Loading src/com/android/launcher3/Launcher.java +3 −1 Original line number Diff line number Diff line Loading @@ -4479,7 +4479,9 @@ public class Launcher extends Activity public void dismissFolderCling(View v) { mLauncherClings.dismissFolderCling(v); } public void markFolderClingDismissedIfNecessary() { mLauncherClings.markFolderClingDismissedIfNecessary(); } /** * To be overridden by subclasses to indicate that there is an activity to launch Loading src/com/android/launcher3/LauncherClings.java +9 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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(); Loading src/com/android/launcher3/Workspace.java +11 −2 Original line number Diff line number Diff line Loading @@ -2719,8 +2719,9 @@ public class Workspace extends SmoothPagedView BubbleTextView icon = (BubbleTextView) child; icon.clearPressedOrFocusedBackground(); } else if (child instanceof FolderIcon) { // Dismiss the folder cling if we haven't already mLauncher.getLauncherClings().markFolderClingDismissed(); // The folder cling isn't flexible enough to be shown in non-default workspace positions // Also if they are dragging it a folder, we assume they don't need to see the cling. mLauncher.markFolderClingDismissedIfNecessary(); } if (child.getTag() == null || !(child.getTag() instanceof ItemInfo)) { Loading Loading @@ -3066,6 +3067,10 @@ public class Workspace extends SmoothPagedView // cell also contains a shortcut, then create a folder with the two shortcuts. if (!mInScrollArea && createUserFolderIfNecessary(cell, container, dropTargetLayout, mTargetCell, distance, false, d.dragView, null)) { // The folder cling isn't flexible enough to be shown in non-default workspace // positions. Also if they are creating a folder, we assume they don't need to // see the cling. mLauncher.markFolderClingDismissedIfNecessary(); return; } Loading Loading @@ -3965,6 +3970,10 @@ public class Workspace extends SmoothPagedView d.postAnimationRunnable = exitSpringLoadedRunnable; if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance, true, d.dragView, d.postAnimationRunnable)) { // The folder cling isn't flexible enough to be shown in non-default workspace // positions. Also if they are creating a folder, we assume they don't need to // see the cling. mLauncher.markFolderClingDismissedIfNecessary(); return; } if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d, Loading Loading
src/com/android/launcher3/Launcher.java +3 −1 Original line number Diff line number Diff line Loading @@ -4479,7 +4479,9 @@ public class Launcher extends Activity public void dismissFolderCling(View v) { mLauncherClings.dismissFolderCling(v); } public void markFolderClingDismissedIfNecessary() { mLauncherClings.markFolderClingDismissedIfNecessary(); } /** * To be overridden by subclasses to indicate that there is an activity to launch Loading
src/com/android/launcher3/LauncherClings.java +9 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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(); Loading
src/com/android/launcher3/Workspace.java +11 −2 Original line number Diff line number Diff line Loading @@ -2719,8 +2719,9 @@ public class Workspace extends SmoothPagedView BubbleTextView icon = (BubbleTextView) child; icon.clearPressedOrFocusedBackground(); } else if (child instanceof FolderIcon) { // Dismiss the folder cling if we haven't already mLauncher.getLauncherClings().markFolderClingDismissed(); // The folder cling isn't flexible enough to be shown in non-default workspace positions // Also if they are dragging it a folder, we assume they don't need to see the cling. mLauncher.markFolderClingDismissedIfNecessary(); } if (child.getTag() == null || !(child.getTag() instanceof ItemInfo)) { Loading Loading @@ -3066,6 +3067,10 @@ public class Workspace extends SmoothPagedView // cell also contains a shortcut, then create a folder with the two shortcuts. if (!mInScrollArea && createUserFolderIfNecessary(cell, container, dropTargetLayout, mTargetCell, distance, false, d.dragView, null)) { // The folder cling isn't flexible enough to be shown in non-default workspace // positions. Also if they are creating a folder, we assume they don't need to // see the cling. mLauncher.markFolderClingDismissedIfNecessary(); return; } Loading Loading @@ -3965,6 +3970,10 @@ public class Workspace extends SmoothPagedView d.postAnimationRunnable = exitSpringLoadedRunnable; if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance, true, d.dragView, d.postAnimationRunnable)) { // The folder cling isn't flexible enough to be shown in non-default workspace // positions. Also if they are creating a folder, we assume they don't need to // see the cling. mLauncher.markFolderClingDismissedIfNecessary(); return; } if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d, Loading