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

Commit 4026a85a authored by Aka (Chih-Yu) Huang's avatar Aka (Chih-Yu) Huang Committed by Android (Google) Code Review
Browse files

Merge "am: Remove unused fields from ProcessServiceRecord" into main

parents 69e91bb1 efe6e2d1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -4539,11 +4539,9 @@ public final class ActiveServices {
                if (srec.app != null) {
                    final ProcessServiceRecord psr = srec.app.mServices;
                    if (group > 0) {
                        psr.setConnectionService(srec);
                        psr.setConnectionGroup(group);
                        psr.setConnectionImportance(importance);
                    } else {
                        psr.setConnectionService(null);
                        psr.setConnectionGroup(0);
                        psr.setConnectionImportance(0);
                    }
+0 −1
Original line number Diff line number Diff line
@@ -15450,7 +15450,6 @@ public class ActivityManagerService extends IActivityManager.Stub
                }
            }
            psr.setReportedForegroundServiceTypes(fgServiceTypes);
            mProcessList.enqueueProcessChangeItemLocked(proc.getPid(), proc.info.uid,
                    ProcessChangeItem.CHANGE_FOREGROUND_SERVICES, fgServiceTypes);
        }
+1 −29
Original line number Diff line number Diff line
@@ -65,11 +65,6 @@ final class ProcessServiceRecord {
     */
    private long mLastTopStartedAlmostPerceptibleBindRequestUptimeMs;

    /**
     * Service that applied current connectionGroup/Importance.
     */
    private ServiceRecord mConnectionService;

    /**
     * Last group set by a connection.
     */
@@ -94,11 +89,6 @@ final class ProcessServiceRecord {
     */
    private boolean mHasTypeNoneFgs;

    /**
     * Last reported foreground service types.
     */
    private int mRepFgServiceTypes;

    /**
     * Bound using BIND_ABOVE_CLIENT, so want to be lower.
     */
@@ -271,15 +261,6 @@ final class ProcessServiceRecord {
        return false;
    }


    int getReportedForegroundServiceTypes() {
        return mRepFgServiceTypes;
    }

    void setReportedForegroundServiceTypes(int foregroundServiceTypes) {
        mRepFgServiceTypes = foregroundServiceTypes;
    }

    int getNumForegroundServices() {
        int count = 0;
        for (int i = 0, serviceCount = mServices.size(); i < serviceCount; i++) {
@@ -330,14 +311,6 @@ final class ProcessServiceRecord {
                < mService.mConstants.mServiceBindAlmostPerceptibleTimeoutMs);
    }

    ServiceRecord getConnectionService() {
        return mConnectionService;
    }

    void setConnectionService(ServiceRecord connectionService) {
        mConnectionService = connectionService;
    }

    int getConnectionGroup() {
        return mConnectionGroup;
    }
@@ -695,10 +668,9 @@ final class ProcessServiceRecord {
            pw.print(" hasAboveClient="); pw.print(mHasAboveClient);
            pw.print(" treatLikeActivity="); pw.println(mTreatLikeActivity);
        }
        if (mConnectionService != null || mConnectionGroup != 0) {
        if (mConnectionGroup != 0) {
            pw.print(prefix); pw.print("connectionGroup="); pw.print(mConnectionGroup);
            pw.print(" Importance="); pw.print(mConnectionImportance);
            pw.print(" Service="); pw.println(mConnectionService);
        }
        if (mAllowlistManager) {
            pw.print(prefix); pw.print("allowlistManager="); pw.println(mAllowlistManager);
+0 −1
Original line number Diff line number Diff line
@@ -1247,7 +1247,6 @@ final class ServiceRecord extends ServiceRecordInternal implements ComponentName
        updateProcessStateOnRequest();
        if (pendingConnectionGroup > 0 && proc != null) {
            final ProcessServiceRecord psr = proc.mServices;
            psr.setConnectionService(this);
            psr.setConnectionGroup(pendingConnectionGroup);
            psr.setConnectionImportance(pendingConnectionImportance);
            pendingConnectionGroup = pendingConnectionImportance = 0;