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

Commit 85935e85 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use updated DeviceConfig API's getLong method to simplify invocation."

parents a607501c 6b85dac5
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -531,17 +531,10 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
    }

    private void updateRollbackLifetimeDurationInMillis() {
        String strRollbackLifetimeInMillis = DeviceConfig.getProperty(
        mRollbackLifetimeDurationInMillis = DeviceConfig.getLong(
                DeviceConfig.Rollback.BOOT_NAMESPACE,
                DeviceConfig.Rollback.ROLLBACK_LIFETIME_IN_MILLIS);

        try {
            mRollbackLifetimeDurationInMillis = (strRollbackLifetimeInMillis == null)
                    ? DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS
                    : Long.parseLong(strRollbackLifetimeInMillis);
        } catch (NumberFormatException e) {
            mRollbackLifetimeDurationInMillis = DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS;
        }
                DeviceConfig.Rollback.ROLLBACK_LIFETIME_IN_MILLIS,
                DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS);
    }

    void onBootCompleted() {