Suppress focusability of normal launcher descendants when a popup opens.
Bug: 22563223 Change-Id: Iebee7c0c858a4d48524b3d5415e4f6d39861c49a
This commit is contained in:
1 parent
f485a7e52e
commit
f0033da0dd
2 files changed
+20
-3
No files matched your search
@@ -3363,6 +3363,18 @@ public class Launcher extends Activity
|
||||
return anim;
|
||||
}
|
||||
|
||||
public void onLauncherClingShown() {
|
||||
// When a launcher cling appears, it should cover the underlying layers, so their focus
|
||||
// should be blocked.
|
||||
if (mDragLayer.getDescendantFocusability() != ViewGroup.FOCUS_BLOCK_DESCENDANTS) {
|
||||
mDragLayer.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
||||
}
|
||||
}
|
||||
|
||||
public void onLauncherClingDismissed() {
|
||||
mDragLayer.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
||||
}
|
||||
|
||||
public void enterSpringLoadedDragMode() {
|
||||
if (LOGD) Log.d(TAG, String.format("enterSpringLoadedDragMode [mState=%s", mState.name()));
|
||||
if (mState == State.WORKSPACE || mState == State.APPS_SPRING_LOADED ||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.launcher3;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.annotation.TargetApi;
|
||||
@@ -92,6 +90,7 @@ class LauncherClings implements OnClickListener {
|
||||
* package was not preinstalled and there exists a db to migrate from.
|
||||
*/
|
||||
public void showMigrationCling() {
|
||||
mLauncher.onLauncherClingShown();
|
||||
mLauncher.hideWorkspaceSearchAndHotseat();
|
||||
|
||||
ViewGroup root = (ViewGroup) mLauncher.findViewById(R.id.launcher);
|
||||
@@ -142,6 +141,7 @@ class LauncherClings implements OnClickListener {
|
||||
content.setBackground(bg);
|
||||
}
|
||||
|
||||
mLauncher.onLauncherClingShown();
|
||||
root.addView(cling);
|
||||
|
||||
if (showWelcome) {
|
||||
@@ -178,7 +178,12 @@ class LauncherClings implements OnClickListener {
|
||||
@Thunk void dismissLongPressCling() {
|
||||
Runnable dismissCb = new Runnable() {
|
||||
public void run() {
|
||||
dismissCling(mLauncher.findViewById(R.id.longpress_cling), null,
|
||||
Runnable cb = new Runnable() {
|
||||
public void run() {
|
||||
mLauncher.onLauncherClingDismissed();
|
||||
}
|
||||
};
|
||||
dismissCling(mLauncher.findViewById(R.id.longpress_cling), cb,
|
||||
WORKSPACE_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user