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

Commit cf2d9181 authored by Eric Biggers's avatar Eric Biggers
Browse files

Remove flag wait_for_internet_ror

Since this flag was launched, remove it and make the corresponding code
unconditional.

Note that locksettings_flags_lib has to be removed rather than left
empty, since otherwise the following build error occurs:

    Error: failed to create java lib

    Caused by:
        production library contains no production flags

Bug: 231660348
Test: atest FrameworksServicesTests:com.android.server.locksettings
Flag: EXEMPT removing wait_for_internet_ror
Change-Id: Ic09ef94b3c3f499cdd987fee04a2742127e9c88a
parent fb6f0572
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -258,7 +258,6 @@ java_library_static {
        "dreams_flags_lib",
        "aconfig_new_storage_flags_lib",
        "powerstats_flags_lib",
        "locksettings_flags_lib",
        "MmdProperties",
        "mmd_flags_lib",
        "profiling_flags_lib",
+0 −11
Original line number Diff line number Diff line
aconfig_declarations {
    name: "locksettings_flags",
    package: "com.android.server.locksettings",
    container: "system",
    srcs: ["*.aconfig"],
}

java_aconfig_library {
    name: "locksettings_flags_lib",
    aconfig_declarations: "locksettings_flags",
}
+21 −45
Original line number Diff line number Diff line
@@ -428,15 +428,11 @@ class RebootEscrowManager {

    /** Wrapper function to set error code serialized through handler, */
    private void setLoadEscrowDataErrorCode(@RebootEscrowErrorCode int value, Handler handler) {
        if (Flags.waitForInternetRor()) {
        mInjector.post(
                handler,
                () -> {
                    mLoadEscrowDataErrorCode = value;
                });
        } else {
            mLoadEscrowDataErrorCode = value;
        }
    }

    /** Wrapper function to compare and set error code serialized through handler. */
@@ -511,7 +507,6 @@ class RebootEscrowManager {
            mWakeLock.acquire(mInjector.getWakeLockTimeoutMillis());
        }

        if (Flags.waitForInternetRor()) {
        // Timeout to stop retrying same as the wake lock timeout.
        mInjector.postDelayed(
                retryHandler,
@@ -523,11 +518,6 @@ class RebootEscrowManager {
        mInjector.post(
                retryHandler,
                () -> loadRebootEscrowDataOnInternet(retryHandler, users, rebootEscrowUsers));
            return;
        }

        mInjector.post(retryHandler, () -> loadRebootEscrowDataWithRetry(
                retryHandler, 0, users, rebootEscrowUsers));
    }

    void scheduleLoadRebootEscrowDataOrFail(
@@ -548,29 +538,15 @@ class RebootEscrowManager {
            return;
        }

        if (Flags.waitForInternetRor()) {
        if (mRebootEscrowTimedOut) {
            Slog.w(TAG, "Failed to load reboot escrow data within timeout");
                compareAndSetLoadEscrowDataErrorCode(
                        ERROR_NONE, ERROR_TIMEOUT_EXHAUSTED, retryHandler);
            compareAndSetLoadEscrowDataErrorCode(ERROR_NONE, ERROR_TIMEOUT_EXHAUSTED, retryHandler);
        } else {
                Slog.w(
                        TAG,
                        "Failed to load reboot escrow data after " + attemptNumber + " attempts");
            Slog.w(TAG, "Failed to load reboot escrow data after " + attemptNumber + " attempts");
            compareAndSetLoadEscrowDataErrorCode(
                    ERROR_NONE, ERROR_RETRY_COUNT_EXHAUSTED, retryHandler);
        }
        onGetRebootEscrowKeyFailed(users, attemptNumber, retryHandler);
            return;
        }

        Slog.w(TAG, "Failed to load reboot escrow data after " + attemptNumber + " attempts");
        if (mInjector.serverBasedResumeOnReboot() && !mInjector.isNetworkConnected()) {
            mLoadEscrowDataErrorCode = ERROR_NO_NETWORK;
        } else {
            mLoadEscrowDataErrorCode = ERROR_RETRY_COUNT_EXHAUSTED;
        }
        onGetRebootEscrowKeyFailed(users, attemptNumber, retryHandler);
    }

    void loadRebootEscrowDataOnInternet(
+0 −9
Original line number Diff line number Diff line
package: "com.android.server.locksettings"
container: "system"

flag {
     name: "wait_for_internet_ror"
     namespace: "sudo"
     description: "Feature flag to wait for internet connectivity before calling resume on reboot server."
     bug: "231660348"
}
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ android_test {
        "net_flags_lib",
        "CtsVirtualDeviceCommonLib",
        "com_android_server_accessibility_flags_lib",
        "locksettings_flags_lib",
    ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
        "true": ["service-crashrecovery-pre-jarjar"],
        default: [],
Loading