diff options
| author | New Author Steven Liu <stevenliu@motorola.com> | 2014-09-11 10:18:45 -0500 |
|---|---|---|
| committer | Vineeta Srivastava <vsrivastava@google.com> | 2014-09-27 07:16:38 +0000 |
| commit | 485f2095f8ba695b88331c01a2de468b5616a5d7 (patch) | |
| tree | cbf812189263d5fad2222662ffd7cb9576e7babc /telephony | |
| parent | c2f4985e846365311c14b32941956d27df8cbf2f (diff) | |
| download | frameworks_base-485f2095f8ba695b88331c01a2de468b5616a5d7.zip frameworks_base-485f2095f8ba695b88331c01a2de468b5616a5d7.tar.gz frameworks_base-485f2095f8ba695b88331c01a2de468b5616a5d7.tar.bz2 | |
redirect RIL_UNSOL_OEM_HOOK_RAW to system app
Add LISTEN_OEM_HOOK_RAW_EVENT and onOemHookRawEvent to PhoneStateListener.
Bug: 17298769
Change-Id: Iaea054d3cc2925eea1e11f8871faabc7bc9dfb2d
Diffstat (limited to 'telephony')
3 files changed, 28 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index 34da1c9..0dcd7c6 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -212,6 +212,14 @@ public class PhoneStateListener { */ public static final int LISTEN_VOLTE_STATE = 0x00004000; + /** + * Listen for OEM hook raw event + * + * @see #onOemHookRawEvent + * @hide + */ + public static final int LISTEN_OEM_HOOK_RAW_EVENT = 0x00008000; + /* * Subscription used to listen to the phone state changes * @hide @@ -312,6 +320,10 @@ public class PhoneStateListener { case LISTEN_VOLTE_STATE: PhoneStateListener.this.onVoLteServiceStateChanged((VoLteServiceState)msg.obj); break; + case LISTEN_OEM_HOOK_RAW_EVENT: + PhoneStateListener.this.onOemHookRawEvent((byte[])msg.obj); + break; + } } }; @@ -480,6 +492,16 @@ public class PhoneStateListener { } /** + * Callback invoked when OEM hook raw event is received. Requires + * the READ_PRIVILEGED_PHONE_STATE permission. + * @param rawData is the byte array of the OEM hook raw data. + * @hide + */ + public void onOemHookRawEvent(byte[] rawData) { + // default implementation empty + } + + /** * The callback methods need to be called on the handler thread where * this object was created. If the binder did that for us it'd be nice. */ @@ -551,6 +573,10 @@ public class PhoneStateListener { public void onVoLteServiceStateChanged(VoLteServiceState lteState) { Message.obtain(mHandler, LISTEN_VOLTE_STATE, 0, 0, lteState).sendToTarget(); } + + public void onOemHookRawEvent(byte[] rawData) { + Message.obtain(mHandler, LISTEN_OEM_HOOK_RAW_EVENT, 0, 0, rawData).sendToTarget(); + } }; private void log(String s) { diff --git a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl index a95336e..cea62ba 100644 --- a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl +++ b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl @@ -43,5 +43,6 @@ oneway interface IPhoneStateListener { void onPreciseDataConnectionStateChanged(in PreciseDataConnectionState dataConnectionState); void onDataConnectionRealTimeInfoChanged(in DataConnectionRealTimeInfo dcRtInfo); void onVoLteServiceStateChanged(in VoLteServiceState lteState); + void onOemHookRawEvent(in byte[] rawData); } diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl index ea5fa27..39defcf 100644 --- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl @@ -62,4 +62,5 @@ interface ITelephonyRegistry { void notifyCellInfoForSubscriber(in long subId, in List<CellInfo> cellInfo); void notifyDataConnectionRealTimeInfo(in DataConnectionRealTimeInfo dcRtInfo); void notifyVoLteServiceStateChanged(in VoLteServiceState lteState); + void notifyOemHookRawEventForSubscriber(in long subId, in byte[] rawData); } |
