Merge "RESTRICT AUTOMERGE Allow LockScreenPattern to be launched in the pinning screen" into pi-dev

This commit is contained in:
TreeHugger Robot
2020-03-12 01:35:21 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 1 deletions

View File

@@ -235,7 +235,7 @@ public class SettingsActivity extends SettingsDrawerActivity
super.onCreate(savedState);
Log.d(LOG_TAG, "Starting onCreate");
if (isLockTaskModePinned() && !isSettingsRunOnTop()) {
if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) {
Log.w(LOG_TAG, "Devices lock task mode pinned.");
finish();
}
@@ -804,6 +804,13 @@ public class SettingsActivity extends SettingsDrawerActivity
return mNextButton;
}
/**
* @return whether or not the activity can be launched from other apps in the pinning screen.
*/
public boolean isLaunchableInTaskModePinned() {
return false;
}
@VisibleForTesting
Bitmap getBitmapFromXmlResource(int drawableRes) {
Drawable drawable = getResources().getDrawable(drawableRes, getTheme());

View File

@@ -139,6 +139,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
}
}
@Override
public boolean isLaunchableInTaskModePinned() {
return true;
}
public void prepareEnterAnimation() {
getFragment().prepareEnterAnimation();
}