summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2014-05-20 23:15:42 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-20 23:15:42 +0000
commit92dfff4bc8ee5fc059a42a256f9a9f7a8e4b1b37 (patch)
tree9b84db092449e11b9c5e227c244f937331780ed4 /policy
parent90b6b63d1dd89cb1816cb5226a0f83f6817c140a (diff)
parent99c6e072aa6681b581a4c2308d7cd4a72948e27c (diff)
downloadframeworks_base-92dfff4bc8ee5fc059a42a256f9a9f7a8e4b1b37.zip
frameworks_base-92dfff4bc8ee5fc059a42a256f9a9f7a8e4b1b37.tar.gz
frameworks_base-92dfff4bc8ee5fc059a42a256f9a9f7a8e4b1b37.tar.bz2
Merge "Disable swipe-to-reveal nav bar / status bar during setup"
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java5
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java12
2 files changed, 14 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java
index 5602206..a4c2ddd 100644
--- a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java
+++ b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java
@@ -115,13 +115,14 @@ public class ImmersiveModeConfirmation {
}
}
- public void immersiveModeChanged(String pkg, boolean isImmersiveMode) {
+ public void immersiveModeChanged(String pkg, boolean isImmersiveMode,
+ boolean userSetupComplete) {
mHandler.removeMessages(H.SHOW);
if (isImmersiveMode) {
final boolean disabled = PolicyControl.disableImmersiveConfirmation(pkg);
if (DEBUG) Slog.d(TAG, String.format("immersiveModeChanged() disabled=%s mConfirmed=%s",
disabled, mConfirmed));
- if (!disabled && (DEBUG_SHOW_EVERY_TIME || !mConfirmed)) {
+ if (!disabled && (DEBUG_SHOW_EVERY_TIME || !mConfirmed) && userSetupComplete) {
mHandler.sendEmptyMessageDelayed(H.SHOW, mShowDelayMs);
}
} else {
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 6390a69..d0305e0 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -775,6 +775,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0;
}
+ boolean isUserSetupComplete() {
+ return Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
+ }
+
private void handleLongPressOnHome() {
if (mLongPressOnHomeBehavior != LONG_PRESS_HOME_NOTHING) {
mHomeConsumed = true;
@@ -4294,6 +4299,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
private void requestTransientBars(WindowState swipeTarget) {
synchronized (mWindowManagerFuncs.getWindowManagerLock()) {
+ if (!isUserSetupComplete()) {
+ // Swipe-up for navigation bar is disabled during setup
+ return;
+ }
boolean sb = mStatusBarController.checkShowTransientBarLw();
boolean nb = mNavigationBarController.checkShowTransientBarLw();
if (sb || nb) {
@@ -5270,7 +5279,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
boolean newImmersiveMode = isImmersiveMode(vis);
if (win != null && oldImmersiveMode != newImmersiveMode) {
final String pkg = win.getOwningPackage();
- mImmersiveModeConfirmation.immersiveModeChanged(pkg, newImmersiveMode);
+ mImmersiveModeConfirmation.immersiveModeChanged(pkg, newImmersiveMode,
+ isUserSetupComplete());
}
vis = mNavigationBarController.updateVisibilityLw(transientNavBarAllowed, oldVis, vis);