diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/dialer/app/Bindings.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/dialer/app/Bindings.java')
-rw-r--r-- | java/com/android/dialer/app/Bindings.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/java/com/android/dialer/app/Bindings.java b/java/com/android/dialer/app/Bindings.java index 2beb40184..c8cf27eb2 100644 --- a/java/com/android/dialer/app/Bindings.java +++ b/java/com/android/dialer/app/Bindings.java @@ -17,9 +17,6 @@ package com.android.dialer.app; import android.content.Context; -import com.android.dialer.app.bindings.DialerBindings; -import com.android.dialer.app.bindings.DialerBindingsFactory; -import com.android.dialer.app.bindings.DialerBindingsStub; import com.android.dialer.app.legacybindings.DialerLegacyBindings; import com.android.dialer.app.legacybindings.DialerLegacyBindingsFactory; import com.android.dialer.app.legacybindings.DialerLegacyBindingsStub; @@ -28,28 +25,10 @@ import java.util.Objects; /** Accessor for the in call UI bindings. */ public class Bindings { - private static DialerBindings instance; private static DialerLegacyBindings legacyInstance; private Bindings() {} - public static DialerBindings get(Context context) { - Objects.requireNonNull(context); - if (instance != null) { - return instance; - } - - Context application = context.getApplicationContext(); - if (application instanceof DialerBindingsFactory) { - instance = ((DialerBindingsFactory) application).newDialerBindings(); - } - - if (instance == null) { - instance = new DialerBindingsStub(); - } - return instance; - } - public static DialerLegacyBindings getLegacy(Context context) { Objects.requireNonNull(context); if (legacyInstance != null) { @@ -67,11 +46,4 @@ public class Bindings { return legacyInstance; } - public static void setForTesting(DialerBindings testInstance) { - instance = testInstance; - } - - public static void setLegacyBindingForTesting(DialerLegacyBindings testLegacyInstance) { - legacyInstance = testLegacyInstance; - } } |