Skip to content
Commit c0bba8b1 authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Adam Lesinski
Browse files

Fix ArrayMap.get vs ArrayMap.valueAt typo

Replace incorrect call to ArrayMap.get with correct call
ArrayMap.valueAt.

This bug was discovered when removing an overlay from /vendor/overlay
and restarting the device. The OMS settings file still referred to the
overlay, and when the settings item was to be removed, the following
crash occurred.

*** FATAL EXCEPTION IN SYSTEM PROCESS: main
java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.om.OverlayInfo.packageName' on a null object reference
   at com.android.server.om.OverlayManagerServiceImpl.onSwitchUser(OverlayManagerServiceImpl.java:121)
   at com.android.server.om.OverlayManagerService.onSwitchUser(OverlayManagerService.java:257)
   at com.android.server.om.OverlayManagerService.<init>(OverlayManagerService.java:237)
   at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:580)
   at com.android.server.SystemServer.run(SystemServer.java:363)
   at com.android.server.SystemServer.main(SystemServer.java:238)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:226)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)

Test: adb exec-out stop && adb exec-out rm /vendor/overlay/... && adb exec-out start
Change-Id: I341a8d6eb90555b9169e5cd7dfac87d850b72e9b
parent abac7a67
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment