Skip to content
Commit 8f5189dd authored by Eric Biggers's avatar Eric Biggers
Browse files

Load Weaver HAL if needed in destroyWeaverSlot()

Now that mWeaver is not initialized at boot time, but rather only by
isWeaverAvailable(), we need to make sure that isWeaverAvailable() is
called before dereferencing mWeaver.  This was done in all cases except
for destroyWeaverSlot(), which is reachable with null mWeaver if a user
is removed before any user is unlocked.  Fix this.

This fixes commit 61bd5961 ("Do not initialize the weaver service at
boot") (http://ag/21164366).

Bug: 252760591
Test: Set a PIN on user 0.  Add secondary user.  Reboot.  Remove
      secondary user using 'pm remove-user'.  system_server crashes
      before this change, but not after it.
Change-Id: I05019af328c56739724a67f9af776664e2cef438
parent bc34045c
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