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

Commit d1858574 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Add callbacks for MediaProjection start / stop." into lmp-dev

parents 33903c83 d86ecd26
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -329,6 +329,7 @@ LOCAL_SRC_FILES += \
	media/java/android/media/projection/IMediaProjection.aidl \
	media/java/android/media/projection/IMediaProjectionCallback.aidl \
	media/java/android/media/projection/IMediaProjectionManager.aidl \
	media/java/android/media/projection/IMediaProjectionWatcherCallback.aidl \
	media/java/android/media/routing/IMediaRouteService.aidl \
	media/java/android/media/routing/IMediaRouteClientCallback.aidl \
	media/java/android/media/routing/IMediaRouter.aidl \
+4 −4
Original line number Diff line number Diff line
@@ -2811,11 +2811,11 @@
        android:description="@string/permdesc_accessDrmCertificates"
        android:protectionLevel="signature|system" />

    <!-- Api Allows an application to create media projection sessions.
    <!-- Api Allows an application to manage media projection sessions.
         @hide This is not a third-party API (intended for system apps). -->
    <permission android:name="android.permission.CREATE_MEDIA_PROJECTION"
        android:label="@string/permlab_createMediaProjection"
        android:description="@string/permdesc_createMediaProjection"
    <permission android:name="android.permission.MANAGE_MEDIA_PROJECTION"
        android:label="@string/permlab_manageMediaProjection"
        android:description="@string/permdesc_manageMediaProjection"
        android:protectionLevel="signature" />

    <!-- @SystemApi Allows an application to read install sessions
+4 −4
Original line number Diff line number Diff line
@@ -3899,10 +3899,10 @@
    <!-- Description of an application permission that lets it control keyguard. -->
    <string name="permdesc_recovery">Allows an application to interact with the recovery system and system updates.</string>

    <!-- Title of an application permission that lets it create media projection sessions. -->
    <string name="permlab_createMediaProjection">Create media projection sessions</string>
    <!-- Description of an application permission that lets it create media projection sessions. -->
    <string name="permdesc_createMediaProjection">Allows an application to create media projection sessions. These sessions can provide applications the ability to capture display and audio contents. Should never be needed by normal apps.</string>
    <!-- Title of an application permission that lets it manage media projection sessions. -->
    <string name="permlab_manageMediaProjection">Manage media projection sessions</string>
    <!-- Description of an application permission that lets it manage media projection sessions. -->
    <string name="permdesc_manageMediaProjection">Allows an application to manage media projection sessions. These sessions can provide applications the ability to capture display and audio contents. Should never be needed by normal apps.</string>

    <!-- Title of an application permission that lets it read install sessions. -->
    <string name="permlab_readInstallSessions">Read install sessions</string>
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
package android.media.projection;

import android.media.projection.IMediaProjection;
import android.media.projection.IMediaProjectionCallback;
import android.media.projection.IMediaProjectionWatcherCallback;
import android.media.projection.MediaProjectionInfo;
import android.os.IBinder;

/** {@hide} */
@@ -25,4 +28,8 @@ interface IMediaProjectionManager {
    IMediaProjection createProjection(int uid, String packageName, int type,
            boolean permanentGrant);
    boolean isValidMediaProjection(IMediaProjection projection);
    MediaProjectionInfo getActiveProjectionInfo();
    void stopActiveProjection();
    void addCallback(IMediaProjectionWatcherCallback callback);
    void removeCallback(IMediaProjectionWatcherCallback callback);
}
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 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.projection;

import android.media.projection.MediaProjectionInfo;

/** {@hide} */
oneway interface IMediaProjectionWatcherCallback {
    void onStart(in MediaProjectionInfo info);
    void onStop(in MediaProjectionInfo info);
}
Loading