Merge "Merge android10-qpr2-s3-release to aosp/master - DO NOT MERGE"

This commit is contained in:
Bill Yi
2020-05-06 15:59:08 +00:00
committed by Gerrit Code Review
3 changed files with 15 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ public class SettingsBaseActivity extends FragmentActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isLockTaskModePinned() && !isSettingsRunOnTop()) {
if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) {
Log.w(TAG, "Devices lock task mode pinned.");
finish();
}
@@ -147,6 +147,13 @@ public class SettingsBaseActivity extends FragmentActivity {
((ViewGroup) findViewById(R.id.content_frame)).addView(view, params);
}
/**
* @return whether or not the activity can be launched from other apps in the pinning screen.
*/
public boolean isLaunchableInTaskModePinned() {
return false;
}
private void onCategoriesChanged() {
final int N = mCategoryListeners.size();
for (int i = 0; i < N; i++) {

View File

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

View File

@@ -89,7 +89,8 @@ public final class PasswordUtils extends com.android.settingslib.Utils {
/* initialPid= */ -1,
getCallingAppPackageName(activityToken),
userId,
message);
message,
false);
} catch (RemoteException e) {
Log.v(TAG, "Could not talk to activity manager.", e);
}