summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-12 19:23:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-12 19:23:30 +0000
commit9af2e2913ea29799948897d5c7c0cb5ef340fd81 (patch)
treea696c0c310081a0288d68a57136e07f1b990066f
parent19b1916861d6d062c06700682cad524cd45f236b (diff)
parenta5b8041a4c5efb933b3cb47750786ec24a095166 (diff)
Merge "Use an activity instead of a fragment for SpeakEasySettings"
-rw-r--r--java/com/android/incallui/speakeasy/Annotations.java2
-rw-r--r--java/com/android/incallui/speakeasy/SpeakEasyComponent.java20
-rw-r--r--java/com/android/incallui/speakeasy/StubSpeakEasyModule.java7
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();
}