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

Commit 1702a9da authored by Xin Li's avatar Xin Li
Browse files

DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master

Bug: 139369544
Change-Id: I835905a51836e7218f0be8c25335b9548ae6b2d3
parents 4204a601 823838e9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -752,6 +752,8 @@ public class Binder implements IBinder {
                    Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e);
                }
            } else {
                // Clear the parcel before writing the exception
                reply.setDataSize(0);
                reply.setDataPosition(0);
                reply.writeException(e);
            }
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    <uses-permission android:name="android.permission.CONTROL_VPN" />
    <uses-permission android:name="android.permission.CONTROL_ALWAYS_ON_VPN" />
    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
    <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>

    <application android:label="VpnDialogs"
                 android:allowBackup="false">
+7 −3
Original line number Diff line number Diff line
@@ -16,6 +16,10 @@

package com.android.vpndialogs;

import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -31,7 +35,6 @@ import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import com.android.internal.app.AlertActivity;
@@ -74,8 +77,9 @@ public class AlwaysOnDisconnectedDialog extends AlertActivity
        setupAlert();

        getWindow().setCloseOnTouchOutside(false);
        getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
        getWindow().setType(TYPE_SYSTEM_ALERT);
        getWindow().addFlags(FLAG_ALT_FOCUSABLE_IM);
        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.vpndialogs;

import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
@@ -78,6 +80,7 @@ public class ConfirmDialog extends AlertActivity
        setupAlert();

        getWindow().setCloseOnTouchOutside(false);
        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
        Button button = mAlert.getButton(DialogInterface.BUTTON_POSITIVE);
        button.setFilterTouchesWhenObscured(true);
    }
+35 −3
Original line number Diff line number Diff line
@@ -4202,6 +4202,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            checkTime(startTime, "startProcess: done removing from pids map");
            app.setPid(0);
            app.startSeq = 0;
        }
        if (DEBUG_PROCESSES && mProcessesOnHold.contains(app)) Slog.v(TAG_PROCESSES,
@@ -4393,6 +4394,14 @@ public class ActivityManagerService extends IActivityManager.Stub
        app.killedByAm = false;
        app.removed = false;
        app.killed = false;
        if (app.startSeq != 0) {
            Slog.wtf(TAG, "startProcessLocked processName:" + app.processName
                    + " with non-zero startSeq:" + app.startSeq);
        }
        if (app.pid != 0) {
            Slog.wtf(TAG, "startProcessLocked processName:" + app.processName
                    + " with non-zero pid:" + app.pid);
        }
        final long startSeq = app.startSeq = ++mProcStartSeqCounter;
        app.setStartParams(uid, hostingType, hostingNameStr, seInfo, startTime);
        if (mConstants.FLAG_PROCESS_START_ASYNC) {
@@ -4578,8 +4587,11 @@ public class ActivityManagerService extends IActivityManager.Stub
        // If there is already an app occupying that pid that hasn't been cleaned up
        if (oldApp != null && !app.isolated) {
            // Clean up anything relating to this pid first
            Slog.w(TAG, "Reusing pid " + pid
                    + " while app is still mapped to it");
          Slog.wtf(TAG, "handleProcessStartedLocked process:" + app.processName
                  + " startSeq:" + app.startSeq
                  + " pid:" + pid
                  + " belongs to another existing app:" + oldApp.processName
                  + " startSeq:" + oldApp.startSeq);
            cleanUpApplicationRecordLocked(oldApp, false, false, -1,
                    true /*replacingPid*/);
        }
@@ -7435,6 +7447,26 @@ public class ActivityManagerService extends IActivityManager.Stub
            synchronized (mPidsSelfLocked) {
                app = mPidsSelfLocked.get(pid);
            }
            if (app != null && (app.startUid != callingUid || app.startSeq != startSeq)) {
                String processName = null;
                final ProcessRecord pending = mPendingStarts.get(startSeq);
                if (pending != null) {
                    processName = pending.processName;
                }
                final String msg = "attachApplicationLocked process:" + processName
                      + " startSeq:" + startSeq
                      + " pid:" + pid
                      + " belongs to another existing app:" + app.processName
                      + " startSeq:" + app.startSeq;
                Slog.wtf(TAG, msg);
                // SafetyNet logging for b/131105245.
                EventLog.writeEvent(0x534e4554, "131105245", app.startUid, msg);
                // If there is already an app occupying that pid that hasn't been cleaned up
                cleanUpApplicationRecordLocked(app, false, false, -1,
                    true /*replacingPid*/);
                mPidsSelfLocked.remove(pid);
                app = null;
            }
        } else {
            app = null;
        }
@@ -7443,7 +7475,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        // update the internal state.
        if (app == null && startSeq > 0) {
            final ProcessRecord pending = mPendingStarts.get(startSeq);
            if (pending != null && pending.startUid == callingUid
            if (pending != null && pending.startUid == callingUid && pending.startSeq == startSeq
                    && handleProcessStartedLocked(pending, pid, pending.usingWrapper,
                            startSeq, true)) {
                app = pending;
Loading