From d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 27 Sep 2012 23:20:10 -0700 Subject: Fix issue #7211769 and #7244492, thrash around on #7226656. Issue #7211769: Crash dialog from background user has non-working "report" The report button now launches the issue reporter for the correct user. Also for crashes on background users, either disable the report button, or simply don't show the dialog depending on the build config. Issue #7244492: Bugreport button in Quick Settings doesn't actually do anything Now they do. Issue #7226656: second user seeing primary user's apps I haven't had any success at reproducing this. I have tried to tighten up the path where we create the user to ensure nothing could cause the user's applications to be accessed before the user it fully created and thus make them installed... but I can't convince myself that is the actual problem. Also tightened up the user switch code to use forground broadcasts for all of the updates about the switch (since this is really a foreground operation), added a facility to have BOOT_COMPELTED broadcasts not get launched for secondary users and use that on a few key system receivers, fixed some debug output. Change-Id: Iadf8f8e4878a86def2e495e9d0dc40c4fb347021 --- cmds/am/src/com/android/commands/am/Am.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmds') diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 396b32f..3df88bb 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -127,6 +127,8 @@ public class Am { runSetDebugApp(); } else if (op.equals("clear-debug-app")) { runClearDebugApp(); + } else if (op.equals("bug-report")) { + runBugReport(); } else if (op.equals("monitor")) { runMonitor(); } else if (op.equals("screen-compat")) { @@ -844,6 +846,11 @@ public class Am { mAm.setDebugApp(null, false, true); } + private void runBugReport() throws Exception { + mAm.requestBugReport(); + System.out.println("Your lovely bug report is being created; please be patient."); + } + private void runSwitchUser() throws Exception { String user = nextArgRequired(); mAm.switchUser(Integer.parseInt(user)); @@ -1508,6 +1515,9 @@ public class Am { "\n" + "am clear-debug-app: clear the previously set-debug-app.\n" + "\n" + + "am bug-report: request bug report generation; will launch UI\n" + + " when done to select where it should be delivered." + + "\n" + "am monitor: start monitoring for crashes or ANRs.\n" + " --gdb: start gdbserv on the given port at crash/ANR\n" + "\n" + -- cgit v1.1