Update broadcast with correct extra field
The extra field EXTRA_DATA_REMOVED in Intent ACTION_PACKAGE_REMOVED
indicates whether this represents a full uninstall (removing both
the code and its data).
When uninstalling apps on a multi-user device without the keep data
flag, we don't set field dataRemoved properly. This results in that
EXTRA_DATA_REMOVED is false and ACTION_PACKAGE_FULLY_REMOVED isn't
broadcasted until the app are completely uninstalled from all users
in the device. Hence, field dataRemoved needs to be set to correct
value accordingly in this case.
Bug: 29072973
Test: manual test
1. Install an app in both primary and second user (user from
work profile of multiple user).
2. Unintall this app from each user.
3. Make sure that the Intent ACTION_PACKAGE_REMOVED with
EXTRA_DATA_REMOVED = true and ACTION_PACKAGE_FULLY_REMOVED
are broadcasted for each user.
Change-Id: Ib67c0b5849cc562bd9e915d45d56f8488915a8f2
1 file changed