diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-10-09 14:00:30 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-10-09 17:57:14 -0700 |
commit | c0bd747b0605af251ff136277f14220a5a4c9818 (patch) | |
tree | 42c57d29d70cb1a8db3ad34da224ac3882481029 /cmds | |
parent | 840590dd642719f402491092944a12475d6d6a8e (diff) | |
download | frameworks_base-c0bd747b0605af251ff136277f14220a5a4c9818.zip frameworks_base-c0bd747b0605af251ff136277f14220a5a4c9818.tar.gz frameworks_base-c0bd747b0605af251ff136277f14220a5a4c9818.tar.bz2 |
Further work on issue #7307399: Framework needs a new pre-user-shutdown...
...phase & callback API
I realized there were a few things wrong with what was there. The new
ACTION_USER_STARTING was not being sent for the first user at boot, and
there was an existing problem where ACTION_USER_STARTED was sent every
time there was a user switch.
Also improved some debug output of broadcasts to make it easier to see
what is going on in this stuff, and better reporting of why a service
couldn't be started.
Change-Id: Id8a536defbbad1f73d94a37d13762436b822fbe3
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 3df88bb..add7a23 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -415,6 +415,10 @@ public class Am { ComponentName cn = mAm.startService(null, intent, intent.getType(), mUserId); if (cn == null) { System.err.println("Error: Not found; no service started."); + } else if (cn.getPackageName().equals("!")) { + System.err.println("Error: Requires permission " + cn.getClassName()); + } else if (cn.getPackageName().equals("!!")) { + System.err.println("Error: " + cn.getClassName()); } } |