summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2021-12-16 17:20:26 -0500
committer Joshua Trask <joshtrask@google.com> 2021-12-16 17:20:26 -0500
commitbd05901f4029112b525732215c430f2bcc3ddfe4 (patch)
tree0614ffee71845bdb522c4369d95d8e7d3896ddb9 /java
parentf202032787b2783ab9e455cc96d6aa2ad3c79fca (diff)
Remove support for "phase 2 delegation."
I had some idea about trying to support both interfaces to the delegate chooser by inspecting the Intent, but I think that's a bad idea (since we may mis-classify Intents that should still be routed to the "full UI" chooser); it's unnecessary; and it's a poor fit for our upcoming "phase 4." A subsequent CL will remove the system-side dispatch. It's safe to do that separately since the system dispatch should never trigger anyways; were the conditions in place to enable the "phase 2" delegation, the system chooser would instead switch over to the delegate, "phase 3"-style, before any "phase 2" target could be selected). Bug: 202165481 Test: Manually verified unbundled-delegation still works. Change-Id: Idfbd9022d3d195e7116b89c9bd2ddb207a15c0a3
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/intentresolver/ChooserActivity.java40
1 files changed, 0 insertions, 40 deletions
diff --git a/java/src/com/android/intentresolver/ChooserActivity.java b/java/src/com/android/intentresolver/ChooserActivity.java
index ad9fe022..0e7adc43 100644
--- a/java/src/com/android/intentresolver/ChooserActivity.java
+++ b/java/src/com/android/intentresolver/ChooserActivity.java
@@ -89,46 +89,6 @@ public final class ChooserActivity extends com.android.internal.app.ChooserActiv
return false;
}
- Intent delegatedIntent = getIntent().getParcelableExtra(Intent.EXTRA_INTENT);
- if (delegatedIntent == null) {
- Log.e(TAG, "No delegated intent");
- return false;
- }
-
- if (tryToHandleAsDelegatedSelectionImmediately(delegatedIntent)) {
- return false;
- }
-
- // This activity was launched from the system-side "springboard" component, and the embedded
- // extra intent is the one that the calling app originally used to launch the system-side
- // component. Treat it as if that's the intent that launched *this* activity directly (as we
- // expect it to be when the unbundling migration is complete). This allows the superclass
- // ChooserActivity implementation to see the same Intent data as it normally would in the
- // system-side implementation.
- setIntent(delegatedIntent);
-
- return true;
- }
-
- /**
- * Try to handle the delegated intent in the style of the earlier unbundled implementations,
- * where the user has already selected a target and we're just supposed to dispatch it. Return
- * whether this was an Intent that we were able to handle in this way.
- *
- * TODO: we don't need to continue to support this usage as we make more progress on the
- * unbundling migration, but before we remove it we should double-check that there's no code
- * path that might result in a client seeing the USE_DELEGATE_CHOOSER flag set to true in
- * DisplayResolveInfo even though they decided not to hand off to the unbundled UI at onCreate.
- */
- private boolean tryToHandleAsDelegatedSelectionImmediately(Intent delegatedIntent) {
-
- if (Intent.ACTION_CHOOSER.equals(delegatedIntent.getAction())) {
- // It looks like we're being invoked for a full chooser, not just the selection.
- return false;
- }
-
- Log.i(TAG, "Dispatching selection delegated from system chooser");
- ChooserHelper.onChoose(this);
return true;
}
}