packages/apps/Settings
修訂 | f8587212e5072723db0a3bcc0311518c5438f8dd (tree) |
---|---|
時間 | 2020-05-06 11:01:14 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge tag 'android-9.0.0_r56' into pie-x86
Android 9.0.0 release 56
@@ -236,7 +236,7 @@ public class SettingsActivity extends SettingsDrawerActivity | ||
236 | 236 | super.onCreate(savedState); |
237 | 237 | Log.d(LOG_TAG, "Starting onCreate"); |
238 | 238 | |
239 | - if (isLockTaskModePinned() && !isSettingsRunOnTop()) { | |
239 | + if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) { | |
240 | 240 | Log.w(LOG_TAG, "Devices lock task mode pinned."); |
241 | 241 | finish(); |
242 | 242 | } |
@@ -810,6 +810,13 @@ public class SettingsActivity extends SettingsDrawerActivity | ||
810 | 810 | return mNextButton; |
811 | 811 | } |
812 | 812 | |
813 | + /** | |
814 | + * @return whether or not the activity can be launched from other apps in the pinning screen. | |
815 | + */ | |
816 | + public boolean isLaunchableInTaskModePinned() { | |
817 | + return false; | |
818 | + } | |
819 | + | |
813 | 820 | @VisibleForTesting |
814 | 821 | Bitmap getBitmapFromXmlResource(int drawableRes) { |
815 | 822 | Drawable drawable = getResources().getDrawable(drawableRes, getTheme()); |
@@ -139,6 +139,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi | ||
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
142 | + @Override | |
143 | + public boolean isLaunchableInTaskModePinned() { | |
144 | + return true; | |
145 | + } | |
146 | + | |
142 | 147 | public void prepareEnterAnimation() { |
143 | 148 | getFragment().prepareEnterAnimation(); |
144 | 149 | } |