Ignore failure when un/registering listener for invalid display

- In the wm tests, the virtual display can be removed by the time we
  go to update the back gesture handler, which can result in an
  exception that (unnecessarily) crashes SysUI.

Bug: 154041177
Test: Manual, not actually able to repro



Change-Id: Iec2a0aaeed43254693a6d2ef01205641189a5648
This commit is contained in:
Winson Chung
2020-04-14 15:05:11 -07:00
parent 4456f7d2d6
commit 939f5bd3e8

View File

@@ -312,7 +312,7 @@ public class EdgeBackGestureHandler implements DisplayListener,
WindowManagerGlobal.getWindowManagerService()
.unregisterSystemGestureExclusionListener(
mGestureExclusionListener, mDisplayId);
} catch (RemoteException e) {
} catch (RemoteException | IllegalArgumentException e) {
Log.e(TAG, "Failed to unregister window manager callbacks", e);
}
@@ -326,7 +326,7 @@ public class EdgeBackGestureHandler implements DisplayListener,
WindowManagerGlobal.getWindowManagerService()
.registerSystemGestureExclusionListener(
mGestureExclusionListener, mDisplayId);
} catch (RemoteException e) {
} catch (RemoteException | IllegalArgumentException e) {
Log.e(TAG, "Failed to register window manager callbacks", e);
}