Merge "Remove controller connection API" into oc-dev
am: daefe1dcc7
Change-Id: Ic46c8ed4e41b80927f74b2fa96ed997f6b581134
This commit is contained in:
@@ -6,8 +6,6 @@ import android.content.ComponentName;
|
||||
import android.os.RemoteException;
|
||||
import android.service.vr.IVrManager;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
|
||||
/**
|
||||
* Used to control aspects of a devices Virtual Reality (VR) capabilities.
|
||||
* <p>
|
||||
@@ -63,32 +61,4 @@ public class VrManager {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate connection for system controller data.
|
||||
*
|
||||
* @param fd Controller data file descriptor.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
public void connectController(FileDescriptor fd) {
|
||||
try {
|
||||
mService.connectController(fd);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sever connection for system controller data.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
public void disconnectController() {
|
||||
try {
|
||||
mService.disconnectController();
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,17 +86,5 @@ interface IVrManager {
|
||||
* currently, else return the display id of the virtual display
|
||||
*/
|
||||
int getVr2dDisplayId();
|
||||
|
||||
/**
|
||||
* Initiate connection for system controller data.
|
||||
*
|
||||
* @param fd Controller data file descriptor.
|
||||
*/
|
||||
void connectController(in FileDescriptor fd);
|
||||
|
||||
/**
|
||||
* Sever connection for system controller data.
|
||||
*/
|
||||
void disconnectController();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ LOCAL_SRC_FILES += \
|
||||
../../../../system/netd/server/binder/android/net/INetd.aidl \
|
||||
../../../../system/netd/server/binder/android/net/metrics/INetdEventListener.aidl \
|
||||
../../../native/cmds/installd/binder/android/os/IInstalld.aidl \
|
||||
../../../native/services/vr/vr_window_manager/aidl/android/service/vr/IVrWindowManager.aidl \
|
||||
|
||||
LOCAL_AIDL_INCLUDES += \
|
||||
system/netd/server/binder
|
||||
|
||||
@@ -39,7 +39,6 @@ import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteCallbackList;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.service.notification.NotificationListenerService;
|
||||
@@ -47,7 +46,6 @@ import android.service.vr.IPersistentVrStateCallbacks;
|
||||
import android.service.vr.IVrListener;
|
||||
import android.service.vr.IVrManager;
|
||||
import android.service.vr.IVrStateCallbacks;
|
||||
import android.service.vr.IVrWindowManager;
|
||||
import android.service.vr.VrListenerService;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
@@ -439,18 +437,6 @@ public class VrManagerService extends SystemService implements EnabledComponentC
|
||||
return VrManagerService.this.getVr2dDisplayId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectController(FileDescriptor fd) throws android.os.RemoteException {
|
||||
enforceCallerPermission(Manifest.permission.RESTRICTED_VR_ACCESS);
|
||||
VrManagerService.this.connectController(fd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnectController() throws android.os.RemoteException {
|
||||
enforceCallerPermission(Manifest.permission.RESTRICTED_VR_ACCESS);
|
||||
VrManagerService.this.disconnectController();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
|
||||
@@ -1184,20 +1170,4 @@ public class VrManagerService extends SystemService implements EnabledComponentC
|
||||
return mVrModeEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
private void connectController(FileDescriptor fd) throws android.os.RemoteException {
|
||||
// TODO(b/36506799): move vr_wm code to VrCore and remove this.
|
||||
IVrWindowManager remote =
|
||||
IVrWindowManager.Stub.asInterface(
|
||||
ServiceManager.getService(IVrWindowManager.SERVICE_NAME));
|
||||
remote.connectController(fd);
|
||||
}
|
||||
|
||||
private void disconnectController() throws android.os.RemoteException {
|
||||
// TODO(b/36506799): move vr_wm code to VrCore and remove this.
|
||||
IVrWindowManager remote =
|
||||
IVrWindowManager.Stub.asInterface(
|
||||
ServiceManager.getService(IVrWindowManager.SERVICE_NAME));
|
||||
remote.disconnectController();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user