add dumpsys -l to list available services
- for people with poor memory like me :) Change-Id: I60160ca333ac4864bb8328f164cc2e9eba3660fc
This commit is contained in:
parent
10e42969e6
commit
caad555f3e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user