Skip to content
Commit e394c195 authored by Zim's avatar Zim
Browse files

Fix uninstall with keep_data flag on multi-user

When uninstalling an app on a multi-user device with the keep data
flag, we end up deleting data still. Here's what seems to happen
in PackageManagerService:

executeDeletePackageLIF
  if (ps.isAnyInstalled(userIds)...)
    clearPackageStateAndReturn = true
  if (clearPackageStateAndReturn)
    clearPackageStateForUserLIF(...flags)
      destroyAppDataLIF // We unconditionally delete data disregarding
                        // 'flags' containing KEEP_DATA

We now check keep_data flag before calling destroyAppDataLIF

Test: Manual testing
Bug: 144828398
Change-Id: I009bd412b67000e39f189ef049400d7e00f9a892
parent bed09965
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