Loading java/com/android/dialer/binary/aosp/AospDialerRootComponent.java +5 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.android.dialer.storage.StorageModule; import com.android.dialer.strictmode.impl.SystemStrictModeModule; import com.android.incallui.calllocation.stub.StubCallLocationModule; import com.android.incallui.maps.stub.StubMapsModule; import com.android.incallui.speakeasy.StubSpeakEasyModule; import com.android.voicemail.impl.VoicemailModule; import dagger.Component; import javax.inject.Singleton; Loading @@ -51,15 +52,16 @@ import javax.inject.Singleton; SharedPrefConfigProviderModule.class, SimulatorModule.class, StorageModule.class, SystemStrictModeModule.class, StubCallLocationModule.class, StubDuoModule.class, StubEnrichedCallModule.class, StubFeedbackModule.class, StubMapsModule.class, VoicemailModule.class, StubSimSuggestionModule.class, StubFeedbackModule.class, StubSpamModule.class, StubSpeakEasyModule.class, SystemStrictModeModule.class, VoicemailModule.class, } ) public interface AospDialerRootComponent extends BaseDialerRootComponent {} java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.dialer.storage.StorageComponent; import com.android.dialer.strictmode.StrictModeComponent; import com.android.incallui.calllocation.CallLocationComponent; import com.android.incallui.maps.MapsComponent; import com.android.incallui.speakeasy.SpeakEasyComponent; import com.android.voicemail.VoicemailComponent; /** Loading @@ -58,7 +59,8 @@ public interface BaseDialerRootComponent PreCallComponent.HasComponent, SimSuggestionComponent.HasComponent, SimulatorComponent.HasComponent, SpamComponent.HasComponent, SpeakEasyComponent.HasComponent, StorageComponent.HasComponent, StrictModeComponent.HasComponent, VoicemailComponent.HasComponent, SpamComponent.HasComponent {} VoicemailComponent.HasComponent {} java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java +7 −5 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.android.dialer.storage.StorageModule; import com.android.dialer.strictmode.impl.SystemStrictModeModule; import com.android.incallui.calllocation.impl.CallLocationModule; import com.android.incallui.maps.impl.MapsModule; import com.android.incallui.speakeasy.StubSpeakEasyModule; import com.android.voicemail.impl.VoicemailModule; import dagger.Component; import javax.inject.Singleton; Loading @@ -49,20 +50,21 @@ import javax.inject.Singleton; CallLogModule.class, ContextModule.class, DialerExecutorModule.class, MapsModule.class, PhoneLookupModule.class, // TODO(zachh): Module which uses APDL? PhoneNumberGeoUtilModule.class, PreCallModule.class, StubSimSuggestionModule.class, SharedPrefConfigProviderModule.class, SimulatorModule.class, StorageModule.class, SystemStrictModeModule.class, StubEnrichedCallModule.class, MapsModule.class, VoicemailModule.class, StubDuoModule.class, StubEnrichedCallModule.class, StubFeedbackModule.class, StubSimSuggestionModule.class, StubSpamModule.class, StubSpeakEasyModule.class, SystemStrictModeModule.class, VoicemailModule.class, } ) public interface GoogleStubDialerRootComponent extends BaseDialerRootComponent {} java/com/android/incallui/speakeasy/SpeakEasy.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.incallui.speakeasy; /** This interface provides a wrapper between callers and the Whisper client. */ public interface SpeakEasy { /** Signals to the user interface that the feature is abailable for use. */ boolean isEnabled(); } java/com/android/incallui/speakeasy/SpeakEasyComponent.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.incallui.speakeasy; import android.content.Context; import com.android.dialer.inject.HasRootComponent; import dagger.Subcomponent; /** Dagger component to get SpeakEasy. */ @Subcomponent public abstract class SpeakEasyComponent { public abstract SpeakEasy speakEasy(); public static SpeakEasyComponent get(Context context) { return ((SpeakEasyComponent.HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) .speakEasyComponent(); } /** Used to refer to the root application component. */ public interface HasComponent { SpeakEasyComponent speakEasyComponent(); } } Loading
java/com/android/dialer/binary/aosp/AospDialerRootComponent.java +5 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.android.dialer.storage.StorageModule; import com.android.dialer.strictmode.impl.SystemStrictModeModule; import com.android.incallui.calllocation.stub.StubCallLocationModule; import com.android.incallui.maps.stub.StubMapsModule; import com.android.incallui.speakeasy.StubSpeakEasyModule; import com.android.voicemail.impl.VoicemailModule; import dagger.Component; import javax.inject.Singleton; Loading @@ -51,15 +52,16 @@ import javax.inject.Singleton; SharedPrefConfigProviderModule.class, SimulatorModule.class, StorageModule.class, SystemStrictModeModule.class, StubCallLocationModule.class, StubDuoModule.class, StubEnrichedCallModule.class, StubFeedbackModule.class, StubMapsModule.class, VoicemailModule.class, StubSimSuggestionModule.class, StubFeedbackModule.class, StubSpamModule.class, StubSpeakEasyModule.class, SystemStrictModeModule.class, VoicemailModule.class, } ) public interface AospDialerRootComponent extends BaseDialerRootComponent {}
java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.dialer.storage.StorageComponent; import com.android.dialer.strictmode.StrictModeComponent; import com.android.incallui.calllocation.CallLocationComponent; import com.android.incallui.maps.MapsComponent; import com.android.incallui.speakeasy.SpeakEasyComponent; import com.android.voicemail.VoicemailComponent; /** Loading @@ -58,7 +59,8 @@ public interface BaseDialerRootComponent PreCallComponent.HasComponent, SimSuggestionComponent.HasComponent, SimulatorComponent.HasComponent, SpamComponent.HasComponent, SpeakEasyComponent.HasComponent, StorageComponent.HasComponent, StrictModeComponent.HasComponent, VoicemailComponent.HasComponent, SpamComponent.HasComponent {} VoicemailComponent.HasComponent {}
java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java +7 −5 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.android.dialer.storage.StorageModule; import com.android.dialer.strictmode.impl.SystemStrictModeModule; import com.android.incallui.calllocation.impl.CallLocationModule; import com.android.incallui.maps.impl.MapsModule; import com.android.incallui.speakeasy.StubSpeakEasyModule; import com.android.voicemail.impl.VoicemailModule; import dagger.Component; import javax.inject.Singleton; Loading @@ -49,20 +50,21 @@ import javax.inject.Singleton; CallLogModule.class, ContextModule.class, DialerExecutorModule.class, MapsModule.class, PhoneLookupModule.class, // TODO(zachh): Module which uses APDL? PhoneNumberGeoUtilModule.class, PreCallModule.class, StubSimSuggestionModule.class, SharedPrefConfigProviderModule.class, SimulatorModule.class, StorageModule.class, SystemStrictModeModule.class, StubEnrichedCallModule.class, MapsModule.class, VoicemailModule.class, StubDuoModule.class, StubEnrichedCallModule.class, StubFeedbackModule.class, StubSimSuggestionModule.class, StubSpamModule.class, StubSpeakEasyModule.class, SystemStrictModeModule.class, VoicemailModule.class, } ) public interface GoogleStubDialerRootComponent extends BaseDialerRootComponent {}
java/com/android/incallui/speakeasy/SpeakEasy.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.incallui.speakeasy; /** This interface provides a wrapper between callers and the Whisper client. */ public interface SpeakEasy { /** Signals to the user interface that the feature is abailable for use. */ boolean isEnabled(); }
java/com/android/incallui/speakeasy/SpeakEasyComponent.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.incallui.speakeasy; import android.content.Context; import com.android.dialer.inject.HasRootComponent; import dagger.Subcomponent; /** Dagger component to get SpeakEasy. */ @Subcomponent public abstract class SpeakEasyComponent { public abstract SpeakEasy speakEasy(); public static SpeakEasyComponent get(Context context) { return ((SpeakEasyComponent.HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) .speakEasyComponent(); } /** Used to refer to the root application component. */ public interface HasComponent { SpeakEasyComponent speakEasyComponent(); } }