Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2abf1c60 authored by Jin Qian's avatar Jin Qian
Browse files

Revert "Add remote callbacks for persistent vr mode"

This reverts commit 504c6d67.

Change-Id: Ia0f8d508272211736d421cf097abaa0bcbc3abab
parent 504c6d67
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -282,7 +282,6 @@ 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 \
+0 −15
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package android.service.vr;

import android.service.vr.IVrStateCallbacks;
import android.service.vr.IPersistentVrStateCallbacks;

/** @hide */
interface IVrManager {
@@ -36,20 +35,6 @@ 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.
     *
+3 −3
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ 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;
@@ -237,6 +236,7 @@ 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;
@@ -999,8 +999,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    }
    MyOrientationListener mOrientationListener;

    final IPersistentVrStateCallbacks mPersistentVrModeListener =
            new IPersistentVrStateCallbacks.Stub() {
    final PersistentVrStateListener mPersistentVrModeListener =
            new PersistentVrStateListener() {
        @Override
        public void onPersistentVrStateChanged(boolean enabled) {
            mPersistentVrModeEnabled = enabled;
+15 −8
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.
@@ -13,12 +13,19 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.server.vr;

package android.service.vr;

/** @hide */
oneway interface IPersistentVrStateCallbacks {

    void onPersistentVrStateChanged(in boolean enabled);
/**
 * Listener for state changes to persistent VR mode.
 *
 * @hide Only for use within system server.
 */
public abstract class PersistentVrStateListener {

  /**
   * Called when the Persistent VR mode state changes.
   *
   * @param enabled {@code true} if persistent VR mode is enabled.
   */
    public abstract void onPersistentVrStateChanged(boolean enabled);
}
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ 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.
@@ -102,5 +101,5 @@ public abstract class VrManagerInternal {
    /**
     * Adds listener that reports state changes to persistent VR mode.
     */
    public abstract void addPersistentVrModeStateListener(IPersistentVrStateCallbacks listener);
    public abstract void addPersistentVrModeStateListener(PersistentVrStateListener listener);
}
Loading