Loading services/autofill/java/com/android/server/autofill/ui/FillUi.java +18 −4 Original line number Diff line number Diff line Loading @@ -398,6 +398,12 @@ final class FillUi { } catch (WindowManager.BadTokenException e) { if (sDebug) Slog.d(TAG, "Filed with with token " + params.token + " gone."); mCallback.onDestroy(); } catch (IllegalStateException e) { // WM throws an ISE if mContentView was added twice; this should never happen - // since show() and hide() are always called in the UIThread - but when it does, // it should not crash the system. Slog.e(TAG, "Exception showing window " + params, e); mCallback.onDestroy(); } } Loading @@ -405,11 +411,19 @@ final class FillUi { * Hides the window. */ void hide() { try { if (mShowing) { mContentView.setOnTouchListener(null); mWm.removeView(mContentView); mShowing = false; } } catch (IllegalStateException e) { // WM might thrown an ISE when removing the mContentView; this should never // happen - since show() and hide() are always called in the UIThread - but if it // does, it should not crash the system. Slog.e(TAG, "Exception hiding window ", e); mCallback.onDestroy(); } } @Override Loading Loading
services/autofill/java/com/android/server/autofill/ui/FillUi.java +18 −4 Original line number Diff line number Diff line Loading @@ -398,6 +398,12 @@ final class FillUi { } catch (WindowManager.BadTokenException e) { if (sDebug) Slog.d(TAG, "Filed with with token " + params.token + " gone."); mCallback.onDestroy(); } catch (IllegalStateException e) { // WM throws an ISE if mContentView was added twice; this should never happen - // since show() and hide() are always called in the UIThread - but when it does, // it should not crash the system. Slog.e(TAG, "Exception showing window " + params, e); mCallback.onDestroy(); } } Loading @@ -405,11 +411,19 @@ final class FillUi { * Hides the window. */ void hide() { try { if (mShowing) { mContentView.setOnTouchListener(null); mWm.removeView(mContentView); mShowing = false; } } catch (IllegalStateException e) { // WM might thrown an ISE when removing the mContentView; this should never // happen - since show() and hide() are always called in the UIThread - but if it // does, it should not crash the system. Slog.e(TAG, "Exception hiding window ", e); mCallback.onDestroy(); } } @Override Loading