diff options
author | Eric Erfanian <erfanian@google.com> | 2017-03-21 10:11:17 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-21 10:11:17 -0700 |
commit | fc37b02f5d3381a7882770941e461b13b679b6ef (patch) | |
tree | 23ce96100a89f1cf8847a4967efd35e56b6f8092 /java/com/android/voicemail/VoicemailComponent.java | |
parent | 30ccc4f3aa6da94f0bb8a01a880a6353b883b263 (diff) |
Update AOSP Dialer source from internal google3 repository at
cl/150756069
Test: make, treehugger
This CL updates the AOSP Dialer source with all the changes that have
gone into the private google3 repository. This includes all the
changes from cl/150392808 (3/16/2017) to cl/150756069 (3/21/2017).
This goal of these drops is to keep the AOSP source in sync with the
internal google3 repository. Currently these sync are done by hand
with very minor modifications to the internal source code.
See the Android.mk file for list of modifications.
Our current goal is to do frequent drops (daily if possible) and
eventually switched to an automated process.
Change-Id: I0888b5db52efb28eb8194600e0c7804592f975f3
Diffstat (limited to 'java/com/android/voicemail/VoicemailComponent.java')
-rw-r--r-- | java/com/android/voicemail/VoicemailComponent.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/java/com/android/voicemail/VoicemailComponent.java b/java/com/android/voicemail/VoicemailComponent.java index 6dd6f9d90..bed75f0ef 100644 --- a/java/com/android/voicemail/VoicemailComponent.java +++ b/java/com/android/voicemail/VoicemailComponent.java @@ -17,26 +17,18 @@ package com.android.voicemail; import android.content.Context; +import com.android.dialer.inject.HasRootComponent; import dagger.Subcomponent; -import com.android.voicemail.impl.VoicemailClientImpl; /** Subcomponent that can be used to access the voicemail implementation. */ -public class VoicemailComponent { - private static VoicemailComponent instance; - private VoicemailClientImpl voicemailClient; +@Subcomponent +public abstract class VoicemailComponent { - public VoicemailClient getVoicemailClient() { - if (voicemailClient == null) { - voicemailClient = new VoicemailClientImpl(); - } - return voicemailClient; - } + public abstract VoicemailClient getVoicemailClient(); public static VoicemailComponent get(Context context) { - if (instance == null) { - instance = new VoicemailComponent(); - } - return instance; + return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) + .voicemailComponent(); } /** Used to refer to the root application component. */ |