Merge cherrypicks of [10745155, 10743283, 10746098, 10735615, 10743284, 10745369, 10745156, 10745157, 10746136, 10746137, 10745215, 10746138, 10745216, 10745217, 10746139, 10745218, 10743285, 10746118, 10746119, 10745827, 10745158, 10745159, 10743224, 10743225, 10745492] into qt-qpr2-release

Change-Id: I1da09579d5ce7b2c67b4a7db381c779a5c5ccb6b
This commit is contained in:
android-build-team Robot
2020-03-19 04:53:30 +00:00
3 changed files with 15 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ public class SettingsBaseActivity extends FragmentActivity {
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if (isLockTaskModePinned() && !isSettingsRunOnTop()) { if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) {
Log.w(TAG, "Devices lock task mode pinned."); Log.w(TAG, "Devices lock task mode pinned.");
finish(); finish();
} }
@@ -147,6 +147,13 @@ public class SettingsBaseActivity extends FragmentActivity {
((ViewGroup) findViewById(R.id.content_frame)).addView(view, params); ((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() { private void onCategoriesChanged() {
final int N = mCategoryListeners.size(); final int N = mCategoryListeners.size();
for (int i = 0; i < N; i++) { 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() { public void prepareEnterAnimation() {
getFragment().prepareEnterAnimation(); getFragment().prepareEnterAnimation();
} }

View File

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