Merge "Introduce new App Ops permission for 3rd-party InCallService" into rvc-qpr-dev-plus-aosp
This commit is contained in:
@@ -96,6 +96,7 @@ package android {
|
|||||||
field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
|
field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
|
||||||
field public static final String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
|
field public static final String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
|
||||||
field public static final String MANAGE_EXTERNAL_STORAGE = "android.permission.MANAGE_EXTERNAL_STORAGE";
|
field public static final String MANAGE_EXTERNAL_STORAGE = "android.permission.MANAGE_EXTERNAL_STORAGE";
|
||||||
|
field public static final String MANAGE_ONGOING_CALLS = "android.permission.MANAGE_ONGOING_CALLS";
|
||||||
field public static final String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
|
field public static final String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
|
||||||
field public static final String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
|
field public static final String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
|
||||||
field public static final String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
|
field public static final String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ package android.app {
|
|||||||
field public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
field public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
||||||
field public static final String OPSTR_MANAGE_EXTERNAL_STORAGE = "android:manage_external_storage";
|
field public static final String OPSTR_MANAGE_EXTERNAL_STORAGE = "android:manage_external_storage";
|
||||||
field public static final String OPSTR_MANAGE_IPSEC_TUNNELS = "android:manage_ipsec_tunnels";
|
field public static final String OPSTR_MANAGE_IPSEC_TUNNELS = "android:manage_ipsec_tunnels";
|
||||||
|
field public static final String OPSTR_MANAGE_ONGOING_CALLS = "android:manage_ongoing_calls";
|
||||||
field public static final String OPSTR_MUTE_MICROPHONE = "android:mute_microphone";
|
field public static final String OPSTR_MUTE_MICROPHONE = "android:mute_microphone";
|
||||||
field public static final String OPSTR_NEIGHBORING_CELLS = "android:neighboring_cells";
|
field public static final String OPSTR_NEIGHBORING_CELLS = "android:neighboring_cells";
|
||||||
field public static final String OPSTR_PLAY_AUDIO = "android:play_audio";
|
field public static final String OPSTR_PLAY_AUDIO = "android:play_audio";
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ package android {
|
|||||||
field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
|
field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
|
||||||
field public static final String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
|
field public static final String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
|
||||||
field public static final String MANAGE_EXTERNAL_STORAGE = "android.permission.MANAGE_EXTERNAL_STORAGE";
|
field public static final String MANAGE_EXTERNAL_STORAGE = "android.permission.MANAGE_EXTERNAL_STORAGE";
|
||||||
|
field public static final String MANAGE_ONGOING_CALLS = "android.permission.MANAGE_ONGOING_CALLS";
|
||||||
field public static final String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
|
field public static final String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
|
||||||
field public static final String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
|
field public static final String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
|
||||||
field public static final String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
|
field public static final String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ package android.app {
|
|||||||
field public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
field public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
||||||
field public static final String OPSTR_MANAGE_EXTERNAL_STORAGE = "android:manage_external_storage";
|
field public static final String OPSTR_MANAGE_EXTERNAL_STORAGE = "android:manage_external_storage";
|
||||||
field public static final String OPSTR_MANAGE_IPSEC_TUNNELS = "android:manage_ipsec_tunnels";
|
field public static final String OPSTR_MANAGE_IPSEC_TUNNELS = "android:manage_ipsec_tunnels";
|
||||||
|
field public static final String OPSTR_MANAGE_ONGOING_CALLS = "android:manage_ongoing_calls";
|
||||||
field public static final String OPSTR_MUTE_MICROPHONE = "android:mute_microphone";
|
field public static final String OPSTR_MUTE_MICROPHONE = "android:mute_microphone";
|
||||||
field public static final String OPSTR_NEIGHBORING_CELLS = "android:neighboring_cells";
|
field public static final String OPSTR_NEIGHBORING_CELLS = "android:neighboring_cells";
|
||||||
field public static final String OPSTR_PLAY_AUDIO = "android:play_audio";
|
field public static final String OPSTR_PLAY_AUDIO = "android:play_audio";
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ package android.app {
|
|||||||
field public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time";
|
field public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time";
|
||||||
field public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time";
|
field public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time";
|
||||||
field public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time";
|
field public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time";
|
||||||
|
field public static final String OPSTR_MANAGE_ONGOING_CALLS = "android:manage_ongoing_calls";
|
||||||
field public static final int OP_COARSE_LOCATION = 0; // 0x0
|
field public static final int OP_COARSE_LOCATION = 0; // 0x0
|
||||||
field public static final int OP_RECORD_AUDIO = 27; // 0x1b
|
field public static final int OP_RECORD_AUDIO = 27; // 0x1b
|
||||||
field public static final int OP_START_FOREGROUND = 76; // 0x4c
|
field public static final int OP_START_FOREGROUND = 76; // 0x4c
|
||||||
|
|||||||
@@ -846,6 +846,8 @@ public class AppOpsManager {
|
|||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public static final int OP_SEND_SMS = AppProtoEnums.APP_OP_SEND_SMS;
|
public static final int OP_SEND_SMS = AppProtoEnums.APP_OP_SEND_SMS;
|
||||||
/** @hide */
|
/** @hide */
|
||||||
|
public static final int OP_MANAGE_ONGOING_CALLS = AppProtoEnums.APP_OP_MANAGE_ONGOING_CALLS;
|
||||||
|
/** @hide */
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public static final int OP_READ_ICC_SMS = AppProtoEnums.APP_OP_READ_ICC_SMS;
|
public static final int OP_READ_ICC_SMS = AppProtoEnums.APP_OP_READ_ICC_SMS;
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -1136,7 +1138,7 @@ public class AppOpsManager {
|
|||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||||
public static final int _NUM_OP = 103;
|
public static final int _NUM_OP = 104;
|
||||||
|
|
||||||
/** 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";
|
||||||
@@ -1447,6 +1449,15 @@ public class AppOpsManager {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grants an app access to the {@link android.telecom.InCallService} API to see
|
||||||
|
* information about ongoing calls and to enable control of calls.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
@TestApi
|
||||||
|
public static final String OPSTR_MANAGE_ONGOING_CALLS = "android:manage_ongoing_calls";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AppOp granted to apps that we are started via {@code am instrument -e --no-isolated-storage}
|
* AppOp granted to apps that we are started via {@code am instrument -e --no-isolated-storage}
|
||||||
*
|
*
|
||||||
@@ -1552,6 +1563,7 @@ public class AppOpsManager {
|
|||||||
OP_MANAGE_EXTERNAL_STORAGE,
|
OP_MANAGE_EXTERNAL_STORAGE,
|
||||||
OP_INTERACT_ACROSS_PROFILES,
|
OP_INTERACT_ACROSS_PROFILES,
|
||||||
OP_LOADER_USAGE_STATS,
|
OP_LOADER_USAGE_STATS,
|
||||||
|
OP_MANAGE_ONGOING_CALLS,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1666,6 +1678,7 @@ public class AppOpsManager {
|
|||||||
OP_PHONE_CALL_MICROPHONE, // OP_PHONE_CALL_MICROPHONE
|
OP_PHONE_CALL_MICROPHONE, // OP_PHONE_CALL_MICROPHONE
|
||||||
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
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1775,6 +1788,7 @@ public class AppOpsManager {
|
|||||||
OPSTR_PHONE_CALL_MICROPHONE,
|
OPSTR_PHONE_CALL_MICROPHONE,
|
||||||
OPSTR_PHONE_CALL_CAMERA,
|
OPSTR_PHONE_CALL_CAMERA,
|
||||||
OPSTR_RECORD_AUDIO_HOTWORD,
|
OPSTR_RECORD_AUDIO_HOTWORD,
|
||||||
|
OPSTR_MANAGE_ONGOING_CALLS,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1885,6 +1899,7 @@ public class AppOpsManager {
|
|||||||
"PHONE_CALL_MICROPHONE",
|
"PHONE_CALL_MICROPHONE",
|
||||||
"PHONE_CALL_CAMERA",
|
"PHONE_CALL_CAMERA",
|
||||||
"RECORD_AUDIO_HOTWORD",
|
"RECORD_AUDIO_HOTWORD",
|
||||||
|
"MANAGE_ONGOING_CALLS",
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1996,6 +2011,7 @@ public class AppOpsManager {
|
|||||||
null, // no permission for OP_PHONE_CALL_MICROPHONE
|
null, // no permission for OP_PHONE_CALL_MICROPHONE
|
||||||
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,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2107,6 +2123,7 @@ public class AppOpsManager {
|
|||||||
null, // PHONE_CALL_MICROPHONE
|
null, // PHONE_CALL_MICROPHONE
|
||||||
null, // PHONE_CALL_MICROPHONE
|
null, // PHONE_CALL_MICROPHONE
|
||||||
null, // RECORD_AUDIO_HOTWORD
|
null, // RECORD_AUDIO_HOTWORD
|
||||||
|
null, // MANAGE_ONGOING_CALLS
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2217,6 +2234,7 @@ public class AppOpsManager {
|
|||||||
null, // PHONE_CALL_MICROPHONE
|
null, // PHONE_CALL_MICROPHONE
|
||||||
null, // PHONE_CALL_CAMERA
|
null, // PHONE_CALL_CAMERA
|
||||||
null, // RECORD_AUDIO_HOTWORD
|
null, // RECORD_AUDIO_HOTWORD
|
||||||
|
null, // MANAGE_ONGOING_CALLS
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2326,6 +2344,7 @@ public class AppOpsManager {
|
|||||||
AppOpsManager.MODE_ALLOWED, // PHONE_CALL_MICROPHONE
|
AppOpsManager.MODE_ALLOWED, // PHONE_CALL_MICROPHONE
|
||||||
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
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2439,6 +2458,7 @@ public class AppOpsManager {
|
|||||||
false, // PHONE_CALL_MICROPHONE
|
false, // PHONE_CALL_MICROPHONE
|
||||||
false, // PHONE_CALL_CAMERA
|
false, // PHONE_CALL_CAMERA
|
||||||
false, // RECORD_AUDIO_HOTWORD
|
false, // RECORD_AUDIO_HOTWORD
|
||||||
|
true, // MANAGE_ONGOING_CALLS
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -210,4 +210,5 @@ enum AppOpEnum {
|
|||||||
APP_OP_PHONE_CALL_MICROPHONE = 100;
|
APP_OP_PHONE_CALL_MICROPHONE = 100;
|
||||||
APP_OP_PHONE_CALL_CAMERA = 101;
|
APP_OP_PHONE_CALL_CAMERA = 101;
|
||||||
APP_OP_RECORD_AUDIO_HOTWORD = 102;
|
APP_OP_RECORD_AUDIO_HOTWORD = 102;
|
||||||
|
APP_OP_MANAGE_ONGOING_CALLS = 103;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2193,6 +2193,11 @@
|
|||||||
<permission android:name="android.permission.BIND_INCALL_SERVICE"
|
<permission android:name="android.permission.BIND_INCALL_SERVICE"
|
||||||
android:protectionLevel="signature|privileged" />
|
android:protectionLevel="signature|privileged" />
|
||||||
|
|
||||||
|
<!-- Allows to query ongoing call details and manage ongoing calls
|
||||||
|
<p>Protection level: signature|appop -->
|
||||||
|
<permission android:name="android.permission.MANAGE_ONGOING_CALLS"
|
||||||
|
android:protectionLevel="signature|appop" />
|
||||||
|
|
||||||
<!-- Allows the app to request network scans from telephony.
|
<!-- Allows the app to request network scans from telephony.
|
||||||
<p>Not for use by third-party applications.
|
<p>Not for use by third-party applications.
|
||||||
@SystemApi @hide-->
|
@SystemApi @hide-->
|
||||||
|
|||||||
Reference in New Issue
Block a user