diff options
| author | 2023-05-12 08:24:01 +0000 | |
|---|---|---|
| committer | 2023-05-12 08:24:01 +0000 | |
| commit | 393d7edf82a7b4b9ec02fd87b53fe61fada0005f (patch) | |
| tree | 886ea8e96201802621a373f062a1b63f76eb7076 /java/src/com | |
| parent | 53f4d6acd026e8efc16f8923d53d88110ba1ac46 (diff) | |
| parent | 0e19f669c3703a6c29baece731b09011e01e1790 (diff) | |
Merge "Remove auto-launching for single target, multiple tabs" into udc-dev
Diffstat (limited to 'java/src/com')
| -rw-r--r-- | java/src/com/android/intentresolver/ResolverActivity.java | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/java/src/com/android/intentresolver/ResolverActivity.java b/java/src/com/android/intentresolver/ResolverActivity.java index ced7bf58..5205f9b6 100644 --- a/java/src/com/android/intentresolver/ResolverActivity.java +++ b/java/src/com/android/intentresolver/ResolverActivity.java @@ -1864,8 +1864,10 @@ public class ResolverActivity extends FragmentActivity implements } else if (numberOfProfiles == 2 && mMultiProfilePagerAdapter.getActiveListAdapter().isTabLoaded() && mMultiProfilePagerAdapter.getInactiveListAdapter().isTabLoaded() - && (maybeAutolaunchIfNoAppsOnInactiveTab() - || maybeAutolaunchIfCrossProfileSupported())) { + && maybeAutolaunchIfCrossProfileSupported()) { + // TODO(b/280988288): If the ChooserActivity is shown we should consider showing the + // correct intent-picker UIs (e.g., mini-resolver) if it was launched without + // ACTION_SEND. return true; } return false; @@ -1892,23 +1894,6 @@ public class ResolverActivity extends FragmentActivity implements return false; } - private boolean maybeAutolaunchIfNoAppsOnInactiveTab() { - int count = mMultiProfilePagerAdapter.getActiveListAdapter().getUnfilteredCount(); - if (count != 1) { - return false; - } - ResolverListAdapter inactiveListAdapter = - mMultiProfilePagerAdapter.getInactiveListAdapter(); - if (inactiveListAdapter.getUnfilteredCount() != 0) { - return false; - } - TargetInfo target = mMultiProfilePagerAdapter.getActiveListAdapter() - .targetInfoForPosition(0, false); - safelyStartActivity(target); - finish(); - return true; - } - /** * When we have a personal and a work profile, we auto launch in the following scenario: * - There is 1 resolved target on each profile |