• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revisionafdfe99117dbb6481d349b79d3c55dc2f343e9d0 (tree)
Zeit2020-03-13 05:34:30
AutorMill Chen <millchen@goog...>
CommiterAnis Assi

Log Message

RESTRICT AUTOMERGE
Allow LockScreenPattern to be launched in the pinning screen

If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.

In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.

Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
Merged-In: I8070de79a83350d1658efcb19e983669dad0e673
(cherry picked from commit 101c9be6c1f7f89cb1b8a788b8e6e62358684d94)

Ändern Zusammenfassung

Diff

--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -255,7 +255,7 @@ public class SettingsActivity extends SettingsDrawerActivity
255255 protected void onCreate(Bundle savedState) {
256256 super.onCreate(savedState);
257257
258- if (isLockTaskModePinned() && !isSettingsRunOnTop()) {
258+ if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) {
259259 Log.w(LOG_TAG, "Devices lock task mode pinned.");
260260 finish();
261261 }
@@ -964,6 +964,13 @@ public class SettingsActivity extends SettingsDrawerActivity
964964 startActivity(intent);
965965 }
966966
967+ /**
968+ * @return whether or not the activity can be launched from other apps in the pinning screen.
969+ */
970+ public boolean isLaunchableInTaskModePinned() {
971+ return false;
972+ }
973+
967974 private boolean isLockTaskModePinned() {
968975 final ActivityManager activityManager =
969976 getApplicationContext().getSystemService(ActivityManager.class);
--- a/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialBaseActivity.java
@@ -134,6 +134,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
134134 }
135135 }
136136
137+ @Override
138+ public boolean isLaunchableInTaskModePinned() {
139+ return true;
140+ }
141+
137142 public void prepareEnterAnimation() {
138143 getFragment().prepareEnterAnimation();
139144 }