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

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

Merge "Make DeviceConfig getter name explicit." into main

parents 19be2632 ab54f017
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class AppFunctionManagerServiceImpl extends IAppFunctionManager.Stub {
        bindAppFunctionServiceUnchecked(requestInternal, serviceIntent, targetUser,
                safeExecuteAppFunctionCallback,
                /*bindFlags=*/ Context.BIND_AUTO_CREATE,
                /*timeoutInMillis=*/ mServiceConfig.getExecutionTimeoutConfig());
                /*timeoutInMillis=*/ mServiceConfig.getExecuteAppFunctionTimeoutMillis());
    }

    private void bindAppFunctionServiceUnchecked(
+1 −1
Original line number Diff line number Diff line
@@ -26,5 +26,5 @@ public interface ServiceConfig {
    /**
     * Returns the maximum time to wait for an app function execution to be complete.
     */
    long getExecutionTimeoutConfig();
    long getExecuteAppFunctionTimeoutMillis();
}
+5 −4
Original line number Diff line number Diff line
@@ -22,16 +22,17 @@ import android.provider.DeviceConfig;
 * Implementation of {@link ServiceConfig}
 */
public class ServiceConfigImpl implements ServiceConfig {
    static final String DEVICE_CONFIG_PROPERTY_EXECUTION_TIMEOUT = "execution_timeout";
    static final long DEFAULT_EXECUTION_TIMEOUT_MS = 5000L;
    static final String DEVICE_CONFIG_PROPERTY_EXECUTION_TIMEOUT =
            "execute_app_function_timeout_millis";
    static final long DEFAULT_EXECUTE_APP_FUNCTION_TIMEOUT_MS = 5000L;


    @Override
    public long getExecutionTimeoutConfig() {
    public long getExecuteAppFunctionTimeoutMillis() {
        return DeviceConfig.getLong(
                NAMESPACE_APP_FUNCTIONS,
                DEVICE_CONFIG_PROPERTY_EXECUTION_TIMEOUT,
                DEFAULT_EXECUTION_TIMEOUT_MS
                DEFAULT_EXECUTE_APP_FUNCTION_TIMEOUT_MS
        );
    }
}