summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java10
-rw-r--r--policy/src/com/android/internal/policy/impl/WindowOrientationListener.java7
2 files changed, 9 insertions, 8 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index ccbef6b..a426ac2 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -841,7 +841,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// Detect user pressing the power button in panic when an application has
// taken over the whole screen.
boolean panic = mImmersiveModeConfirmation.onPowerKeyDown(interactive,
- event.getDownTime(), isImmersiveMode(mLastSystemUiFlags));
+ SystemClock.elapsedRealtime(), isImmersiveMode(mLastSystemUiFlags));
if (panic) {
mHandler.post(mRequestTransientNav);
}
@@ -1439,8 +1439,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density;
int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;
- // Allow the navigation bar to move on small devices (phones).
- mNavigationBarCanMove = shortSizeDp < 600;
+ // Allow the navigation bar to move on non-square small devices (phones).
+ mNavigationBarCanMove = width != height && shortSizeDp < 600;
mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
// Allow a system property to override this. Used by the emulator.
@@ -4177,7 +4177,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
topIsFullscreen = (fl & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0
|| (mLastSystemUiFlags & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0;
// The subtle difference between the window for mTopFullscreenOpaqueWindowState
- // and mTopIsFullscreen is that that mTopIsFullscreen is set only if the window
+ // and mTopIsFullscreen is that mTopIsFullscreen is set only if the window
// has the FLAG_FULLSCREEN set. Not sure if there is another way that to be the
// case though.
if (mStatusBarController.isTransientShowing()) {
@@ -4751,6 +4751,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
msg.setAsynchronous(true);
msg.sendToTarget();
}
+ break;
}
}
@@ -6117,6 +6118,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (denyTransientStatus || denyTransientNav) {
// clear the clearable flags instead
clearClearableFlagsLw();
+ vis &= ~View.SYSTEM_UI_CLEARABLE_FLAGS;
}
vis = mStatusBarController.updateVisibilityLw(transientStatusBarAllowed, oldVis, vis);
diff --git a/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java b/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
index 704da33..2f60d55 100644
--- a/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
+++ b/policy/src/com/android/internal/policy/impl/WindowOrientationListener.java
@@ -23,7 +23,6 @@ import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Handler;
import android.os.SystemProperties;
-import android.util.FloatMath;
import android.util.Log;
import android.util.Slog;
import android.util.TimeUtils;
@@ -446,7 +445,7 @@ public abstract class WindowOrientationListener {
if (LOG) {
Slog.v(TAG, "Raw acceleration vector: "
+ "x=" + x + ", y=" + y + ", z=" + z
- + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z));
+ + ", magnitude=" + Math.sqrt(x * x + y * y + z * z));
}
// Apply a low-pass filter to the acceleration up vector in cartesian space.
@@ -473,7 +472,7 @@ public abstract class WindowOrientationListener {
if (LOG) {
Slog.v(TAG, "Filtered acceleration vector: "
+ "x=" + x + ", y=" + y + ", z=" + z
- + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z));
+ + ", magnitude=" + Math.sqrt(x * x + y * y + z * z));
}
skipSample = false;
}
@@ -487,7 +486,7 @@ public abstract class WindowOrientationListener {
boolean isSwinging = false;
if (!skipSample) {
// Calculate the magnitude of the acceleration vector.
- final float magnitude = FloatMath.sqrt(x * x + y * y + z * z);
+ final float magnitude = (float) Math.sqrt(x * x + y * y + z * z);
if (magnitude < NEAR_ZERO_MAGNITUDE) {
if (LOG) {
Slog.v(TAG, "Ignoring sensor data, magnitude too close to zero.");