diff options
author | Adam Cohen <adamcohen@google.com> | 2014-05-16 16:42:35 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2014-05-16 18:18:20 -0700 |
commit | 6268f2db4c129e33d8d77513cb9df0f4799c7520 (patch) | |
tree | 9001025468b615f946e9c5f45e27bc9ead8ea003 /src/com/android/launcher3/LauncherClings.java | |
parent | bbe1e24c5ff470a695510d23d67bcb6f2ad88d0e (diff) | |
download | android_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.tar.gz android_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.tar.bz2 android_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.zip |
Disable the folder cling in two cases
-> When the user creates a new folder
-> When the user drags an existing folder
-> The folder cling gets cut off in certain instances
and until we make it more extensible (not worth
it right now), we're disabling it in the problematic
cases. Also, in the problematic cases, the user
is demonstrating some advanced knowledge, so
it's somewhat justifiable.
issue 14491765
Change-Id: Ib15d2f097c51a9b755f04b95ed6ef468d3bacc60
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(); |