android: Prevent AR and VR modules from using too many strings.

As discovered recently, when building the Monochrome bundle, the
AR and VR feature modules embed all localized strings from their
source packages, which is much more than needed.

This CL fixes the issue by setting aapt_locale_whitelist on
each module definition. This is a quick fix, though we may
consider in the future supporting setting this variable on
the top-level bundle target instead.

+ Small change to compile_resources.py to fix a runtime
  crash due to a variable not properly assigned before
  being referenced (this happens when using a locale
  whitelist without a resource blacklist regex).

BUG=923017
R=agrieve@chromium.org,tiborg@chromium.org,benmason@chromium.org

Change-Id: I59e0c305a94521d8c873ffa682613504710c427b
Reviewed-on: https://chromium-review.googlesource.com/c/1420798
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: David Turner <digit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624165}
3 files changed