summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mark Renouf <mrenouf@google.com> 2022-03-09 10:35:48 -0500
committer Mark Renouf <mrenouf@google.com> 2022-03-23 14:55:39 +0000
commit3782660d736b4de72a13eced643afc06b9438170 (patch)
tree85e9ea40eacca39b50507e938785d09b913422a8
parent7da1e7d30c8559db65a53b95a3ca848f2cd958e8 (diff)
Removes 'mIsHeadlessSpringboardActivity'
Leftovers from delegate/springboard refactoring path Change-Id: I5557cae095a112a1e122a1edf7dac07d42feca4e
-rw-r--r--core/java/com/android/internal/app/ChooserActivity.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 7c6c8685330d..ddd6860b1ba4 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -153,18 +153,6 @@ public class ChooserActivity extends ResolverActivity implements
SelectableTargetInfoCommunicator {
private static final String TAG = "ChooserActivity";
- /**
- * Whether this chooser is operating in "headless springboard" mode (as determined during
- * onCreate). In this mode, our activity sits in the background and waits for the new
- * "unbundled" chooser to handle the Sharesheet experience; the system ChooserActivity is
- * responsible only for providing the startActivityAsCaller permission token and keeping it
- * valid for the life of the unbundled delegate activity.
- *
- * TODO: when the unbundled chooser is fully launched, the system-side "springboard" can use a
- * simpler implementation that doesn't inherit from ResolverActivity.
- */
- private boolean mIsHeadlessSpringboardActivity;
-
private AppPredictor mPersonalAppPredictor;
private AppPredictor mWorkAppPredictor;
private boolean mShouldDisplayLandscape;
@@ -260,11 +248,6 @@ public class ChooserActivity extends ResolverActivity implements
private static final float DIRECT_SHARE_EXPANSION_RATE = 0.78f;
- private boolean mEnableChooserDelegate =
- DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI,
- SystemUiDeviceConfigFlags.USE_DELEGATE_CHOOSER,
- false);
-
private static final int DEFAULT_SALT_EXPIRATION_DAYS = 7;
private int mMaxHashSaltDays = DeviceConfig.getInt(DeviceConfig.NAMESPACE_SYSTEMUI,
SystemUiDeviceConfigFlags.HASH_SALT_MAX_DAYS,
@@ -531,12 +514,6 @@ public class ChooserActivity extends ResolverActivity implements
@Override
protected void onCreate(Bundle savedInstanceState) {
- if (handOverToDelegateChooser()) {
- super_onCreate(savedInstanceState);
- mIsHeadlessSpringboardActivity = true;
- return;
- }
-
final long intentReceivedTime = System.currentTimeMillis();
getChooserActivityLogger().logSharesheetTriggered();
// This is the only place this value is being set. Effectively final.
@@ -752,56 +729,6 @@ public class ChooserActivity extends ResolverActivity implements
postponeEnterTransition();
}
- private boolean handOverToDelegateChooser() {
- // Check the explicit classname so that we don't interfere with the flow of any subclasses.
- if (!this.getClass().getName().equals("com.android.internal.app.ChooserActivity")
- || !mEnableChooserDelegate) {
- return false;
- }
-
- Intent delegationIntent = new Intent();
- final ComponentName delegateActivity = ComponentName.unflattenFromString(
- Resources.getSystem().getString(R.string.config_chooserActivity));
- delegationIntent.setComponent(delegateActivity);
- delegationIntent.putExtra(Intent.EXTRA_INTENT, getIntent());
- delegationIntent.addFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
-
- // Don't close until the delegate finishes, or the token will be invalidated.
- mAwaitingDelegateResponse = true;
- startActivityForResult(delegationIntent, REQUEST_CODE_RETURN_FROM_DELEGATE_CHOOSER);
- return true;
- }
-
- @Override
- protected void onRestart() {
- if (mIsHeadlessSpringboardActivity) {
- super_onRestart();
- return;
- }
-
- super.onRestart();
- }
-
- @Override
- protected void onSaveInstanceState(Bundle outState) {
- if (mIsHeadlessSpringboardActivity) {
- super_onSaveInstanceState(outState);
- return;
- }
-
- super.onSaveInstanceState(outState);
- }
-
- @Override
- protected void onRestoreInstanceState(Bundle savedInstanceState) {
- if (mIsHeadlessSpringboardActivity) {
- super_onRestoreInstanceState(savedInstanceState);
- return;
- }
-
- super.onRestoreInstanceState(savedInstanceState);
- }
-
@Override
protected int appliedThemeResId() {
return R.style.Theme_DeviceDefault_Chooser;
@@ -1061,11 +988,6 @@ public class ChooserActivity extends ResolverActivity implements
@Override
public void onConfigurationChanged(Configuration newConfig) {
- if (mIsHeadlessSpringboardActivity) {
- super_onConfigurationChanged(newConfig);
- return;
- }
-
super.onConfigurationChanged(newConfig);
ViewPager viewPager = findViewById(R.id.profile_pager);
if (viewPager.isLayoutRtl()) {
@@ -1618,10 +1540,6 @@ public class ChooserActivity extends ResolverActivity implements
protected void onDestroy() {
super.onDestroy();
- if (mIsHeadlessSpringboardActivity) {
- return;
- }
-
if (mRefinementResultReceiver != null) {
mRefinementResultReceiver.destroy();
mRefinementResultReceiver = null;