diff options
author | zachh <zachh@google.com> | 2018-05-31 15:23:51 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-01 18:16:51 -0700 |
commit | b287a05cfe6c0364aca04abd6ef04bc6397e763f (patch) | |
tree | dbd9064779a3169f49755ee3b1b7c9a2c181ad8e /java | |
parent | 3fe4d2bda429e632713c37ef0c5bf71c3dc15c81 (diff) |
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
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/configprovider/ConfigProviderBindings.java | 14 |
1 files changed, 1 insertions, 13 deletions
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 { |