Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ java_library { "core/java/android/service/euicc/IGetEuiccInfoCallback.aidl", "core/java/android/service/euicc/IGetEuiccProfileInfoListCallback.aidl", "core/java/android/service/euicc/IGetOtaStatusCallback.aidl", "core/java/android/service/euicc/IOtaStatusChangedCallback.aidl", "core/java/android/service/euicc/IRetainSubscriptionsForFactoryResetCallback.aidl", "core/java/android/service/euicc/ISwitchToSubscriptionCallback.aidl", "core/java/android/service/euicc/IUpdateSubscriptionNicknameCallback.aidl", Loading core/java/android/service/euicc/EuiccService.java +42 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,18 @@ public abstract class EuiccService extends Service { return mStubWrapper; } /** * Callback class for {@link #onStartOtaIfNecessary(int, OtaStatusChangedCallback)} * * The status of OTA which can be {@code android.telephony.euicc.EuiccManager#EUICC_OTA_} * * @see IEuiccService#startOtaIfNecessary */ public interface OtaStatusChangedCallback { /** Called when OTA status is changed. */ void onOtaStatusChanged(int status); } /** * Return the EID of the eUICC. * Loading @@ -213,6 +225,16 @@ public abstract class EuiccService extends Service { */ public abstract @OtaStatus int onGetOtaStatus(int slotId); /** * Perform OTA if current OS is not the latest one. * * @param slotId ID of the SIM slot to use for the operation. This is currently not populated * but is here to future-proof the APIs. * @param statusChangedCallback Function called when OTA status changed. */ public abstract void onStartOtaIfNecessary( int slotId, OtaStatusChangedCallback statusChangedCallback); /** * Populate {@link DownloadableSubscription} metadata for the given downloadable subscription. * Loading Loading @@ -395,6 +417,26 @@ public abstract class EuiccService extends Service { }); } @Override public void startOtaIfNecessary( int slotId, IOtaStatusChangedCallback statusChangedCallback) { mExecutor.execute(new Runnable() { @Override public void run() { EuiccService.this.onStartOtaIfNecessary(slotId, new OtaStatusChangedCallback() { @Override public void onOtaStatusChanged(int status) { try { statusChangedCallback.onOtaStatusChanged(status); } catch (RemoteException e) { // Can't communicate with the phone process; ignore. } } }); } }); } @Override public void getOtaStatus(int slotId, IGetOtaStatusCallback callback) { mExecutor.execute(new Runnable() { Loading core/java/android/service/euicc/IEuiccService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.service.euicc.IGetEidCallback; import android.service.euicc.IGetEuiccInfoCallback; import android.service.euicc.IGetEuiccProfileInfoListCallback; import android.service.euicc.IGetOtaStatusCallback; import android.service.euicc.IOtaStatusChangedCallback; import android.service.euicc.IRetainSubscriptionsForFactoryResetCallback; import android.service.euicc.ISwitchToSubscriptionCallback; import android.service.euicc.IUpdateSubscriptionNicknameCallback; Loading @@ -39,6 +40,7 @@ oneway interface IEuiccService { boolean forceDeactivateSim, in IGetDownloadableSubscriptionMetadataCallback callback); void getEid(int slotId, in IGetEidCallback callback); void getOtaStatus(int slotId, in IGetOtaStatusCallback callback); void startOtaIfNecessary(int slotId, in IOtaStatusChangedCallback statusChangedCallback); void getEuiccProfileInfoList(int slotId, in IGetEuiccProfileInfoListCallback callback); void getDefaultDownloadableSubscriptionList(int slotId, boolean forceDeactivateSim, in IGetDefaultDownloadableSubscriptionListCallback callback); Loading core/java/android/service/euicc/IOtaStatusChangedCallback.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 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 android.service.euicc; /** @hide */ oneway interface IOtaStatusChangedCallback { void onOtaStatusChanged(int status); } No newline at end of file core/res/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,9 @@ <protected-broadcast android:name="android.media.tv.action.CHANNEL_BROWSABLE_REQUESTED" /> <protected-broadcast android:name="com.android.server.InputMethodManagerService.SHOW_INPUT_METHOD_PICKER" /> <!-- Added in P --> <protected-broadcast android:name="android.telephony.euicc.action.OTA_STATUS_CHANGED" /> <!-- ====================================================================== --> <!-- RUNTIME PERMISSIONS --> <!-- ====================================================================== --> Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ java_library { "core/java/android/service/euicc/IGetEuiccInfoCallback.aidl", "core/java/android/service/euicc/IGetEuiccProfileInfoListCallback.aidl", "core/java/android/service/euicc/IGetOtaStatusCallback.aidl", "core/java/android/service/euicc/IOtaStatusChangedCallback.aidl", "core/java/android/service/euicc/IRetainSubscriptionsForFactoryResetCallback.aidl", "core/java/android/service/euicc/ISwitchToSubscriptionCallback.aidl", "core/java/android/service/euicc/IUpdateSubscriptionNicknameCallback.aidl", Loading
core/java/android/service/euicc/EuiccService.java +42 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,18 @@ public abstract class EuiccService extends Service { return mStubWrapper; } /** * Callback class for {@link #onStartOtaIfNecessary(int, OtaStatusChangedCallback)} * * The status of OTA which can be {@code android.telephony.euicc.EuiccManager#EUICC_OTA_} * * @see IEuiccService#startOtaIfNecessary */ public interface OtaStatusChangedCallback { /** Called when OTA status is changed. */ void onOtaStatusChanged(int status); } /** * Return the EID of the eUICC. * Loading @@ -213,6 +225,16 @@ public abstract class EuiccService extends Service { */ public abstract @OtaStatus int onGetOtaStatus(int slotId); /** * Perform OTA if current OS is not the latest one. * * @param slotId ID of the SIM slot to use for the operation. This is currently not populated * but is here to future-proof the APIs. * @param statusChangedCallback Function called when OTA status changed. */ public abstract void onStartOtaIfNecessary( int slotId, OtaStatusChangedCallback statusChangedCallback); /** * Populate {@link DownloadableSubscription} metadata for the given downloadable subscription. * Loading Loading @@ -395,6 +417,26 @@ public abstract class EuiccService extends Service { }); } @Override public void startOtaIfNecessary( int slotId, IOtaStatusChangedCallback statusChangedCallback) { mExecutor.execute(new Runnable() { @Override public void run() { EuiccService.this.onStartOtaIfNecessary(slotId, new OtaStatusChangedCallback() { @Override public void onOtaStatusChanged(int status) { try { statusChangedCallback.onOtaStatusChanged(status); } catch (RemoteException e) { // Can't communicate with the phone process; ignore. } } }); } }); } @Override public void getOtaStatus(int slotId, IGetOtaStatusCallback callback) { mExecutor.execute(new Runnable() { Loading
core/java/android/service/euicc/IEuiccService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.service.euicc.IGetEidCallback; import android.service.euicc.IGetEuiccInfoCallback; import android.service.euicc.IGetEuiccProfileInfoListCallback; import android.service.euicc.IGetOtaStatusCallback; import android.service.euicc.IOtaStatusChangedCallback; import android.service.euicc.IRetainSubscriptionsForFactoryResetCallback; import android.service.euicc.ISwitchToSubscriptionCallback; import android.service.euicc.IUpdateSubscriptionNicknameCallback; Loading @@ -39,6 +40,7 @@ oneway interface IEuiccService { boolean forceDeactivateSim, in IGetDownloadableSubscriptionMetadataCallback callback); void getEid(int slotId, in IGetEidCallback callback); void getOtaStatus(int slotId, in IGetOtaStatusCallback callback); void startOtaIfNecessary(int slotId, in IOtaStatusChangedCallback statusChangedCallback); void getEuiccProfileInfoList(int slotId, in IGetEuiccProfileInfoListCallback callback); void getDefaultDownloadableSubscriptionList(int slotId, boolean forceDeactivateSim, in IGetDefaultDownloadableSubscriptionListCallback callback); Loading
core/java/android/service/euicc/IOtaStatusChangedCallback.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 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 android.service.euicc; /** @hide */ oneway interface IOtaStatusChangedCallback { void onOtaStatusChanged(int status); } No newline at end of file
core/res/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,9 @@ <protected-broadcast android:name="android.media.tv.action.CHANNEL_BROWSABLE_REQUESTED" /> <protected-broadcast android:name="com.android.server.InputMethodManagerService.SHOW_INPUT_METHOD_PICKER" /> <!-- Added in P --> <protected-broadcast android:name="android.telephony.euicc.action.OTA_STATUS_CHANGED" /> <!-- ====================================================================== --> <!-- RUNTIME PERMISSIONS --> <!-- ====================================================================== --> Loading