Make system gallery role fall back to its default.
In work profile, the system gallery might be disabled upon profile creation and installed later. Since it is still the system gallery, it should still get the system gallery role, so we can just make the system gallery role fall back to its default holder. There are already several roles in need of this, and to avoid creating a specialized system gallery role behavior just for this, a fallBackToDefaultHolder attribute is added to role. The duplicated logic in existing behaviors is also simplified to use the new attribute. Fixes: 157691735 Test: Set up a work profile with TestDPC on a build without this fix, run adb shell cmd package install-existing --user 10 <GALLERY> to enable the system gallery for work profile, and confirm that gallery cannot delete photos without asking for permission. Test: Set up a work profile with TestDPC on a build with this fix, run adb shell cmd package install-existing --user 10 <GALLERY> to enable the system gallery for work profile, and confirm that gallery can delete photos. Change-Id: I30e937bcd005ff0d6c27b225e535dad358a0af10
Loading
Please register or sign in to comment