Loading res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -183,8 +183,6 @@ <string name="allow_rotation_title">Allow Home screen rotation</string> <!-- Text explaining when the home screen will get rotated. [CHAR LIMIT=100] --> <string name="allow_rotation_desc">When phone is rotated</string> <!-- Text explaining that rotation is disabled in Display settings. 'Display' refers to the Display section in system settings [CHAR LIMIT=100] --> <string name="allow_rotation_blocked_desc">Current Display setting doesn\'t permit rotation</string> <!-- Title for Notification dots setting. Tapping this will link to the system Notifications settings screen where the user can turn off notification dots globally. [CHAR LIMIT=50] --> <string name="icon_badging_title">Notification dots</string> <!-- Text to indicate that the system icon badging setting is on [CHAR LIMIT=100] --> Loading res/xml/launcher_preferences.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <SwitchPreference android:key="pref_allowRotation" android:title="@string/allow_rotation_title" android:summary="@string/allow_rotation_desc" android:defaultValue="@bool/allow_rotation" android:persistent="true" /> Loading src/com/android/launcher3/SettingsActivity.java +0 −28 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ public class SettingsActivity extends Activity { public static class LauncherSettingsFragment extends PreferenceFragment { private IconBadgingObserver mIconBadgingObserver; private RotationLockObserver mRotationLockObserver; private String mPreferenceKey; private boolean mPreferenceHighlighted = false; Loading Loading @@ -134,12 +133,6 @@ public class SettingsActivity extends Activity { // Launcher supports rotation by default. No need to show this setting. getPreferenceScreen().removePreference(rotationPref); } else { mRotationLockObserver = new RotationLockObserver(rotationPref, resolver); // Register a content observer to listen for system setting changes while // this UI is active. mRotationLockObserver.register(Settings.System.ACCELEROMETER_ROTATION); // Initialize the UI once rotationPref.setDefaultValue(getAllowRotationDefaultValue()); } Loading Loading @@ -201,10 +194,6 @@ public class SettingsActivity extends Activity { mIconBadgingObserver.unregister(); mIconBadgingObserver = null; } if (mRotationLockObserver != null) { mRotationLockObserver.unregister(); mRotationLockObserver = null; } super.onDestroy(); } Loading @@ -228,23 +217,6 @@ public class SettingsActivity extends Activity { } } private static class RotationLockObserver extends SettingsObserver.System { private final Preference mRotationPref; public RotationLockObserver(Preference rotationPref, ContentResolver resolver) { super(resolver); mRotationPref = rotationPref; } @Override public void onSettingChanged(boolean enabled) { mRotationPref.setEnabled(enabled); mRotationPref.setSummary(enabled ? R.string.allow_rotation_desc : R.string.allow_rotation_blocked_desc); } } /** * Content observer which listens for system badging setting changes, * and updates the launcher badging setting subtext accordingly. Loading Loading
res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -183,8 +183,6 @@ <string name="allow_rotation_title">Allow Home screen rotation</string> <!-- Text explaining when the home screen will get rotated. [CHAR LIMIT=100] --> <string name="allow_rotation_desc">When phone is rotated</string> <!-- Text explaining that rotation is disabled in Display settings. 'Display' refers to the Display section in system settings [CHAR LIMIT=100] --> <string name="allow_rotation_blocked_desc">Current Display setting doesn\'t permit rotation</string> <!-- Title for Notification dots setting. Tapping this will link to the system Notifications settings screen where the user can turn off notification dots globally. [CHAR LIMIT=50] --> <string name="icon_badging_title">Notification dots</string> <!-- Text to indicate that the system icon badging setting is on [CHAR LIMIT=100] --> Loading
res/xml/launcher_preferences.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <SwitchPreference android:key="pref_allowRotation" android:title="@string/allow_rotation_title" android:summary="@string/allow_rotation_desc" android:defaultValue="@bool/allow_rotation" android:persistent="true" /> Loading
src/com/android/launcher3/SettingsActivity.java +0 −28 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ public class SettingsActivity extends Activity { public static class LauncherSettingsFragment extends PreferenceFragment { private IconBadgingObserver mIconBadgingObserver; private RotationLockObserver mRotationLockObserver; private String mPreferenceKey; private boolean mPreferenceHighlighted = false; Loading Loading @@ -134,12 +133,6 @@ public class SettingsActivity extends Activity { // Launcher supports rotation by default. No need to show this setting. getPreferenceScreen().removePreference(rotationPref); } else { mRotationLockObserver = new RotationLockObserver(rotationPref, resolver); // Register a content observer to listen for system setting changes while // this UI is active. mRotationLockObserver.register(Settings.System.ACCELEROMETER_ROTATION); // Initialize the UI once rotationPref.setDefaultValue(getAllowRotationDefaultValue()); } Loading Loading @@ -201,10 +194,6 @@ public class SettingsActivity extends Activity { mIconBadgingObserver.unregister(); mIconBadgingObserver = null; } if (mRotationLockObserver != null) { mRotationLockObserver.unregister(); mRotationLockObserver = null; } super.onDestroy(); } Loading @@ -228,23 +217,6 @@ public class SettingsActivity extends Activity { } } private static class RotationLockObserver extends SettingsObserver.System { private final Preference mRotationPref; public RotationLockObserver(Preference rotationPref, ContentResolver resolver) { super(resolver); mRotationPref = rotationPref; } @Override public void onSettingChanged(boolean enabled) { mRotationPref.setEnabled(enabled); mRotationPref.setSummary(enabled ? R.string.allow_rotation_desc : R.string.allow_rotation_blocked_desc); } } /** * Content observer which listens for system badging setting changes, * and updates the launcher badging setting subtext accordingly. Loading