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

Commit b743b067 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't record audio if UID is idle - core framework"

parents c26b093c 14ab967e
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -86,6 +86,9 @@ interface IActivityManager {
    // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h
    // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h
    // =============== Beginning of transactions used on native side as well ======================
    // =============== Beginning of transactions used on native side as well ======================
    ParcelFileDescriptor openContentUri(in String uriString);
    ParcelFileDescriptor openContentUri(in String uriString);
    void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
            String callingPackage);
    void unregisterUidObserver(in IUidObserver observer);
    // =============== End of transactions used on native side as well ============================
    // =============== End of transactions used on native side as well ============================


    // Special low-level communication with activity manager.
    // Special low-level communication with activity manager.
@@ -478,9 +481,6 @@ interface IActivityManager {
     */
     */
    void keyguardGoingAway(int flags);
    void keyguardGoingAway(int flags);
    int getUidProcessState(int uid, in String callingPackage);
    int getUidProcessState(int uid, in String callingPackage);
    void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
            String callingPackage);
    void unregisterUidObserver(in IUidObserver observer);
    boolean isAssistDataAllowedOnCurrentActivity();
    boolean isAssistDataAllowedOnCurrentActivity();
    boolean showAssistFromActivity(in IBinder token, in Bundle args);
    boolean showAssistFromActivity(in IBinder token, in Bundle args);
    boolean isRootVoiceInteraction(in IBinder token);
    boolean isRootVoiceInteraction(in IBinder token);
+20 −9
Original line number Original line Diff line number Diff line
@@ -18,15 +18,14 @@ package android.app;


/** {@hide} */
/** {@hide} */
oneway interface IUidObserver {
oneway interface IUidObserver {
    /**
    // WARNING: when these transactions are updated, check if they are any callers on the native
     * General report of a state change of an uid.
    // side. If so, make sure they are using the correct transaction ids and arguments.
     *
    // If a transaction which will also be used on the native side is being inserted, add it to
     * @param uid The uid for which the state change is being reported.
    // below block of transactions.
     * @param procState The updated process state for the uid.

     * @param procStateSeq The sequence no. associated with process state change of the uid,
    // Since these transactions are also called from native code, these must be kept in sync with
     *                     see UidRecord.procStateSeq for details.
    // the ones in frameworks/native/include/binder/IActivityManager.h
     */
    // =============== Beginning of transactions used on native side as well ======================
    void onUidStateChanged(int uid, int procState, long procStateSeq);


    /**
    /**
     * Report that there are no longer any processes running for a uid.
     * Report that there are no longer any processes running for a uid.
@@ -44,6 +43,18 @@ oneway interface IUidObserver {
     */
     */
    void onUidIdle(int uid, boolean disabled);
    void onUidIdle(int uid, boolean disabled);


    // =============== End of transactions used on native side as well ============================

    /**
     * General report of a state change of an uid.
     *
     * @param uid The uid for which the state change is being reported.
     * @param procState The updated process state for the uid.
     * @param procStateSeq The sequence no. associated with process state change of the uid,
     *                     see UidRecord.procStateSeq for details.
     */
    void onUidStateChanged(int uid, int procState, long procStateSeq);

    /**
    /**
     * Report when the cached state of a uid has changed.
     * Report when the cached state of a uid has changed.
     * If true, a uid has become cached -- that is, it has some active processes that are
     * If true, a uid has become cached -- that is, it has some active processes that are
+1 −0
Original line number Original line Diff line number Diff line
@@ -150,6 +150,7 @@
    <assign-permission name="android.permission.WAKE_LOCK" uid="audioserver" />
    <assign-permission name="android.permission.WAKE_LOCK" uid="audioserver" />
    <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="audioserver" />
    <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="audioserver" />
    <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="audioserver" />
    <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="audioserver" />
    <assign-permission name="android.permission.PACKAGE_USAGE_STATS" uid="audioserver" />


    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="cameraserver" />
    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="cameraserver" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="cameraserver" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="cameraserver" />