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

Commit d6c19708 authored by Rubin Xu's avatar Rubin Xu Committed by Android (Google) Code Review
Browse files

Merge "add MANAGE_CREDENTIALS appop" into rvc-qpr-dev-plus-aosp

parents 2762e7c6 603f3ee7
Loading
Loading
Loading
Loading
+24 −2
Original line number Original line Diff line number Diff line
@@ -1139,9 +1139,16 @@ public class AppOpsManager {
    // TODO: Add as AppProtoEnums
    // TODO: Add as AppProtoEnums
    public static final int OP_RECORD_AUDIO_HOTWORD = 102;
    public static final int OP_RECORD_AUDIO_HOTWORD = 102;


    /**
     * Manage credentials in the system KeyChain.
     *
     * @hide
     */
    public static final int OP_MANAGE_CREDENTIALS = AppProtoEnums.APP_OP_MANAGE_CREDENTIALS;

    /** @hide */
    /** @hide */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage
    public static final int _NUM_OP = 104;
    public static final int _NUM_OP = 105;


    /** Access to coarse location information. */
    /** Access to coarse location information. */
    public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
    public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -1488,6 +1495,13 @@ public class AppOpsManager {
     */
     */
    public static final String OPSTR_RECORD_AUDIO_HOTWORD = "android:record_audio_hotword";
    public static final String OPSTR_RECORD_AUDIO_HOTWORD = "android:record_audio_hotword";


    /**
     * Manage credentials in the system KeyChain.
     *
     * @hide
     */
    public static final String OPSTR_MANAGE_CREDENTIALS = "android:manage_credentials";

    /** {@link #sAppOpsToNote} not initialized yet for this op */
    /** {@link #sAppOpsToNote} not initialized yet for this op */
    private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
    private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
    /** Should not collect noting of this app-op in {@link #sAppOpsToNote} */
    /** Should not collect noting of this app-op in {@link #sAppOpsToNote} */
@@ -1682,6 +1696,7 @@ public class AppOpsManager {
            OP_PHONE_CALL_CAMERA,               // OP_PHONE_CALL_CAMERA
            OP_PHONE_CALL_CAMERA,               // OP_PHONE_CALL_CAMERA
            OP_RECORD_AUDIO_HOTWORD,            // RECORD_AUDIO_HOTWORD
            OP_RECORD_AUDIO_HOTWORD,            // RECORD_AUDIO_HOTWORD
            OP_MANAGE_ONGOING_CALLS,            // MANAGE_ONGOING_CALLS
            OP_MANAGE_ONGOING_CALLS,            // MANAGE_ONGOING_CALLS
            OP_MANAGE_CREDENTIALS,              // MANAGE_CREDENTIALS
    };
    };


    /**
    /**
@@ -1792,6 +1807,7 @@ public class AppOpsManager {
            OPSTR_PHONE_CALL_CAMERA,
            OPSTR_PHONE_CALL_CAMERA,
            OPSTR_RECORD_AUDIO_HOTWORD,
            OPSTR_RECORD_AUDIO_HOTWORD,
            OPSTR_MANAGE_ONGOING_CALLS,
            OPSTR_MANAGE_ONGOING_CALLS,
            OPSTR_MANAGE_CREDENTIALS,
    };
    };


    /**
    /**
@@ -1903,6 +1919,7 @@ public class AppOpsManager {
            "PHONE_CALL_CAMERA",
            "PHONE_CALL_CAMERA",
            "RECORD_AUDIO_HOTWORD",
            "RECORD_AUDIO_HOTWORD",
            "MANAGE_ONGOING_CALLS",
            "MANAGE_ONGOING_CALLS",
            "MANAGE_CREDENTIALS",
    };
    };


    /**
    /**
@@ -2015,6 +2032,7 @@ public class AppOpsManager {
            null, // no permission for OP_PHONE_CALL_CAMERA
            null, // no permission for OP_PHONE_CALL_CAMERA
            null, // no permission for OP_RECORD_AUDIO_HOTWORD
            null, // no permission for OP_RECORD_AUDIO_HOTWORD
            Manifest.permission.MANAGE_ONGOING_CALLS,
            Manifest.permission.MANAGE_ONGOING_CALLS,
            null, // no permission for OP_MANAGE_CREDENTIALS
    };
    };


    /**
    /**
@@ -2127,6 +2145,7 @@ public class AppOpsManager {
            null, // PHONE_CALL_MICROPHONE
            null, // PHONE_CALL_MICROPHONE
            null, // RECORD_AUDIO_HOTWORD
            null, // RECORD_AUDIO_HOTWORD
            null, // MANAGE_ONGOING_CALLS
            null, // MANAGE_ONGOING_CALLS
            null, // MANAGE_CREDENTIALS
    };
    };


    /**
    /**
@@ -2238,6 +2257,7 @@ public class AppOpsManager {
            null, // PHONE_CALL_CAMERA
            null, // PHONE_CALL_CAMERA
            null, // RECORD_AUDIO_HOTWORD
            null, // RECORD_AUDIO_HOTWORD
            null, // MANAGE_ONGOING_CALLS
            null, // MANAGE_ONGOING_CALLS
            null, // MANAGE_CREDENTIALS
    };
    };


    /**
    /**
@@ -2348,6 +2368,7 @@ public class AppOpsManager {
            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_CAMERA
            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_CAMERA
            AppOpsManager.MODE_ALLOWED, // OP_RECORD_AUDIO_HOTWORD
            AppOpsManager.MODE_ALLOWED, // OP_RECORD_AUDIO_HOTWORD
            AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS
            AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS
            AppOpsManager.MODE_DEFAULT, // MANAGE_CREDENTIALS
    };
    };


    /**
    /**
@@ -2462,6 +2483,7 @@ public class AppOpsManager {
            false, // PHONE_CALL_CAMERA
            false, // PHONE_CALL_CAMERA
            false, // RECORD_AUDIO_HOTWORD
            false, // RECORD_AUDIO_HOTWORD
            true, // MANAGE_ONGOING_CALLS
            true, // MANAGE_ONGOING_CALLS
            false, // MANAGE_CREDENTIALS
    };
    };


    /**
    /**