Loading telephony/java/android/service/euicc/EuiccService.java +15 −3 Original line number Diff line number Diff line Loading @@ -856,10 +856,22 @@ public abstract class EuiccService extends Service { int slotId, IGetAvailableMemoryInBytesCallback callback) { mExecutor.execute( () -> { long availableMemoryInBytes = long availableMemoryInBytes = EuiccManager.EUICC_MEMORY_FIELD_UNAVAILABLE; String unsupportedOperationMessage = ""; try { availableMemoryInBytes = EuiccService.this.onGetAvailableMemoryInBytes(slotId); } catch (UnsupportedOperationException e) { unsupportedOperationMessage = e.getMessage(); } try { if (!unsupportedOperationMessage.isEmpty()) { callback.onUnsupportedOperationException( unsupportedOperationMessage); } else { callback.onSuccess(availableMemoryInBytes); } } catch (RemoteException e) { // Can't communicate with the phone process; ignore. } Loading telephony/java/android/service/euicc/IGetAvailableMemoryInBytesCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -19,4 +19,5 @@ package android.service.euicc; /** @hide */ oneway interface IGetAvailableMemoryInBytesCallback { void onSuccess(long availableMemoryInBytes); void onUnsupportedOperationException(String message); } Loading
telephony/java/android/service/euicc/EuiccService.java +15 −3 Original line number Diff line number Diff line Loading @@ -856,10 +856,22 @@ public abstract class EuiccService extends Service { int slotId, IGetAvailableMemoryInBytesCallback callback) { mExecutor.execute( () -> { long availableMemoryInBytes = long availableMemoryInBytes = EuiccManager.EUICC_MEMORY_FIELD_UNAVAILABLE; String unsupportedOperationMessage = ""; try { availableMemoryInBytes = EuiccService.this.onGetAvailableMemoryInBytes(slotId); } catch (UnsupportedOperationException e) { unsupportedOperationMessage = e.getMessage(); } try { if (!unsupportedOperationMessage.isEmpty()) { callback.onUnsupportedOperationException( unsupportedOperationMessage); } else { callback.onSuccess(availableMemoryInBytes); } } catch (RemoteException e) { // Can't communicate with the phone process; ignore. } Loading
telephony/java/android/service/euicc/IGetAvailableMemoryInBytesCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -19,4 +19,5 @@ package android.service.euicc; /** @hide */ oneway interface IGetAvailableMemoryInBytesCallback { void onSuccess(long availableMemoryInBytes); void onUnsupportedOperationException(String message); }