aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authornchalko <nchalko@google.com>2019-01-11 12:55:15 -0800
committerNick Chalko <nchalko@google.com>2019-02-12 22:13:45 -0800
commitd55e20c8cdad6b479fa6a9e32e1a18707104685c (patch)
tree8ce52b0b9371527a4853ff5f8e29eeb842e7dff0 /common
parent5dd6dbb9fb30e83a8f28bbe9584639e9db1cc58c (diff)
downloadTV-d55e20c8cdad6b479fa6a9e32e1a18707104685c.tar.gz
Inject DbExecutor
PiperOrigin-RevId: 228929607 Change-Id: Ie3f8167d667e94378a7ed07f1091cebe154050de
Diffstat (limited to 'common')
-rw-r--r--common/src/com/android/tv/common/dagger/ApplicationModule.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/common/src/com/android/tv/common/dagger/ApplicationModule.java b/common/src/com/android/tv/common/dagger/ApplicationModule.java
index 592717b8..4655f777 100644
--- a/common/src/com/android/tv/common/dagger/ApplicationModule.java
+++ b/common/src/com/android/tv/common/dagger/ApplicationModule.java
@@ -16,6 +16,7 @@
package com.android.tv.common.dagger;
import android.app.Application;
+import android.content.ContentResolver;
import android.content.Context;
import android.os.Looper;
import com.android.tv.common.dagger.annotations.ApplicationContext;
@@ -29,21 +30,21 @@ import dagger.Provides;
*/
@Module
public final class ApplicationModule {
- private final Application application;
+ private final Application mApplication;
public ApplicationModule(Application application) {
- this.application = application;
+ mApplication = application;
}
@Provides
Application provideApplication() {
- return application;
+ return mApplication;
}
@Provides
@ApplicationContext
Context provideContext() {
- return application.getApplicationContext();
+ return mApplication.getApplicationContext();
}
@Provides
@@ -51,4 +52,9 @@ public final class ApplicationModule {
static Looper provideMainLooper() {
return Looper.getMainLooper();
}
+
+ @Provides
+ ContentResolver provideContentResolver() {
+ return mApplication.getContentResolver();
+ }
}