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

Commit fa100a6e authored by Yu-Ting Tseng's avatar Yu-Ting Tseng Committed by Android (Google) Code Review
Browse files

Merge "Add IProcessObserver.OnProcessStarted API." into main

parents 32db9dbe 03bd516c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@ public abstract class HomeVisibilityListener {

    public HomeVisibilityListener() {
        mObserver = new android.app.IProcessObserver.Stub() {
            @Override
            public void onProcessStarted(int pid, int processUid, int packageUid,
                    String packageName, String processName) {
            }

            @Override
            public void onForegroundActivitiesChanged(int pid, int uid, boolean fg) {
                refreshHomeVisibility();
+11 −0
Original line number Diff line number Diff line
@@ -18,6 +18,17 @@ package android.app;

/** {@hide} */
oneway interface IProcessObserver {
    /**
     * Invoked when an app process starts up.
     *
     * @param pid The pid of the process.
     * @param processUid The UID associated with the process.
     * @param packageUid The UID associated with the package.
     * @param packageName The name of the package.
     * @param processName The name of the process.
     */
    void onProcessStarted(int pid, int processUid, int packageUid,
                          @utf8InCpp String packageName, @utf8InCpp String processName);
    void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities);
    void onForegroundServicesChanged(int pid, int uid, int serviceTypes);
    void onProcessDied(int pid, int uid);
+8 −0
Original line number Diff line number Diff line
@@ -78,6 +78,14 @@ abstract class TvPipTestBase : PipTestBase(rotationToString(ROTATION_0), ROTATIO
            uiAutomation.dropShellPermissionIdentity()
        }

        override fun onProcessStarted(
            pid: Int,
            processUid: Int,
            packageUid: Int,
            packageName: String,
            processName: String
        ) {}

        override fun onForegroundActivitiesChanged(pid: Int, uid: Int, foreground: Boolean) {}

        override fun onForegroundServicesChanged(pid: Int, uid: Int, serviceTypes: Int) {}
+5 −0
Original line number Diff line number Diff line
@@ -3753,6 +3753,11 @@ final class ActivityManagerShellCommand extends ShellCommand {
            }
        }

        @Override
        public void onProcessStarted(int pid, int processUid, int packageUid, String packageName,
                String processName) {
        }

        @Override
        public void onForegroundServicesChanged(int pid, int uid, int serviceTypes) {
        }
+5 −0
Original line number Diff line number Diff line
@@ -101,6 +101,11 @@ final class AppFGSTracker extends BaseAppStateDurationsTracker<AppFGSPolicy, Pac
            }
        }

        @Override
        public void onProcessStarted(int pid, int processUid, int packageUid, String packageName,
                String processName) {
        }

        @Override
        public void onProcessDied(int pid, int uid) {
        }
Loading