Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caad555f authored by keunyoung's avatar keunyoung
Browse files

add dumpsys -l to list available services

- for people with poor memory like me :)

Change-Id: I60160ca333ac4864bb8328f164cc2e9eba3660fc
parent 10e42969
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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) {