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

Commit 31d7ce89 authored by Alex Lin's avatar Alex Lin
Browse files

Change Euicc dump api locktime to 5 seconds

Change Euicc dump api's lock time from 30 to 5 seconds
Bug: 150126492
Test: manually tested by grabbing bug report.

Change-Id: I8014397f849efe47156f058740196cbb3a126faf
Merged-Id: I8014397f849efe47156f058740196cbb3a126faf
parent 814d22e1
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) {