Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11893,6 +11893,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Boolean>); method @Deprecated public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3318,6 +3318,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void refreshUiccProfile(); method @Deprecated public void setCarrierTestOverride(String, String, String, String, String, String, String); method public void setCarrierTestOverride(String, String, String, String, String, String, String, String, String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Boolean>); method @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public void updateTestOtaEmergencyNumberDbFilePath(@NonNull String); field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 Loading telephony/java/android/telephony/TelephonyManager.java +46 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ import android.util.Pair; import com.android.ims.internal.IImsServiceFeatureCallback; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.IBooleanConsumer; import com.android.internal.telephony.INumberVerificationCallback; import com.android.internal.telephony.IOns; import com.android.internal.telephony.IPhoneSubInfo; Loading Loading @@ -12524,6 +12525,51 @@ public class TelephonyManager { return true; } /** * Specify which bands modem's background scan must act on. * If {@code specifiers} is non-empty, the scan will be restricted to the bands specified. * Otherwise, it scans all bands. * * For example, CBRS is only on LTE band 48. By specifying this band, * modem saves more power. * * @param specifiers which bands to scan. * @param executor The executor to execute the callback on * @param callback The callback that gets invoked when the radio responds to the request. Called * with {@code true} if the request succeeded, {@code false} otherwise. * @hide */ @SystemApi @TestApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull List<RadioAccessSpecifier> specifiers, @Nullable @CallbackExecutor Executor executor, @Nullable Consumer<Boolean> callback) { Objects.requireNonNull(specifiers, "Specifiers must not be null."); if (callback != null) { Objects.requireNonNull(executor, "Executor must not be null when" + " the callback is nonnull"); } IBooleanConsumer aidlConsumer = callback == null ? null : new IBooleanConsumer.Stub() { @Override public void accept(boolean result) { executor.execute(() -> callback.accept(result)); } }; try { ITelephony service = getITelephony(); if (service != null) { service.setSystemSelectionChannels(specifiers, getSubId(), aidlConsumer); } } catch (RemoteException ex) { if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } /** * Verifies whether the input MCC/MNC and MVNO correspond to the current carrier. * Loading telephony/java/com/android/internal/telephony/IBooleanConsumer.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.telephony; // Copies consumer pattern for an operation that requires a boolean result from another process to // finish. oneway interface IBooleanConsumer { void accept(boolean result); } No newline at end of file telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.telephony.NeighboringCellInfo; import android.telephony.NetworkScanRequest; import android.telephony.PhoneNumberRange; import android.telephony.RadioAccessFamily; import android.telephony.RadioAccessSpecifier; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyHistogram; Loading @@ -54,6 +55,7 @@ import android.telephony.ims.aidl.IImsRegistration; import android.telephony.ims.aidl.IImsRegistrationCallback; import com.android.ims.internal.IImsServiceFeatureCallback; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.IBooleanConsumer; import com.android.internal.telephony.IIntegerConsumer; import com.android.internal.telephony.INumberVerificationCallback; import com.android.internal.telephony.OperatorInfo; Loading Loading @@ -2126,6 +2128,9 @@ interface ITelephony { boolean isApnMetered(int apnType, int subId); oneway void setSystemSelectionChannels(in List<RadioAccessSpecifier> specifiers, int subId, IBooleanConsumer resultCallback); boolean isMvnoMatched(int subId, int mvnoType, String mvnoMatchData); /** Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11893,6 +11893,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Boolean>); method @Deprecated public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3318,6 +3318,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void refreshUiccProfile(); method @Deprecated public void setCarrierTestOverride(String, String, String, String, String, String, String); method public void setCarrierTestOverride(String, String, String, String, String, String, String, String, String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Boolean>); method @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public void updateTestOtaEmergencyNumberDbFilePath(@NonNull String); field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 Loading
telephony/java/android/telephony/TelephonyManager.java +46 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ import android.util.Pair; import com.android.ims.internal.IImsServiceFeatureCallback; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.IBooleanConsumer; import com.android.internal.telephony.INumberVerificationCallback; import com.android.internal.telephony.IOns; import com.android.internal.telephony.IPhoneSubInfo; Loading Loading @@ -12524,6 +12525,51 @@ public class TelephonyManager { return true; } /** * Specify which bands modem's background scan must act on. * If {@code specifiers} is non-empty, the scan will be restricted to the bands specified. * Otherwise, it scans all bands. * * For example, CBRS is only on LTE band 48. By specifying this band, * modem saves more power. * * @param specifiers which bands to scan. * @param executor The executor to execute the callback on * @param callback The callback that gets invoked when the radio responds to the request. Called * with {@code true} if the request succeeded, {@code false} otherwise. * @hide */ @SystemApi @TestApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull List<RadioAccessSpecifier> specifiers, @Nullable @CallbackExecutor Executor executor, @Nullable Consumer<Boolean> callback) { Objects.requireNonNull(specifiers, "Specifiers must not be null."); if (callback != null) { Objects.requireNonNull(executor, "Executor must not be null when" + " the callback is nonnull"); } IBooleanConsumer aidlConsumer = callback == null ? null : new IBooleanConsumer.Stub() { @Override public void accept(boolean result) { executor.execute(() -> callback.accept(result)); } }; try { ITelephony service = getITelephony(); if (service != null) { service.setSystemSelectionChannels(specifiers, getSubId(), aidlConsumer); } } catch (RemoteException ex) { if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } /** * Verifies whether the input MCC/MNC and MVNO correspond to the current carrier. * Loading
telephony/java/com/android/internal/telephony/IBooleanConsumer.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.telephony; // Copies consumer pattern for an operation that requires a boolean result from another process to // finish. oneway interface IBooleanConsumer { void accept(boolean result); } No newline at end of file
telephony/java/com/android/internal/telephony/ITelephony.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.telephony.NeighboringCellInfo; import android.telephony.NetworkScanRequest; import android.telephony.PhoneNumberRange; import android.telephony.RadioAccessFamily; import android.telephony.RadioAccessSpecifier; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyHistogram; Loading @@ -54,6 +55,7 @@ import android.telephony.ims.aidl.IImsRegistration; import android.telephony.ims.aidl.IImsRegistrationCallback; import com.android.ims.internal.IImsServiceFeatureCallback; import com.android.internal.telephony.CellNetworkScanResult; import com.android.internal.telephony.IBooleanConsumer; import com.android.internal.telephony.IIntegerConsumer; import com.android.internal.telephony.INumberVerificationCallback; import com.android.internal.telephony.OperatorInfo; Loading Loading @@ -2126,6 +2128,9 @@ interface ITelephony { boolean isApnMetered(int apnType, int subId); oneway void setSystemSelectionChannels(in List<RadioAccessSpecifier> specifiers, int subId, IBooleanConsumer resultCallback); boolean isMvnoMatched(int subId, int mvnoType, String mvnoMatchData); /** Loading