Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c954ce6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix requestProvisionSubscriberId related API to work properly" into main

parents eec75865 a6e7b7d7
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import java.lang.annotation.RetentionPolicy;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
@@ -2636,9 +2635,9 @@ public final class SatelliteManager {
                        if (resultCode == SATELLITE_RESULT_SUCCESS) {
                            if (resultData.containsKey(KEY_REQUEST_PROVISION_SUBSCRIBER_ID_TOKEN)) {
                                List<ProvisionSubscriberId> list =
                                        Collections.singletonList(resultData.getParcelable(
                                        resultData.getParcelableArrayList(
                                                KEY_REQUEST_PROVISION_SUBSCRIBER_ID_TOKEN,
                                                ProvisionSubscriberId.class));
                                                ProvisionSubscriberId.class);
                                executor.execute(() -> Binder.withCleanCallingIdentity(() ->
                                        callback.onResult(list)));
                            } else {
@@ -2692,13 +2691,13 @@ public final class SatelliteManager {
                    @Override
                    protected void onReceiveResult(int resultCode, Bundle resultData) {
                        if (resultCode == SATELLITE_RESULT_SUCCESS) {
                            if (resultData.containsKey(KEY_SATELLITE_PROVISIONED)) {
                            if (resultData.containsKey(KEY_IS_SATELLITE_PROVISIONED)) {
                                boolean isIsProvisioned =
                                        resultData.getBoolean(KEY_SATELLITE_PROVISIONED);
                                        resultData.getBoolean(KEY_IS_SATELLITE_PROVISIONED);
                                executor.execute(() -> Binder.withCleanCallingIdentity(() ->
                                        callback.onResult(isIsProvisioned)));
                            } else {
                                loge("KEY_REQUEST_PROVISION_TOKENS does not exist.");
                                loge("KEY_IS_SATELLITE_PROVISIONED does not exist.");
                                executor.execute(() -> Binder.withCleanCallingIdentity(() ->
                                        callback.onError(new SatelliteException(
                                                SATELLITE_RESULT_REQUEST_FAILED))));
+1 −1
Original line number Diff line number Diff line
@@ -3411,7 +3411,7 @@ interface ITelephony {
     */
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission("
            + "android.Manifest.permission.SATELLITE_COMMUNICATION)")
    void requestProvisionSubscriberIds(in ResultReceiver receiver);
    void requestProvisionSubscriberIds(in ResultReceiver result);

    /**
     * Request to get provisioned status for given a satellite subscriber id.