packages/apps/Settings
Revision | e841b738a9f7093077d14dd85bca9b6c9f3b6ba4 (tree) |
---|---|
Zeit | 2020-05-08 11:53:53 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge tag 'android-8.1.0_r76' into oreo-x86
Android 8.1.0 release 76
@@ -255,7 +255,7 @@ public class SettingsActivity extends SettingsDrawerActivity | ||
255 | 255 | protected void onCreate(Bundle savedState) { |
256 | 256 | super.onCreate(savedState); |
257 | 257 | |
258 | - if (isLockTaskModePinned() && !isSettingsRunOnTop()) { | |
258 | + if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) { | |
259 | 259 | Log.w(LOG_TAG, "Devices lock task mode pinned."); |
260 | 260 | finish(); |
261 | 261 | } |
@@ -969,6 +969,13 @@ public class SettingsActivity extends SettingsDrawerActivity | ||
969 | 969 | startActivity(intent); |
970 | 970 | } |
971 | 971 | |
972 | + /** | |
973 | + * @return whether or not the activity can be launched from other apps in the pinning screen. | |
974 | + */ | |
975 | + public boolean isLaunchableInTaskModePinned() { | |
976 | + return false; | |
977 | + } | |
978 | + | |
972 | 979 | private boolean isLockTaskModePinned() { |
973 | 980 | final ActivityManager activityManager = |
974 | 981 | getApplicationContext().getSystemService(ActivityManager.class); |
@@ -134,6 +134,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi | ||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | + @Override | |
138 | + public boolean isLaunchableInTaskModePinned() { | |
139 | + return true; | |
140 | + } | |
141 | + | |
137 | 142 | public void prepareEnterAnimation() { |
138 | 143 | getFragment().prepareEnterAnimation(); |
139 | 144 | } |