summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherClings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/LauncherClings.java')
-rw-r--r--src/com/android/launcher3/LauncherClings.java15
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();