summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2018-04-10 15:18:12 -0600
committerJeff Sharkey <jsharkey@android.com>2018-04-10 15:18:15 -0600
commitaa1a911d9a0f797748b001c41bd8df2f517b318c (patch)
tree8e7f65a3c08c5217fda0e4d8e308437534ab2fc4 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent964631d1a78842f4297d875012b0ebe1c08cd06d (diff)
Fix broken target SDK checks.
Consider an app targeting the final API 28, but running on an older build where "P" is still API 10000. Those apps need to be treated as legacy apps. In general, the logical pattern that should be used when enforcing target SDK behaviors is below. For applying behavior to legacy apps: // BROKEN if (targetSdkVersion <= Build.VERSION_CODES.N_MR1) { // CORRECT if (targetSdkVersion < Build.VERSION_CODES.O) { For applying behavior to new apps: // BROKEN if (targetSdkVersion > Build.VERSION_CODES.N_MR1) { // CORRECT if (targetSdkVersion >= Build.VERSION_CODES.O) { Bug: 77865751 Test: builds, boots Change-Id: Ia83bd446a940751d51a6542c7a5b9cca174c5296
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions