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

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

Merge "am: Rename getPackageList to getProcessPackageNames" into main

parents 8fe46327 648b0cfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ class AppErrors {
        }

        if (exceptionTypeId == CrashedByAdbException.TYPE_ID) {
            String[] packages = proc.getPackageList();
            final String[] packages = proc.getProcessPackageNames();
            for (int i = 0; i < packages.length; i++) {
                if (mService.mPackageManagerInt.isPackageStateProtected(packages[i], proc.userId)) {
                    Slog.w(TAG, "crashApplication: Can not crash protected package " + packages[i]);
+1 −1
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ public final class AppExitInfoTracker {
            info.setProcessName(app.processName);
            info.setConnectionGroup(app.mServices.getConnectionGroup());
            info.setPackageName(app.info.packageName);
            info.setPackageList(app.getPackageList());
            info.setPackageList(app.getProcessPackageNames());
            info.setReason(ApplicationExitInfo.REASON_UNKNOWN);
            info.setSubReason(ApplicationExitInfo.SUBREASON_UNKNOWN);
            info.setStatus(0);
+2 −2
Original line number Diff line number Diff line
@@ -2391,7 +2391,7 @@ public abstract class OomAdjuster {
    @GuardedBy({"mService", "mProcLock"})
    private void maybeUpdateUsageStatsLSP(ProcessRecordInternal app, long nowElapsed) {
        if (DEBUG_USAGE_STATS) {
            Slog.d(TAG, "Checking proc [" + Arrays.toString(app.getPackageList())
            Slog.d(TAG, "Checking proc [" + Arrays.toString(app.getProcessPackageNames())
                    + "] state changes: old = " + app.getSetProcState() + ", new = "
                    + app.getCurProcState());
        }
@@ -2429,7 +2429,7 @@ public abstract class OomAdjuster {
                && (!app.getHasReportedInteraction()
                    || (nowElapsed - app.getInteractionEventTime()) > interactionThreshold)) {
            app.setInteractionEventTime(nowElapsed);
            String[] packages = app.getPackageList();
            final String[] packages = app.getProcessPackageNames();
            if (packages != null) {
                for (int i = 0; i < packages.length; i++) {
                    mService.mUsageStatsService.reportEvent(packages[i], app.userId,
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ final class PackageList {
        return mPkgList;
    }

    String[] getPackageList() {
    String[] getPackageNames() {
        synchronized (this) {
            int size = mPkgList.size();
            if (size == 0) {
+2 −1
Original line number Diff line number Diff line
@@ -573,7 +573,8 @@ class ProcessErrorStateRecord {
            final long startOffset = 0L;
            final long endOffset = firstPidEndOffset.get();
            mService.mProcessList.mAppExitInfoTracker.scheduleLogAnrTrace(
                    pid, mApp.uid, mApp.getPackageList(), tracesFile, startOffset, endOffset);
                    pid, mApp.uid, mApp.getProcessPackageNames(), tracesFile, startOffset,
                    endOffset);
        }

        // Check if package is still being loaded
Loading