summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-10 14:47:46 -0800
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:16:24 -0700
commit7cb7e89c3fb7e5f59cd28a3a396d0412d4fce8a4 (patch)
treedfe207747ed3dded731b7cf361a261708dc68b0c
parent02bcffada9aa1b9000ae0c6c597db5484458c29b (diff)
downloadandroid_packages_apps_Trebuchet-7cb7e89c3fb7e5f59cd28a3a396d0412d4fce8a4.zip
android_packages_apps_Trebuchet-7cb7e89c3fb7e5f59cd28a3a396d0412d4fce8a4.tar.gz
android_packages_apps_Trebuchet-7cb7e89c3fb7e5f59cd28a3a396d0412d4fce8a4.tar.bz2
Trebuchet: Move allow rotation to home settings section
Issue-id: CYNGNOS-1929 Change-Id: Ib1e615ccbce7991a31e15a967c942994fc3c01c2
-rw-r--r--src/com/android/launcher3/OverviewSettingsPanel.java38
-rw-r--r--src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java37
2 files changed, 62 insertions, 13 deletions
diff --git a/src/com/android/launcher3/OverviewSettingsPanel.java b/src/com/android/launcher3/OverviewSettingsPanel.java
index 229b019..5602834 100644
--- a/src/com/android/launcher3/OverviewSettingsPanel.java
+++ b/src/com/android/launcher3/OverviewSettingsPanel.java
@@ -51,8 +51,7 @@ public class OverviewSettingsPanel {
String[] valuesApp = new String[] {
res.getString(R.string.larger_icons_text),
- res.getString(R.string.protected_app_settings),
- res.getString(R.string.allow_rotation_title)};
+ res.getString(R.string.protected_app_settings)};
mSettingsAdapter = new SettingsPinnedHeaderAdapter(mLauncher);
mSettingsAdapter.setHeaders(headers);
@@ -77,6 +76,41 @@ public class OverviewSettingsPanel {
return cursor;
}
+ private String[] getValuesHome() {
+ Resources res = mLauncher.getResources();
+ ArrayList<String> values = new ArrayList<String>(Arrays.asList(new String[]{
+ res.getString(R.string.home_screen_search_text),
+ res.getString(R.string.icon_labels),
+ res.getString(R.string.scrolling_wallpaper),
+ res.getString(R.string.grid_size_text),
+ res.getString(R.string.allow_rotation_title)}));
+
+ // Add additional external settings.
+ RemoteFolderManager.onInitializeHomeSettings(values, mLauncher);
+
+ String[] valuesArr = new String[values.size()];
+ values.toArray(valuesArr);
+ return valuesArr;
+ }
+
+ private String[] getValuesDrawer() {
+ Resources res = mLauncher.getResources();
+ ArrayList<String> values = new ArrayList<String>(Arrays.asList(new String[]{
+ res.getString(R.string.icon_labels),
+ res.getString(R.string.app_drawer_style),
+ res.getString(R.string.app_drawer_color),
+ res.getString(R.string.fast_scroller),
+ res.getString(R.string.fast_scroller_type),
+ res.getString(R.string.home_screen_search_text)}));
+
+ // Add additional external settings.
+ RemoteFolderManager.onInitializeDrawerSettings(values, mLauncher);
+
+ String[] valuesArr = new String[values.size()];
+ values.toArray(valuesArr);
+ return valuesArr;
+ }
+
public void notifyDataSetInvalidated() {
mSettingsAdapter.notifyDataSetInvalidated();
}
diff --git a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
index c4f16c4..10ad337 100644
--- a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
+++ b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
@@ -122,6 +122,18 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
case 3:
updateDynamicGridSizeSettingsItem(stateView, settingSwitch);
break;
+ case 4:
+ current = SettingsProvider.getBoolean(mContext,
+ SettingsProvider.SETTINGS_UI_ALLOW_ROTATION,
+ R.bool.preferences_interface_allow_rotation);
+ setSettingSwitch(stateView, settingSwitch, current);
+ break;
+ case 5:
+ current = SettingsProvider.getBoolean(mContext,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_REMOTE_FOLDER,
+ R.bool.preferences_interface_homescreen_remote_folder_default);
+ setSettingSwitch(stateView, settingSwitch, current);
+ break;
default:
hideStates(stateView, settingSwitch);
}
@@ -183,12 +195,6 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
R.bool.preferences_interface_general_icons_large_default);
setSettingSwitch(stateView, settingSwitch, current);
break;
- case 2:
- current = SettingsProvider.getBoolean(mContext,
- SettingsProvider.SETTINGS_UI_ALLOW_ROTATION,
- R.bool.preferences_interface_allow_rotation);
- setSettingSwitch(stateView, settingSwitch, current);
- break;
default:
hideStates(stateView, settingSwitch);
}
@@ -268,6 +274,20 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
case 3:
mLauncher.onClickDynamicGridSizeButton();
break;
+<<<<<<< HEAD
+=======
+ case 4:
+ onSettingsBooleanChanged(v,
+ SettingsProvider.SETTINGS_UI_ALLOW_ROTATION,
+ R.bool.preferences_interface_allow_rotation);
+ break;
+ case 5:
+ onSettingsBooleanChanged(v,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_REMOTE_FOLDER,
+ R.bool.preferences_interface_homescreen_remote_folder_default);
+ mLauncher.getRemoteFolderManager().onSettingChanged();
+ break;
+>>>>>>> 4c4ae03... Trebuchet: Move allow rotation to home settings section
}
break;
case OverviewSettingsPanel.DRAWER_SETTINGS_POSITION:
@@ -326,11 +346,6 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
OverviewSettingsPanel.ANDROID_PROTECTED_APPS);
mLauncher.startActivity(intent);
break;
- case 2:
- onSettingsBooleanChanged(v,
- SettingsProvider.SETTINGS_UI_ALLOW_ROTATION,
- R.bool.preferences_interface_allow_rotation);
- break;
}
}