Merge "Change the Listener API names" am: fe6978a73f am: 05430c9d1f
am: bc79a1c468
Change-Id: Ie1672f6e103dd59ee97b54681836d0e1fda7c2ae
This commit is contained in:
@@ -7768,8 +7768,8 @@ package android.telephony {
|
|||||||
field public static final int LISTEN_CALL_ATTRIBUTES_CHANGED = 67108864; // 0x4000000
|
field public static final int LISTEN_CALL_ATTRIBUTES_CHANGED = 67108864; // 0x4000000
|
||||||
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_CALL_DISCONNECT_CAUSES = 33554432; // 0x2000000
|
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_CALL_DISCONNECT_CAUSES = 33554432; // 0x2000000
|
||||||
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_IMS_CALL_DISCONNECT_CAUSES = 134217728; // 0x8000000
|
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_IMS_CALL_DISCONNECT_CAUSES = 134217728; // 0x8000000
|
||||||
field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_CALL_EMERGENCY_NUMBER = 268435456; // 0x10000000
|
field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 268435456; // 0x10000000
|
||||||
field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_SMS_EMERGENCY_NUMBER = 536870912; // 0x20000000
|
field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 536870912; // 0x20000000
|
||||||
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_CALL_STATE = 2048; // 0x800
|
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_CALL_STATE = 2048; // 0x800
|
||||||
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_DATA_CONNECTION_STATE = 4096; // 0x1000
|
field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_DATA_CONNECTION_STATE = 4096; // 0x1000
|
||||||
field public static final int LISTEN_RADIO_POWER_STATE_CHANGED = 8388608; // 0x800000
|
field public static final int LISTEN_RADIO_POWER_STATE_CHANGED = 8388608; // 0x800000
|
||||||
|
|||||||
@@ -2866,8 +2866,8 @@ package android.telephony {
|
|||||||
public class PhoneStateListener {
|
public class PhoneStateListener {
|
||||||
method public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber);
|
method public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber);
|
||||||
method public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber);
|
method public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber);
|
||||||
field @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public static final int LISTEN_OUTGOING_CALL_EMERGENCY_NUMBER = 268435456; // 0x10000000
|
field @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 268435456; // 0x10000000
|
||||||
field @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public static final int LISTEN_OUTGOING_SMS_EMERGENCY_NUMBER = 536870912; // 0x20000000
|
field @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 536870912; // 0x20000000
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ServiceState implements android.os.Parcelable {
|
public class ServiceState implements android.os.Parcelable {
|
||||||
|
|||||||
@@ -272,8 +272,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE;
|
PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE;
|
||||||
|
|
||||||
static final int READ_ACTIVE_EMERGENCY_SESSION_PERMISSION_MASK =
|
static final int READ_ACTIVE_EMERGENCY_SESSION_PERMISSION_MASK =
|
||||||
PhoneStateListener.LISTEN_OUTGOING_CALL_EMERGENCY_NUMBER
|
PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_CALL
|
||||||
| PhoneStateListener.LISTEN_OUTGOING_SMS_EMERGENCY_NUMBER;
|
| PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_SMS;
|
||||||
|
|
||||||
private static final int MSG_USER_SWITCHED = 1;
|
private static final int MSG_USER_SWITCHED = 1;
|
||||||
private static final int MSG_UPDATE_DEFAULT_SUB = 2;
|
private static final int MSG_UPDATE_DEFAULT_SUB = 2;
|
||||||
@@ -1946,7 +1946,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mOutgoingCallEmergencyNumber[phoneId] = emergencyNumber;
|
mOutgoingCallEmergencyNumber[phoneId] = emergencyNumber;
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
if (r.matchPhoneStateListenerEvent(
|
if (r.matchPhoneStateListenerEvent(
|
||||||
PhoneStateListener.LISTEN_OUTGOING_CALL_EMERGENCY_NUMBER)
|
PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_CALL)
|
||||||
&& idMatch(r.subId, subId, phoneId)) {
|
&& idMatch(r.subId, subId, phoneId)) {
|
||||||
try {
|
try {
|
||||||
r.callback.onOutgoingEmergencyCall(emergencyNumber);
|
r.callback.onOutgoingEmergencyCall(emergencyNumber);
|
||||||
@@ -1971,7 +1971,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mOutgoingSmsEmergencyNumber[phoneId] = emergencyNumber;
|
mOutgoingSmsEmergencyNumber[phoneId] = emergencyNumber;
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
if (r.matchPhoneStateListenerEvent(
|
if (r.matchPhoneStateListenerEvent(
|
||||||
PhoneStateListener.LISTEN_OUTGOING_SMS_EMERGENCY_NUMBER)
|
PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_SMS)
|
||||||
&& idMatch(r.subId, subId, phoneId)) {
|
&& idMatch(r.subId, subId, phoneId)) {
|
||||||
try {
|
try {
|
||||||
r.callback.onOutgoingEmergencySms(emergencyNumber);
|
r.callback.onOutgoingEmergencySms(emergencyNumber);
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ public class PhoneStateListener {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
@TestApi
|
@TestApi
|
||||||
@RequiresPermission(Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION)
|
@RequiresPermission(Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION)
|
||||||
public static final int LISTEN_OUTGOING_CALL_EMERGENCY_NUMBER = 0x10000000;
|
public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 0x10000000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen for the emergency number placed from an outgoing SMS.
|
* Listen for the emergency number placed from an outgoing SMS.
|
||||||
@@ -387,7 +387,7 @@ public class PhoneStateListener {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
@TestApi
|
@TestApi
|
||||||
@RequiresPermission(Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION)
|
@RequiresPermission(Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION)
|
||||||
public static final int LISTEN_OUTGOING_SMS_EMERGENCY_NUMBER = 0x20000000;
|
public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 0x20000000;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Subscription used to listen to the phone state changes
|
* Subscription used to listen to the phone state changes
|
||||||
|
|||||||
Reference in New Issue
Block a user