diff options
| author | 2022-07-20 15:15:33 +0800 | |
|---|---|---|
| committer | 2022-07-20 15:16:58 +0800 | |
| commit | b172c3161f00a697140c226c3ed0993c8a9e0e4d (patch) | |
| tree | bf5b6222a0fb1ae3b7233e49590332b1d26b4e84 /tools | |
| parent | 71dd611947ce1ede7eb34371011bc46dc1eab381 (diff) | |
Fix unused-but-set-variable warnings
These are essentially dead code...
Test: presubmit
Bug: 197240255
Change-Id: If36fa244990cb7d101fce57bcd5d8115f8722064
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/aapt/Command.cpp | 6 | ||||
| -rw-r--r-- | tools/aapt/ResourceTable.cpp | 8 |
2 files changed, 1 insertions, 13 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 812e2087f36b..b5c35f62895b 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -1028,7 +1028,6 @@ int doDump(Bundle* bundle) // These permissions are required by services implementing services // the system binds to (IME, Accessibility, PrintServices, etc.) bool hasBindDeviceAdminPermission = false; - bool hasBindInputMethodPermission = false; bool hasBindAccessibilityServicePermission = false; bool hasBindPrintServicePermission = false; bool hasBindNfcServicePermission = false; @@ -1738,7 +1737,6 @@ int doDump(Bundle* bundle) hasMetaHostPaymentCategory = false; hasMetaOffHostPaymentCategory = false; hasBindDeviceAdminPermission = false; - hasBindInputMethodPermission = false; hasBindAccessibilityServicePermission = false; hasBindPrintServicePermission = false; hasBindNfcServicePermission = false; @@ -1852,9 +1850,7 @@ int doDump(Bundle* bundle) String8 permission = AaptXml::getAttribute(tree, PERMISSION_ATTR, &error); if (error == "") { - if (permission == "android.permission.BIND_INPUT_METHOD") { - hasBindInputMethodPermission = true; - } else if (permission == + if (permission == "android.permission.BIND_ACCESSIBILITY_SERVICE") { hasBindAccessibilityServicePermission = true; } else if (permission == diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index b9de11b0026b..47750fc11a6e 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -2970,14 +2970,6 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<const ResourceFilter>& } e->setNameIndex(keyStrings.add(e->getName(), true)); - // If this entry has no values for other configs, - // and is the default config, then it is special. Otherwise - // we want to add it with the config info. - ConfigDescription* valueConfig = NULL; - if (N != 1 || config == nullConfig) { - valueConfig = &config; - } - status_t err = e->prepareFlatten(&valueStrings, this, &configTypeName, &config); if (err != NO_ERROR) { |