Loading src/com/android/launcher3/Launcher.java +41 −0 Original line number Diff line number Diff line Loading @@ -558,6 +558,35 @@ public class Launcher extends Activity } } }); mLauncherCallbacks.setLauncherSearchCallback(new Launcher.LauncherSearchCallbacks() { private boolean mImportanceStored = false; private int mWorkspaceImportanceForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_AUTO; private int mHotseatImportanceForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_AUTO; @Override public void onSearchOverlayOpened() { if (mImportanceStored) { return; } // The underlying workspace and hotseat are temporarily suppressed by the search // overlay. So they sholudn't be accessible. mWorkspaceImportanceForAccessibility = mWorkspace.getImportantForAccessibility(); mHotseatImportanceForAccessibility = mHotseat.getImportantForAccessibility(); mWorkspace.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); mHotseat.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); mImportanceStored = true; } @Override public void onSearchOverlayClosed() { mWorkspace.setImportantForAccessibility(mWorkspaceImportanceForAccessibility); mHotseat.setImportantForAccessibility(mHotseatImportanceForAccessibility); mImportanceStored = false; } }); return true; } Loading Loading @@ -1207,6 +1236,18 @@ public class Launcher extends Activity public void dismissAllApps(); } public interface LauncherSearchCallbacks { /** * Called when the search overlay is shown. */ public void onSearchOverlayOpened(); /** * Called when the search overlay is dismissed. */ public void onSearchOverlayClosed(); } public interface LauncherOverlayCallbacks { /** * This method indicates whether a call to {@link #enterFullImmersion()} will succeed, Loading src/com/android/launcher3/LauncherCallbacks.java +7 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,11 @@ public interface LauncherCallbacks { */ public void setLauncherAppsCallback(Object callbacks); /** * Sets the callbacks to allow reacting the actions of search overlays of the launcher. * * @param callbacks A set of callbacks to the Launcher, is actually a LauncherSearchCallback, * but for implementation purposes is passed around as an object. */ public void setLauncherSearchCallback(Object callbacks); } src/com/android/launcher3/LauncherExtension.java +5 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,11 @@ public class LauncherExtension extends Launcher { // Do nothing } @Override public void setLauncherSearchCallback(Object callbacks) { // Do nothing } class LauncherExtensionOverlay implements LauncherOverlay { LauncherOverlayCallbacks mLauncherOverlayCallbacks; ViewGroup mOverlayView; Loading Loading
src/com/android/launcher3/Launcher.java +41 −0 Original line number Diff line number Diff line Loading @@ -558,6 +558,35 @@ public class Launcher extends Activity } } }); mLauncherCallbacks.setLauncherSearchCallback(new Launcher.LauncherSearchCallbacks() { private boolean mImportanceStored = false; private int mWorkspaceImportanceForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_AUTO; private int mHotseatImportanceForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_AUTO; @Override public void onSearchOverlayOpened() { if (mImportanceStored) { return; } // The underlying workspace and hotseat are temporarily suppressed by the search // overlay. So they sholudn't be accessible. mWorkspaceImportanceForAccessibility = mWorkspace.getImportantForAccessibility(); mHotseatImportanceForAccessibility = mHotseat.getImportantForAccessibility(); mWorkspace.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); mHotseat.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); mImportanceStored = true; } @Override public void onSearchOverlayClosed() { mWorkspace.setImportantForAccessibility(mWorkspaceImportanceForAccessibility); mHotseat.setImportantForAccessibility(mHotseatImportanceForAccessibility); mImportanceStored = false; } }); return true; } Loading Loading @@ -1207,6 +1236,18 @@ public class Launcher extends Activity public void dismissAllApps(); } public interface LauncherSearchCallbacks { /** * Called when the search overlay is shown. */ public void onSearchOverlayOpened(); /** * Called when the search overlay is dismissed. */ public void onSearchOverlayClosed(); } public interface LauncherOverlayCallbacks { /** * This method indicates whether a call to {@link #enterFullImmersion()} will succeed, Loading
src/com/android/launcher3/LauncherCallbacks.java +7 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,11 @@ public interface LauncherCallbacks { */ public void setLauncherAppsCallback(Object callbacks); /** * Sets the callbacks to allow reacting the actions of search overlays of the launcher. * * @param callbacks A set of callbacks to the Launcher, is actually a LauncherSearchCallback, * but for implementation purposes is passed around as an object. */ public void setLauncherSearchCallback(Object callbacks); }
src/com/android/launcher3/LauncherExtension.java +5 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,11 @@ public class LauncherExtension extends Launcher { // Do nothing } @Override public void setLauncherSearchCallback(Object callbacks) { // Do nothing } class LauncherExtensionOverlay implements LauncherOverlay { LauncherOverlayCallbacks mLauncherOverlayCallbacks; ViewGroup mOverlayView; Loading