summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Govinda Wasserman <gwasserman@google.com> 2023-02-06 18:51:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-02-06 18:51:29 +0000
commit2a670fae34e541f9b7e7a19220f63fd14b5a9ef0 (patch)
tree39e0ba56a87f7ee8b250a4f6da80c445d31e572f
parentc77daf398482a18350f1f2178d9c24e0b33c8b2f (diff)
parent608bf43988e2a1a3813cc0ce67555780b2a0c30f (diff)
Merge "Adds some missing injections for VR and PCC" into tm-qpr-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
index 4bb5d04e7fc2..d1c34a8d0821 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
@@ -31,6 +31,7 @@ import android.app.StatsManager;
import android.app.UiModeManager;
import android.app.WallpaperManager;
import android.app.admin.DevicePolicyManager;
+import android.app.ambientcontext.AmbientContextManager;
import android.app.job.JobScheduler;
import android.app.role.RoleManager;
import android.app.smartspace.SmartspaceManager;
@@ -79,6 +80,7 @@ import android.permission.PermissionManager;
import android.safetycenter.SafetyCenterManager;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
+import android.service.vr.IVrManager;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
@@ -146,6 +148,13 @@ public class FrameworkServicesModule {
return Optional.ofNullable(context.getSystemService(SystemUpdateManager.class));
}
+ @Provides
+ @Nullable
+ @Singleton
+ static AmbientContextManager provideAmbientContextManager(Context context) {
+ return context.getSystemService(AmbientContextManager.class);
+ }
+
/** */
@Provides
public AmbientDisplayConfiguration provideAmbientDisplayConfiguration(Context context) {
@@ -261,6 +270,13 @@ public class FrameworkServicesModule {
@Provides
@Singleton
@Nullable
+ static IVrManager provideIVrManager() {
+ return IVrManager.Stub.asInterface(ServiceManager.getService(Context.VR_SERVICE));
+ }
+
+ @Provides
+ @Singleton
+ @Nullable
static FaceManager provideFaceManager(Context context) {
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
return context.getSystemService(FaceManager.class);