Prevent Idmapdaemon from failing set system property
During the shutdown mode, system property is not allowed to be set.
To set system property is used by either starting or stopping
IdmapDaemon.
To start IdmapDaemon may be during the shutdown mode. In this
situation, it triggers NullPointerException because IdmapDaemon is
not started and mService is null. This patch handles this kind of
RuntimeException, logs the error and prevents NPE.
Test: TID="CtsAppSecurityHostTestCases"; \
atest OverlayDeviceTests \
OverlayHostTests \
OverlayRemountedTest \
${TID}:android.appsecurity.cts.OverlayHostTest
Test: http://ab/I12600010009296086
Bug: 214011992
Bug: 212776174
Change-Id: I1820f00473be423d08738a6045925bb38a71d541
1 file changed