Start logging rotation lock history + include caller information

There have been a few reports on foldables where rotation lock suddenly
changed, without user interaction.
Adding these logs will make it easier to debug the issue.

Bug: 289023967
Bug: 289534937
Bug: 279685215
Test: Manually - Change rotation lock and check logs in dumpsys
Change-Id: I2a877e7b47c863871a2c6ba29ce46e63d28c8008
This commit is contained in:
Chris Göllner
2023-07-14 16:35:16 +01:00
parent f357f32284
commit f09a5ce94c
5 changed files with 11 additions and 6 deletions

View File

@@ -30,12 +30,13 @@ public class ShadowRotationPolicy {
private static boolean rotationSupported = true;
@Implementation
protected static void setRotationLock(Context context, final boolean enabled) {
protected static void setRotationLock(Context context, final boolean enabled, String caller) {
rotationLockEnabled = enabled;
}
@Implementation
protected static void setRotationLockForAccessibility(Context context, final boolean enabled) {
protected static void setRotationLockForAccessibility(
Context context, final boolean enabled, String caller) {
rotationLockEnabled = enabled;
}