| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Convert Android xml resources to API 14 compatible. | 7 """Convert Android xml resources to API 14 compatible. |
| 8 | 8 |
| 9 There are two reasons that we cannot just use API 17 attributes, | 9 There are two reasons that we cannot just use API 17 attributes, |
| 10 so we are generating another set of resources by this script. | 10 so we are generating another set of resources by this script. |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, output_v17_dir) | 260 GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, output_v17_dir) |
| 261 elif resource_type == 'values': | 261 elif resource_type == 'values': |
| 262 if 'v17' in qualifiers: | 262 if 'v17' in qualifiers: |
| 263 output_qualifiers = qualifiers[:] | 263 output_qualifiers = qualifiers[:] |
| 264 del output_qualifiers[qualifiers.index('v17')] | 264 del output_qualifiers[qualifiers.index('v17')] |
| 265 output_v14_dir = os.path.join(options.res_v14_compatibility_dir, | 265 output_v14_dir = os.path.join(options.res_v14_compatibility_dir, |
| 266 '-'.join([resource_type] + | 266 '-'.join([resource_type] + |
| 267 output_qualifiers)) | 267 output_qualifiers)) |
| 268 GenerateV14StyleResourcesInDir(input_dir, output_v14_dir) | 268 GenerateV14StyleResourcesInDir(input_dir, output_v14_dir) |
| 269 else: | 269 else: |
| 270 # TODO(kkimlabs): uncomment the below line and remove 'pass' once the | 270 ErrorIfStyleResourceExistsInDir(input_dir) |
| 271 # downstream fix (https://gerrit-int.chromium.org/#/c/38786/) is landed. | |
| 272 # ErrorIfStyleResourceExistsInDir(input_dir) | |
| 273 pass | |
| 274 | 271 |
| 275 if options.stamp: | 272 if options.stamp: |
| 276 build_utils.Touch(options.stamp) | 273 build_utils.Touch(options.stamp) |
| 277 | 274 |
| 278 if __name__ == '__main__': | 275 if __name__ == '__main__': |
| 279 sys.exit(main(sys.argv)) | 276 sys.exit(main(sys.argv)) |
| 280 | 277 |
| OLD | NEW |