Skip to content
Commit 76e6f9d2 authored by Winson's avatar Winson
Browse files

Use StorageManager#isUserKeyUnlocked to determine CE storage in PMS

Rather than use isUserUnlockingOrUnlocked, which relies on the user
state int to be toggled, this moves to isUserKeyUnlocked, which better
represents the actual state of being able to create directories on
user credential protected storage.

The problem with the user state int is that it's only toggled after
reconciling app data to fix up missing directories. This means that
between reconcilation finishing and the state int being flipped, there
is a period of time where an app could be installed, such as a carrier
app responding to a SIM event.

This causes the install to see that the user is locked and skip
creating the /data/user/ directory. But because reconcilation has
already finished, this will never get created until the device is
rebooted or the package re-installed. This causes the app to crash
when initializing.

Instead, by checking the storage key directly, which is guaranteed to
be flipped when reconcilation occurs, any apps installed that are not
reconciled will also create the right directories.

Bug: 187103629

Test: manual, try to install carrier apps during reconcilation

Change-Id: If086f5126d508739d1079662776f4951ea339f43
parent 79ce03a8
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