diff options
author | Adam Cohen <adamcohen@google.com> | 2014-05-17 01:18:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-17 01:18:44 +0000 |
commit | 57884c7ee2835df52913a87ad90e83293c3157d3 (patch) | |
tree | e79d0c430068990dac824577e8e5ee15cc44b9f9 /src/com/android/launcher3/LauncherClings.java | |
parent | 1a86ac56d73762773d67a85ebe0c33faddcc4798 (diff) | |
parent | 6268f2db4c129e33d8d77513cb9df0f4799c7520 (diff) | |
download | android_packages_apps_Trebuchet-57884c7ee2835df52913a87ad90e83293c3157d3.tar.gz android_packages_apps_Trebuchet-57884c7ee2835df52913a87ad90e83293c3157d3.tar.bz2 android_packages_apps_Trebuchet-57884c7ee2835df52913a87ad90e83293c3157d3.zip |
Merge "Disable the folder cling in two cases" into ub-now-nova
Diffstat (limited to 'src/com/android/launcher3/LauncherClings.java')
-rw-r--r-- | src/com/android/launcher3/LauncherClings.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/launcher3/LauncherClings.java b/src/com/android/launcher3/LauncherClings.java index 97138eeaa..a2cce1ab8 100644 --- a/src/com/android/launcher3/LauncherClings.java +++ b/src/com/android/launcher3/LauncherClings.java @@ -315,12 +315,6 @@ class LauncherClings { editor.commit(); } - public void markFolderClingDismissed() { - SharedPreferences.Editor editor = mLauncher.getSharedPrefs().edit(); - editor.putBoolean(LauncherClings.FOLDER_CLING_DISMISSED_KEY, true); - editor.apply(); - } - /** Removes the cling outright from the DragLayer */ private void removeCling(int id) { final View cling = mLauncher.findViewById(id); @@ -415,6 +409,15 @@ class LauncherClings { mLauncher.getSearchBar().showSearchBar(true); } + public void markFolderClingDismissedIfNecessary() { + SharedPreferences prefs = mLauncher.getSharedPrefs(); + if (!prefs.getBoolean(FOLDER_CLING_DISMISSED_KEY, false)) { + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean(FOLDER_CLING_DISMISSED_KEY, true); + editor.apply(); + } + } + public void dismissMigrationClingCopyApps(View v) { // Copy the shortcuts from the old database LauncherModel model = mLauncher.getModel(); |