diff --git a/mobile/src/com/cradle/iitc_mobile/share/IntentListView.java b/mobile/src/com/cradle/iitc_mobile/share/IntentListView.java index 26a2beb1..8aa118e9 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/IntentListView.java +++ b/mobile/src/com/cradle/iitc_mobile/share/IntentListView.java @@ -59,23 +59,22 @@ public class IntentListView extends ListView { private static final HashSet KNOWN_COPY_HANDLERS = new HashSet(); - private static void setupKnownCopyHandlers() { - if (!KNOWN_COPY_HANDLERS.isEmpty()) { - return; + static { + if (KNOWN_COPY_HANDLERS.isEmpty()) { + + KNOWN_COPY_HANDLERS.add(new CopyHandler( + "com.google.android.apps.docs", + "com.google.android.apps.docs.app.SendTextToClipboardActivity")); + + KNOWN_COPY_HANDLERS.add(new CopyHandler( + "com.aokp.romcontrol", + "com.aokp.romcontrol.ShareToClipboard")); } - - KNOWN_COPY_HANDLERS.add(new CopyHandler( - "com.google.android.apps.docs", - "com.google.android.apps.docs.app.SendTextToClipboardActivity")); - - KNOWN_COPY_HANDLERS.add(new CopyHandler( - "com.aokp.romcontrol", - "com.aokp.romcontrol.ShareToClipboard")); } + private final HashMap mActivities = new HashMap(); private IntentAdapter mAdapter; private PackageManager mPackageManager; - private final HashMap mActivities = new HashMap(); public IntentListView(Context context) { super(context); @@ -93,8 +92,6 @@ public class IntentListView extends ListView { } private void init() { - setupKnownCopyHandlers(); - mPackageManager = getContext().getPackageManager(); mAdapter = new IntentAdapter(); setAdapter(mAdapter);