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

Commit bf6b213f authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

More robust @RequiresPermission handling.

The "conditional" value doesn't have any permissions to examine.

Test: builds, boots, "conditional" annotations work
Bug: 73559440
Change-Id: I36177078c1a6aeb7392773548f9c5e4696064e57
parent d0f517b9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1738,8 +1738,7 @@ public class AppOpsManager {
     * @param callback Where to report changes.
     * @hide
     */
    // TODO: Uncomment below annotation once b/73559440 is fixed
    // @RequiresPermission(value=Manifest.permission.WATCH_APPOPS, conditional=true)
    @RequiresPermission(value=android.Manifest.permission.WATCH_APPOPS, conditional=true)
    public void startWatchingMode(int op, String packageName, final OnOpChangedListener callback) {
        synchronized (mModeWatchers) {
            IAppOpsCallback cb = mModeWatchers.get(callback);