diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-03-08 16:13:15 -0800 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-03-13 16:42:38 -0700 |
commit | 02ffba940ca96988ed3e7774c606b43c58373b5e (patch) | |
tree | 9d829654e361a899b1de8f0621716774e75857ec /cmds/am | |
parent | 998b692d888765d10827264c953b227439fbf365 (diff) | |
download | frameworks_base-02ffba940ca96988ed3e7774c606b43c58373b5e.zip frameworks_base-02ffba940ca96988ed3e7774c606b43c58373b5e.tar.gz frameworks_base-02ffba940ca96988ed3e7774c606b43c58373b5e.tar.bz2 |
Handle finished bugreports, share from private.
Show notification when a bugreport is finished, letting the user
launch a SEND_MULTIPLE intent to share them. Add dialog that warns
user about contents before sharing. Since bugreports are now stored
in private app data of the Shell app, use FileProvider to build Uris
that we can grant others access to.
Define BUGREPORT_FINISHED as being a protected broadcast. Delete
older bugreports automatically to reclaim disk space. Migrate any
Intent extras to ClipData when building PendingIntents.
Add --receiver-permission support to am shell command.
Bug: 7005318
Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
Diffstat (limited to 'cmds/am')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 9fa7dbb..1c02960 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -63,6 +63,7 @@ public class Am { private int mRepeat = 0; private int mUserId; + private String mReceiverPermission; private String mProfileFile; @@ -332,6 +333,8 @@ public class Am { mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES; } else if (opt.equals("--user")) { mUserId = parseUserArg(nextArgRequired()); + } else if (opt.equals("--receiver-permission")) { + mReceiverPermission = nextArgRequired(); } else { System.err.println("Error: Unknown option: " + opt); return null; @@ -608,7 +611,7 @@ public class Am { Intent intent = makeIntent(UserHandle.USER_ALL); IntentReceiver receiver = new IntentReceiver(); System.out.println("Broadcasting: " + intent); - mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, null, + mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission, android.app.AppOpsManager.OP_NONE, true, false, mUserId); receiver.waitForFinish(); } @@ -1408,6 +1411,7 @@ public class Am { "am broadcast: send a broadcast Intent. Options are:\n" + " --user <USER_ID> | all | current: Specify which user to send to; if not\n" + " specified then send to all users.\n" + + " --receiver-permission <PERMISSION>: Require receiver to hold permission.\n" + "\n" + "am instrument: start an Instrumentation. Typically this target <COMPONENT>\n" + " is the form <TEST_PACKAGE>/<RUNNER_CLASS>. Options are:\n" + |