Loading src/java/com/android/internal/telephony/Phone.java +5 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.internal.telephony; import android.annotation.Nullable; import android.app.BroadcastOptions; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; Loading Loading @@ -2438,10 +2439,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { */ public void sendDialerSpecialCode(String code) { if (!TextUtils.isEmpty(code)) { final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setAllowBackgroundActivityStarts(true); Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION, Uri.parse("android_secret_code://" + code)); intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcast(intent); mContext.sendBroadcast(intent, null, options.toBundle()); // {@link TelephonyManager.ACTION_SECRET_CODE} will replace {@link // TelephonyIntents#SECRET_CODE_ACTION} in the next Android version. Before Loading @@ -2449,7 +2452,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { Intent secrectCodeIntent = new Intent(TelephonyManager.ACTION_SECRET_CODE, Uri.parse("android_secret_code://" + code)); intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcast(secrectCodeIntent); mContext.sendBroadcast(secrectCodeIntent, null, options.toBundle()); } } Loading Loading
src/java/com/android/internal/telephony/Phone.java +5 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.internal.telephony; import android.annotation.Nullable; import android.app.BroadcastOptions; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; Loading Loading @@ -2438,10 +2439,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { */ public void sendDialerSpecialCode(String code) { if (!TextUtils.isEmpty(code)) { final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setAllowBackgroundActivityStarts(true); Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION, Uri.parse("android_secret_code://" + code)); intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcast(intent); mContext.sendBroadcast(intent, null, options.toBundle()); // {@link TelephonyManager.ACTION_SECRET_CODE} will replace {@link // TelephonyIntents#SECRET_CODE_ACTION} in the next Android version. Before Loading @@ -2449,7 +2452,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { Intent secrectCodeIntent = new Intent(TelephonyManager.ACTION_SECRET_CODE, Uri.parse("android_secret_code://" + code)); intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcast(secrectCodeIntent); mContext.sendBroadcast(secrectCodeIntent, null, options.toBundle()); } } Loading