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

Commit f9703253 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7236906 from 32c12205 to rvc-qpr3-release

Change-Id: I6557eab74b16141d9e68e077efb0ee1c104c788b
parents 6d0a8875 32c12205
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
/* //device/apps/common/assets/res/any/strings.xml
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
 -->

<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="mmcc_illegal_me" msgid="6819499009131365312">"ফোন অনুমোদিত নয় MM#6"</string>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -4891,6 +4891,10 @@ public final class ActiveServices {
                if (!pr.mAllowBackgroundActivityStartsTokens.isEmpty()) {
                    return true;
                }
                if (pr.getWindowProcessController()
                        .areBackgroundActivityStartsAllowedByGracePeriodSafe()) {
                    return true;
                }
            }
        }

+22 −8
Original line number Diff line number Diff line
@@ -455,15 +455,13 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
        mAllowBackgroundActivityStarts = allowBackgroundActivityStarts;
    }

    boolean areBackgroundActivityStartsAllowed() {
        // allow if the whitelisting flag was explicitly set
        if (mAllowBackgroundActivityStarts) {
            if (DEBUG_ACTIVITY_STARTS) {
                Slog.d(TAG, "[WindowProcessController(" + mPid
                        + ")] Activity start allowed: mAllowBackgroundActivityStarts = true");
    public boolean areBackgroundActivityStartsAllowedByGracePeriodSafe() {
        synchronized (mAtm.mGlobalLockWithoutBoost) {
            return areBackgroundActivityStartsAllowedByGracePeriod();
        }
            return true;
    }

    boolean areBackgroundActivityStartsAllowedByGracePeriod() {
        // allow if any activity in the caller has either started or finished very recently, and
        // it must be started or finished after last stop app switches time.
        final long now = SystemClock.uptimeMillis();
@@ -485,8 +483,24 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
                        + ACTIVITY_BG_START_GRACE_PERIOD_MS
                        + "ms grace period but also within stop app switch window");
            }
        }
        return false;
    }

    boolean areBackgroundActivityStartsAllowed() {
        // allow if the whitelisting flag was explicitly set
        if (mAllowBackgroundActivityStarts) {
            if (DEBUG_ACTIVITY_STARTS) {
                Slog.d(TAG, "[WindowProcessController(" + mPid
                        + ")] Activity start allowed: mAllowBackgroundActivityStarts = true");
            }
            return true;
        }

        if (areBackgroundActivityStartsAllowedByGracePeriod()) {
            return true;
        }

        // allow if the proc is instrumenting with background activity starts privs
        if (mInstrumentingWithBackgroundActivityStartPrivileges) {
            if (DEBUG_ACTIVITY_STARTS) {