| Index: build/android/play_services/preprocess.py
|
| diff --git a/build/android/play_services/preprocess.py b/build/android/play_services/preprocess.py
|
| index 07057296e1eb36c23abedface2d3f5efe7311db8..99c000e223115b60451db16d033d8148d70b4e9e 100755
|
| --- a/build/android/play_services/preprocess.py
|
| +++ b/build/android/play_services/preprocess.py
|
| @@ -125,7 +125,7 @@ def ProcessGooglePlayServices(repo, out_dir, config_path, is_extracted_repo):
|
| _ImportFromAars(config, tmp_paths, repo)
|
|
|
| _GenerateCombinedJar(tmp_paths)
|
| - _ProcessResources(config, tmp_paths)
|
| + _ProcessResources(config, tmp_paths, repo)
|
| _BuildOutput(config, tmp_paths, out_dir)
|
| finally:
|
| shutil.rmtree(tmp_root)
|
| @@ -199,7 +199,7 @@ def _GenerateCombinedJar(tmp_paths):
|
| cmd_helper.Call(['jar', '-cf', out_file_name, '-C', working_dir, '.'])
|
|
|
|
|
| -def _ProcessResources(config, tmp_paths):
|
| +def _ProcessResources(config, tmp_paths, repo):
|
| LOCALIZED_VALUES_BASE_NAME = 'values-'
|
| locale_whitelist = set(config.locale_whitelist)
|
|
|
| @@ -216,6 +216,17 @@ def _ProcessResources(config, tmp_paths):
|
| if dir_locale not in locale_whitelist:
|
| shutil.rmtree(res_dir)
|
|
|
| + # Reimport files from the whitelist.
|
| + for res_path in config.resource_whitelist:
|
| + for whitelisted_file in glob.glob(os.path.join(repo, res_path)):
|
| + resolved_file = os.path.relpath(whitelisted_file, repo)
|
| + rebased_res = os.path.join(tmp_paths['imported_clients'], resolved_file)
|
| +
|
| + if not os.path.exists(os.path.dirname(rebased_res)):
|
| + os.makedirs(os.path.dirname(rebased_res))
|
| +
|
| + shutil.copy(os.path.join(repo, whitelisted_file), rebased_res)
|
| +
|
|
|
| def _BuildOutput(config, tmp_paths, out_dir):
|
| generation_date = datetime.utcnow()
|
|
|