From fff0d2390d1fd91ee1d9caca3a37ffc959ac1231 Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Mon, 10 Nov 2014 10:35:02 -0800 Subject: Revert Themes button to Settings button Remove the themes button in the overview panel and add back the Settings button instead. Conflicts: res/drawable-hdpi/ic_setting.png res/drawable-hdpi/ic_setting_pressed.png res/drawable-mdpi/ic_setting.png res/drawable-mdpi/ic_setting_pressed.png res/drawable-xhdpi/ic_setting.png res/drawable-xhdpi/ic_setting_pressed.png res/drawable-xxhdpi/ic_setting.png res/drawable-xxhdpi/ic_setting_pressed.png res/drawable/setting_button.xml res/drawable/settings_button.xml res/drawable/themes_button.xml res/layout/settings_pane.xml res/values/cm_strings.xml src/com/android/launcher3/Launcher.java src/com/android/launcher3/OverviewSettingsPanel.java Change-Id: Ia7517b508ec99d5c8070b960e3de35bd9b7e36fa --- res/drawable/settings_button.xml | 21 +++++++++++++++++++++ res/layout/settings_pane.xml | 0 src/com/android/launcher3/Launcher.java | 9 +++++++++ .../android/launcher3/OverviewSettingsPanel.java | 5 +++-- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100755 res/drawable/settings_button.xml mode change 100644 => 100755 res/layout/settings_pane.xml diff --git a/res/drawable/settings_button.xml b/res/drawable/settings_button.xml new file mode 100755 index 000000000..4d66a1ac7 --- /dev/null +++ b/res/drawable/settings_button.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/res/layout/settings_pane.xml b/res/layout/settings_pane.xml old mode 100644 new mode 100755 diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 9cc28dcf0..e82f5b03b 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1403,6 +1403,15 @@ public class Launcher extends Activity popupMenu.show(); } + protected void startSettings() { + Intent settings; + settings = new Intent(android.provider.Settings.ACTION_SETTINGS); + startActivity(settings); + if (mWorkspace.isInOverviewMode()) { + mWorkspace.exitOverviewMode(false); + } + } + public interface QSBScroller { public void setScrollY(int scrollY); } diff --git a/src/com/android/launcher3/OverviewSettingsPanel.java b/src/com/android/launcher3/OverviewSettingsPanel.java index a0cbc11ec..5f0c15e0a 100644 --- a/src/com/android/launcher3/OverviewSettingsPanel.java +++ b/src/com/android/launcher3/OverviewSettingsPanel.java @@ -15,8 +15,6 @@ public class OverviewSettingsPanel { public static final String ANDROID_SETTINGS = "com.android.settings"; public static final String ANDROID_PROTECTED_APPS = "com.android.settings.applications.ProtectedAppsActivity"; - public static final String THEME_SETTINGS = - "com.android.settings.Settings$ThemeSettingsActivity"; public static final int HOME_SETTINGS_POSITION = 0; public static final int DRAWER_SETTINGS_POSITION = 1; public static final int APP_SETTINGS_POSITION = 2; @@ -115,6 +113,9 @@ public class OverviewSettingsPanel { settingsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { + if (!mLauncher.getWorkspace().isSwitchingState()) { + mLauncher.startSettings(); + } } }); settingsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener()); -- cgit v1.2.3