summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2018-04-05 13:46:31 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-04-05 13:46:31 -0700
commitc5d3d2c15ff8532752836246c6f121c73381aeb0 (patch)
treeabac8e5313cbb2d23e040af4a9b24997c1ca6ad0
parentabe53861a2c3b59f80cdaab531784c89229a2193 (diff)
parentbfc71588585b05f7e4e04fa5447beb5123dc244a (diff)
Merge "Add settings fragment boilerplate."
am: bfc7158858 Change-Id: I259461aaf6f36444f0e4f8adec3e1b45723805b8
-rw-r--r--java/com/android/incallui/speakeasy/SpeakEasyComponent.java4
-rw-r--r--java/com/android/incallui/speakeasy/StubSpeakEasyModule.java8
2 files changed, 12 insertions, 0 deletions
diff --git a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java
index 2403354bc..320bc69ee 100644
--- a/java/com/android/incallui/speakeasy/SpeakEasyComponent.java
+++ b/java/com/android/incallui/speakeasy/SpeakEasyComponent.java
@@ -17,7 +17,9 @@
package com.android.incallui.speakeasy;
import android.content.Context;
+import android.support.v4.app.Fragment;
import com.android.dialer.inject.HasRootComponent;
+import com.google.common.base.Optional;
import dagger.Subcomponent;
/** Dagger component to get SpeakEasyCallManager. */
@@ -26,6 +28,8 @@ public abstract class SpeakEasyComponent {
public abstract SpeakEasyCallManager speakEasyCallManager();
+ public abstract Optional<Fragment> speakEasySettingsFragment();
+
public static SpeakEasyComponent get(Context context) {
return ((SpeakEasyComponent.HasComponent)
((HasRootComponent) context.getApplicationContext()).component())
diff --git a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java
index 713ce2b44..960692b20 100644
--- a/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java
+++ b/java/com/android/incallui/speakeasy/StubSpeakEasyModule.java
@@ -16,8 +16,11 @@
package com.android.incallui.speakeasy;
+import android.support.v4.app.Fragment;
+import com.google.common.base.Optional;
import dagger.Binds;
import dagger.Module;
+import dagger.Provides;
/** Module which binds {@link SpeakEasyCallManagerStub}. */
@Module
@@ -25,4 +28,9 @@ public abstract class StubSpeakEasyModule {
@Binds
abstract SpeakEasyCallManager bindsSpeakEasy(SpeakEasyCallManagerStub stub);
+
+ @Provides
+ static Optional<Fragment> provideSpeakEasySettingsFragment() {
+ return Optional.absent();
+ }
}