This commit is contained in:
Jon Atkins 2013-11-04 18:27:51 +00:00
commit b30ce8115d
2 changed files with 12 additions and 4 deletions

View File

@ -23,7 +23,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name="com.cradle.iitc_mobile.IITC_Mobile" android:name=".IITC_Mobile"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTop" android:launchMode="singleTop"
@ -89,11 +89,11 @@
android:name=".share.ShareActivity" android:name=".share.ShareActivity"
android:label="@string/activity_share" android:label="@string/activity_share"
android:noHistory="true" android:noHistory="true"
android:parentActivityName="com.cradle.iitc_mobile.IITC_Mobile" android:parentActivityName=".IITC_Mobile"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"> android:theme="@android:style/Theme.Holo.Light.DarkActionBar">
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value="com.cradle.iitc_mobile.IITC_Mobile"/> android:value=".IITC_Mobile"/>
</activity> </activity>
<activity <activity
@ -136,7 +136,7 @@
<!-- Points to searchable activity so the whole app can invoke search. --> <!-- Points to searchable activity so the whole app can invoke search. -->
<meta-data <meta-data
android:name="android.app.default_searchable" android:name="android.app.default_searchable"
android:value="com.cradle.iitc_mobile.IITC_Mobile"/> android:value=".IITC_Mobile"/>
</application> </application>
</manifest> </manifest>

View File

@ -152,11 +152,19 @@ public class IntentListView extends ListView {
ResolveInfo info = activityList.get(i); ResolveInfo info = activityList.get(i);
ActivityInfo activity = info.activityInfo; ActivityInfo activity = info.activityInfo;
// fix bug in PackageManager - a replaced package name might cause non-exported intents to appear
if (activity.exported == false && !activity.packageName.equals(packageName)) {
activityList.remove(i);
i--;
continue;
}
// remove all IITCm intents, except for SendToClipboard in case Drive is not installed // remove all IITCm intents, except for SendToClipboard in case Drive is not installed
if (activity.packageName.equals(packageName)) { if (activity.packageName.equals(packageName)) {
if (hasCopyIntent || !activity.name.equals(SendToClipboard.class.getCanonicalName())) { if (hasCopyIntent || !activity.name.equals(SendToClipboard.class.getCanonicalName())) {
activityList.remove(i); activityList.remove(i);
i--; i--;
continue;
} }
} }
} }