summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeunyoung <keunyoung@google.com>2013-06-13 15:08:51 -0700
committerkeunyoung <keunyoung@google.com>2013-06-13 16:32:26 -0700
commitcaad555f3efaf77941c4eacd4f6c84eb22d14f6d (patch)
tree6457569b5e3f05a1b18d278b4588c0ad69e04324
parent10e42969e6869c438244974495c9c71cdf3ec7be (diff)
downloadframeworks_native-caad555f3efaf77941c4eacd4f6c84eb22d14f6d.zip
frameworks_native-caad555f3efaf77941c4eacd4f6c84eb22d14f6d.tar.gz
frameworks_native-caad555f3efaf77941c4eacd4f6c84eb22d14f6d.tar.bz2
add dumpsys -l to list available services
- for people with poor memory like me :) Change-Id: I60160ca333ac4864bb8328f164cc2e9eba3660fc
-rw-r--r--cmds/dumpsys/dumpsys.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmds/dumpsys/dumpsys.cpp b/cmds/dumpsys/dumpsys.cpp
index 7cd5afd..ce8993d 100644
--- a/cmds/dumpsys/dumpsys.cpp
+++ b/cmds/dumpsys/dumpsys.cpp
@@ -39,7 +39,11 @@ int main(int argc, char* const argv[])
Vector<String16> services;
Vector<String16> args;
- if (argc == 1) {
+ bool showListOnly = false;
+ if ((argc == 2) && (strcmp(argv[1], "-l") == 0)) {
+ showListOnly = true;
+ }
+ if ((argc == 1) || showListOnly) {
services = sm->listServices();
services.sort(sort_func);
args.add(String16("-a"));
@@ -64,6 +68,10 @@ int main(int argc, char* const argv[])
}
}
+ if (showListOnly) {
+ return 0;
+ }
+
for (size_t i=0; i<N; i++) {
sp<IBinder> service = sm->checkService(services[i]);
if (service != NULL) {