Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 553796e6 authored by Hai Zhang's avatar Hai Zhang
Browse files

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
parent 981b8d6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment