This will allow the android.os.Build class to be generated dynamically
from the Studio side.
In order to allow the "refactoring" of classses like android.os.Build,
Create needed to be modified.
While adding the test, I've also done a small clean-up of the
AsmGeneratorTest to re-use some code.
Bug: http://b.android.com/210345
Test: Added new test to AsmGeneratorTest
Change-Id: Ie4e1209c1c60b7a33cb427dbd556a9741ec8f8b3
This is for example used in displaying a checked radio button.
Test: Modified widget render test to include a checked radio button
Change-Id: I43074ce038f69f28c0cf5fb396d393722b02b142
Patterns for Bulgarian (bg) and Church Slavonic (cu) are now loaded
too.
Also make changes to fontchain_lint.py, so it knows the script for Bulgarian
and Church Slavonic is Cyrillic.
Test: make -j works and creates .hyb files for bg and cu
Change-Id: I0586f6c49380279ef88fe952b5cfd2d3594c5524
When passed a color, resolveThemeAttribute was not parsing the value
into the .data field.
Bug: http://b.android.com/232870
Test: Added new test
Change-Id: I9d91e3a70c24f1e71d9d89977fe79b0965e98893
Apps that expect to use the current SDK don't specify anything in their
manifest and the build system rightfully injects the current SDK.
Any apps that specify their own <uses-sdk> or versionCode are telling
the build system that they are purposely using some other minSdkVersion,
etc (support library demos).
Test: None
Change-Id: I0aba3a71e15703c7bcafcf4d35608a1851dd8567
Fixes: 34901699
When activity that is moved between displays handles all configuration
changes, it won't be restarted. This CL adds a callback to the client
to notify it about display change. Usually it will be followed by
onConfigurationChanged, except when configuration didn't actually change.
When activity is recreated, it won't receive onMovedToDisplay.
Bug: 34862802
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I9a9501cab788623ada15a31efb53e4b2378639fe
Benchmarks on bullhead-userdebug show that there is a negligent
performance impact when using sparse entries on a 30% loaded
sparse type of 1000 resources.
Benchmark Time CPU Iterations
-----------------------------------------------------------------------------------
BM_SparseEntryGetResourceSparseLarge 255 ns 254 ns 2751408
BM_SparseEntryGetResourceNotSparseLarge 254 ns 254 ns 2756534
Bug: 27381711
Test: make libandroidfw_tests aapt2_tests
Change-Id: I051ea22f2f6b2bc3696e446adc9e2a34be18009f
Return null instead of triggering a NPE when there are no resource of
the asked type.
Test: RenderTests.testFonts
Change-Id: Ib45ebdf2178e62cbd987082512fcbb009de3f1b2
The class loader in Resources is now used to inflate drawables. Because
layoutlib was using the system class loader, the drawables would fail to
inflate.
With this change, Resources will use the layoutlib class loader instead
of the system one.
Test: Tested from the studio side
Change-Id: I933ff68e704f9d3599b69cd74e98e44bdca3c789
After any package install, removal or update, save the changed
package and update a global sequence number. At any point, apps
can query for the packages changed since a particular sequence
number.
If a package is changed multiple times, it is only included once
in the change list.
Bug: 33865505
Test: Create sample app to query for changes and see which packages are changed after performing certain operations
Change-Id: Ia4646035362b16a97110e05f3f909ce385b48428
This is part of work to introduce historical debugging infrastructure
for Android IME.
In this CL, we will focus on the following two event flows.
A1. IMMS#attachNewInputLocked() queues MSG_(RE)START_INPUT to deliver
new InputConnection/EditorInfo to the current IME
A2. The IME triggers IMS#onStartInput()/IMS#onRestartInput() and
updates the following fields:
- InputMethodService#mStartedInputConnection
- InputMethodService#mInputEditorInfo
B1. IME is expected to call back IMM#setImeWindowStatus() to notify
its window visibility change to IMMS.
B2. IMMS updates the following field if the caller is still the
current IME.
- InputMethodManagerService#mImeWindowVis
What this CL aims to do is to enable IMMS to access A1 state when it
was in B2 state, by considering that for given a B1 the last A2
happened before B1 is the cause of B1 and B2.
To do this, IMMS issues a binder token in A1 and each IME keeps it
so that it can be passed in B1. By using this Binder token as a key,
IMMS can keep tracking state snapshot taken from each A1. Note that
those state snapshots keep alive until the Binder token's proxy in the
IME process loses strong reference from its GC root.
Test: Make sure `adb shell dumpsys input_method | grep mImeWindowVis`
matches to the IME window visibility.
Test: Make sure the current IME is not receiving any
InvalidParameterException from IMMS.
Bug: 35079353
Change-Id: I9921b381e02106dbffff5e0b3d13f0a1245ce807
Reverse the logic since the field wouldn't be initialized to true before
super is called.
Test: Layoutlib tests
Change-Id: Ic3affb608bdf3306ada25e2dd986a48f6caae202
During construction, we want to make NopCanvas as light as possible so
we just say that we are hw accelerated.
This caused some crashes further down the line for some views that
thought that NopCanvas was hw accelerated. From now on, NopCanvas is
only hw accelerated during construction.
Test: Covered by the existing tests
Change-Id: If09a662312e5c90d011e7ab2cbb524ef7b420d12
Keeping the mapping manually is very error prone and the
SystemServiceRegistry already does it for us.
Bug: http://b.android.com/231975
Test: Added new test
Change-Id: I507c4a9d5f0821a5a237ee27f5e97c5cd9040223