Merge "Add null check in Launcher onNewIntent() before moveToDefaultScreen()." into ub-launcher3-burnaby-polish
am: c3d76582b6
* commit 'c3d76582b656fdabc92a470ebe0d986b58c44751':
Add null check in Launcher onNewIntent() before moveToDefaultScreen().
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 4687bb7..19bdea0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1893,7 +1893,7 @@
final View v = getWindow().peekDecorView();
if (v != null && v.getWindowToken() != null) {
- InputMethodManager imm = (InputMethodManager)getSystemService(
+ InputMethodManager imm = (InputMethodManager) getSystemService(
INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
@@ -1932,7 +1932,9 @@
mWorkspace.post(new Runnable() {
@Override
public void run() {
- mWorkspace.moveToDefaultScreen(true);
+ if (mWorkspace != null) {
+ mWorkspace.moveToDefaultScreen(true);
+ }
}
});
}