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

Commit 9dc92af2 authored by Gaurav Bhola's avatar Gaurav Bhola
Browse files

Ensure that DebuggerWindow is shown on headless systems.

- on headless systems, user-0 is invisible. And hence windows started by
  user-0 process are not visible.

Test: atest AmStartOptionsTest#DashD
Bug: 294279968
Fix: 302587507
Change-Id: I82c22d88ef58ad264d4156c3fc113b2ae57e2631
parent 31930f37
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.am;

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

import android.content.Context;
import android.content.DialogInterface;
import android.os.Handler;
@@ -54,6 +56,7 @@ final class AppWaitingForDebuggerDialog extends BaseErrorDialog {
        setButton(DialogInterface.BUTTON_POSITIVE, "Force Close", mHandler.obtainMessage(1, app));
        setTitle("Waiting For Debugger");
        WindowManager.LayoutParams attrs = getWindow().getAttributes();
        attrs.privateFlags |= SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
        attrs.setTitle("Waiting For Debugger: " + app.info.processName);
        getWindow().setAttributes(attrs);
    }