Merge "Start logging rotation lock history + include caller information" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
51e3fc3388
@@ -54,7 +54,8 @@ public class LockScreenRotationPreferenceController extends TogglePreferenceCont
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean setChecked(boolean isChecked) {
|
public boolean setChecked(boolean isChecked) {
|
||||||
RotationPolicy.setRotationLock(mContext, !isChecked);
|
RotationPolicy.setRotationLock(mContext, !isChecked,
|
||||||
|
/* caller= */ "LockScreenRotationPreferenceController#setChecked");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -103,7 +103,8 @@ public class AutoRotatePreferenceController extends TogglePreferenceController i
|
|||||||
final boolean isLocked = !isChecked;
|
final boolean isLocked = !isChecked;
|
||||||
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATION_LOCK,
|
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATION_LOCK,
|
||||||
isLocked);
|
isLocked);
|
||||||
RotationPolicy.setRotationLock(mContext, isLocked);
|
RotationPolicy.setRotationLock(mContext, isLocked,
|
||||||
|
/* caller= */ "AutoRotatePreferenceController#setChecked");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -82,7 +82,8 @@ public class AutoRotateSwitchBarController extends SettingsMainSwitchPreferenceC
|
|||||||
final boolean isLocked = !isChecked;
|
final boolean isLocked = !isChecked;
|
||||||
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATE_ROTATE_MASTER_TOGGLE,
|
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATE_ROTATE_MASTER_TOGGLE,
|
||||||
isLocked);
|
isLocked);
|
||||||
RotationPolicy.setRotationLock(mContext, isLocked);
|
RotationPolicy.setRotationLock(mContext, isLocked,
|
||||||
|
/* caller= */ "AutoRotateSwitchBarController#setChecked");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -169,7 +169,8 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
|||||||
final boolean isLocked = !isChecked;
|
final boolean isLocked = !isChecked;
|
||||||
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATION_LOCK,
|
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ROTATION_LOCK,
|
||||||
isLocked);
|
isLocked);
|
||||||
RotationPolicy.setRotationLock(mContext, isLocked);
|
RotationPolicy.setRotationLock(mContext, isLocked,
|
||||||
|
/* caller= */ "SmartAutoRotatePreferenceController#setChecked");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,12 +30,13 @@ public class ShadowRotationPolicy {
|
|||||||
private static boolean rotationSupported = true;
|
private static boolean rotationSupported = true;
|
||||||
|
|
||||||
@Implementation
|
@Implementation
|
||||||
protected static void setRotationLock(Context context, final boolean enabled) {
|
protected static void setRotationLock(Context context, final boolean enabled, String caller) {
|
||||||
rotationLockEnabled = enabled;
|
rotationLockEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Implementation
|
@Implementation
|
||||||
protected static void setRotationLockForAccessibility(Context context, final boolean enabled) {
|
protected static void setRotationLockForAccessibility(
|
||||||
|
Context context, final boolean enabled, String caller) {
|
||||||
rotationLockEnabled = enabled;
|
rotationLockEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user