summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2022-12-07 17:59:12 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-12-07 17:59:12 +0000
commit93587561b4515fb1a96b0763fb730d4940292d0c (patch)
tree297ea71abe66fe33f6ef51ecfe667ff2a7cc8c24 /java/src
parentbb41b308393d013f98b8c94aa2b7b18bd18d2138 (diff)
parente366d8cd25624e35bb0eeb5e1d46cbfdf12a4ae5 (diff)
Merge "Fail startup via ResolverActivity.super_onCreate()" into tm-qpr-dev
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/intentresolver/ChooserActivity.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/java/src/com/android/intentresolver/ChooserActivity.java b/java/src/com/android/intentresolver/ChooserActivity.java
index ebf0d203..ba121050 100644
--- a/java/src/com/android/intentresolver/ChooserActivity.java
+++ b/java/src/com/android/intentresolver/ChooserActivity.java
@@ -238,17 +238,12 @@ public class ChooserActivity extends ResolverActivity implements
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
| Intent.FLAG_GRANT_PREFIX_URI_PERMISSION;
- /* TODO: this is `nullable` *primarily* because we have to defer the assignment til onCreate().
- * We make the only assignment there, and *expect* it to be ready by the time we ever use it --
+ /* TODO: this is `nullable` because we have to defer the assignment til onCreate(). We make the
+ * only assignment there, and expect it to be ready by the time we ever use it --
* someday if we move all the usage to a component with a narrower lifecycle (something that
* matches our Activity's create/destroy lifecycle, not its Java object lifecycle) then we
- * should be able to make this assignment as "final." Unfortunately, for now we also have
- * a vestigial design where ChooserActivity.onCreate() can invalidate a request, but it still
- * has to call up to ResolverActivity.onCreate() before closing, and the base method delegates
- * back down to other methods in ChooserActivity that aren't really relevant if we're closing
- * (and so they'd normally want to assume it was a valid "creation," with non-null parameters).
- * Any client null checks are workarounds for this condition that can be removed once that
- * design is cleaned up. */
+ * should be able to make this assignment as "final."
+ */
@Nullable
private ChooserRequestParameters mChooserRequest;
@@ -332,7 +327,7 @@ public class ChooserActivity extends ResolverActivity implements
} catch (IllegalArgumentException e) {
Log.e(TAG, "Caller provided invalid Chooser request parameters", e);
finish();
- super.onCreate(null);
+ super_onCreate(null);
return;
}
@@ -1153,10 +1148,6 @@ public class ChooserActivity extends ResolverActivity implements
@Override
public void addUseDifferentAppLabelIfNecessary(ResolverListAdapter adapter) {
- if (mChooserRequest == null) {
- return;
- }
-
if (mChooserRequest.getCallerChooserTargets().size() > 0) {
mChooserMultiProfilePagerAdapter.getActiveListAdapter().addServiceResults(
/* origTarget */ null,