Skip to content

Commit

Permalink
Fix crash on attempt to close keyboard when the system service doesn'…
Browse files Browse the repository at this point in the history
…t exist
  • Loading branch information
amirzaidi committed Aug 25, 2017
1 parent ba845da commit 0664e5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/com/android/launcher3/dragndrop/DragController.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ public DragView startDrag(Bitmap b, int dragLayerX, int dragLayerY,
}

// Hide soft keyboard, if visible
mLauncher.getSystemService(InputMethodManager.class)
.hideSoftInputFromWindow(mWindowToken, 0);
try {
mLauncher.getSystemService(InputMethodManager.class)
.hideSoftInputFromWindow(mWindowToken, 0);
} catch (NoSuchMethodError ex) { }

mOptions = options;
if (mOptions.systemDndStartPoint != null) {
Expand Down

0 comments on commit 0664e5e

Please sign in to comment.