| 1996 | } |
| 1997 | |
| 1998 | bool ResourceTable::appendComment(const String16& package, |
| 1999 | const String16& type, |
| 2000 | const String16& name, |
| 2001 | const String16& comment, |
| 2002 | bool onlyIfEmpty) |
| 2003 | { |
| 2004 | if (comment.size() <= 0) { |
| 2005 | return true; |
| 2006 | } |
| 2007 | |
| 2008 | sp<Package> p = mPackages.valueFor(package); |
| 2009 | if (p != NULL) { |
| 2010 | sp<Type> t = p->getTypes().valueFor(type); |
| 2011 | if (t != NULL) { |
| 2012 | sp<ConfigList> c = t->getConfigs().valueFor(name); |
| 2013 | if (c != NULL) { |
| 2014 | c->appendComment(comment, onlyIfEmpty); |
| 2015 | return true; |
| 2016 | } |
| 2017 | } |
| 2018 | } |
| 2019 | return false; |
| 2020 | } |
| 2021 | |
| 2022 | bool ResourceTable::appendTypeComment(const String16& package, |
| 2023 | const String16& type, |
no test coverage detected