Loading src/java/com/android/internal/telephony/CommandsInterface.java +5 −0 Original line number Diff line number Diff line Loading @@ -1388,6 +1388,11 @@ public interface CommandsInterface { void invokeOemRilRequestStrings(String[] strings, Message response); /** * Fires when RIL_UNSOL_OEM_HOOK_RAW is received from the RIL. */ void setOnUnsolOemHookRaw(Handler h, int what, Object obj); void unSetOnUnsolOemHookRaw(Handler h); /** * Send TERMINAL RESPONSE to the SIM, after processing a proactive command Loading src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +9 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,15 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } @Override public void notifyOemHookRawEventForSubscriber(long subId, byte[] rawData) { try { mRegistry.notifyOemHookRawEventForSubscriber(subId, rawData); } catch (RemoteException ex) { // system process is dead } } /** * Convert the {@link PhoneConstants.State} enum into the TelephonyManager.CALL_STATE_* * constants for the public API. Loading src/java/com/android/internal/telephony/PhoneBase.java +16 −1 Original line number Diff line number Diff line Loading @@ -152,7 +152,8 @@ public abstract class PhoneBase extends Handler implements Phone { protected static final int EVENT_SRVCC_STATE_CHANGED = 31; protected static final int EVENT_INITIATE_SILENT_REDIAL = 32; protected static final int EVENT_RADIO_NOT_AVAILABLE = 33; protected static final int EVENT_LAST = EVENT_RADIO_NOT_AVAILABLE; protected static final int EVENT_UNSOL_OEM_HOOK_RAW = 34; protected static final int EVENT_LAST = EVENT_UNSOL_OEM_HOOK_RAW; // Key used to read/write current CLIR setting public static final String CLIR_KEY = "clir_key"; Loading Loading @@ -403,6 +404,7 @@ public abstract class PhoneBase extends Handler implements Phone { mContext.registerReceiver(mImsIntentReceiver, filter); mCi.registerForSrvccStateChanged(this, EVENT_SRVCC_STATE_CHANGED, null); mCi.setOnUnsolOemHookRaw(this, EVENT_UNSOL_OEM_HOOK_RAW, null); } @Override Loading @@ -418,6 +420,7 @@ public abstract class PhoneBase extends Handler implements Phone { mSmsUsageMonitor.dispose(); mUiccController.unregisterForIccChanged(this); mCi.unregisterForSrvccStateChanged(this); mCi.unSetOnUnsolOemHookRaw(this); if (mTelephonyTester != null) { mTelephonyTester.dispose(); Loading Loading @@ -520,6 +523,18 @@ public abstract class PhoneBase extends Handler implements Phone { } break; case EVENT_UNSOL_OEM_HOOK_RAW: ar = (AsyncResult)msg.obj; if (ar.exception == null) { byte[] data = (byte[])ar.result; Rlog.d(LOG_TAG, "EVENT_UNSOL_OEM_HOOK_RAW data=" + IccUtils.bytesToHexString(data)); mNotifier.notifyOemHookRawEventForSubscriber(getSubId(), data); } else { Rlog.e(LOG_TAG, "OEM hook raw exception: " + ar.exception); } break; default: throw new RuntimeException("unexpected event not handled"); } Loading src/java/com/android/internal/telephony/PhoneNotifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,6 @@ public interface PhoneNotifier { public void notifyDataConnectionRealTimeInfo(Phone sender, DataConnectionRealTimeInfo dcRtInfo); public void notifyVoLteServiceStateChanged(Phone sender, VoLteServiceState lteState); public void notifyOemHookRawEventForSubscriber(long subId, byte[] rawData); } Loading
src/java/com/android/internal/telephony/CommandsInterface.java +5 −0 Original line number Diff line number Diff line Loading @@ -1388,6 +1388,11 @@ public interface CommandsInterface { void invokeOemRilRequestStrings(String[] strings, Message response); /** * Fires when RIL_UNSOL_OEM_HOOK_RAW is received from the RIL. */ void setOnUnsolOemHookRaw(Handler h, int what, Object obj); void unSetOnUnsolOemHookRaw(Handler h); /** * Send TERMINAL RESPONSE to the SIM, after processing a proactive command Loading
src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +9 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,15 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } @Override public void notifyOemHookRawEventForSubscriber(long subId, byte[] rawData) { try { mRegistry.notifyOemHookRawEventForSubscriber(subId, rawData); } catch (RemoteException ex) { // system process is dead } } /** * Convert the {@link PhoneConstants.State} enum into the TelephonyManager.CALL_STATE_* * constants for the public API. Loading
src/java/com/android/internal/telephony/PhoneBase.java +16 −1 Original line number Diff line number Diff line Loading @@ -152,7 +152,8 @@ public abstract class PhoneBase extends Handler implements Phone { protected static final int EVENT_SRVCC_STATE_CHANGED = 31; protected static final int EVENT_INITIATE_SILENT_REDIAL = 32; protected static final int EVENT_RADIO_NOT_AVAILABLE = 33; protected static final int EVENT_LAST = EVENT_RADIO_NOT_AVAILABLE; protected static final int EVENT_UNSOL_OEM_HOOK_RAW = 34; protected static final int EVENT_LAST = EVENT_UNSOL_OEM_HOOK_RAW; // Key used to read/write current CLIR setting public static final String CLIR_KEY = "clir_key"; Loading Loading @@ -403,6 +404,7 @@ public abstract class PhoneBase extends Handler implements Phone { mContext.registerReceiver(mImsIntentReceiver, filter); mCi.registerForSrvccStateChanged(this, EVENT_SRVCC_STATE_CHANGED, null); mCi.setOnUnsolOemHookRaw(this, EVENT_UNSOL_OEM_HOOK_RAW, null); } @Override Loading @@ -418,6 +420,7 @@ public abstract class PhoneBase extends Handler implements Phone { mSmsUsageMonitor.dispose(); mUiccController.unregisterForIccChanged(this); mCi.unregisterForSrvccStateChanged(this); mCi.unSetOnUnsolOemHookRaw(this); if (mTelephonyTester != null) { mTelephonyTester.dispose(); Loading Loading @@ -520,6 +523,18 @@ public abstract class PhoneBase extends Handler implements Phone { } break; case EVENT_UNSOL_OEM_HOOK_RAW: ar = (AsyncResult)msg.obj; if (ar.exception == null) { byte[] data = (byte[])ar.result; Rlog.d(LOG_TAG, "EVENT_UNSOL_OEM_HOOK_RAW data=" + IccUtils.bytesToHexString(data)); mNotifier.notifyOemHookRawEventForSubscriber(getSubId(), data); } else { Rlog.e(LOG_TAG, "OEM hook raw exception: " + ar.exception); } break; default: throw new RuntimeException("unexpected event not handled"); } Loading
src/java/com/android/internal/telephony/PhoneNotifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,6 @@ public interface PhoneNotifier { public void notifyDataConnectionRealTimeInfo(Phone sender, DataConnectionRealTimeInfo dcRtInfo); public void notifyVoLteServiceStateChanged(Phone sender, VoLteServiceState lteState); public void notifyOemHookRawEventForSubscriber(long subId, byte[] rawData); }