From 16191f1a3049d9ff81454b63ebb986b2568924ba Mon Sep 17 00:00:00 2001 From: erfanian Date: Mon, 4 Jun 2018 17:52:10 -0700 Subject: Update dagger types. Bug: 73736474 Test: unit PiperOrigin-RevId: 199224642 Change-Id: Ie11e0bfb261a1ff49b49697314c4341cab4a48d0 --- java/com/android/incallui/speakeasy/Annotations.java | 4 ++++ java/com/android/incallui/speakeasy/SpeakEasyComponent.java | 8 ++++++-- java/com/android/incallui/speakeasy/StubSpeakEasyModule.java | 11 +++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/java/com/android/incallui/speakeasy/Annotations.java b/java/com/android/incallui/speakeasy/Annotations.java index f369ce441..5d513fc9b 100644 --- a/java/com/android/incallui/speakeasy/Annotations.java +++ b/java/com/android/incallui/speakeasy/Annotations.java @@ -32,4 +32,8 @@ public final class Annotations { /** A Speakeasy settings fragment */ @Qualifier public @interface SpeakEasySettingsFragment {} + + /** A Speakeasy settings object */ + @Qualifier + public @interface SpeakEasySettingsObject {} } diff --git a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java index 6257cc0f9..ab6438077 100644 --- a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java +++ b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java @@ -17,10 +17,11 @@ package com.android.incallui.speakeasy; import android.content.Context; -import android.support.v4.app.Fragment; +import android.preference.PreferenceFragment; import com.android.dialer.inject.HasRootComponent; import com.android.incallui.speakeasy.Annotations.SpeakEasyIcon; import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsFragment; +import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsObject; import com.android.incallui.speakeasy.Annotations.SpeakEasyText; import com.google.common.base.Optional; import dagger.Subcomponent; @@ -31,7 +32,10 @@ public abstract class SpeakEasyComponent { public abstract SpeakEasyCallManager speakEasyCallManager(); - public abstract @SpeakEasySettingsFragment Optional speakEasySettingsFragment(); + public abstract @SpeakEasySettingsFragment Optional + speakEasySettingsFragment(); + + public abstract @SpeakEasySettingsObject Optional speakEasySettingsObject(); public abstract @SpeakEasyIcon Optional speakEasyIcon(); diff --git a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java index 9f23ddd37..e844ad348 100644 --- a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java +++ b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java @@ -16,11 +16,12 @@ package com.android.incallui.speakeasy; -import android.support.v4.app.Fragment; +import android.preference.PreferenceFragment; import com.android.dialer.inject.DialerVariant; import com.android.dialer.inject.InstallIn; import com.android.incallui.speakeasy.Annotations.SpeakEasyIcon; import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsFragment; +import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsObject; import com.android.incallui.speakeasy.Annotations.SpeakEasyText; import com.google.common.base.Optional; import dagger.Binds; @@ -36,7 +37,13 @@ public abstract class StubSpeakEasyModule { abstract SpeakEasyCallManager bindsSpeakEasy(SpeakEasyCallManagerStub stub); @Provides - static @SpeakEasySettingsFragment Optional provideSpeakEasySettingsFragment() { + static @SpeakEasySettingsFragment Optional + provideSpeakEasySettingsFragment() { + return Optional.absent(); + } + + @Provides + static @SpeakEasySettingsObject Optional provideSpeakEasySettingsObject() { return Optional.absent(); } -- cgit v1.2.3