diff options
author | Régis Décamps <regisd@google.com> | 2018-04-17 13:04:29 +0200 |
---|---|---|
committer | Régis Décamps <regisd@google.com> | 2018-05-10 09:39:56 +0200 |
commit | e6dc996bf10bf6e707d22e184d08b0445e3debe2 (patch) | |
tree | e1197094bddab0744e73e04094941a323c23de9f /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 4caeadd63eae168a0094810627f91de1386edc26 (diff) |
Reuse String literals rather new instance in UriMatcher
Micro-optimization: Instead of using a new instance of "#" and "*", reuse the
String literals. This will save 18 bytes for each "*" and "#" used in Uri
matchers.
Also, use switch/case rather than if/else for string matching.
Finally, add test and move TestClass in same package.
Bug: 32502682
Change-Id: Id672138a2213f68e05cafb4e88ed3c1e61c735a4
Test: Unit test
source build/envsetup.sh
lunch aosp_x86-eng
m -j 8
emulator -system out/target/product/generic_x86/system-qemu.img
make FrameworkCoreTests
adb -e install out/target/product/generic_x86/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb -e shell am instrument -w -r -e class android.content.UriMatcherTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions