Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ LOCAL_SRC_FILES += \ core/java/android/service/notification/IStatusBarNotificationHolder.aidl \ core/java/android/service/notification/IConditionListener.aidl \ core/java/android/service/notification/IConditionProvider.aidl \ core/java/android/service/vr/IPersistentVrStateCallbacks.aidl \ core/java/android/service/vr/IVrListener.aidl \ core/java/android/service/vr/IVrManager.aidl \ core/java/android/service/vr/IVrStateCallbacks.aidl \ Loading services/core/java/com/android/server/vr/PersistentVrStateListener.java→core/java/android/service/vr/IPersistentVrStateCallbacks.aidl +8 −15 Original line number Diff line number Diff line /** * Copyright (C) 2017 The Android Open Source Project * Copyright (c) 2017, 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. Loading @@ -13,19 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.vr; /** * Listener for state changes to persistent VR mode. * * @hide Only for use within system server. */ public abstract class PersistentVrStateListener { package android.service.vr; /** @hide */ oneway interface IPersistentVrStateCallbacks { void onPersistentVrStateChanged(in boolean enabled); /** * Called when the Persistent VR mode state changes. * * @param enabled {@code true} if persistent VR mode is enabled. */ public abstract void onPersistentVrStateChanged(boolean enabled); } core/java/android/service/vr/IVrManager.aidl +15 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.service.vr; import android.service.vr.IVrStateCallbacks; import android.service.vr.IPersistentVrStateCallbacks; /** @hide */ interface IVrManager { Loading @@ -35,6 +36,20 @@ interface IVrManager { */ void unregisterListener(in IVrStateCallbacks cb); /** * Add a callback to be notified when persistent VR mode state changes. * * @param cb the callback instance to add. */ void registerPersistentVrStateListener(in IPersistentVrStateCallbacks cb); /** * Remove the callack from the current set of registered callbacks. * * @param cb the callback to remove. */ void unregisterPersistentVrStateListener(in IPersistentVrStateCallbacks cb); /** * Return current VR mode state. * Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ import android.provider.Settings; import android.service.dreams.DreamManagerInternal; import android.service.dreams.DreamService; import android.service.dreams.IDreamManager; import android.service.vr.IPersistentVrStateCallbacks; import android.speech.RecognizerIntent; import android.telecom.TelecomManager; import android.util.DisplayMetrics; Loading Loading @@ -236,7 +237,6 @@ import com.android.server.policy.keyguard.KeyguardStateMonitor.StateCallback; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.wm.AppTransition; import com.android.server.vr.VrManagerInternal; import com.android.server.vr.PersistentVrStateListener; import java.io.File; import java.io.FileReader; Loading Loading @@ -999,8 +999,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } MyOrientationListener mOrientationListener; final PersistentVrStateListener mPersistentVrModeListener = new PersistentVrStateListener() { final IPersistentVrStateCallbacks mPersistentVrModeListener = new IPersistentVrStateCallbacks.Stub() { @Override public void onPersistentVrStateChanged(boolean enabled) { mPersistentVrModeEnabled = enabled; Loading services/core/java/com/android/server/vr/VrManagerInternal.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.vr; import android.annotation.NonNull; import android.content.ComponentName; import android.service.vr.IPersistentVrStateCallbacks; /** * Service for accessing the VR mode manager. Loading Loading @@ -101,5 +102,5 @@ public abstract class VrManagerInternal { /** * Adds listener that reports state changes to persistent VR mode. */ public abstract void addPersistentVrModeStateListener(PersistentVrStateListener listener); public abstract void addPersistentVrModeStateListener(IPersistentVrStateCallbacks listener); } Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ LOCAL_SRC_FILES += \ core/java/android/service/notification/IStatusBarNotificationHolder.aidl \ core/java/android/service/notification/IConditionListener.aidl \ core/java/android/service/notification/IConditionProvider.aidl \ core/java/android/service/vr/IPersistentVrStateCallbacks.aidl \ core/java/android/service/vr/IVrListener.aidl \ core/java/android/service/vr/IVrManager.aidl \ core/java/android/service/vr/IVrStateCallbacks.aidl \ Loading
services/core/java/com/android/server/vr/PersistentVrStateListener.java→core/java/android/service/vr/IPersistentVrStateCallbacks.aidl +8 −15 Original line number Diff line number Diff line /** * Copyright (C) 2017 The Android Open Source Project * Copyright (c) 2017, 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. Loading @@ -13,19 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.vr; /** * Listener for state changes to persistent VR mode. * * @hide Only for use within system server. */ public abstract class PersistentVrStateListener { package android.service.vr; /** @hide */ oneway interface IPersistentVrStateCallbacks { void onPersistentVrStateChanged(in boolean enabled); /** * Called when the Persistent VR mode state changes. * * @param enabled {@code true} if persistent VR mode is enabled. */ public abstract void onPersistentVrStateChanged(boolean enabled); }
core/java/android/service/vr/IVrManager.aidl +15 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.service.vr; import android.service.vr.IVrStateCallbacks; import android.service.vr.IPersistentVrStateCallbacks; /** @hide */ interface IVrManager { Loading @@ -35,6 +36,20 @@ interface IVrManager { */ void unregisterListener(in IVrStateCallbacks cb); /** * Add a callback to be notified when persistent VR mode state changes. * * @param cb the callback instance to add. */ void registerPersistentVrStateListener(in IPersistentVrStateCallbacks cb); /** * Remove the callack from the current set of registered callbacks. * * @param cb the callback to remove. */ void unregisterPersistentVrStateListener(in IPersistentVrStateCallbacks cb); /** * Return current VR mode state. * Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ import android.provider.Settings; import android.service.dreams.DreamManagerInternal; import android.service.dreams.DreamService; import android.service.dreams.IDreamManager; import android.service.vr.IPersistentVrStateCallbacks; import android.speech.RecognizerIntent; import android.telecom.TelecomManager; import android.util.DisplayMetrics; Loading Loading @@ -236,7 +237,6 @@ import com.android.server.policy.keyguard.KeyguardStateMonitor.StateCallback; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.wm.AppTransition; import com.android.server.vr.VrManagerInternal; import com.android.server.vr.PersistentVrStateListener; import java.io.File; import java.io.FileReader; Loading Loading @@ -999,8 +999,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } MyOrientationListener mOrientationListener; final PersistentVrStateListener mPersistentVrModeListener = new PersistentVrStateListener() { final IPersistentVrStateCallbacks mPersistentVrModeListener = new IPersistentVrStateCallbacks.Stub() { @Override public void onPersistentVrStateChanged(boolean enabled) { mPersistentVrModeEnabled = enabled; Loading
services/core/java/com/android/server/vr/VrManagerInternal.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.vr; import android.annotation.NonNull; import android.content.ComponentName; import android.service.vr.IPersistentVrStateCallbacks; /** * Service for accessing the VR mode manager. Loading Loading @@ -101,5 +102,5 @@ public abstract class VrManagerInternal { /** * Adds listener that reports state changes to persistent VR mode. */ public abstract void addPersistentVrModeStateListener(PersistentVrStateListener listener); public abstract void addPersistentVrModeStateListener(IPersistentVrStateCallbacks listener); }