summaryrefslogtreecommitdiff
path: root/src_override/com
diff options
context:
space:
mode:
authorAustin Wang <wangaustin@google.com>2023-06-15 17:29:00 -0700
committerAustin Wang <wangaustin@google.com>2023-06-29 17:36:31 -0700
commit54ab36b6e9043ae4182af392a941e1513950b60a (patch)
tree1b84595956ed18d4470bb74b51be8512a31bc8c3 /src_override/com
parentb9bc4760f948eee529ec0f5e944cabd2aa905513 (diff)
downloadThemePicker-54ab36b6e9043ae4182af392a941e1513950b60a.tar.gz
Enable Hilt for picker app (3/3)
Bug: 288128417 Test: soong build, gradle build for 3 variants, launch WP Change-Id: If9c97d30000de03c10ba6b43634ab31c45efdc75
Diffstat (limited to 'src_override/com')
-rw-r--r--src_override/com/android/customization/picker/CustomizationPickerApplication.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/src_override/com/android/customization/picker/CustomizationPickerApplication.java b/src_override/com/android/customization/picker/CustomizationPickerApplication.java
new file mode 100644
index 00000000..2e549ff0
--- /dev/null
+++ b/src_override/com/android/customization/picker/CustomizationPickerApplication.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.customization.picker;
+
+import android.app.Application;
+
+import com.android.customization.module.ThemePickerInjector;
+import com.android.wallpaper.module.InjectorProvider;
+
+import dagger.hilt.android.HiltAndroidApp;
+
+/**
+ * Application subclass that initializes the injector.
+ */
+@HiltAndroidApp(Application.class)
+public class CustomizationPickerApplication extends Hilt_CustomizationPickerApplication {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ // Initialize the injector.
+ InjectorProvider.setInjector(new ThemePickerInjector());
+ }
+}