Swallow exception from failed idmap2d disable

If the idmap daemon cannot be disabled for some reason, it is okay
to swallow the exception caused by failing to set "ctl.stop". Log a
warning instead.

Bug: 186761471
Test: builds
Change-Id: Iae07c9f9af6a0c07fd6d89d97452f0add19db56d
This commit is contained in:
Ryan Mitchell
2021-05-26 16:12:21 -07:00
parent 72cd5f1552
commit 43b63f0d4e

View File

@@ -194,7 +194,13 @@ class IdmapDaemon {
}
private static void stopIdmapService() {
SystemService.stop(IDMAP_DAEMON);
try {
SystemService.stop(IDMAP_DAEMON);
} catch (RuntimeException e) {
// If the idmap daemon cannot be disabled for some reason, it is okay
// since we already finished invoking idmap.
Slog.w(TAG, "Failed to disable idmap2 daemon", e);
}
}
private Connection connect() throws TimeoutException, RemoteException {