summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2014-11-10 18:35:01 (GMT)
committerAdnan <adnan@cyngn.com>2014-11-19 23:53:58 (GMT)
commita251402a9c16fb95414138c3f50dbcdf40d9d869 (patch)
treea97d98d63b92cb9275f6d378cd84801dacebd9da
parent6c336aea9f6f895fedb29840eb3598989317f8bc (diff)
downloadandroid_packages_apps_Trebuchet-a251402a9c16fb95414138c3f50dbcdf40d9d869.zip
android_packages_apps_Trebuchet-a251402a9c16fb95414138c3f50dbcdf40d9d869.tar.gz
android_packages_apps_Trebuchet-a251402a9c16fb95414138c3f50dbcdf40d9d869.tar.bz2
Trebuchet : Persist sorting mode
Change-Id: I62e0e79785e7e4c56b8e31df78909c4522e229c7
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java4
-rw-r--r--src/com/android/launcher3/Launcher.java2
-rw-r--r--src/com/android/launcher3/settings/SettingsProvider.java2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 55b4a55..0a125e6 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -1508,6 +1508,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
public void setup(Launcher launcher, DragController dragController) {
mLauncher = launcher;
mDragController = dragController;
+ int sortMode = SettingsProvider.getIntCustomDefault(mLauncher, SettingsProvider.SETTINGS_UI_DRAWER_SORT_MODE, -1);
+ if (sortMode != -1) {
+ setSortMode(SortMode.getModeForValue(sortMode));
+ }
}
/**
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 07d1708..28a9881 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1254,6 +1254,8 @@ public class Launcher extends Activity
break;
}
mOverviewSettingsPanel.notifyDataSetInvalidated();
+ SettingsProvider.putInt(getBaseContext(), SettingsProvider.SETTINGS_UI_DRAWER_SORT_MODE,
+ mAppsCustomizeContent.getSortMode().getValue());
return true;
}
});
diff --git a/src/com/android/launcher3/settings/SettingsProvider.java b/src/com/android/launcher3/settings/SettingsProvider.java
index e6bcc9c..044c5a0 100644
--- a/src/com/android/launcher3/settings/SettingsProvider.java
+++ b/src/com/android/launcher3/settings/SettingsProvider.java
@@ -40,6 +40,8 @@ public final class SettingsProvider {
public static final String SETTINGS_UI_DRAWER_REMOVE_HIDDEN_APPS_WIDGETS = "ui_drawer_remove_hidden_apps_widgets";
public static final String SETTINGS_UI_DRAWER_HIDE_ICON_LABELS = "ui_drawer_hide_icon_labels";
public static final String SETTINGS_UI_GENERAL_ICONS_LARGE = "ui_general_icons_large";
+ public static final String SETTINGS_UI_GENERAL_ICONS_TEXT_FONT_FAMILY = "ui_general_icons_text_font";
+ public static final String SETTINGS_UI_GENERAL_ICONS_TEXT_FONT_STYLE = "ui_general_icons_text_font_style";
public static final String SETTINGS_UI_DRAWER_SORT_MODE = "ui_drawer_sort_mode";
public static SharedPreferences get(Context context) {