History log of /frameworks/base/core/java/android/content/res/ResourcesImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1194b0bdfed798cae594c6e80c13855ea6618f3b 23-Mar-2018 Chris Craik <ccraik@google.com> Remove incorrect @NonNull annotations on getDrawable() and variants.

For compatibility, had to continue returning null when drawables could
not be decoded. Fix annotation to match pre-P behavior (the behavior
was reverted separately).

Fixes: 69543526
Test: make

Partial revert of Ib01eca970c5c9969998ce5b265b120aa7048b41a

Change-Id: I5f612f47793c3f04cf9874e13efdc13397ddd4e8
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
bebfcc46a249a70af04bc18490a897888a142fb8 12-Feb-2018 Adam Lesinski <adamlesinski@google.com> Refactor AssetManager

Bug: 64071469
Test: atest CtsContentTestCases
Change-Id: Ia6856157e8813856268fba003e1e591d690cb26e
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
513031d15b78579e39d59b71ab5a1b0afabc5544 15-Feb-2018 Leon Scroggins III <scroggo@google.com> Reland "Call ImageDecoder directly in ResourcesImpl"

This reverts commit 0f05b4895d0e09eb0c59065c30dd04bb884a1983.

Bug: 73083791
Test: CTS (I08618dcd7707e5857ed8f8f01fd78b4129cd5804)

Change-Id: I8a95725c8453d94f406c2c14d2c3555dc1c2901f
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
e848e106b6373d7ca73cfcdac26757c0ea763cd8 12-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert incorrect NonNull assertions in ColorStateList loading"
2e41d49d0023cbbb762c3254ef37295d6fb03d14 09-Feb-2018 Chris Craik <ccraik@google.com> Revert incorrect NonNull assertions in ColorStateList loading

Fixes: 73157047
Test: atest CtsContentTestCases:ResourcesTest

Partial revert of ceb269362175e90899e8bdcad4319b91ee13abb6

Change-Id: I7c1db6f8d2b3451692b018212576960c78250d57
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
bde1df21adf264d3398b9f3274f353faa6399008 09-Feb-2018 Adam Lesinski <adamlesinski@google.com> Revert "Replace AssetManager with AssetManager2 implementation"

This reverts commit 1187590da38457809dd368d4901c9c47ac5a6958.

Bug: 73134570
Change-Id: I59b4d714e447478ea124f086356f127f42251fb7
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
25d7f46aa938fff0eb782fb867a99bb7ba0b6e21 09-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Call ImageDecoder directly in ResourcesImpl""
0f05b4895d0e09eb0c59065c30dd04bb884a1983 08-Feb-2018 Leon Scroggins <scroggo@google.com> Revert "Call ImageDecoder directly in ResourcesImpl"

This reverts commit 40c59fdef0087ea0325e447ae0ee113cc8ca7c15.

Reason for revert: b/73083791

Change-Id: I044e534be07c5fd18c99dcc65a14b72eaf1fecd5
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
ceb269362175e90899e8bdcad4319b91ee13abb6 02-Feb-2018 Chris Craik <ccraik@google.com> Change Resources.getDrawable nullability

Resources.getDrawable() was annotated @Nullable because there was one
very particular path where Bitmap decoding would fail and trigger a null
return.

As part of the switch to ImageDecoder, that path was changed to now throw
an IOException, which will result as a NotFoundException to the caller of
getDrawable.

This CL annotates that path as @NonNull to reduce pain of dealing with
@Nullable method that was very unlikely to be null in practice.

Also fixes many other missing nullability annotations, and relabel
many @Nullable paths that would never return null in practice as
@NonNull.

Bug: 69543526
Test: ResourcesTest

Change-Id: Ib01eca970c5c9969998ce5b265b120aa7048b41a
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
cffb3604aef4d3f6238d6694201298417bd159fb 06-Feb-2018 Adam Lesinski <adamlesinski@google.com> Merge changes from topic "assetmanager2"

* changes:
libandroidfw: Improve performance of AssetManager2
libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Make idiomatic use of ApkAssets and AssetManager
libandroidfw: Make sure to set the 'app as lib' flag
Replace AssetManager with AssetManager2 implementation
40c59fdef0087ea0325e447ae0ee113cc8ca7c15 01-Feb-2018 Leon Scroggins III <scroggo@google.com> Call ImageDecoder directly in ResourcesImpl

Test: Existing tests

Add a new (hidden) ImageDecoder.Source that accepts an AssetInputStream.
This allows us to create an AnimatedImageDrawable without fear of the
client closing the stream.

Call it from ResourcesImpl instead of Drawable.createFromResourceStream.

Change-Id: I07e00ca60c97538335a6310e830b73211fd8e7bb
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
1187590da38457809dd368d4901c9c47ac5a6958 23-Jan-2017 Adam Lesinski <adamlesinski@google.com> Replace AssetManager with AssetManager2 implementation

Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I2bb6d7656d2516d371e83e541ed02f91405f6d94
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
f7d01dd7e14e01420c39e7fb8eca3cfa0f5f31b6 26-Jan-2018 Adam Lesinski <adamlesinski@google.com> Revert "Replace AssetManager with AssetManager2 implementation"

This reverts commit dcb3c6559b09ec89771858ec27a787027da9af50.

Bug:72511998
Change-Id: I665966ca109f66f85d8665db388c71ea2303c3b8
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
dcb3c6559b09ec89771858ec27a787027da9af50 23-Jan-2017 Adam Lesinski <adamlesinski@google.com> Replace AssetManager with AssetManager2 implementation

Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I572eb13c6a4372c7f656f5912821cececd5bf3d4
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
7fb38311361390e24d7e43ce1eb220faccd251ff 23-Jan-2018 Adam Lesinski <adamlesinski@google.com> Revert "Replace AssetManager with AssetManager2 implementation"

This reverts commit b20a0ce59f59cb5ec857748e056cc341dbd13b92.
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
1f62f7c72eaa6477950d6c0bf1bde562a68f6301 23-Jan-2018 Adam Lesinski <adamlesinski@google.com> Merge changes from topic "assetmanager-refactor"

* changes:
libandroidfw: Improve performance of AssetManager2
libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Make idiomatic use of ApkAssets and AssetManager
Replace AssetManager with AssetManager2 implementation
3aab9561b2d3a2f41935dfb453d140d789dc0478 12-Jan-2018 Hyunyoung Song <hyunyoungs@google.com> Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d819d2c385c04e49369e8574fa111d14)" into oc-dev am: 48df033607
am: 69d240d584

Change-Id: I02bf540b41fd9fd026fbe0fad4069526664cd56f
b20a0ce59f59cb5ec857748e056cc341dbd13b92 23-Jan-2017 Adam Lesinski <adamlesinski@google.com> Replace AssetManager with AssetManager2 implementation

Test: Existing CTS tests pass
Test: make libandroidfw_tests
Change-Id: I858f7e1d909c08273b096601136e3f28e15eb5d4
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
aff04c35ae4dd98bf1a0ea363e5708bd40cf2ad9 10-Oct-2017 Hyunyoung Song <hyunyoungs@google.com> Wrap StackOverflowError in NotFoundException.
Bug: 67462465
Bug: 66498711
Test: builds and tested using faulty apk with recursive drawable.
Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e
(cherry picked from commit dc92d925d819d2c385c04e49369e8574fa111d14)
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
99b25d2817a1058e56c5384a43040e0f3f291ce1 01-Nov-2017 Sunny Goyal <sunnygoyal@google.com> Preventing recursive referrence in drawables

Bug: 68706673
Bug: 66498711
Test: Added CTS tests
Change-Id: I8034f49d16f9a7bc1749714fd6d6231bba5088d0
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
dc92d925d819d2c385c04e49369e8574fa111d14 10-Oct-2017 Hyunyoung Song <hyunyoungs@google.com> Wrap StackOverflowError in NotFoundException.
Bug: 67462465
Test: builds and tested using faulty apk with recursive drawable.
Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
aa6560c148909ae0e0be4cbc3d14562ba3eceb77 14-Jul-2017 Makoto Onuki <omakoto@google.com> Two more numbers in the preload log

Bug 63136392
Test: Manual

Change-Id: I0fa1dffa80d4d06cbfc41e0b40ddce5d324052ec
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
1480b67635cdc4c2c5e735741bf30393fd70d738 14-Jul-2017 Makoto Onuki <omakoto@google.com> Better preload drawable logging

Bug 63136392
Test: Manual test

Change-Id: I8753b36f632cf2ff57a5ef28df29f3fc5657f607
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
36d6a985cd0595061a2f5a9facc91aa013aea72a 26-May-2017 Tenghui Zhu <ztenghui@google.com> Merge "Create a new drawable after caching the DrawableContainer" into oc-dev
ee7e8f13ea2293e93ef9dd9f3f088186edd4864e 17-May-2017 ztenghui <ztenghui@google.com> Create a new drawable after caching the DrawableContainer

fix:37135264

Test: Add new CTS test
bit
CtsGraphicsTestCases:android.graphics.drawable.cts.DrawableContainerStateTest,
CtsGraphicsTestCases:android.graphics.drawable.cts.DrawableContainerTest,
CtsGraphicsTestCases:android.graphics.drawable.cts.Drawable_ConstantStateTest

Change-Id: I8bb868d16a944f746ec41d3e37ae4215b964d949
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
2ea169a2ecbb7e589fcef78cb1486d007a8fb867 16-May-2017 Seigo Nonaka <nona@google.com> Introduce early exit path for non resource path.

Developer can specify android:fontFamily with three ways, pre-defined
font family name, e.g. "sans-serif", path to the font file in resource
directory, e.g. "res/fonts/Roboto-Regular.ttf", or path to the XML font
family file, e.g. "res/fonts/Roboto.xml".

Resources.getFont treats font files and XML files but pre-defined family
name is handled by TextView. Thus, we can early exit if the passed value
is not likely resource path.

This improves the inflation performance.
The score without this patch:
gfx-avg-frame-time-50: 6.9
gfx-avg-frame-time-90: 9.4
gfx-avg-frame-time-95: 10.4
gfx-avg-frame-time-99: 16.7

The score with this patch:
gfx-avg-frame-time-50: 7.0
gfx-avg-frame-time-90: 8.9
gfx-avg-frame-time-95: 9.7
gfx-avg-frame-time-99: 16.5

Measured on bullhead-userdebug.

The APCT perf test improves from
String FontFamily: 200,086 -> 132,561
File FontFamily : 199,256 -> 161,843
XML FontFamily : 203,681 -> 158,553

Measured on angler-userdebug.

Bug: 38232467
Test: UiBenchmark
Change-Id: Ia601ae7207ae8c60848c9efdbb9396267a57257c
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
5e0aed49a874b32b135bbd8da620357764b69ad4 01-May-2017 Seigo Nonaka <nona@google.com> Fix NPE happens if no source was specified to font element.

This also fixes unexpected fallback to the old implemntation by calling
allowUnsupportedFont() which is only for backward compatibility.

This CL also remove getResourceId() method. Nobody uses this method.

Bug: 37865521
Bug: 37844248
Test: am instrument -w -e class android.content.res.cts.ResourcesTest\
android.content.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I987448add728c53c916f24a2ea8f337be417248f
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
50954d2b4ea938d787ef5021d75f6bc02826607a 15-Apr-2017 Adam Lesinski <adamlesinski@google.com> Propagate density through AdaptiveIconDrawable and BitmapDrawable

Resources#getDrawableForDensity now propagates the overridden
density through to AdaptiveIconDrawable so that the density can be
propagated to leaf BitmapDrawables correctly.

This enables AdaptiveIconDrawable to support higher resolution
foreground/background bitmaps for use in Launcher.

Bug: 36039665
Test: bit CtsContentTestCases:android.content.res.cts.ResourcesTest
Change-Id: Iaa9a5592626e38e1ff839a76f7c6cfb9e16e5dc1
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
2821eeae9732002c1a4bd9d6812a45ea65b7b6a0 17-Mar-2017 Clara Bayarri <clarabayarri@google.com> Preload fonts from an array

Until now we were reusing the font tags, but it is not needed,
we can declare the list of fonts to preload with a simple
resources array.

Test: manual
Bug: 36119246
Change-Id: I39819018012c322aff62e13aa69ab35467be57ac
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
a8a66ccf1c6c042a71817d61fc159f10c21f4844 20-Mar-2017 Alan Viverette <alanv@google.com> [Resources] preloaded drawables few

Symptom: preloaded drawables few
Root Cause: all Java-side usages of config flags Must use Java flags
Solution: all Java-side usages of config flags Must use Java flags
Project: N70
Note:
Test: No

Fixes: 36448068
Change-Id: Iba4ac0067405bf1605cb1a98aa4dfc6263bbe5f8
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
ac873c9f25d2a687c9195226b9d680f51c91fa30 08-Mar-2017 Seigo Nonaka <nona@google.com> Clean up public FontConfig APIs

This CL contains following clean up:

- Hide unnecessary constructors.
- Change List<XX> to XX[] since actually all fields are immutable.
- Change font's variant type from String to int.
- Decouple resource related members to FontResourcesParser.
- Add NonNull/Nullable to all fields.

Test: ran android.content.res.FontResourcesParserTest

Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
4b5a4d221f377686a730182a3bffb8c6f190e313 27-Jan-2017 Clara Bayarri <clarabayarri@google.com> Declarative downloadable fonts

Implement support for downloadable font requests in xml. Given the
xml fonts feature in O, this adds support to not only declare
local font files as font resources, but also Downloadable fonts
from a fonts provider.

A provider returns a font family (of one or more files) given a
query, so the new attributes are added to the font-family tag.

Additionally, add support to pre-declare downloadable font resources
in the Android Manifest. These will then be fetched at app startup
time so they are available to use from the Typeface cache asap.

When retrieving downloadable fonts via resources, the cache is
checked to see if the font is already there and is used, otherwise
a request is sent to the provider and the default font is returned
as we need a result synchronously.

To do this, the developer declares an additional fonts xml resource
file with the list of fonts to preload and links it in the manifest
with a meta-data tag.

E.g.:

res/font/mydownloadedfont.xml

<font-family xmlns:android="http://schemas.android.com/apk/res/android"
android:fontProviderAuthority="com.example.test.fontprovider"
android:fontProviderQuery="myrequestedfont">
</font-family>

res/font/preloaded_fonts.xml

<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font android:font="@font/mydownloadedfont" />
</font-family>

and in the AndroidManifest.xml

<meta-data android:name="preloaded_fonts"
android:resource="@font/preloaded_fonts" />

Bug: 34660500, 34658116
Test: WIP, need to add more
Change-Id: I1d92555e115e241bf23b59e6f5c6cca6c7361de7
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
b12397e57e79c5dd9e8b2cb3839f5cd30b5d515f 27-Jan-2017 Clara Bayarri <clarabayarri@google.com> Cache Downloaded Fonts in Typeface

If the requested Typeface is already loaded into memory, return
from the cache.

Test: none, optimization
Change-Id: I32422c47c68502ba83b7d976f6e05f70dda5daed
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
fe98ad919bebaf41191b7fdf0a1d841198d4f46a 30-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement .xml font resource support"
0ee455a8997c14ff0f8cd99f11c80e1e3c236de3 27-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Convert native changing config flags to Java flags"
ed00bfdfae5d5cbc9e13f4e8affdece48f4c5b7f 20-Jan-2017 Clara Bayarri <clarabayarri@google.com> Implement .xml font resource support

This change implements the loading and parsing
of xml type font resources, and makes sure it is
used properly by TextView styles.

Test: run cts -m CtsContentTestCases -t android.content.res.cts.ResourcesTest
run cts -m CtsWidgetTestCases -t android.widget.cts.TextViewTest#testFontResources*

Change-Id: I5a2930b3ba7dad67d9607e9036a5dde6bab0c5a4
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
9ad386b37c4c4ebe1176caa8eeab131387fc93ed 26-Jan-2017 Alan Viverette <alanv@google.com> Convert native changing config flags to Java flags

Also adds more annotations.

Bug: 33080269
Test: ResourcesTest#testChangingConfiguration
Change-Id: I08d438821b96e3d74da1c1c34009673c77caf27e
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
408afbf06040ea29d1a9d60e9dc50d1923068de4 25-Jan-2017 Romain Guy <romainguy@google.com> Change configuration's color mode based on the display's color mode

Bug: 32984164
Test: CtsContentTestCases

Change-Id: Iedc7d1cc488b80718576082667b6e96956c4f847
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
18e9f9f3778318918c44d944489cb50daaf45d1c 19-Dec-2016 Clara Bayarri <clarabayarri@google.com> Expose Resources.getFont

Based on the work already done in aapt2, load a Font from a
resource id.

Test: WIP
Change-Id: Idc06bfbfd16452a328bfcc6ea9dcfb723b633f0c
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
f32adf447511d54c2aa0948d3c1ef44d461538ac 23-Nov-2016 John Reck <jreck@google.com> Clean up ApplyStyle JNI

Bug: 32573798

Mark input uint32_t[] as const. Use Read-only JNI
array access for input as it's faster than critical access.

Use non-movable arrays for TypedArray so that the address can
be resolved and stored, avoiding the need to do JNI array
access for the output.

Indicies is always non-null, so remove the optional checks.

Eliminate unused return value.

Benchmark results:
twelveKeyInflate 4963us -> 4713us
simpleViewInflate 73us -> 60us

Test: Device boots, benchmarks show faster

Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
58857c8b2bd64272d2320f62fd860783bb671da8 29-Oct-2016 Alan Viverette <alanv@google.com> Always propagate changingConfigurations to newly-created drawables

Bug: 32395972
Test: ResourcesTest#testChangingConfigurations
Change-Id: I555f3271854bdb6026db15f855847714c4986af3
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
bad43fcae487a19865c174483c11829379817c8a 19-Jul-2016 Adam Lesinski <adamlesinski@google.com> Fix undefined fontScale issue in Configuration

When using a Configuration object as a delta for use
as an update to an existing Configuration object,
the fontScale property is always defaulted to 1.0, which
is not considered "undefined". That means that fontScale will
always get overridden to 1.0.

This changes the undefined value of fontScale to 0.0, which is
set when the Configuration object is constructed. Thankfully,
the documentation for Configuration states that until
Configuration#setToDefaults() is called, the Configuration is in
an invalid state. That means that apps can not rely on fontScale == 1.0
without calling setToDefaults().

Bug:29924927
Change-Id: I19342c55f7057423f1ca8c5d8dce1dff07617d90
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
8e8d23214a71d8813ebd3676b192924c530cb913 24-Jun-2016 Adam Lesinski <adamlesinski@google.com> Update DisplayMetrics when resizing

Previously the DisplayMetrics passed to a new ResourcesImpl
object would be generated from the default DisplayAdjustments.
We now use the correct DisplayAdjustments for the ResourcesImpl
and make sure to update them for things like rotation changes.

Bug:29619314
Change-Id: If2ba0d7670a4554dcd3fde9766e2337f20a191fd
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
4ece3d6bb18a609afcd0e82f0340b7d36ba24eea 17-Jun-2016 Adam Lesinski <adamlesinski@google.com> ContextImpl: Keep DisplayAdjustments and Display in sync

Make sure that when our Resources get updated, that DisplayAdjustment
and Display properly reflect the potentially new screen dimensions.

Bug:28388969
Change-Id: I340550ea094ece87abc8790dd46aaa60ab3cedd3
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
f135b271bfaa5a23f3af5a15ce59fd4ffb44a6be 28-May-2016 Christopher Tate <ctate@google.com> Don't call .toString() on potentially null CharSequence

We're building an exception message string, but by explicitly invoking
.toString() we're accidentally triggering an NPE rather than the typed
exception we want to throw. Build the string in a way that will be
safe and sensical even if the CharSequence is null.

Bug 29009255

Change-Id: I1813260f0b36fd44506b8327f997dd20c2d6c8bf
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
b61e405397200f78b1c652143cba7c751df05a00 20-May-2016 Adam Lesinski <adamlesinski@google.com> Improve performance of LocaleList with Resources

We allow each individual Resources object to select the best
Locale for the given APK. This allows one update to the configuration
instead of multiple updates, once the locale is chosen.

The Java locale is selected from the app context's locale.

Bug:28625993
Bug:27325465
Change-Id: I99e1e53f522e560f3b80bbd1e1c605f552dbdff0
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
23cbe85610f780134cc77dd4a54732a22ed6e86e 18-May-2016 Yohei Yukawa <yukawa@google.com> Move LocaleList to avoid layering violation.

Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
991357fe25b3addabf85b871df3f4098fc4b833b 10-May-2016 Adam Lesinski <adamlesinski@google.com> BluetoothManager: Make requestControllerActivityInfo one call

Instead of making multiple calls into the Bluetooth service,
make one call that can timeout. This helps prevent cases
when the Bluetooth process hangs and the system_server is calling into
it and causes a WATCHDOG restart.

Bug:28658141
Change-Id: I37778b7b6e508be420a21bdf23593ae89b38f5b8
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
0b9295d06750dc6da032a2b2092e2c500c65393f 10-Mar-2016 Alan Viverette <alanv@google.com> Push flags from top-level TypedValue into ComplexColor changing configs

Previously a ComplexColor that was defined within varying configs would
not push the flags into its changing configs, so it wouldn't get reloaded.

This implementation follows the Drawable implementation, where the base
changing configs are stored in the superclass.

Bug: 27573177
Change-Id: I1da5ee6ab998d8296f8860c1a99d3e1399438543
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
ac85f90466dd60d2af8ffc3942d503a0de606726 11-Mar-2016 Alan Viverette <alanv@google.com> Ensure all Java-side usages of config flags are using Java flags

Previously we were using native config flags in some places that expected
Java flags, and vice-versa. All usages of config flags are now annotated
to ensure we're using the right type.

Cleans up annotations on most methods that were touched.

Bug: 21161798
Change-Id: Ifd87dfb12199fc8258915d8a510e03ddb681ca89
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
082614c6a57a115ee0c5975e3579bf34a178c0f8 04-Mar-2016 Adam Lesinski <adamlesinski@google.com> Cache per-Activity Resources objects

Each Activity has a Resources object whose underlying state changes
when a configuration change occurs, both global and for that activity only (multi-window).
Views and other clients of the Resources object can safely cache it knowing that
they always have a reference to the most up-to-date resources.

This applies to Resources.Theme objects as well.

Bug:26854894
Change-Id: Ifd3da5a1086e17f747dfc265a447fe92a3a5c692
/frameworks/base/core/java/android/content/res/ResourcesImpl.java
fb302ccd8e0610a09691ea5503ff8111dc7a2e41 01-Mar-2016 Adam Lesinski <adamlesinski@google.com> Move the guts of Resources to ResourcesImpl

In order to satisfy the requirement that clients can
cache a Resources object when a configuration change happens,
we move the caches and all other method bodies to ResourcesImpl.
These can then be swapped out for the correct version when needed,
while allowing clients to keep holding the existing Resources references.

This is part 1 of 2 CLs. The next one will do the actual switching of implementations
based on configuration changes for multiwindow.

Bug:26854894
Change-Id: I41156194a3541e59053b4048c3a15981c7d8a506
/frameworks/base/core/java/android/content/res/ResourcesImpl.java