use of android.telephony.PreciseCallState in project platform_frameworks_base by android.
the class TelephonyRegistry method notifyPreciseCallState.
public void notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState) {
if (!checkNotifyPermission("notifyPreciseCallState()")) {
return;
}
synchronized (mRecords) {
mRingingCallState = ringingCallState;
mForegroundCallState = foregroundCallState;
mBackgroundCallState = backgroundCallState;
mPreciseCallState = new PreciseCallState(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) {
try {
r.callback.onPreciseCallStateChanged(mPreciseCallState);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
}
broadcastPreciseCallStateChanged(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
}
use of android.telephony.PreciseCallState in project android_frameworks_base by DirtyUnicorns.
the class TelephonyRegistry method notifyPreciseCallState.
public void notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState) {
if (!checkNotifyPermission("notifyPreciseCallState()")) {
return;
}
synchronized (mRecords) {
mRingingCallState = ringingCallState;
mForegroundCallState = foregroundCallState;
mBackgroundCallState = backgroundCallState;
mPreciseCallState = new PreciseCallState(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) {
try {
r.callback.onPreciseCallStateChanged(mPreciseCallState);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
}
broadcastPreciseCallStateChanged(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
}
use of android.telephony.PreciseCallState in project android_frameworks_base by AOSPA.
the class TelephonyRegistry method notifyDisconnectCause.
public void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause) {
if (!checkNotifyPermission("notifyDisconnectCause()")) {
return;
}
synchronized (mRecords) {
mPreciseCallState = new PreciseCallState(mRingingCallState, mForegroundCallState, mBackgroundCallState, disconnectCause, preciseDisconnectCause);
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) {
try {
r.callback.onPreciseCallStateChanged(mPreciseCallState);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
}
broadcastPreciseCallStateChanged(mRingingCallState, mForegroundCallState, mBackgroundCallState, disconnectCause, preciseDisconnectCause);
}
use of android.telephony.PreciseCallState in project android_frameworks_base by AOSPA.
the class TelephonyRegistry method notifyPreciseCallState.
public void notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState) {
if (!checkNotifyPermission("notifyPreciseCallState()")) {
return;
}
synchronized (mRecords) {
mRingingCallState = ringingCallState;
mForegroundCallState = foregroundCallState;
mBackgroundCallState = backgroundCallState;
mPreciseCallState = new PreciseCallState(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) {
try {
r.callback.onPreciseCallStateChanged(mPreciseCallState);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
}
broadcastPreciseCallStateChanged(ringingCallState, foregroundCallState, backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID);
}
use of android.telephony.PreciseCallState in project android_frameworks_base by ResurrectionRemix.
the class TelephonyRegistry method notifyDisconnectCause.
public void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause) {
if (!checkNotifyPermission("notifyDisconnectCause()")) {
return;
}
synchronized (mRecords) {
mPreciseCallState = new PreciseCallState(mRingingCallState, mForegroundCallState, mBackgroundCallState, disconnectCause, preciseDisconnectCause);
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) {
try {
r.callback.onPreciseCallStateChanged(mPreciseCallState);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
}
broadcastPreciseCallStateChanged(mRingingCallState, mForegroundCallState, mBackgroundCallState, disconnectCause, preciseDisconnectCause);
}
Aggregations