diff options
3 files changed, 14 insertions, 15 deletions
diff --git a/java/com/android/incallui/speakeasy/Annotations.java b/java/com/android/incallui/speakeasy/Annotations.java index 6d7fb4a1c..c66fe94c3 100644 --- a/java/com/android/incallui/speakeasy/Annotations.java +++ b/java/com/android/incallui/speakeasy/Annotations.java @@ -23,7 +23,7 @@ public final class Annotations { /** A Speakeasy settings fragment */ @Qualifier - public @interface SpeakEasySettingsFragment {} + public @interface SpeakEasySettingsActivity {} /** A Speakeasy settings object */ @Qualifier diff --git a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java index d3145949e..5d536321d 100644 --- a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java +++ b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java @@ -17,10 +17,10 @@ package com.android.incallui.speakeasy; import android.content.Context; -import android.preference.PreferenceFragment; +import android.support.v7.app.AppCompatActivity; import com.android.dialer.inject.HasRootComponent; import com.android.incallui.speakeasy.Annotations.SpeakEasyChipResourceId; -import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsFragment; +import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsActivity; import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsObject; import com.android.incallui.speakeasy.Annotations.SpeakEasyTextResourceId; import com.google.common.base.Optional; @@ -30,10 +30,16 @@ import dagger.Subcomponent; @Subcomponent public abstract class SpeakEasyComponent { + public static SpeakEasyComponent get(Context context) { + return ((SpeakEasyComponent.HasComponent) + ((HasRootComponent) context.getApplicationContext()).component()) + .speakEasyComponent(); + } + public abstract SpeakEasyCallManager speakEasyCallManager(); - public abstract @SpeakEasySettingsFragment Optional<PreferenceFragment> - speakEasySettingsFragment(); + public abstract @SpeakEasySettingsActivity Optional<AppCompatActivity> + speakEasySettingsActivity(); public abstract @SpeakEasySettingsObject Optional<Object> speakEasySettingsObject(); @@ -41,12 +47,6 @@ public abstract class SpeakEasyComponent { public abstract @SpeakEasyTextResourceId Optional<Integer> speakEasyTextResource(); - 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(); diff --git a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java index 9bb7783bf..bab52ffcb 100644 --- a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java +++ b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java @@ -16,11 +16,11 @@ package com.android.incallui.speakeasy; -import android.preference.PreferenceFragment; +import android.support.v7.app.AppCompatActivity; import com.android.dialer.inject.DialerVariant; import com.android.dialer.inject.InstallIn; import com.android.incallui.speakeasy.Annotations.SpeakEasyChipResourceId; -import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsFragment; +import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsActivity; import com.android.incallui.speakeasy.Annotations.SpeakEasySettingsObject; import com.android.incallui.speakeasy.Annotations.SpeakEasyTextResourceId; import com.google.common.base.Optional; @@ -37,8 +37,7 @@ public abstract class StubSpeakEasyModule { abstract SpeakEasyCallManager bindsSpeakEasy(SpeakEasyCallManagerStub stub); @Provides - static @SpeakEasySettingsFragment Optional<PreferenceFragment> - provideSpeakEasySettingsFragment() { + static @SpeakEasySettingsActivity Optional<AppCompatActivity> provideSpeakEasySettingsActivity() { return Optional.absent(); } |