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

Commit 6463f888 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add option to list vndservicemanager services." into oc-dev

parents 4f50c6f3 d6480caf
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -68,18 +68,12 @@ static String8 good_old_string(const String16& src)

int main(int argc, char* const argv[])
{
    sp<IServiceManager> sm = defaultServiceManager();
    fflush(stdout);
    if (sm == NULL) {
        aerr << "service: Unable to get default service manager!" << endl;
        return 20;
    }
    
    bool wantsUsage = false;
    bool wantsVendorServices = false;
    int result = 0;
    
    while (1) {
        int ic = getopt(argc, argv, "h?");
        int ic = getopt(argc, argv, "vh?");
        if (ic < 0)
            break;

@@ -88,6 +82,9 @@ int main(int argc, char* const argv[])
        case '?':
            wantsUsage = true;
            break;
        case 'v':
            wantsVendorServices = true;
            break;
        default:
            aerr << "service: Unknown option -" << ic << endl;
            wantsUsage = true;
@@ -96,6 +93,16 @@ int main(int argc, char* const argv[])
        }
    }

    if (wantsVendorServices) {
        ProcessState::initWithDriver("/dev/vndbinder");
    }
    sp<IServiceManager> sm = defaultServiceManager();
    fflush(stdout);
    if (sm == NULL) {
        aerr << "service: Unable to get default service manager!" << endl;
        return 20;
    }
    
    if (optind >= argc) {
        wantsUsage = true;
    } else if (!wantsUsage) {