From 51b7955cfaed63451be630a9a701d14136328be5 Mon Sep 17 00:00:00 2001 From: Yi Jiang Date: Thu, 24 Jun 2021 15:19:20 -0700 Subject: [PATCH] Changes default timeout for rotation memorization. Rotation memorization is an optimization for smart-autorotate. It will memorize last screen rotation before the screen turns off. And then use that memorized rotation next time when the phone get unlocked. The default timeout for the rotation memorization is 5 minutes. Based on the droidfood experience, we decided to reduce it to 10 seconds. Test: tested locally. Bug: 192010410 Change-Id: Iad49eaa0399cfd4c02a014920b61a36aa171ce68 --- .../java/com/android/server/wm/WindowOrientationListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowOrientationListener.java b/services/core/java/com/android/server/wm/WindowOrientationListener.java index 6a4767a21dc95..0ded8fb313cdb 100644 --- a/services/core/java/com/android/server/wm/WindowOrientationListener.java +++ b/services/core/java/com/android/server/wm/WindowOrientationListener.java @@ -68,7 +68,7 @@ public abstract class WindowOrientationListener { private static final String KEY_ROTATION_MEMORIZATION_TIMEOUT = "rotation_memorization_timeout_millis"; private static final long DEFAULT_ROTATION_RESOLVER_TIMEOUT_MILLIS = 700L; - private static final long DEFAULT_ROTATION_MEMORIZATION_TIMEOUT_MILLIS = 300_000L; // 5 minutes + private static final long DEFAULT_ROTATION_MEMORIZATION_TIMEOUT_MILLIS = 10_000L; // 10 seconds private Handler mHandler; private SensorManager mSensorManager;