Automated g4 rollback of changelist 160696979.

*** Reason for rollback ***

Causes crash on launch (b/63252565)

*** Original change description ***

Fix concurrency issue in constructor.

Before:
sColors served as the branch to initialize all member variables.

Subsequent calls to the constructor after sColors had been initialized,
would result in the use of static members that were not yet initialized.

Now:
We guard each reference with an explicit null check during construct.

Members that require synchronized initialization were put into a small synchronized
method.

This was chosen instead of AtomicReferences, and instead of double check...

***

Bug: 63143138
Test: N/A
PiperOrigin-RevId: 160837963
Change-Id: I2586f7586c8f39182d64c3b28a59886c5ba94789
1 file changed
tree: 5e7cf3797e996e9a100caf310c2355e7b3b47b01
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. LICENSE