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

Commit 02f006e1 authored by Alex Lin's avatar Alex Lin Committed by Gerrit Code Review
Browse files

Merge "Change Euicc dump api locktime to 5 seconds"

parents c43a3b5a 31d7ce89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
     * true or onServiceDisconnected is called (and no package change has occurred which should
     * force us to reestablish the binding).
     */
    static final int BIND_TIMEOUT_MILLIS = 30000;
    private static final int BIND_TIMEOUT_MILLIS = 30000;

    /**
     * Maximum amount of idle time to hold the binding while in {@link ConnectedState}. After this,
+7 −4
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@
 */
package com.android.internal.telephony.euicc;

import static com.android.internal.telephony.euicc.EuiccConnector.BIND_TIMEOUT_MILLIS;

import android.Manifest;
import android.Manifest.permission;
import android.annotation.NonNull;
@@ -72,6 +70,11 @@ public class EuiccController extends IEuiccController.Stub {
    @VisibleForTesting
    static final String EXTRA_OPERATION = "operation";

    /**
     * Time out for {@link #dump(FileDescriptor, PrintWriter, String[])}
     */
    private static final int EUICC_DUMP_TIME_OUT_SECONDS = 5;

    // Aliases so line lengths stay short.
    private static final int OK = EuiccManager.EMBEDDED_SUBSCRIPTION_RESULT_OK;
    private static final int RESOLVABLE_ERROR =
@@ -1295,8 +1298,8 @@ public class EuiccController extends IEuiccController.Stub {
                }
            });

            // Wait up to 30 seconds
            if (!countDownLatch.await(BIND_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS)) {
            // Wait up to 5 seconds
            if (!countDownLatch.await(EUICC_DUMP_TIME_OUT_SECONDS, TimeUnit.SECONDS)) {
                pw.println("===== EUICC SERVICE TIMEOUT =====");
            }
        } catch (InterruptedException e) {