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

Commit f673393b authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Moved more stuff from ActivityManagerService to ActivityTaskManagerService (11/n)

Moved more stuff related to activities out of the current service to the new one.

Bug: 80414790
Fixes: 110988007
Test: Existing tests pass.
Change-Id: Iceed1da8a7441a26d11efebc6d9f692fd053bc7f
parent faa0516e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -213,4 +213,7 @@ public abstract class ActivityManagerInternal {
     * Returns {@code true} if {@code uid} is running an activity from {@code packageName}.
     */
    public abstract boolean hasRunningActivity(int uid, @Nullable String packageName);

    public abstract void updateOomAdj();
    public abstract void sendForegroundProfileChanged(int userId);
}
+0 −1
Original line number Diff line number Diff line
@@ -393,7 +393,6 @@ interface IActivityManager {
    void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
            in String reportPackage);
    void dumpHeapFinished(in String path);
    void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
    void updateLockTaskPackages(int userId, in String[] packages);
    void noteAlarmStart(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
    void noteAlarmFinish(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
+1 −0
Original line number Diff line number Diff line
@@ -421,4 +421,5 @@ interface IActivityTaskManager {
    void stopAppSwitches();
    void resumeAppSwitches();
    void setActivityController(in IActivityController watcher, boolean imAMonkey);
    void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
}
+1 −1
Original line number Diff line number Diff line
@@ -2107,7 +2107,7 @@ public final class ActiveServices {
    private final boolean scheduleServiceRestartLocked(ServiceRecord r, boolean allowCancel) {
        boolean canceled = false;

        if (mAm.isShuttingDownLocked()) {
        if (mAm.mAtmInternal.isShuttingDown()) {
            Slog.w(TAG, "Not scheduling restart of crashed service " + r.shortName
                    + " - system is shutting down");
            return false;
+3 −3
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
                + " to displayId=" + mDisplayId + " position=" + position);
        addStackReferenceIfNeeded(stack);
        positionChildAt(stack, position);
        mSupervisor.mService.mAm.updateSleepIfNeededLocked();
        mSupervisor.mService.updateSleepIfNeededLocked();
    }

    void removeChild(ActivityStack stack) {
@@ -149,7 +149,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
                + " from displayId=" + mDisplayId);
        mStacks.remove(stack);
        removeStackReferenceIfNeeded(stack);
        mSupervisor.mService.mAm.updateSleepIfNeededLocked();
        mSupervisor.mService.updateSleepIfNeededLocked();
        onStackOrderChanged();
    }

@@ -715,7 +715,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>

    boolean shouldSleep() {
        return (mStacks.isEmpty() || !mAllSleepTokens.isEmpty())
                && (mSupervisor.mService.mAm.mRunningVoice == null);
                && (mSupervisor.mService.mRunningVoice == null);
    }

    /**
Loading