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

Commit 85f521e7 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by android-build-merger
Browse files

Merge "Fix issue #65259946: APR: runtime restart: at...

Merge "Fix issue #65259946: APR: runtime restart: at com.android.server.am.ActivityManagerService" into oc-mr1-dev
am: 27207c9b

Change-Id: I2faffd66d1ab5629edece991ed6566c0541d8a3a
parents 19f40da9 27207c9b
Loading
Loading
Loading
Loading
+26 −10
Original line number Diff line number Diff line
@@ -1471,7 +1471,7 @@ public class ActivityManagerService extends IActivityManager.Stub
     * Flag that indicates if multi-window is enabled.
     *
     * For any particular form of multi-window to be enabled, generic multi-window must be enabled
     * in {@link com.android.internal.R.bool.config_supportsMultiWindow} config or
     * in {@link com.android.internal.R.bool#config_supportsMultiWindow} config or
     * {@link Settings.Global#DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES} development option set.
     * At least one of the forms of multi-window must be enabled in order for this flag to be
     * initialized to 'true'.
@@ -13464,7 +13464,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    /**
     * Schedule the given thread a normal scheduling priority.
     *
     * @param newTid the tid of the thread to adjust the scheduling of.
     * @param tid the tid of the thread to adjust the scheduling of.
     * @param suppressLogs {@code true} if any error logging should be disabled.
     *
     * @return {@code true} if this succeeded.
@@ -13477,6 +13477,10 @@ public class ActivityManagerService extends IActivityManager.Stub
            if (!suppressLogs) {
                Slog.w(TAG, "Failed to set scheduling policy, thread does not exist:\n" + e);
            }
        } catch (SecurityException e) {
            if (!suppressLogs) {
                Slog.w(TAG, "Failed to set scheduling policy, not allowed:\n" + e);
            }
        }
        return false;
    }
@@ -13484,7 +13488,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    /**
     * Schedule the given thread an FIFO scheduling priority.
     *
     * @param newTid the tid of the thread to adjust the scheduling of.
     * @param tid the tid of the thread to adjust the scheduling of.
     * @param suppressLogs {@code true} if any error logging should be disabled.
     *
     * @return {@code true} if this succeeded.
@@ -13497,6 +13501,10 @@ public class ActivityManagerService extends IActivityManager.Stub
            if (!suppressLogs) {
                Slog.w(TAG, "Failed to set scheduling policy, thread does not exist:\n" + e);
            }
        } catch (SecurityException e) {
            if (!suppressLogs) {
                Slog.w(TAG, "Failed to set scheduling policy, not allowed:\n" + e);
            }
        }
        return false;
    }
@@ -22054,6 +22062,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                               app.curSchedGroup != ProcessList.SCHED_GROUP_TOP_APP) {
                        mVrController.onTopProcChangedLocked(app);
                        if (mUseFifoUiScheduling) {
                            try {
                                // Reset UI pipeline to SCHED_OTHER
                                setThreadScheduler(app.pid, SCHED_OTHER, 0);
                                setThreadPriority(app.pid, app.savedPriority);
@@ -22062,6 +22071,13 @@ public class ActivityManagerService extends IActivityManager.Stub
                                        SCHED_OTHER, 0);
                                    setThreadPriority(app.renderThreadTid, -4);
                                }
                            } catch (IllegalArgumentException e) {
                                Slog.w(TAG,
                                        "Failed to set scheduling policy, thread does not exist:\n"
                                                + e);
                            } catch (SecurityException e) {
                                Slog.w(TAG, "Failed to set scheduling policy, not allowed:\n" + e);
                            }
                        } else {
                            // Reset priority for top app UI and render threads
                            setThreadPriority(app.pid, 0);