Set exported to "false" again and include a fix for wrong PackageManager queries
This commit is contained in:
parent
5817052cbd
commit
b678d83afd
@ -100,7 +100,7 @@
|
||||
android:name=".share.SendToClipboard"
|
||||
android:enabled="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true"
|
||||
android:exported="false"
|
||||
android:icon="@drawable/copy"
|
||||
android:label="@string/activity_share_to_clipboard"
|
||||
android:noHistory="false">
|
||||
|
@ -152,11 +152,19 @@ public class IntentListView extends ListView {
|
||||
ResolveInfo info = activityList.get(i);
|
||||
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
|
||||
if (activity.packageName.equals(packageName)) {
|
||||
if (hasCopyIntent || !activity.name.equals(SendToClipboard.class.getCanonicalName())) {
|
||||
activityList.remove(i);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user