+ }
+ } else if (depth == 5) {
+ if (withinActivity) {
+ if (tag == "action") {
+ //printf("LOG: action tag\n");
+ String8 action = getAttribute(tree, NAME_ATTR, &error);
+ if (error != "") {
+ fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n", error.string());
+ goto bail;
+ }
+ if (action == "android.intent.action.MAIN") {
+ isMainActivity = true;
+ //printf("LOG: isMainActivity==true\n");
+ }
+ } else if (tag == "category") {
+ String8 category = getAttribute(tree, NAME_ATTR, &error);
+ if (error != "") {
+ fprintf(stderr, "ERROR getting 'name' attribute: %s\n", error.string());
+ goto bail;
+ }
+ if (category == "android.intent.category.LAUNCHER") {
+ isLauncherActivity = true;
+ //printf("LOG: isLauncherActivity==true\n");
+ }
+ }
+ } else if (withinReceiver) {
+ if (tag == "action") {
+ String8 action = getAttribute(tree, NAME_ATTR, &error);
+ if (error != "") {
+ fprintf(stderr, "ERROR getting 'android:name' attribute for receiver: %s\n", error.string());
+ goto bail;
+ }
+ if (action == "android.appwidget.action.APPWIDGET_UPDATE") {
+ const char *rName = getComponentName(pkg, receiverName);
+ if (rName != NULL) {
+ printf("gadget-receiver:'%s/%s'\n", pkg.string(), rName);
+ }
+ }
+ }