Loading Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,8 @@ LOCAL_SRC_FILES += \ telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \ telephony/java/com/android/internal/telephony/gsm/ISimPhoneBook.aidl \ telephony/java/com/android/internal/telephony/gsm/ISms.aidl \ wifi/java/android/net/wifi/IWifiManager.aidl wifi/java/android/net/wifi/IWifiManager.aidl \ telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl # FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) Loading telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl 0 → 100644 +31 −0 Original line number Diff line number Diff line package com.android.internal.telephony; /** * Interface used to interact with extended MMI/USSD network service. */ interface IExtendedNetworkService { /** * Set a MMI/USSD command to ExtendedNetworkService for further process. * This should be called when a MMI command is placed from panel. * @param number the dialed MMI/USSD number. */ void setMmiString(String number); /** * return the specific string which is used to prompt MMI/USSD is running */ CharSequence getMmiRunningText(); /** * Get specific message which should be displayed on pop-up dialog. * @param text original MMI/USSD message response from framework * @return specific user message correspond to text. null stands for no pop-up dialog need to show. */ CharSequence getUserMessage(CharSequence text); /** * Clear pre-set MMI/USSD command. * This should be called when user cancel a pre-dialed MMI command. */ void clearMmiString(); } telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java +21 −3 Original line number Diff line number Diff line Loading @@ -1212,8 +1212,10 @@ public final class GsmMmiCode extends Handler implements MmiCode } else if (sc.equals(SC_WAIT)) { // Call Waiting includes additional data in the response. sb.append(createQueryCallWaitingResultMessage(ints[1])); } else if (isServiceCodeCallBarring(sc) || (ints[0] == 1)) { } else if (isServiceCodeCallBarring(sc)) { // ints[0] for Call Barring is a bit vector of services sb.append(createQueryCallBarringResultMessage(ints[0])); } else if (ints[0] == 1) { // for all other services, treat it as a boolean sb.append(context.getText(com.android.internal.R.string.serviceEnabled)); } else { Loading Loading @@ -1245,6 +1247,22 @@ public final class GsmMmiCode extends Handler implements MmiCode } return sb; } private CharSequence createQueryCallBarringResultMessage(int serviceClass) { StringBuilder sb = new StringBuilder(context.getText(com.android.internal.R.string.serviceEnabledFor)); for (int classMask = 1 ; classMask <= SERVICE_CLASS_MAX ; classMask <<= 1 ) { if ((classMask & serviceClass) != 0) { sb.append("\n"); sb.append(serviceClassToCFString(classMask & serviceClass)); } } return sb; } /*** * TODO: It would be nice to have a method here that can take in a dialstring and Loading Loading
Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,8 @@ LOCAL_SRC_FILES += \ telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \ telephony/java/com/android/internal/telephony/gsm/ISimPhoneBook.aidl \ telephony/java/com/android/internal/telephony/gsm/ISms.aidl \ wifi/java/android/net/wifi/IWifiManager.aidl wifi/java/android/net/wifi/IWifiManager.aidl \ telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl # FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) Loading
telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl 0 → 100644 +31 −0 Original line number Diff line number Diff line package com.android.internal.telephony; /** * Interface used to interact with extended MMI/USSD network service. */ interface IExtendedNetworkService { /** * Set a MMI/USSD command to ExtendedNetworkService for further process. * This should be called when a MMI command is placed from panel. * @param number the dialed MMI/USSD number. */ void setMmiString(String number); /** * return the specific string which is used to prompt MMI/USSD is running */ CharSequence getMmiRunningText(); /** * Get specific message which should be displayed on pop-up dialog. * @param text original MMI/USSD message response from framework * @return specific user message correspond to text. null stands for no pop-up dialog need to show. */ CharSequence getUserMessage(CharSequence text); /** * Clear pre-set MMI/USSD command. * This should be called when user cancel a pre-dialed MMI command. */ void clearMmiString(); }
telephony/java/com/android/internal/telephony/gsm/GsmMmiCode.java +21 −3 Original line number Diff line number Diff line Loading @@ -1212,8 +1212,10 @@ public final class GsmMmiCode extends Handler implements MmiCode } else if (sc.equals(SC_WAIT)) { // Call Waiting includes additional data in the response. sb.append(createQueryCallWaitingResultMessage(ints[1])); } else if (isServiceCodeCallBarring(sc) || (ints[0] == 1)) { } else if (isServiceCodeCallBarring(sc)) { // ints[0] for Call Barring is a bit vector of services sb.append(createQueryCallBarringResultMessage(ints[0])); } else if (ints[0] == 1) { // for all other services, treat it as a boolean sb.append(context.getText(com.android.internal.R.string.serviceEnabled)); } else { Loading Loading @@ -1245,6 +1247,22 @@ public final class GsmMmiCode extends Handler implements MmiCode } return sb; } private CharSequence createQueryCallBarringResultMessage(int serviceClass) { StringBuilder sb = new StringBuilder(context.getText(com.android.internal.R.string.serviceEnabledFor)); for (int classMask = 1 ; classMask <= SERVICE_CLASS_MAX ; classMask <<= 1 ) { if ((classMask & serviceClass) != 0) { sb.append("\n"); sb.append(serviceClassToCFString(classMask & serviceClass)); } } return sb; } /*** * TODO: It would be nice to have a method here that can take in a dialstring and Loading