applications are at level 2
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index be05818..4c9853d 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -1710,7 +1710,7 @@
         } else if (depth == 2 && tag == "application") {
             inApplication = true;
         }
-        if (depth == 3 && inApplication) {
+        if (inApplication) {
             if (tag == "application" || tag == "activity" || tag == "service" || tag == "receiver"
                     || tag == "provider") {
                 String8 name = getAttribute(tree, "http://schemas.android.com/apk/res/android",