diff options
author | erfanian <erfanian@google.com> | 2018-06-04 17:52:10 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-04 17:53:02 -0700 |
commit | 16191f1a3049d9ff81454b63ebb986b2568924ba (patch) | |
tree | 6271b6dc6f6a6dfe4c75e93d109da16aecc6e47e /java | |
parent | 561ad94872d90b7a487d6fd966f93c0e8601492a (diff) |
Update dagger types.
Bug: 73736474
Test: unit
PiperOrigin-RevId: 199224642
Change-Id: Ie11e0bfb261a1ff49b49697314c4341cab4a48d0
Diffstat (limited to 'java')
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<Fragment> speakEasySettingsFragment(); + public abstract @SpeakEasySettingsFragment Optional<PreferenceFragment> + speakEasySettingsFragment(); + + public abstract @SpeakEasySettingsObject Optional<Object> speakEasySettingsObject(); public abstract @SpeakEasyIcon Optional<Integer> 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<Fragment> provideSpeakEasySettingsFragment() { + static @SpeakEasySettingsFragment Optional<PreferenceFragment> + provideSpeakEasySettingsFragment() { + return Optional.absent(); + } + + @Provides + static @SpeakEasySettingsObject Optional<Object> provideSpeakEasySettingsObject() { return Optional.absent(); } |