diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-05-24 20:16:45 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-24 20:16:45 +0000 |
commit | 96bc904deddf244d3d75dc44dd5326d0cf812857 (patch) | |
tree | 27b79c01eeecbe832fd8089758e5dedd28423b8c /src/com/android/launcher3/LauncherStateManager.java | |
parent | db28a992a9eb52f02f565f0185d4a30ee8fed24e (diff) | |
parent | 1b0c5032d1b773d93fed3b1b14587163b86ca521 (diff) | |
download | android_packages_apps_Trebuchet-96bc904deddf244d3d75dc44dd5326d0cf812857.tar.gz android_packages_apps_Trebuchet-96bc904deddf244d3d75dc44dd5326d0cf812857.tar.bz2 android_packages_apps_Trebuchet-96bc904deddf244d3d75dc44dd5326d0cf812857.zip |
Merge "Fixing keyboard navigation when Overview list is empty" into ub-launcher3-edmonton
Diffstat (limited to 'src/com/android/launcher3/LauncherStateManager.java')
-rw-r--r-- | src/com/android/launcher3/LauncherStateManager.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java index 3fcdee934..f938e2412 100644 --- a/src/com/android/launcher3/LauncherStateManager.java +++ b/src/com/android/launcher3/LauncherStateManager.java @@ -17,6 +17,7 @@ package com.android.launcher3; import static android.view.View.VISIBLE; + import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE; @@ -35,7 +36,6 @@ import android.animation.AnimatorSet; import android.os.Handler; import android.os.Looper; import android.support.annotation.IntDef; -import android.view.View; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; @@ -251,7 +251,7 @@ public class LauncherStateManager { prepareForAtomicAnimation(mState, state, builder); AnimatorSet animation = createAnimationToNewWorkspaceInternal( state, builder, onCompleteRunnable); - Runnable runnable = new StartAnimRunnable(animation, state.getFinalFocus(mLauncher)); + Runnable runnable = new StartAnimRunnable(animation); if (delay > 0) { mUiHandler.postDelayed(runnable, delay); } else { @@ -397,6 +397,8 @@ public class LauncherStateManager { } UiFactory.onLauncherStateOrResumeChanged(mLauncher); + + mLauncher.getDragLayer().requestFocus(); } public void onWindowFocusChanged() { @@ -480,11 +482,9 @@ public class LauncherStateManager { private class StartAnimRunnable implements Runnable { private final AnimatorSet mAnim; - private final View mViewToFocus; - public StartAnimRunnable(AnimatorSet anim, View viewToFocus) { + public StartAnimRunnable(AnimatorSet anim) { mAnim = anim; - mViewToFocus = viewToFocus; } @Override @@ -492,9 +492,6 @@ public class LauncherStateManager { if (mConfig.mCurrentAnimation != mAnim) { return; } - if (mViewToFocus != null) { - mViewToFocus.requestFocus(); - } mAnim.start(); } } |