From b287a05cfe6c0364aca04abd6ef04bc6397e763f Mon Sep 17 00:00:00 2001 From: zachh Date: Thu, 31 May 2018 15:23:51 -0700 Subject: Removed static configProvider field in ConfigProviderBindings. Also removed setForTesting method as it was only used to reset static state which no longer exists. Bug: 80441695 Test: tap PiperOrigin-RevId: 198789280 Change-Id: If56aa3942bcb12c950c9250309b51e72f59c5bdc --- .../dialer/configprovider/ConfigProviderBindings.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'java') diff --git a/java/com/android/dialer/configprovider/ConfigProviderBindings.java b/java/com/android/dialer/configprovider/ConfigProviderBindings.java index 0bf0e758d..ca4523c55 100644 --- a/java/com/android/dialer/configprovider/ConfigProviderBindings.java +++ b/java/com/android/dialer/configprovider/ConfigProviderBindings.java @@ -18,35 +18,23 @@ package com.android.dialer.configprovider; import android.content.Context; import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.support.v4.os.UserManagerCompat; import com.android.dialer.common.Assert; /** Accessor for getting a {@link ConfigProvider}. */ public class ConfigProviderBindings { - private static ConfigProvider configProvider; private static ConfigProvider configProviderStub; public static ConfigProvider get(@NonNull Context context) { Assert.isNotNull(context); - if (configProvider != null) { - return configProvider; - } if (!UserManagerCompat.isUserUnlocked(context)) { if (configProviderStub == null) { configProviderStub = new ConfigProviderStub(); } return configProviderStub; } - configProvider = ConfigProviderComponent.get(context).getConfigProvider(); - return configProvider; - } - - @VisibleForTesting - public static void setForTesting(@Nullable ConfigProvider configProviderForTesting) { - configProvider = configProviderForTesting; + return ConfigProviderComponent.get(context).getConfigProvider(); } private static class ConfigProviderStub implements ConfigProvider { -- cgit v1.2.3