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

Commit f3c99e88 authored by Jeff Brown's avatar Jeff Brown
Browse files

Add a platform library for remote display providers.

This interface allows applications to register services that offer
remote displays to the system.  The system will then provide UI
to allow user to connect to these displays and enable mirroring.

Bug: 11257292
Change-Id: I34da5b9dfdaf71267bd3450c505bc1b7368d1b40
parent 170735d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -255,6 +255,8 @@ LOCAL_SRC_FILES += \
	media/java/android/media/IMediaScannerService.aidl \
	media/java/android/media/IRemoteControlClient.aidl \
	media/java/android/media/IRemoteControlDisplay.aidl \
	media/java/android/media/IRemoteDisplayCallback.aidl \
	media/java/android/media/IRemoteDisplayProvider.aidl \
	media/java/android/media/IRemoteVolumeObserver.aidl \
	media/java/android/media/IRingtonePlayer.aidl \
	telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
+8 −0
Original line number Diff line number Diff line
@@ -1992,6 +1992,14 @@
        android:description="@string/permdesc_bindWallpaper"
        android:protectionLevel="signature|system" />

    <!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider},
         to ensure that only the system can bind to it.
         @hide -->
    <permission android:name="android.permission.BIND_REMOTE_DISPLAY"
        android:label="@string/permlab_bindRemoteDisplay"
        android:description="@string/permdesc_bindRemoteDisplay"
        android:protectionLevel="signature" />

    <!-- Must be required by device administration receiver, to ensure that only the
         system can interact with it. -->
    <permission android:name="android.permission.BIND_DEVICE_ADMIN"
+6 −0
Original line number Diff line number Diff line
@@ -1051,6 +1051,12 @@
    <string name="permdesc_bindWallpaper">Allows the holder to bind to the top-level
        interface of a wallpaper. Should never be needed for normal apps.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_bindRemoteDisplay">bind to a remote display</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_bindRemoteDisplay">Allows the holder to bind to the top-level
        interface of a remote display. Should never be needed for normal apps.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_bindRemoteViews">bind to a widget service</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+26 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 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 android.media;

import android.media.RemoteDisplayState;

/**
 * {@hide}
 */
oneway interface IRemoteDisplayCallback {
    void onStateChanged(in RemoteDisplayState state);
}
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 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 android.media;

import android.media.IRemoteDisplayCallback;

/**
 * {@hide}
 */
oneway interface IRemoteDisplayProvider {
    void setCallback(in IRemoteDisplayCallback callback);
    void setDiscoveryMode(int mode);
    void connect(String id);
    void disconnect(String id);
    void setVolume(String id, int volume);
    void adjustVolume(String id, int delta);
}
Loading