diff options
author | Kenny Guy <kennyguy@google.com> | 2015-01-21 16:13:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-21 16:13:24 +0000 |
commit | 06ab0ca4812450ec297722957e18b34cbfa733b2 (patch) | |
tree | 3129a2da5064528e1e01d8e80d2fef50b1ef77fc /core | |
parent | af69fcd0bd4878145214dc16adbf5ef614e7f3a4 (diff) | |
parent | 2b43c73e66d99a5ccc8a23fd1c4e2028f9dd05f2 (diff) | |
download | frameworks_base-06ab0ca4812450ec297722957e18b34cbfa733b2.zip frameworks_base-06ab0ca4812450ec297722957e18b34cbfa733b2.tar.gz frameworks_base-06ab0ca4812450ec297722957e18b34cbfa733b2.tar.bz2 |
Merge "Only hide cross profile disclosure when showing resolver." into lmp-mr1-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/app/IntentForwarderActivity.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java index 9656a21..7c1308f 100644 --- a/core/java/com/android/internal/app/IntentForwarderActivity.java +++ b/core/java/com/android/internal/app/IntentForwarderActivity.java @@ -96,9 +96,12 @@ public class IntentForwarderActivity extends Activity { final android.content.pm.ResolveInfo ri = getPackageManager().resolveActivityAsUser( newIntent, MATCH_DEFAULT_ONLY, targetUserId); - // Only show a disclosure if this is a normal (non-OS) app - final boolean shouldShowDisclosure = - !UserHandle.isSameApp(ri.activityInfo.applicationInfo.uid, Process.SYSTEM_UID); + // Don't show the disclosure if next activity is ResolverActivity or ChooserActivity + // as those will already have shown work / personal as neccesary etc. + final boolean shouldShowDisclosure = ri == null || ri.activityInfo == null || + !"android".equals(ri.activityInfo.packageName) || + !(ResolverActivity.class.getName().equals(ri.activityInfo.name) + || ChooserActivity.class.getName().equals(ri.activityInfo.name)); try { startActivityAsCaller(newIntent, null, targetUserId); |