mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Use a broadcast receiver instead of a settings observer.
Settings observer doesn't work if a setting is modified in another process, hence we instead register a receiver which listens for a signal from the settings process that the rotation preference has changed. Change-Id: I570e3c67bb64a32347e84ca00a8ac31d9010eac3
This commit is contained in:
@@ -93,6 +93,9 @@ public final class Utilities {
|
||||
private static boolean sForceEnableRotation = isPropertyEnabled(FORCE_ENABLE_ROTATION_PROPERTY);
|
||||
|
||||
public static final String ALLOW_ROTATION_PREFERENCE_KEY = "pref_allowRotation";
|
||||
public static final String SCREEN_ROTATION_SETTING_INTENT =
|
||||
"come.android.launcher3.SCREEN_ORIENTATION_PREF_CHANGED";
|
||||
public static final String SCREEN_ROTATION_SETTING_EXTRA = "screenRotationPref";
|
||||
|
||||
public static boolean isPropertyEnabled(String propertyName) {
|
||||
return Log.isLoggable(propertyName, Log.VERBOSE);
|
||||
|
||||
Reference in New Issue
Block a user