Snap for 8730838 from 5d57e3d651 to tm-release
Change-Id: I07913027890716e22b84394beafd40864b6a832d
This commit is contained in:
@@ -131,9 +131,14 @@ public class OverviewState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public void onBackPressed(Launcher launcher) {
|
||||
TaskView taskView = launcher.<RecentsView>getOverviewPanel().getRunningTaskView();
|
||||
RecentsView recentsView = launcher.getOverviewPanel();
|
||||
TaskView taskView = recentsView.getRunningTaskView();
|
||||
if (taskView != null) {
|
||||
taskView.launchTasks();
|
||||
if (recentsView.isTaskViewFullyVisible(taskView)) {
|
||||
taskView.launchTasks();
|
||||
} else {
|
||||
recentsView.snapToPage(recentsView.indexOfChild(taskView));
|
||||
}
|
||||
} else {
|
||||
super.onBackPressed(launcher);
|
||||
}
|
||||
|
||||
@@ -1187,7 +1187,9 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
public int getScrollForPage(int index) {
|
||||
if (!pageScrollsInitialized() || index >= mPageScrolls.length || index < 0) {
|
||||
// TODO(b/233112195): Use !pageScrollsInitialized() instead of mPageScrolls == null, once we
|
||||
// root cause where we should be using runOnPageScrollsInitialized().
|
||||
if (mPageScrolls == null || index >= mPageScrolls.length || index < 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return mPageScrolls[index];
|
||||
|
||||
@@ -69,10 +69,6 @@ public class UiThreadHelper {
|
||||
activityContext.getStatsLogManager().logger()
|
||||
.log(LAUNCHER_ALLAPPS_KEYBOARD_CLOSED);
|
||||
return;
|
||||
} else {
|
||||
// print which stack trace failed.
|
||||
Log.e("Launcher", "hideKeyboard ignored.", new Exception());
|
||||
// Then attempt to use the old logic.
|
||||
}
|
||||
}
|
||||
// Since the launcher context cannot be accessed directly from callback, adding secondary
|
||||
|
||||
Reference in New Issue
Block a user