summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-05 04:13:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-05 04:13:03 +0000
commit9337f657f6c2890fd3d043b943da3234a7fa2d1f (patch)
tree6271b6dc6f6a6dfe4c75e93d109da16aecc6e47e
parent561ad94872d90b7a487d6fd966f93c0e8601492a (diff)
parent16191f1a3049d9ff81454b63ebb986b2568924ba (diff)
Merge "Update dagger types."
-rw-r--r--java/com/android/incallui/speakeasy/Annotations.java4
-rw-r--r--java/com/android/incallui/speakeasy/SpeakEasyComponent.java8
-rw-r--r--java/com/android/incallui/speakeasy/StubSpeakEasyModule.java11
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();
}