From 35a913ffd9055f184e4ae05d53cb3856d7e10752 Mon Sep 17 00:00:00 2001 From: erfanian Date: Thu, 5 Apr 2018 11:57:46 -0700 Subject: Add settings fragment boilerplate. Bug: 73736474 Test: unit tests PiperOrigin-RevId: 191776448 Change-Id: Idf3eaee2d6639d5a6643c9670230e88d0028bf3c --- java/com/android/incallui/speakeasy/SpeakEasyComponent.java | 4 ++++ java/com/android/incallui/speakeasy/StubSpeakEasyModule.java | 8 ++++++++ 2 files changed, 12 insertions(+) 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 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 provideSpeakEasySettingsFragment() { + return Optional.absent(); + } } -- cgit v1.2.3