• Home
  • History
  • Annotate
  • only in /frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
History log of /frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
febc4591c06cc8a90a844aaf1be9718299d53d43 30-Apr-2018 Tyler Gunn <tgunn@google.com> Implement sendBroadcastAsUserMultiplePermissions in BridgeContext.

sendBroadcastAsUserMultiplePermissions was added to Context.java.
Implementing in BridgeContext.

Test: Compile / build (actual usage is documented in other bugs)
Bug: 78650469
Change-Id: I8715b6fce7039268eb29914cb15f68ab922f4d3f
ridgeContext.java
ee1e5bee68e1bc731b379b62eb6660e488f506c9 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updating overriden method PackageManager#setSuspended" into pi-dev
94f61fd0f610ef901cdb7cd0c3a3fd17007e90b4 21-Mar-2018 Suprabh Shukla <suprabh@google.com> Updating overriden method PackageManager#setSuspended

Changed the signature of the api setPackagesSuspended. Updating here so
references do not break

Test: N/A

Bug: 74336673
Change-Id: Ib6ea0eb7f5d3cb233845a252b2fde5b33bbba8ca
ridgePackageManager.java
bad64df1e6737d16771faeebfb825355bac9f038 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add new method" into pi-dev
f0618f5354d93fe7fdc9d0cab8ee070a8344acc2 13-Mar-2018 Philip P. Moltmann <moltmann@google.com> Add new method

Test: Built
Bug: 73829108
Change-Id: I56d43924c4de018e76207d189d2254fe7e95036c
ridgePackageManager.java
4b91976c3cad78902b2e97434a9aaee211a380aa 19-Mar-2018 Lucas Dupin <dupin@google.com> IPowerManager compatibility

Test: make
Bug: 73178121
Change-Id: I4481debaaf7dfd1e4eb3c65af4fede64b8c7e2b2
ridgePowerManager.java
116000a4c644ddd562efeb1ee549909be0d7b332 07-Mar-2018 Adrian Roos <roosa@google.com> layoutlib: get rid of some more stub bridges

Bug: 27297992
Test: mmm frameworks/layoutlib
Change-Id: I6cc2ec078230064fcce3656788589af59a1f7e2d
ridgeIInputMethodManager.java
ridgeWindow.java
ridgeWindowSession.java
a8f32e2bae9fad9455fc4c0062ada8d5132c986e 07-Mar-2018 Adrian Roos <roosa@google.com> Merge "layoutlib: replace BridgeSession with InvocationProxy" into pi-dev
040799a9c476b85be2f3a70cd182447519ecccbf 07-Mar-2018 Adrian Roos <roosa@google.com> layoutlib: replace BridgeSession with InvocationProxy

Since this class is really only there to provide
a non-null stub, replace it with a reflected
invocation handler that does not need to be kept in
sync with the framework.

Test: mmm frameworks/layoutlib
Bug: 73813813
Change-Id: I5dc574338552841841a044d1e32727ded570c851
ridgeWindowSession.java
2d66581c55669054b2d0030b6f7bd1863376fb2a 28-Feb-2018 Tarandeep Singh <tarandeep@google.com> API rename in BridgeIInputMM

Bug: 73954137
Test: make checkbuild

Change-Id: Ia022fbc2084031748f4c4d471725e4298c17c5ff
ridgeIInputMethodManager.java
6041cf289315147ce1e4c983454eb5af49e89409 15-Feb-2018 Diego Perez <diegoperez@google.com> Remove error when defStyleAttr does not exist

Since it's not really an error condition. Also fix a test dispose.

Test: N/A
Change-Id: I9484233ce50975ea6eda5c7e480c727c1d6bb19a
(cherry picked from commit 52feaa430b24eb11d7a4b6c9283e9f137e302d98)
ridgeContext.java
a4ac68349e730d5517187ea780b0284c7e383130 14-Feb-2018 Diego Perez <diegoperez@google.com> When defStyleAttr == 0 do not report missing style

If we pass the default value to defStyleAttr but we do pass a value to
defStyleRes do not report it as a warning.

Test: Added new test
Change-Id: Ie1cbe9803bd500953b454f408b39636b0c02eeb7
(cherry picked from commit aa8025d3bfe541dfc633bd001724140f8def8f25)
ridgeContext.java
0358a99f349e418142779f328a3136b1f5f1565e 29-Jan-2018 Michal Bendowski <bendowski@google.com> Layoulib updates for new prebuilts

Test: N/A
Change-Id: I9f8731e087aa931a7d0bec28125c8f66c7530118
ridgeContext.java
ridgeXmlBlockParser.java
5e44c07e86c6118164e760ee565531dd57c3bf11 09-Feb-2018 Dianne Hackborn <hackbod@google.com> Add AttributeSet.getAttributeNamespace().

Why not.

Bug: 73101753
Test: Build and booted
Change-Id: Ib8511ceb64292701270b885fd874aae5ecd1c5d5
ridgeLayoutParamsMapAttributes.java
opAttributeSet.java
252a093511cde0cc077f9f665725fa7008b0513a 05-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix defStyleRes fallback in obtainStyledAttributes"
0eea906e1c11e3fa77e39669949fc067475359c9 02-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add new test method to BridgeIInputManager"
5b23d5c17370d87daf4b04b831008c76e95cbe63 02-Feb-2018 Tarandeep Singh <tarandeep@google.com> Add new test method to BridgeIInputManager

Added isInputMethodPickerShownForTest().
Bug: 72557082
Test: Manually build

Change-Id: I61f194462bd69a1ae0bc4ebddd4a151cab20aced
ridgeIInputMethodManager.java
6ec650799e4fc9bdea0882af6415f76853beb194 31-Jan-2018 Diego Perez <diegoperez@google.com> Changes to support both androidx and support package

This includes the changes needed in layoutlib to support both androidx
and the "old" android.support namespaces. In most cases it's just a
matter of trying both names.

Test: Existing tests pass
Bug: 72540342
Change-Id: I91dbf39aade96b68817b8af51338da2284cae723
(cherry picked from commit a094e4734b1e3294f12e03e361cdb16e9a58e9de)
upport/DesignLibUtil.java
upport/DrawerLayoutUtil.java
upport/FragmentTabHostUtil.java
upport/RecyclerViewUtil.java
upport/SupportPreferencesUtil.java
767052452e64bd6979c0b177c08312d8eb43e38f 29-Jan-2018 Diego Perez <diegoperez@google.com> Fix defStyleRes fallback in obtainStyledAttributes

Existing code was not correctly retrieving the given defStyleRes style
if the lookup of defStyleAttr was failing. This would break the
rendering of components that do not define their styles in the current
theme.

Bug: 72598797
Test: Added regression test
Change-Id: I0c3535e7a0fd549a09d61dfba3d8e2393ed8ec4c
ridgeContext.java
54377ecf6873cc85ae3462c74127063158fbff2b 24-Jan-2018 Michael Wright <michaelwr@google.com> Remove old Binder methods.

Test: N/A
Bug: 69406898
Change-Id: I86f0e1b466afcd5c6ddedc505129ac42bfa4d564
ridgePowerManager.java
bccfdd5d86d431437d437e71ffbf5a20702c5584 23-Jan-2018 Roberto Perez <robertoalexis@google.com> Merge "Adding a new category to mark car-optimized launcher activity"
0e145d0251fc0fb747de026508c6035ca9f4e039 19-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Follow the interface change in ISession."
dde9c878e2ae95e7cefc9840d10438333b58fda0 16-Jan-2018 Andrii Kulian <akulian@google.com> Update layoutlib with tap exclude API for WindowSession

Bug: 63902362
Test: Manual with ActivityView test app
Change-Id: I1d9ecf75196337abf19179b47f9374ea2b8dd5f8
ridgeWindowSession.java
2edaae4c87df25c8567b62a386fc43cca4349bce 11-Jan-2018 Daichi Hirono <hirono@google.com> Follow the interface change in ISession.

Bug: 70818582
Test: None
Change-Id: Ia2c2314dc03b55e20994594510da5bd8abed0ff6
ridgeWindowSession.java
9a5ff5029d77135204810be58fdde2e77255ed42 09-Jan-2018 Roberto Perez <robertoalexis@google.com> Adding a new category to mark car-optimized launcher activity

Test: TBD
Bug: 70681347
Change-Id: Ic2c888945505389c26f664679d2d90fcb8deb68f
ridgePackageManager.java
963d97eed45a695ddd6ce438df19f11136863879 19-Dec-2017 Philip P. Moltmann <moltmann@google.com> Remove removed API from cloned classes

Test: m -j layoutlib
Change-Id: Ia5e10edf6d3756a54ffc1c8c4017361801786443
ridgePackageManager.java
0355feaced699944b480649a6ba138d21b9751e9 12-Dec-2017 Yohei Yukawa <yukawa@google.com> Follow IInputMethodManager method signature change

This CL takes care of IInputMethodManager method signature change
because of I56682c7dee71d461687b9e80ab746d382fd55e0c.

Bug: 69256929
Test: make -j layoutlib
Change-Id: Ia2d6cc8e6d99c76c1aa33104d10a14d10e89317f
ridgeIInputMethodManager.java
43d8e98b25291000a721d5aeae3dd3b612559c51 11-Dec-2017 Yohei Yukawa <yukawa@google.com> Remove IInputMethodManager#setInputMethodEnabled

Bug: 70475949
Test: compile
Change-Id: Ifd888278159e59c15d23c62db8234cd5b6be3215
ridgeIInputMethodManager.java
7dee340a3e644dfdd027832b8b9b1831be05263d 08-Dec-2017 Tarandeep Singh <tarandeep@google.com> Merge "Add new methods to BridgeIInputMethodManager."
3810dfd556ea3ad9c2627ebd2aceb7ed0009196f 07-Dec-2017 Adrian Roos <roosa@google.com> Display Cutout: Update layoutlib

Bug: 65689439
Test: make layoutlib
Change-Id: I958f2586ef0dfcc0f2ae0c08241e7192c6a9e946
ridgeWindow.java
ridgeWindowSession.java
60a5f793f52a7af047d59bcca71a3696cbed52b0 14-Nov-2017 Tarandeep Singh <tarandeep@google.com> Add new methods to BridgeIInputMethodManager.

Bug: 63037786
Test: None.
Change-Id: Ib780a094d16320424f9eede241c9a92320759ced
ridgeIInputMethodManager.java
1d44a80f7596c203530f62877b99be5841df609d 14-Nov-2017 Philip P. Moltmann <moltmann@google.com> Remove removed API

Bug: 65261282
Test: Built
Change-Id: Icf9c16b3296a132c6345a8d8e6615f1ec546ed16
ridgePackageManager.java
dc3d0176993003aa949f0baf61327f1096f453d8 03-Oct-2017 Diego Perez <diegoperez@google.com> Fix ContextThemeWrapper

Removing the overriden implementations of obtainStyledAttributes in
Context to allow the chance of a modified Theme to be applied by the
original version. Now, internalObtainStyledAttributes will be called
from the Theme after the correct Theme has been set.
Updated the test app to be able to add a new test.

Test: New ContextThemeWrapper test in RenderTests
Change-Id: I0c05b0afe6a48c9634864814715912416c96db6a
Fixes: 66902070
ridgeContext.java
ab93443117844cf490af35be356fa478ceeb3746 18-Sep-2017 Diego Perez <diegoperez@google.com> Add textClassifier case in getSystemService

AppCompat asks in some cases for it. Returning null is a valid case so
we just want to avoid the assertion.
Also, change all the ifs into a more compact case statement.

Test: Existing tests should pass
Change-Id: I81b586db296f2b4382086f5c6751d6ee195d7a71
ridgeContext.java
efe0830e745db4879e4230cff5ce89dd465eadf5 28-Jul-2017 Todd Kennedy <toddke@google.com> Add new API

Bug: 62805090
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_null
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_empty
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_valid
Change-Id: I7399de1a9928cc8460e1ea0caf0e51d6ca253d79
ridgePackageManager.java
f59abd4701479e496d955cb8521a813e535aefa3 04-Jul-2017 Jerome Gaillard <jgaillard@google.com> Add support for FragmentTabHost from the support library

FragmentTabHost objects need to have their "setup" method called after
inflation, and it is not the same method as the one from TabHost.

Bug: 37128407
Test: manual testing with Studio
Change-Id: I3fae79af613774ed7fdf5c332e4eca616254084c
upport/FragmentTabHostUtil.java
438ab5fe60e718f47feecde1f58cb9acf171cad2 30-Jun-2017 Albert Chaulk <achaulk@google.com> Add stub for new WindowManager.getCurrentImeTouchRegion API am: ef63e202e8
am: fb2977f0d4

Change-Id: I3fc65ca7c3678cce1a1024a86ae3be1b8420150d
ef63e202e832fb8bbc188c7299544d900c9626a0 29-Jun-2017 Albert Chaulk <achaulk@google.com> Add stub for new WindowManager.getCurrentImeTouchRegion API

Test: None
Change-Id: I1d01c570ffb574093c012e825e523cee0fd116b8
iew/WindowManagerImpl.java
b75a80419e56193c0e8a5a75301ef6c461964ed4 26-Jun-2017 Jerome Gaillard <jgaillard@google.com> Allow layoutlib to load custom fonts

The ability to load custom fonts was restricted in Change Iac2a6fb3.

Test: RenderTests.testFonts
Change-Id: I7d7be91af9285661afe41d557fa10a0036f787b7
ridgeContext.java
b5f9ac1b6e12d3c6a6a419d9a9d3eac27d4cbe54 22-Jun-2017 Seigo Nonaka <nona@google.com> Implement canLoadUnsafeResources added in frameworks/base

Bug: N/A
Test: m checkbuild
Merged-In: Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271
Change-Id: Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271
(cherry picked from commit d5c220b9577b09848ed18412bc65e8272e6efb61)
ridgeContext.java
b434d050594908640757db0fdaf9724859455a41 23-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement canLoadUnsafeResources added in frameworks/base"
d5c220b9577b09848ed18412bc65e8272e6efb61 22-Jun-2017 Seigo Nonaka <nona@google.com> Implement canLoadUnsafeResources added in frameworks/base

Bug: N/A
Test: m checkbuild
Change-Id: Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271
ridgeContext.java
b1bd12381b7b0b57eff6d9bb1a5ae23309ab2b5c 22-Jun-2017 Jerome Gaillard <jgaillard@google.com> Add support for changing shape of adaptive icons

The shape of adaptive icons can now be changed by passing a string
describing the path of the shape through a flag inside
LayoutlibCallback.

Bug: 38161918
Test: testAdaptiveIcon expanded
Change-Id: I25c6af6c7a3d4264d3c72e780d26b79cfe8db35c
enderParamsFlags.java
3780b5f90d3b967c2b02b50a27ad315ee86de090 01-Jun-2017 Diego Perez <diegoperez@google.com> Address warnings in BridgeXmlBlockParser + annotations

Test: N/A
Change-Id: I3c56858ad9d86c41e1b5709bd4868b716f6255a1
ridgeXmlBlockParser.java
opAttributeSet.java
ed15a15a31489930f212ac27b81127f6b729af95 19-May-2017 Christopher Tate <ctate@google.com> Track framework change in Context w.r.t. shared prefs restore

Bug 12061817
Test: cts-tradefed run cts -m CtsBackupHostTestCases

Change-Id: Ic3acb400aed41edceb4d1f62cd63d9c4b3db8b91
ridgeContext.java
c56293b035c7a73188b709b7effc340a022e46f4 20-May-2017 Diego Perez <diegoperez@google.com> Merge "Add itemCount to RecyclerView"
ac6b06ff015ab321b726c5fa990ce368c8fbf399 18-May-2017 Charlie Tsai <chartsai@google.com> Merge "Support reference type for BridgeTypedArray.getValue()"
bc876628ee6b96164b91908ff62fcaefe930f403 18-May-2017 Charlie Tsai <chartsai@google.com> Support reference type for BridgeTypedArray.getValue()

Test: N/A (indirectly tested by rendering tests)
Change-Id: I7f90b080afe10f41ce695276f37dc8e298132dcd
ridgeContext.java
03faa7e778e24fbc3de3ec1212e265c2d04a8f47 18-May-2017 Diego Perez <diegoperez@google.com> Remove field injection

Refactoring Resources to remove the field injection. This is needed to
be able to move the existing code to ResourcesImpl.
In the process, add relevant Nullable annotations and checks.

Test: Existing tests pass
Change-Id: Ibd3fe021ee0f7c9de01a79240581a410dfff681a
ridgeContext.java
b1ae00e68fac4cb755d3d1b5ed66f0df4adf3fba 18-May-2017 Diego Perez <diegoperez@google.com> Add itemCount to RecyclerView

tools:itemCount allows customizing the number of elements in the
RecyclerView adapter

Bug: 38316827
Test: This needs to be manually tested on the Studio side since the
adapter only exists there.
Change-Id: I5377bd5ab180676d46a06bccdd4462be9f27bb42
upport/RecyclerViewUtil.java
0df64b5eb9687820c13f37d3fb338a0280a2e7f6 12-May-2017 Sunny Goyal <sunnygoyal@google.com> Updating layoutlib as per PackageManager changes

Test: N/A
Change-Id: I8f5a891dff4e62d3cde9be84a005b166b59f123d
ridgePackageManager.java
41599e719d17f7a7fb64e2df043eb3542f4325f5 02-May-2017 Diego Perez <diegoperez@google.com> Sync layoutlib projects with latest changes in master

Test: N/A
Change-Id: I0a9cf653d1b17a5206a31516443cc7d8606a5b6e
ridgePackageManager.java
ridgePowerManager.java
9a60bff96b03b8338e1cd514767b7f151a4334b7 20-Apr-2017 Chad Brubaker <cbrubaker@google.com> Merge "Address API review comments for registerReceiver" into oc-dev
57da7f4b3ba1771e9ecb8303a2b1ab960a1bf0e3 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Address API council comments" into oc-dev
f29d1288bb4b3c339900cbe0318d975f461b4de1 18-Apr-2017 Chad Brubaker <cbrubaker@google.com> Address API review comments for registerReceiver

Bug: 37465538
Test: manual; Verified that Instant Apps can send broadcasts to
receivers still via the changed API.

Change-Id: Ib0f3d0c8ee71234288ccecd07e621554eb9b70ac
ridgeContext.java
3d32934d8919c7e04ffe922d9b88c5bb7c15b672 13-Apr-2017 Chad Brubaker <cbrubaker@google.com> Change ANDROID_ID for Instant Apps

ANDROID_ID for Instant Apps now has the following properties:
1) per-app scoped
2) reset if the user clears the Instant App
3) remains the same if the Instant App gets upgraded to an installed
app.

Note that if the user goes instant -> installed_1 -> uninstall ->
installed_2 the ANDROID_ID at installed_1 will not be the same as
installed_2. This was deemed better than the id changing on the upgrade
step.

Test: manual
Change-Id: I532975c50049c94ff80902a897e001dd35a69f9f
ridgePackageManager.java
be21a2599e27eea420f8a075f1ad3b54dd69d834 19-Apr-2017 Svetoslav Ganov <svetoslavganov@google.com> Address API council comments

Test: cookie CTS tests pass

bug:37327624
bug:37325276
bug:37323696

Change-Id: I52b10470759e471629ec6772e115df94482eb341
ridgePackageManager.java
83d5eb6020ab5c8977aa7e60421bf616b9cf60a2 15-Apr-2017 Christopher Tate <ctate@google.com> Turn down the preliminary foreground service API

The NotificationManager.startServiceInForeground() experiment is over,
and will not ship as API, so it's time to tidy up and get rid of it.

Bug 36130212
Test: manual

Change-Id: I834d1ce059aa464ff27f69f5e5d3625cc5e61d8a
ridgeContext.java
20196aafd25767fb9d5cefbc433ae19672001025 12-Apr-2017 Todd Kennedy <toddke@google.com> expose the instant app installer component

Bug: 35873804
Test: TreeHugger
Change-Id: I4d962927587bb10833bfe3c3db27fdceab668fc3
ridgePackageManager.java
622fd40c673859584c5d9d87f6b7d592d2b1eef9 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-dev
0be80285b6b8cb25fc5ae317d7cbea95b015385a 30-Mar-2017 Dianne Hackborn <hackbod@google.com> Implement issue #36590595: Add ability to associated a ClipData with JobInfo

Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
ridgeContext.java
8848268eefc54ee9280be576c77ff2cc8f3926bc 24-Mar-2017 Diego Perez <diegoperez@google.com> Revert "Layoutlib changes to support the new ResourceUrl"

This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb.

Test: N/A
Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
(cherry picked from commit a4e82144b26ee50fca2739abc4f6c7111dc2f3cb)
ridgeContext.java
754e8e9508c90212cd8b88dcac2066e0903d1563 21-Mar-2017 Christopher Tate <ctate@google.com> API refactor: context.startForegroundService()

Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state. Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds. If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
ridgeContext.java
0609785e6f839bfd27e33fa2630e6a1c12be9a20 29-Mar-2017 Diego Perez <diegoperez@google.com> Make layoutlib more lenient with recoverable errors

In many cases, throwing an exception will stop the inflation or
rendering of a layout. Sometimes, we could recover from some of the
failures and render a layout that is "usable".
I've done a first pass trying to follow the following rules:
- Try simple recoveries by choosing sensible defaults. Not trying
complex recoveries.
- Only recover if the exception is not part of the class behaviour.
Avoided removing declared exceptions or exceptions that are expected by
the framework.
- I've kept assertions in place so, in most cases, the behaviour will
be almost identical to the previous one with assertions enabled.

Test: Checked with existing tests
Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
ridgeContext.java
ridgePackageManager.java
11e84b1a1039c47c93dbdc041fc91db6473124aa 29-Mar-2017 Diego Perez <diegoperez@google.com> Add audio service support to BridgeContext

Bug: http://b.android.com/259326
Test: N/A
Change-Id: Ie43ccca49a5e77d82426b4f265e3c05dddfacad9
ridgeContext.java
a8b4afe1dbde123023f3e0dec5f90a9740699796 24-Mar-2017 Chad Brubaker <cbrubaker@google.com> Add ACTION_EPHEMERAL_RESOLVER_SETTINGS

This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6d5f23d82c97db32c848bc4ea2b81bc)
ridgePackageManager.java
876ec5e8007f6e9b0f1603b9d3e70ac79df535fe 21-Mar-2017 Diego Perez <diegoperez@google.com> Layoutlib changes to support the new ResourceUrl

Updates the resource handling after the changes to the ResourceUrl API
changes.

Test: Existing tests should pass
Change-Id: I314a20673cf94e4ef27e9712d3fa7b6f69bba796
ridgeContext.java
4a304b3a08c266d7a8dbc566ca9f298a7d615d53 16-Mar-2017 Andrii Kulian <akulian@google.com> Separate global and override config sent to client

There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
ridgeWindow.java
ridgeWindowSession.java
c32c565c575095b08bf523a5307b6ecf0fea0b8b 16-Mar-2017 Rob Carr <racarr@google.com> Merge "Delete some SurfaceView support code."
2483d9bdfcedcef15f20af674a0b0d2b46830eba 14-Mar-2017 Robert Carr <racarr@google.com> Delete some SurfaceView support code.

repositionChild, performDeferredDestroy, and SurfaceControl with
background were all only used by SurfaceView and are now no longer
required in the wm.

Test: Only red.
Change-Id: Icb773572e6d6202f78a6d23b2431fbfacbe272c6
ridgeWindowSession.java
913daaa87fa26b5129e70b637a446de7f197a2f7 08-Mar-2017 Todd Kennedy <toddke@google.com> Add API to mark apps that have an update available

Ostensibly for instant apps, we allow play to mark an app as having
an update available. This will trigger instant app resolution even
if the instant app is already installed on device.

Bug: 35143464
Test: Manual; launch URI of installed instant app, see it runs w/o resolution. set bit. launch URI of installed instant app, see it runs resolution
Change-Id: I511df2b2a3eab39377167c770255ccbe02d5dad2
ridgePackageManager.java
ebb1cbe522dca9a98855721bca01562c9bc3443a 13-Mar-2017 Chad Brubaker <cbrubaker@google.com> Merge changes from topic 'receiver_IA'

* changes:
Enforce visibleToInstantApps for receivers
Only send exposed broadcasts to Instant Apps
990874c1cc5b7b43b255285984392ae3fffc9356 07-Mar-2017 Felipe Leme <felipeal@google.com> Replaced auto-fill by autofill to keep it consistent with API style.

This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
ridgeContext.java
c00a47a147a82e9b1efde195ca7665d637aeefc9 10-Feb-2017 jackqdyulei <jackqdyulei@google.com> Add BatterySaverPolicy for power save mode

The BatterySaverPolicy is designed to consolidate all battery saver
knobs into a central location. Usually it is consistent to
mLowPowerModeEnabled unless it gets different data for specific
service. By adding these knobs, we can effectively tune the battery
saver.

This cl sets up the framework for BatterySaverPolicy and updates
following service to get battery saver data from BatterySaverPolicy

1. GnssLocationProvider
2. VibratorService
3. WindowManagerService
4. BackupManagerService
5. SoundTriggerService
6. NetworkPolicyManagerService

Screen brightness will come in a following cl.

Bug: 34693888
Test: FrameworksServicesTests

Change-Id: I6b040e93391614b44d136a485faa4a332c396e51
ridgePowerManager.java
99d8469f009565d9929e0b023da50ff7513a6e4c 02-Mar-2017 Chad Brubaker <cbrubaker@google.com> Enforce visibleToInstantApps for receivers

Instant apps can only send broadcasts to receivers that are declared in
the manifest with android:visibleToInstantApps=true or if the app
registers a receiver at runtime using the new methods that take
visibleToInstantApps.

Bug:33350280
Test: Manually sending broadcasts from Instant Apps only goes to
receivers with visibleToInstantApps set to true.
Test: Receiving a broadcast from within the same app does not require
visibleToInstantApps to be set.

Change-Id: I54d79a502ba9c5fd03ede3c09e08afc88fe2775f
ridgeContext.java
88a1fc3bfb49d61cdea189cb4f03c599e83a95e7 02-Mar-2017 David Christie <dnchrist@google.com> Create PackageManager.isInstantApp API to query whether
a given package name is an instant app.

Test: refactor existing codepaths retained

Change-Id: I6253fe8cc398d6547566d11043bffd1c4ffaa74a
ridgePackageManager.java
3c5e3381983b1f2e98560a7bdbaadd4e7491144c 01-Mar-2017 Diego Perez <diegoperez@google.com> Rename android.os.Build so it can be dynamically generated

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
ridgeContext.java
9fe85b7fbe2e7566ce8dd164cba9897bc40f1a0c 23-Feb-2017 Jerome Gaillard <jgaillard@google.com> Add autofill service to BridgeContext

Test: layoutlib tests
Change-Id: I52b360a64518165eefee4250b1c32e9f5f87845d
ridgeContext.java
9e866698f868b71ac7505081b75ac671fa2b9072 21-Feb-2017 Diego Perez <diegoperez@google.com> Merge "Fix BridgeContext.resolveThemeAttribute color parsing"
0986aa118c279a45fd21af0128f2f81e3d7daa6f 20-Feb-2017 Diego Perez <diegoperez@google.com> Fix BridgeContext.resolveThemeAttribute color parsing

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
ridgeContext.java
180ffddd59ba9662430e8aaf70a5ce2cb27cc8bb 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API for accessing preloaded files cache"
58d2e2867c492598634323346900e0a2fc7c893b 03-Sep-2016 Fyodor Kupolov <fkupolov@google.com> API for accessing preloaded files cache

Added @SystemAPI method Context.getPreloadsFileCache.

Bug: 31008665
Test: manual
Change-Id: Id61ab5e1b78d8bfbd40f61985406a8de4082b30f
ridgeContext.java
a43c71f50d43e71ad9ff021cd8a0f895d6b0b22b 09-Feb-2017 Andrii Kulian <akulian@google.com> Report move to display for activities that handle config changes

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
ridgeContext.java
ridgeWindow.java
95818dde0e66cb1f0b0790fcc1e78e3d82cfdf1f 08-Feb-2017 Todd Kennedy <toddke@google.com> Add API to track package changes

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
ridgePackageManager.java
dd01bfdd39f5a15110c20551badd923c40d40d77 13-Feb-2017 Yohei Yukawa <yukawa@google.com> Merge "Track event flow to IMMS#setImeWindowStatus"
45d5e00515630ee1485f5b143fab69ba7d0122ba 13-Feb-2017 Yohei Yukawa <yukawa@google.com> Track event flow to IMMS#setImeWindowStatus

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
ridgeIInputMethodManager.java
996f17f581adc1ed069265d91502d54316419462 13-Feb-2017 Diego Perez <diegoperez@google.com> Merge changes Ic3affb60,If09a6623

* changes:
Fix NopCanvas initialization
NopCanvas is only hw accelerated during construction
c297692372cdbf03bfb28a403217be533cfd2777 02-Feb-2017 Diego Perez <diegoperez@google.com> Fix NopCanvas initialization

Reverse the logic since the field wouldn't be initialized to true before
super is called.

Test: Layoutlib tests
Change-Id: Ic3affb608bdf3306ada25e2dd986a48f6caae202
raphics/NopCanvas.java
9bd6d14e7330ee1ef63a5b49baac45a445bc13d8 02-Feb-2017 Diego Perez <diegoperez@google.com> NopCanvas is only hw accelerated during construction

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
raphics/NopCanvas.java
33c5bdb3a4e5aab21e9744449d1efcdb2eb11a4f 16-Jan-2017 Diego Perez <diegoperez@google.com> Remove custom service Class -> name mapping

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
ridgeContext.java
221ea4643037f71b229497aedc4debe11def4f1d 13-Feb-2017 Yohei Yukawa <yukawa@google.com> Introduce @SoftInputModeFlags annotation

Doing this allows us to annotate integer values that should corresponds
to WindowManager.LayoutParams#softInputMode.

Test: There should be no behavior change. RetentionPolicy.SOURCE
annotation should change nothing in production code.
Test: checkbuild
Bug: 32784563
Bug: 35079353
Change-Id: I96300b090edce327d0515c740183abe91ded6bac
ridgeIInputMethodManager.java
7d6d3b5e523f0fbd2325c0a5c53de45cce4dff87 09-Feb-2017 Yohei Yukawa <yukawa@google.com> Merge "Eliminate out-of-sync IMM#mFullscreenMode error"
fa2a724214272bdb1205817c43b5344ef0606c5c 08-Feb-2017 Yohei Yukawa <yukawa@google.com> Eliminate out-of-sync IMM#mFullscreenMode error

As explained in the commit message of my previous CL [1], we have
had a design issue in how to notify the full-screen mode change
from the IME to InputMethodManager running in the target application.

Histrically we have done this by using hooking the following IPC
from the IME to the target application.

InputConnection#reportFullscreenMode()

However, since we also want InputConnection to be deactivated in some
situations such as the when the target application is no longer
focused. In other words, InputConnection is not a reliable way to
notify something.

As a result, we have suffered from many stale state issues.
Bug 21455064 and Bug 28157836 are such examples. In Android N, we
introduced yet another hack to work around those issues, but it is
really time to fix the protocol design instead.

The new strategy is to rely on internal IPCs provided by
InputMethodManager to deliver such critical notifications from one
process to the other. This is actually more natural because our goal
is to make sure that InputMethodManager#isFullscreenMode() always
returns the latest value as long as the caller is the focused
application.

For backword compatibility, applications that are monitoring
this callback should continue working, as InputMethodManager emulates
the previous behavior. However, as updated in JavaDoc, IMEs are no
longer allowed to invoke InputConnection#reportFullscreenMode(),
which should be OK because even on previous releases IMEs should rely on
InputMethodService#updateFullscreenMode() instead.

[1]: Iba184245a01a3b340f006bc4e415d304de3c2696
1544def0facda69c210b0ae64b17394ea2860d39

Fixes: 28406127
Test: Make sure Bug 21455064 is still fixed.
1. Input some words in extract mode.
2. Select a word.
3. Perform copy.
4. Select a word.
5. Rotate the device.
6. Try to select a word.
7. Make sure he word is selected and action mode starts.
Test: Make sure Bug 28157836 is still fixed.
1. Rotate device to landscape mode.
2. Tap on EditText and start full screen extracted mode.
3. Rotate device to portrait mode.
4. Long press to start action mode.
5. Make sure Action mode gets started.
Test: `adb shell dumpsys input_method` to make sure that fullscreen
state is synchronized across the app, IMMS, and the IME.
Change-Id: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
ridgeIInputMethodManager.java
a082f4bd3bb8fd0e0a10d4b461bd1519bf7ed7a6 18-Jan-2017 Diego Perez <diegoperez@google.com> Fix support for enum attributes in BridgeContext

Test: Updated BridgeXmlPullAttributesTest
Bug: http://b.android.com/231347
Change-Id: I5fd8b46155ccea6c9b65787f311a0887fa4b4806
ridgeContext.java
42f56ba554f811d06cb8c4ba732263277cb47a7c 31-Jan-2017 Svetoslav Ganov <svetoslavganov@google.com> Add instant cookie APIs

This change adds APIs for instant apps to store cookie data
that is presisted across instant installs and across the
upgrade from an instant to a standard app. Standard apps
can use the cookie APIs but when they are uninstalled the
cookie is also deleted. The cookies are kept longer than
the instant apps as they are much smaller - 16KB by default.
We can change the cookie size via a system setting i.e.
after we ship we can increase size if needed.

We also add internal APIs to surface information about
installed and uninstalled instant apps which should be
used for showing them in the UI. For this puporse we store
the icon, permissions, and label of uninstalled apps. If
the app is re-installed we drop this meta-data but keep
the cookie around. If we have cookie data stored and the
signing cert of the app changes when it gets re-intalled
we wipe the cookie.

Test: CTS tests pass; hiddent APIs tested manually

Change-Id: If145c0440cc61a5303e2cbb70228d235d36037a5
ridgePackageManager.java
8d59ccd32249e5186225f162f536b2202e6c5544 27-Jan-2017 Paul Navin <paulnavin@google.com> Add hidden API for whether permission review mode is on. am: 7b89a7b1f7 am: 7c230c6f3c
am: dd91db5515

Change-Id: I936449f717e3c2919622181c9068ec8a48b452ad
c7304188e4c89e99d515224ba6e6276b9590851e 27-Jan-2017 Paul Navin <paulnavin@google.com> Add hidden API for whether permission review mode is on.

BUG: 34240393
Change-Id: I68e55767a7da1d457a6cedd210aac9e339fb996c
ridgePackageManager.java
89f21e1efebc20f3c2608ea4814c2f5e0829221e 26-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adding an api for apps to check whether they can install apps"
cd7190d2d9f1dd1369ddd062c4b5363ac7a94d3f 24-Jan-2017 Suprabh Shukla <suprabh@google.com> Adding an api for apps to check whether they can install apps

Some apps may want to check whether they are trusted to install apps on
the device, so they can prompt the user to go to settings and mark them
as trusted before they do an intensive operation like downloading an
apk.

Test: cts-tradefed run cts -m CtsExternalSourcesTestCases

Bug: 31002700
Change-Id: Icd9d04daa157e6733decba245ec251ce4acd4122
ridgePackageManager.java
c9827e6887d4467e4b1871c3172f823bba6bd68c 21-Dec-2016 Vladislav Kaznacheev <kaznacheev@google.com> Implement pointer capture API

When in pointer capture mode, mouse pointer disappears and
further mouse events are dispatched to the focused view
in the window which has requested capture.

The captured events have the source SOURCE_MOUSE_RELATIVE
belonging to SOURCE_CLASS_TRACKBALL. They are
dispatched through dispatchCapturedPointerEvent /
onCapturedPointerEvent. There is also a new listener.

Pointer capture mode may only be granted to a currently
focused window, and will be canceled upon a window focus change.

Test: cts-tradefed ... --test android.view.cts.PointerCaptureTest
Bug: 30897034
Change-Id: I6e5934aa415ac2b6dda1cee173d0f23e5021af84
ridgeWindow.java
5c62f83fa8e6f119cb479016378e5c02789b8cb3 22-Nov-2016 Adam Lesinski <adamlesinski@google.com> Add support for Split APK dependcies

Apps can now declare in their base APK AndroidManifest.xml
that they want to have their split APKs loaded in isolated
Contexts. This means code and resources from the split
get loaded into their own ClassLoader and AssetManager.

<manifest xmlns:android="..."
...
android:isolatedSplits="true"
...

In order to make this more useful, splits can declare dependencies
on other splits, which will all get pulled in to the Context
and run as expected at runtime.

A split declares its dependency on another split by using the
tag <uses-split> in its AndroidManifest.xml:

<manifest xmlns:android="...">
...
<uses-split android:name="feature_split_1" />
...

A split can have a single parent on which it depends on. This is
due to the limitation of having a single ClassLoader parent.
All splits depend on the base APK implicitly.

PackageManager verifies that no cycles exist and that each dependency
is present before allowing an installation to succeed.

The runtime will then load splits based on the dependencies.

Given the following APKs:

base <-- split A <-- split C
^----- split B

If an Activity defined in split C is launched, then the base,
split A, and split C will be loaded into the ClassLoader defined
for the Activity's Context. The AssetManager will similarly be loaded
with the resources of the splits.

A split can be manually loaded by creating a Context for that split, defined
by its name:

Context.createContextForSplit("my_feature_split_1");

All installed Activities, Services, Receivers, and Providers are accessible
to other apps via Intent resolution. When they are instantiated, they are
given the appropriate Context that satisfies any dependencies the split they
were defined in stipulated.

Test: WIP (CTS tests to come)
Change-Id: I8989712b241b7bc84381f2919d88455fcad62161
ridgeContext.java
1c1efdc62b2902b7162e238ae9533936a64b447f 12-Dec-2016 Svet Ganov <svetoslavganov@google.com> Platform support for static shared libraries

This change adds support for static shared libraries that
emulate static linking allowing apps that statically link
against the same library version to share a common
implementation. A library is hosed by a package in a standard
APK.

Static shared libraries have a name and a version declared
by a dedicated manifest tag. A client uses also a new tag
to refer to the static library it uses by specifying the
lib name, version, and the hash of the signing certificate.
This allows two apps to rely on two different library versions
and prevents impersonation of the shared library by a side-loaded
app with the same package name.

Internally apps providing static libs use synthetic package
name generated from the manifest package name and the library
version. This allows having different "versions" of the same
package installed at the same time.

An application cannot be installed if a static shared lib it
depends on is missing. A used shared library cannot be uninstalled.
Shared libraries can rotate certificates like normal apps. The
versions of these libs should be ordered similarly to the version
codes of the hosting package. Such libs cannot use shared user
id, cannot be ephemeral, cannot declare other libraries, cannot
rename their package, cannot declare child-packages. They must
target O SDK. Also they cannot be suspended or hidden or their
uninstall blocked. Generally, speaking policy regarding code in
static shared libs should be applied to the packages using the
library as it could have just statically linked the code.

We now have APIs to query information about the shared libraries
on the device in general. To clients static shared libraries are
presented as multiple versions of the same package which is how
they are declared and published. Therefore, one can have two
versions of the same package which means we need way to query
for and uninstall a specific version of a package. Also static
shared libs can depend on other static shared libs which are
versioned packages. To ease representation we add the concept
of a versioned package which should be used in the case of
static shared libs.

A client can see only the static shared libs it depends on and
more specifically only the versions it depends would be retrieved
by using the standard package manager APIs. There is a new
dedicated API to get info about all shared libraries which
would provide data about all static shared lib versions. Also
these libraries must use v2 signing scheme.

Test: CTS tests pass

bug:30974070

Change-Id: I4f3d537ee7a81f880950377b996e1d9d4813da5c
ridgePackageManager.java
67368fb33c9715393ad36d6b472f693a2fa8e760 07-Nov-2016 Christopher Tate <ctate@google.com> Enable background restrictions

Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
- persistent process
- currently on the idle battery whitelist
- global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Icc19b2fbc05f40dcf8c3fc4abf718c373dc8d4f6
ridgeContext.java
898b5927b61ae0fcffe01d091a205e2baeaf5446 09-Dec-2016 Diego Perez <diegoperez@google.com> Add missing attributes to old themes

Because we always use the latest framework code, some resources might
fail to resolve when using old themes (they haven't been backported).
Since this is an artifact caused by us using always the latest code, we
check for some of those values and replace them here.

Bug: http://b.android.com/225105
Test: Included new testActivityOnOldTheme
Change-Id: Ia7a8a27fb81fe0b4a1e0c9610a2033a87720864d
ridgeContext.java
91137872e6b68a70adc1c750c122241065f0c125 10-Nov-2016 Diego Perez <diegoperez@google.com> Force animateFirstValue to false

This CL forces both animateFirstValue and animateLayoutChanges to false
in themes when running layoutlib. This helps with the rendering of some
widgets so they do not rely on animations.

Test: Test as part of testActivity
Change-Id: Ic9214929d3582bc3e0a196d198cc4fb36347c782
ridgeContext.java
f37e8f9f16c0b1de315900f3a55790eaac1322d2 16-Jan-2017 Jerome Gaillard <jgaillard@google.com> Merge "Create a mock Display Mode"
6e6b78204c19817ed3663d765b636b6aa0c906fe 11-Jan-2017 Bartosz Fabianowski <bartfab@google.com> Add install reason

This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.

With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.

Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"

Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
ridgePackageManager.java
ef7487c2803aab8ed737bd69bf3493a5bcdf874f 11-Jan-2017 Jeff Sharkey <jsharkey@android.com> Add API for apps to declare their "category".

Upcoming platform features need to cluster apps together into broad
categories to help summarize information to users. (For example,
when presenting battery, network, and disk usage.)

We are tightly limiting the set of categories to keep them easily
presentable to users when summarizing information. This feature is
not designed to be a general-purpose taxonomy, nor should it be
allowed to become one.

Older apps may not have defined a category in their manifests, so
allow the installing app to define a category on their behalf.

Test: builds, boots
Bug: 33815939
Change-Id: I785b882ee7c18072ef47d56e0fc19ad72888e1b7
ridgePackageManager.java
f3ca3c357705ceef045f78130414a0b472e38801 25-Oct-2016 Diego Perez <diegoperez@google.com> Create a mock Display Mode

Recycler view gets the refresh rate of the display during its setup.
Implementing a Mode that returns a fake refresh rate.

Bug: 32328330
Change-Id: I1025641ec37ca3ec90309b30ad270fd996fd8d46
(cherry picked from commit 4a1c85c71f4de5faeeab2791f80dd7a1ad423f2c)
iew/WindowManagerImpl.java
29936f54c1b9697e37bf4438cba74b04b98aabea 02-Dec-2016 Steve McKay <smckay@google.com> Replace ContentProvider SQL args w/ Bundle & Constants.

Test: cts-tradefed run cts-dev -m CtsContentTestCases
Bug: 30927484
Change-Id: Idb9dbc2b80896e9f8474a0db71353b7a3810d597
ridgeContentProvider.java
24c4e73cb6e6d1ca1da0fba9e8ff01debeec26e6 15-Nov-2016 Kenny Guy <kennyguy@google.com> Allow overriding max profile in debugable builds.

Support a system property on debugable builds to
override the max number of managed profiles to
allow easier dogfooding of multiple profiles.
Support 3 different badge colours for managed profiles.

Bug: 30473760
Test: runtest -c com.android.server.pm.UserManagerServiceCreateProfileTest frameworks-services
Test: runtest -c com.android.server.pm.UserManagerServiceUserInfoTest frameworks-services
Test: manual - attempting to create 2 profiles with adb fails, passes once I set the property.
Change-Id: Ie7fb19048a04a01572666f229283152254d0ffc3
ridgePackageManager.java
124716b109bb8658ecad1aaa1539195b555e832a 17-Nov-2016 Bartosz Fabianowski <bartfab@google.com> Wire up PM.getInstalledApplicationsAsUser(flags, userId) as hidden API

Settings needs to access a variant of getInstalledApplications() which
takes a |userId| argument. Since this is not currently exposed by
PackageManager, Settings calls into PackageManagerService directly. This
is ugly and breaks the regular abstraction layer hierarchy.

The CL fixes the problem by exposing the required variant of
getInstalledApplications() as a hidden API, analogously to what was done
before with getInstalledPackages().

Bug: 32692748
Test: Will be CTS-verifier-tested together with Settings
Change-Id: Id9c4e8e18524d312159821f1a4d5527263c7e950
ridgePackageManager.java
0b2af4ad59f1aa8c6f033d4ad1689b0b655ae0d8 10-Nov-2016 Ben Lin <linben@google.com> Adding ContentProvider#refresh and ContentResolver#refresh.

Original CL is from ag/1568530.

Bug: 31647485
Change-Id: Ib45fc995a361b8c75cd3600f638910b18a263d51
ridgeContentProvider.java
57ade81a414e6e717a9e31b8855a9eec1a256e85 08-Nov-2016 Diego Perez <diegoperez@google.com> Merge "Fix themed attributes resolution"
f6215420fe3432e2b756251a32c0cf62ad1787a3 23-Aug-2016 Dianne Hackborn <hackbod@google.com> New infrastructure to switch remaining commands to "cmd" calls.

This introduces a new feature of the IBinder command protocol
to allow the shell command implementation to call back into
its caller to ask it to open files in the calling context. This
is needed so that commands that have arguments specifying files
can open those files as the calling shell, not the system (or
whatever) process.

To test this all out, move the "am start" implementation over
to ActivityManagerShellCommand, in particular along with its
option to specify a file in which to write profiling data.

Test: Manual

Change-Id: I0c1e3857defefbd19a2ac29413aafbb34b1e48a3
ridgeContext.java
ea1734b5a1c15857eba67749cebb5323bf759d94 20-Sep-2016 Diego Perez <diegoperez@google.com> Fix themed attributes resolution

If an attribute is not an actual theme reference, the call to
Resources.Theme.resolveAttribute will fail in layoutlib. This would
happen for example for color values.
The call in the Android framework simply returns the value.

Bug: 31553972
Change-Id: Idda768a659d94a6c3f848dc960303cf4241325c3
ridgeContext.java
c123f32c834d43f66727993de1325e298b8068c3 03-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Add per-user versions of set{Component,Application}EnabledSetting.""
25618bd60b395aa50939dd70c3ea479d122b31d9 03-Aug-2016 Sudheer Shanka <sudheersai@google.com> Revert "Add per-user versions of set{Component,Application}EnabledSetting."

This reverts commit 0e6bfff6c1ec17cf8f3cfb6e4853d3c0fa3ffb73.

Change-Id: I4eafa9fc052e9eba9e26fd32c09b5e759fe63b00
ridgePackageManager.java
a77dce7c8a8b203858082e070aa32b2ff0cab4a3 26-Jul-2016 Chad Brubaker <cbrubaker@google.com> Add missing sendBroadcastAsUser to BridgeContext

Change-Id: I843c4a97e07c955d5f588448ec1c147f4634117f
ridgeContext.java
d03a9ff2c02d8b979d4889eab9d364de1c6bf597 20-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add per-user versions of set{Component,Application}EnabledSetting."
b1ad4f85757d69659eb43d4479b2f13d3408f398 20-Jul-2016 Sudheer Shanka <sudheersai@google.com> Add per-user versions of set{Component,Application}EnabledSetting.

Change-Id: Id63b233308e92a4c360f38d4728c519ac2131ff0
Fixes: 30230444
ridgePackageManager.java
aa8f8214724934b745e1bb620f3a65812be0e7e0 15-Jul-2016 Diego Perez <diegoperez@google.com> Restore getAccessibleMethod in the preferences inflater

It turns out that although the method was public, the class is package
protected and hence the "Accessible" call

Change-Id: Iec69ad15db4c22d472a941dd335b6cf7789eea09
(cherry picked from commit ff78c344e63c8665ab7b0773b91e473b4fe650ff)
upport/SupportPreferencesUtil.java
b321cbfeb00723a6d18746f0d5bbcfd6b6602f6e 16-May-2016 Diego Perez <diegoperez@google.com> Add support for appcompat preferences rendering

This CL adds new code to handle the support preferences classes. If the
support library is not installed in the project, it will use the regular
inflater as fallback.
This also ports the hotfix that used to live in Android Studio to
support "*Compat" preferences to the regular BridgePreferenceInflater.

Change-Id: I8ff34455d46b6188f0931e821d329224f6a0a343
(cherry picked from commit 90110d50f4c48ea7ec196a068f55b0eb86114c46)
upport/RecyclerViewUtil.java
upport/SupportPreferencesUtil.java
0f735598f93ec8f7aad99670644826cc504d1f73 27-Jun-2016 Diego Perez <diegoperez@google.com> Merge "Add support for AppCompat widgets"
a18c7568154db149748981d7ece1d229cc146fd1 27-Jun-2016 Diego Perez <diegoperez@google.com> Merge "Always calculate default property values"
4cc40451b1cf6c0a70f467dfc3b3a457730fa018 23-Jun-2016 Yohei Yukawa <yukawa@google.com> Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev
ab641d8380953402dc09743b2934d7d9e2ed4f64 23-Jun-2016 Yohei Yukawa <yukawa@google.com> Add InputMethodService#exposeContent()

This is a follow up CL to my previous CLs [1][2] that introduced
InputConnection#commitContent(InputContentInfo, Bundle) API to enable
IMEs to send a content to the target application.

With this CL, IME developers are able to temporarily expose
InputContentInfo object to the target package without permanently
granting URI permission. Although calling IMS#exposeContent() is
allowed only for the IME that is currently selected, the client is able
to request a temporary read-only access even after the current IME is
switched to any other IME as long as the client keeps InputContentInfo
object.

Here is a sample code snippet about how to use this mechanism.

[IME]
InputContentInfo contentInfo = new InputContentInfo(
contentUri,
new ClipDescription(description, new String[]{mimeType}),
linkUrl);
exposeContent(contentInfo, getCurrentInputEditorInfo());
getCurrentInputConnection().commitContent(inputContentInfo, null);

[App]
try {
contentInfo.requestPermission();
// Load inputContentInfo.getContentUri() here.
} finally {
contentInfo.releasePermission();
}

[1]: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
152944f4909c47917473293b258d266435c6ab35
[2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
adebb52588b098a1af678d4e33a234ef1ce783b2

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
ridgeIInputMethodManager.java
1835f6367385080ebcb1c02fe02339c077f0c9cf 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Fix build due to missing abstract method impl

getDisplay() was added to Context, which needs to be implemented
for BridgeContext.

Bug:28388969
Change-Id: I7b0ffcbbe252403e35f08d3fa40d6b0e4dbf0daa
ridgeContext.java
bdcc221005b9246910cdf03b51b8f497f125c6e5 24-May-2016 Diego Perez <diegoperez@google.com> Always calculate default property values

We used to only calculate the default property value if the attribute
was not set in the XML. The properties palette can make use of the
default property values even if the value is manually set so adding code
to support that use case.

Bug: http://b.android.com/210957
Change-Id: Iaade37cbe78329f7be3d34ffbf8fc8e7449cfcaa
(cherry picked from commit 1a6c26f66fd355822a0fa7e08c9ca93582e9fc8d)
ridgeContext.java
9b30e13d8a9896da848fb5db5f91c802fc5249b2 27-May-2016 Diego Perez <diegoperez@google.com> Add support for AppCompat widgets

This allows previews to use appcompat attributes like
app:backgroundTint.

Bug: http://b.android.com/211349
Change-Id: Iaa5f1612c58a6a27d3948bfe1bc0373098c57720
(cherry picked from commit 2ddddbc86314fa16c51d0e5f0d6e55e0a6676d26)
ridgeContext.java
595dc521566c418549a8b412336b649a9ba58e71 16-May-2016 Yohei Yukawa <yukawa@google.com> Make IMS#clearInsetOfPreviousIme() reliable.

This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
- PhoneWindowManager#mLastInputMethodWindow
- PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME. As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window. All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

[1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
2977eb7b6ce82309a1bb1ba4ab698f503cb0388a
[2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
792faa2c16d319e874a1d633f964a78266d5f3f2

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change. Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
ridgeIInputMethodManager.java
259504c6368e44adfffd4f56f7a838b2d5e73ff9 10-May-2016 Diego Perez <diegoperez@google.com> Fix VectorDrawable_Delegate and DrawerLayout

Modify the nDraw call that has been changed in the framework to return
an int with the number of pixels allocated.
Modify the animation initialization render call to use the actual
measured size (instead of 0,0) so the DrawerLayout is setup
correctly.

Change-Id: I198de05206382c6489056f7c3d9a1d328864321c
raphics/NopCanvas.java
7cbc998171f7625ccabfced83c16138f7f725465 03-May-2016 Robert Carr <racarr@google.com> Prepare to replace windows across recreate().

When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
ridgeWindowSession.java
ba59d0ed5f4d3ee43ae372bcec80ffcc566b3bc5 29-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Add namespace before attr name in defPropMap" into nyc-dev
18ba2f64c15380780855fbc72dd041ce56c62a74 27-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add namespace before attr name in defPropMap

Change-Id: I36d094fb69d5f5ce0aebde04960ffcd19c27a2eb
ridgeContext.java
8764674a4802fbd74ae0e9d7c1c63eaae6d5fce9 22-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Disallow disable of the system shared libs." into nyc-dev
c7c7394dbd40ca3bea751eba6344c121bda69c43 14-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Return complete properties map instead of per view" into nyc-dev
18be29a3d14f1b3e840e8ee88b5a1951a6f6e9c8 14-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Return complete properties map instead of per view

Change-Id: Ib7c71606d1bf43bbaa80f5601a8508d7aa49d953
ridgeContext.java
ropertiesMap.java
0eff15e30ee1914d70edb93c3c6f664e2abf2988 14-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Disallow disable of the system shared libs.

bug:28173410

Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
ridgePackageManager.java
599f491b231572972b3f5c60ec6a35b84de0762a 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added api to delete cache files for a given user" into nyc-dev
46f3148ab5156ebe8d80d56ca60bb575bd327b95 13-Apr-2016 Suprabh Shukla <suprabh@google.com> Added api to delete cache files for a given user

Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
ridgePackageManager.java
d94cff87ccbae3042dc4c328863619f4794cc8a5 12-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add post resolve property values

Change-Id: Ia86b7dfc479cc5313cce36b6b3066fbb1d00c292
ridgeContext.java
ropertiesMap.java
8997bbe69bb4ebf1fbafe65aa8c736c8a452edd0 07-Apr-2016 Diego Perez <diegoperez@google.com> Fix NPE when runnin testActivity

Change-Id: I7ac81cb286b8d5593ae7f5fedb99bfd0fda791c5
ridgeContext.java
91fff28b337acb51d39219d6e04c730a3c74f91a 06-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Add properties from textAppearance to property map" into nyc-dev
5719b7e97ebbfeb891ec687f796abfe824a3182f 05-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add properties from textAppearance to property map

The default property map is used to get the list of XML properties that
a view queried. For things like textAppearance, these are additional
attributes that the TextView queries, but wasn't added to the property
map. Add them too.

Change-Id: I1e03fbeced224866de1dcc51b93d5aa5d5886ade
ridgeContext.java
0685ab35ad78094ceb2d9fb0583e2cadd1968c90 04-Apr-2016 Diego Perez <diegoperez@google.com> Separate inflate from render step

Up until now, createSession will always do a first render. With the new
embedded layoutlib we might want to actually call objects from the
inflated view before doing a render or even do it between renders.
This allows to avoid the first initial render unless needed.

This CL also fixes a bug that would only happen when multiple render
calls are issued. When scrolling, use scrollTo since we likely want
absolute positions, not relative.

Change-Id: I4b1d8388d7218a8de33e25cd546fd965fcb07dc7
enderParamsFlags.java
9ce4158f0594ae8b61e3a34862a2111587a83c98 29-Mar-2016 Robert Carr <racarr@google.com> Ensure we change SurfaceView size from UI thread.

We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
ridgeWindowSession.java
b2a1e2cbae1442226019ccce716a5b937fe2d1ce 10-Mar-2016 Clara Bayarri <clarabayarri@google.com> Keyboard Shortcuts: plumb deviceId through

Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
ridgeWindow.java
iew/WindowManagerImpl.java
831f206e3e0b65f2c51f83cd142d82b146090c74 22-Mar-2016 Chong Zhang <chz@google.com> Don't change geometry in relayout if preserve geometry is requested

This causes scaling to be applied in the relayout window since the
requested size won't match the window size. Apply the requested size
in repositionChild instead.

bug: 27676101
Change-Id: I03beee2b9fe118a6be329b5fd1338d54e48d9a22
ridgeWindowSession.java
0a5d5bc6c103cd83ed2d79f2fd5a335e8e8f11be 21-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Add guard around getXmlFileParser() call

Prevents the need to update the LayoutLib API level.

Bug: http://b.android.com/202942
Change-Id: I507239148ab8d6d45406624dba569c8b7197f979
enderParamsFlags.java
2921f27c6c759463a032bbefc744da16deeb40f8 21-Mar-2016 Diego Perez <diegoperez@google.com> Merge "Account for parent scroll position" into nyc-dev
efa6b1d9644f99ef26255033d78bf1cb1fecccbe 19-Mar-2016 Yohei Yukawa <yukawa@google.com> Merge "Tell IMS about missing InputConnection methods." into nyc-dev
30936986998bc84280e7c48c02081f580cd2a433 18-Mar-2016 Tony Mantler <nicoya@google.com> Merge "Fix build" into nyc-dev
95d36ba5ec5276ed08cfcc80f8b2e7fadc1e1ebb 18-Mar-2016 Tony Mantler <nicoya@google.com> Fix build

Change-Id: I590db57366a40aa011ee02e6e34e64cd2e7d1115
ridgePowerManager.java
777163c3facaed668b43061d726a572fd58f6f60 04-Mar-2016 Diego Perez <diegoperez@google.com> Account for parent scroll position

When calculating the ViewInfo bounding box, account for the parent
scroll position.
Also make renderAndVerify return a RenderResult to verify some data
about the result layout.

Change-Id: I965e393c49b5030c80083daf5e058fa31400ce93
ridgeContext.java
07deb6cbc9082993040f1288cf964de066e69c96 16-Mar-2016 Jeff Sharkey <jsharkey@android.com> Refactoring FBE APIs based on council feedback.

Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
ridgeContext.java
0ddc7beea377a36bcb9aac503975a968e7b19f3c 09-Jul-2015 Sudheer Shanka <sudheersai@google.com> Flush package restriction changes for a user.

Change-Id: I7c4481f820b6b368487d00de6c783e64cec99f4b
ridgePackageManager.java
42ddba73f213ebb6b5ca78618a063f7c9225684c 15-Mar-2016 Yohei Yukawa <yukawa@google.com> Tell IMS about missing InputConnection methods.

Summary:
This CL introduces a unified mechanism to deal with the situation
where the application directly implements InputConnection but some of
methods are not implemented. Note that there should be zero overhead
when the application extends BaseInputConnection or
InputConnectionWrapper.

Background:
When ever we add a new method to InputConnection, there has been a
risk that existing applications that directly implement
InputConnection can get java.lang.AbstractMethodError exception at
runtime, because older SDKs do not require the application developer
to implement the methods that are newly added in later SDKs. Because
of this we strongly discouraged developers to directly implement
InputConnection interface, and encouraged them to subclass
BaseInputConnection or InputConnectionWrapper instead. That said, as
requested in Bug 26945674, there is a certain demand to be able to
implement InputConnection without depending on BaseInputConnection.
The goal of this CL is to provide a reliable and sustainable solution
to above missing method scenario in InputConnection.

One of the reasons why dealing with missing InputConnection methods is
so difficult is that what InputMethodService receives to communicate
with the target application is actually a proxy class
com.android.internal.view.InputConnectionWrapper
that runs in the IME process and immediately returns true for most of
methods in InputConnection such as #commitText() and
#finishComposingText(). Because of this asynchronous nature, it is
too late to change the actual return value that the IME receives when
the application receives those one-way asynchronous IPC calls.

Solution:
To handle those cases, this CL checks the availability of
InputConnection methods that did not exist in the initial release
before the target application calls startInput(), and let the
application to send its availability bits to IMMS so that
InputConnectionWrapper running in the IME process can be initialized
with such availability bits. Note that we do know that
BaseInputConnection and its subclasses support all the InputConnection
methods, hence for most of applications we can just assume that all
the methods are available without reflection.

With such availability bits, InputConnectionWrapper is now able to
gracefully return failure code to the IME because the availability of
those methods is immutable, except for a tricky case where the
application relies on a proxy object that dynamically changes the
dispatch target.

Here is the list of APIs that we start checking the availability in
this CL.
[API Level 9+]
- InputConnection#getSelectedText(int)
- InputConnection#setComposingRegion(int, int)
[API Level 11+]
- InputConnection#commitCorrection(CorrectionInfo)
[API Level 21+]
- InputConnection#requestCursorUpdates(int)}
[API Level 24+]
- InputConnection#deleteSurroundingTextInCodePoints(int, int)
- InputConnection#getHandler()

Ideas alternatively considered: Default methods in InputConnection
We once considered having default methods in InputConnection but
abandoned this idea because it does not directly solve the problem
about how to tell the that the API does not take effect.
Also having default methods would make it difficult for application
developers to be aware of newly added methods in InputConnection.

Bug: 27407234
Bug: 27642734
Bug: 27650039
Change-Id: I3c58fadd924fad72cb984f0c23d3099fd0295c64
ridgeIInputMethodManager.java
6826157d504444207a7fb459a59c52a71451b217 08-Mar-2016 Siva Velusamy <vsiva@google.com> BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)
am: af0f3bda17

* commit 'af0f3bda17ee3de4ad3560c9a675527b20e2af5f':
BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)
05954d5ec954d360bc75df29be2ebf511e472bc5 08-Mar-2016 Siva Velusamy <vsiva@google.com> BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)

Change-Id: I214ddf066bd69d56275477712419745cf781cee3
ridgeContext.java
896eb1c37f6a44d65d3a459891475e99170b657c 04-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Change BridgeResources to Resources_Delegate

This is a very hacky fix to make layoutlib work with the latest support
lib. Inject a couple of fields in android.content.res.Resources to
allow using most of the earlier code as is.

Bug: 27403642
Bug: http://b.android.com/201934
Change-Id: Ia96a1b4642a1907a77d9ca7a2392f78809b92e38
ridgeContext.java
4d6787e9bfb52e534613f1a7c52165eff97d8600 04-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Change BridgeResources to Resources_Delegate [DO NOT MERGE]

Do not merge because the resource implementation has changed in N and
the change is no longer valid there.

This is a very hacky fix to make layoutlib work with the latest support
lib. Inject a couple of fields in android.content.res.Resources to
allow using most of the earlier code as is.

Bug: 27403642
Bug: http://b.android.com/201934
Change-Id: I186cad32b1b4de64164fbad937d989e0110c6976
ridgeContext.java
9b86b12c55895ec1d90281d16e1c240e0fced280 19-Feb-2016 Vadim Tryshev <vadimt@google.com> Adding getManagedUserBadgedDrawableForDensity() to PackageManager.

It allows badging an image regardless of of the user (no
user id parameter). The styling for managed users is applied.

This is useful for new cases where the existing functions
wouldn't badge the icon, but we need it.

Bug: 25192539
Change-Id: I2fd2f226f626fb2e6cda1cfe072013350e12b41c
ridgePackageManager.java
b2dbbcd866b34920696a53bc66951cc05699c220 24-Feb-2016 Todd Kennedy <toddke@google.com> Revert "Revert "Remove deprecated methods / classes""

This reverts commit 5cbeb5902633646fbc0a1be252081e77aaaee7b4.

Change-Id: Id96010364d65e6131221ebbcc8ce5889a2da256c
ridgePackageManager.java
5ed1e327fe8adad2a71b1df0aa04e45ba47426ce 24-Feb-2016 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Id21200a8239908c18379d67639c090ccfd3772f2
ridgeWindow.java
c6a46b0eb351a2b0ea18ac6032413a3cc13803f1 23-Feb-2016 Yohei Yukawa <yukawa@google.com> Fix build breakage.

This follows up to my previous CL [1], which forgot to update
BridgeIInputMethodManager.java (again!).

[1] I56934f18e30d90fcdf77bcbb0c35a92a5feb1b82
05c25f8a3a033816ac25aa5cd7db5b1ab495bc3f

Bug: 25373872
Change-Id: I0643069fd0b677115c89c340b7a23f1d12bd7988
ridgeIInputMethodManager.java
e7df8fcf8a3e3729bd5918c20bab27b9f25c17a7 17-Feb-2016 Jeff Sharkey <jsharkey@android.com> Make BackupManager encryption aware.

Backup requires both CE and DE storage to be available, so delay
spinning up the backup system until the user is unlocked, since
that's when CE storage becomes available. Note that devices without
FBE immediately transition USER_SYSTEM into the unlocked state,
since their CE is always available.

Offer to backup and restore files under both CE and DE. Since DE
is effectively the same as CE, most logic is simply duplicated for
now, but it could be simplified in the future. Since system apps
can force their default storage location to DE, we always build
explicit CE and DE paths.

Add getDataDir() to give clean access to the top-level private data
directory, but disclaim that apps shouldn't create files there.

Bug: 26279618
Change-Id: Ic34a4b330223725db93b1d0f5c9dffc88002c61f
ridgeContext.java
8ee39320e64c39a51b761d1af3a2af3752a54ab5 26-Jan-2016 Andrei Stingaceanu <stg@google.com> Suspend packages - one call for multiple packages

Refactor setPackageSuspended into setPackagesSuspended. The rationale
is that the consumers of this API are likely to want to remove
multiple packages at once. Rather than calling the API N times, call
it just once.

The good part is that we already have the broadcast intent for
suspended packages take an array so only one broadcast. Less stress
on the system.

Another good part is that (right now) we only have one consumer of
this API and it will be easy to make changes once this CL goes in.

As a shell command, for consistency only allowed one package at
a time.

Bug: 22776761
Change-Id: Ic8b8cf64d0a288ea3a282bb7b72f9d663b3b0049
ridgePackageManager.java
64926019ec2f194d8bbb938387cc43ee9a5a1f48 17-Feb-2016 Andrei Stingaceanu <stg@google.com> Merge "Suspend packages - new API for retrieving the suspended status" into nyc-dev
2f40e90aa663997fa7df1ecb11fbde1b72522c2a 12-Feb-2016 Andrei Stingaceanu <stg@google.com> Suspend packages - new API for retrieving the suspended status

Instead of always rebuilding the full ApplicationInfo for a
package when callers are only interested in the suspended status
add a new fast API in Packagemanager (which only checks the
suspended user setting for the requested package and returns
a boolean) and change the appropriate caller code too.

Bug: 26794775
Bug: 22776761
Change-Id: Ide8428ef734479360d5a8a75fd8e0ed8ddf2da7a
ridgePackageManager.java
c262ff1a96632aa6fd2eea7c8244e43d21743a27 16-Feb-2016 Jeff Sharkey <jsharkey@android.com> Add feature versions for devices and apps.

We're starting to see more instances of device features that will
increment separately from the SDK API level, such as camera HAL,
GPU capabilities, Bluetooth, and other hardware standards.

This change adds the ability for device features to specify a
version, which is defined to be backwards compatible. That is, apps
requesting an older version of a feature must continue working on
devices with a newer version of that same feature.

When a version is undefined, we assume the default version "0".

Bug: 27162500
Change-Id: If890bf3f3dbb715e8feb80e7059a0d65618482ea
ridgePackageManager.java
a8b19f02074a4987bf245fd7a53be89ba56a6695 10-Feb-2016 Vladislav Kaznacheev <kaznacheev@google.com> Update pointer icon when View.setPointerIcon is called

Currently the updated pointer icon is only displayed after
the next mouse move.

Bug:27107871
Change-Id: Ieed57b07fe44699735179cf57968a9bb08981396
ridgeWindowSession.java
88f19731d666fc862ecbbff3508efa1ec3dca89b 10-Feb-2016 Svet Ganov <svetoslavganov@google.com> Fix build

Change-Id: I7c0601f873e37c7ebf71068ba81366704672bd70
ridgePackageManager.java
3055137d8134ff0e798768cb8b5b8974a1e588d8 30-Jan-2016 Jeff Sharkey <jsharkey@android.com> Offer to migrate databases and SharedPreferences.

Databases and SharedPreferences often involve multiple files under
the hood, so developers wanting to migrate them between different
storage contexts should ask us to make sure all relevant files are
migrated correctly.

This makes a best-effort attempt to recover from battery pulls
during migration, while still trying to alert developers to
conflicting files.

Bug: 26668510, 25860525
Change-Id: I9ffa3e8cb6191dfd4237b9466a081d6d77df3ba0
ridgeContext.java
81a4d694cf320fb8045019c6cbde5e95397f4c92 27-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix app staying in drag resizing when undocking

When dismissing the docked stack, the fullscreen stack stayed in drag
resize mode because it got a relayout, but because the bounds didn't
change (it switches to the fullscreen layout a bit earlier) it never
called WM.relayoutWindow, so it stayed in drag resize mode indefinitely.

To fix this, introduce forceRelayout in Window.resized(), which makes
sure the client always calls relayoutWindow. Set this to true whenever
drag resizing is changing.

For some very weird reason this also broke that home button was not
responding anymore.

Bug: 26806532
Change-Id: I4b39c1c419a166aa7093c31226f2a4915f642328
ridgeWindow.java
8dfdb65f006c400fe3fb879d3f703efa1bd36152 26-Jan-2016 Ian Pedowitz <ijpedowitz@google.com> Fix build and reorder methods to match ec6a447c86b03f5896fdb717de530c8abf8887f9

Change-Id: I39ee2864eda489bf0e485ea96d30e56b29500865
ridgeWindow.java
3b848a2d10470964c683c958e31d58982897465a 26-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Fix build.

Change-Id: I68d6fade1b2a44a3542182914e0cd5853f4f0a81
ridgeWindow.java
8a8c374044b81f07f098a76da2fb7a17857f463b 23-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Change mouse pointer when drag and drop is active"
688afb50501539582c1ac2b61e676a24e4b75f5e 22-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Change mouse pointer when drag and drop is active

Mouse pointer is set to STYLE_GRAB when the drag has started and
reset to STYLE_DEFAULT when the drag has ended.

Resetting the pointer shape to the one defined by an underlying
view will be handled in a separate patch.

Bug: 24415739
Change-Id: I8df0a08c5701a34a48f10ec6b43c2cf2e6362d61
ridgeWindowSession.java
b48f2ce5a4c3d24077cc8fd70a0c6432d9544285 22-Jan-2016 Selim Cinek <cinek@google.com> Fix build by adding missing method

Change-Id: I4309225f9c799237857ce4c8f7ae2f8667d0b8be
ridgePackageManager.java
114b55f58b9b3c422e44a058cf7b84d65ca62b8f 19-Jan-2016 Rob Carr <racarr@google.com> Merge "Replace SurfaceViews across resize trigerred relaunches."
26b41672123f5fb8d4953e5f87cda12a6cc9300f 13-Jan-2016 Robert Carr <racarr@google.com> Replace SurfaceViews across resize trigerred relaunches.

In resize modes where we are preserving the main application
window, we need to tell the WindowManager to prepare to replace
the child surfaces, or they will dissapear across relaunches.

Bug: 26070641
Change-Id: I864168688dc320e9280e651f9c5df614f52bc96c
ridgeWindowSession.java
2442417ef7ba00e13641f91f7d76e9bd78930f98 16-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: I6d4bebf90c11a4a00d259aac34bb9459d973da9b
ridgeWindowSession.java
11a7e6cf73d0416951d8218db937b3fc2e102398 15-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Fix custom font rendering" into mnc-ub-dev am: f5984d5fce
am: 14df39f9e5

* commit '14df39f9e5855caef8d272fb136abe17b225d971':
Fix custom font rendering
85ce0498994c007dc1a8732a4dc125c0061be0d1 14-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Fix custom font rendering

The context was using the wrong asset manager.

Bug: http://b.android.com/198897
Change-Id: Id58473a4539ed93a9f338c730686128c7089fc92
ridgeContext.java
c427a03685a9c2df4d46e46d23a2fb4b102b815f 14-Jan-2016 Wale Ogunwale <ogunwale@google.com> Fix build breakage.

Bug: 22405482
Change-Id: I8fc522885801e9735544ec3820c8fdd4a4368d71
ridgeWindow.java
iew/WindowManagerImpl.java
e2abe8e77aa1946d843e1ee54ee719459fa8e31d 09-Jan-2016 Jeff Sharkey <jsharkey@android.com> Even more PackageManager caller triage.

Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
ridgePackageManager.java
6852f8a6ac24dab52df10dedc600a305a0c00953 07-Jan-2016 Jeff Sharkey <jsharkey@android.com> Add flags to requests for package UID/GIDs.

This gives callers the ability to request details for missing
packages. Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
ridgePackageManager.java
2b2f9c87ff5b1d507381e67299622de54417df79 06-Jan-2016 Jeff Sharkey <jsharkey@android.com> Consistent naming for PackageManager methods.

When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix. This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
ridgePackageManager.java
5633003f0f651d78354e5b3079e50fa205a256a3 21-Dec-2015 Alex Klyubin <klyubin@google.com> No need to pass digest of AndroidManifest.xml around.

When an APK is being installed, the full path to the file is
occasionally passed between processes. To detect changes to the file
during these handovers, the digest of the AndroidManifest.xml entry
could be passed around as well.

This security feature is no longer used and is no longer needed. APKs
should be installed using the modern Package Installer API
(android.content.pm.PackageInstaller).

Bug: 24542768
Change-Id: I2762634c85448e7adcd47ffc9a5294c021e127bd
ridgePackageManager.java
8f0db97915d645587fd320362592b15592b66b16 26-Nov-2015 Andrei Stingaceanu <stg@google.com> Wire call to suspend a package

Adds APIs in DevicePolicyManager and PackageManager for allowing
a device admin to suspend a package. PackageManagerService sets
or unsets a new PackageUserState 'suspended' setting. Terminal
command to suspend/unsuspend has been added via
PackageManagerShellCommand (as root).

Next steps:
* use the new 'suspended' setting for denying access to start app
(probably in ActivityStackSupervisor)
* broadcast a PACKAGE_(UN)SUSPENDED intent for launchers to pick up
* remove app from recents (go further and kill it if it is running)
* erase existing notifications for this app

Bug: 22776576
Change-Id: I718b3498f6a53cc0c6fdfb6d15031e53ddca4353
ridgePackageManager.java
4a3aef73043ec146ac0a14a8262a7111f1c35714 10-Dec-2015 Dianne Hackborn <hackbod@google.com> Merge "Add new target SDK filtering feature to BroadcastOptions."
4234e9b99661b0e10357243762054f9297167217 10-Dec-2015 Dianne Hackborn <hackbod@google.com> Add new target SDK filtering feature to BroadcastOptions.

You can now control the range of target SDKs that receivers
will be need to have in order to receive your broadcast.

Use this for CONNECTIVITY_ACTION to not allow N+ applications
to receive these broadcasts through their manifest.

Also tweak the broadcast debug output code to now include the
disposition of each receiver in the list. This is becoming
important as skipping receivers is becoming a more common
thing to have happen.

Change-Id: I251daf68575c07cbb447536286ab4e68b7015148
ridgeContext.java
35ce9f43f2af401f2ff9784ecee1db007ad4c219 09-Dec-2015 Jeff Sharkey <jsharkey@google.com> Merge "Slight API renaming, better behavior."
e1b6ca4806fff4beeae156cb927348b6af38030c 09-Dec-2015 Jeff Sharkey <jsharkey@android.com> Slight API renaming, better behavior.

Rename APIs to reflect that they're storage-related. Also move
credential-storage APIs to be system API.

Return a null Context when device-encrypted storage isn't
supported. This is the easiest way to keep legacy apps working when
upgrading from M to N.

Reduce strictness of path checking so we don't crash when working
with special packages like "android".

Bug: 22358539, 26104027
Change-Id: I38c24fc003488186210a6ae3b64270f86e1efe56
ridgeContext.java
9922d5eceb3ebdfa6bf0f7241cb1f7dc5bb6d05c 08-Dec-2015 Jeff Sharkey <jsharkey@google.com> Merge "Shift around encryption public APIs."
4b5aa505b91123cb8e9c203b6e3923e81e5e0205 08-Dec-2015 Jeff Sharkey <jsharkey@android.com> Shift around encryption public APIs.

There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all. Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
ridgeContext.java
9f86b34f8308a132e91650920f1d58be0786d236 25-Nov-2015 Svet Ganov <svetoslavganov@google.com> Ephemeral cookie API

Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
ridgePackageManager.java
4ab815a73310595079806f88dbe069111c1f5296 08-Dec-2015 Jeff Sharkey <jsharkey@android.com> APIs to obtain SharedPreferences paths.

Needed for apps that want to migrate SharedPreferences from CE to DE
storage. Note that a device will only ever enter a CE mode with a
factory reset, so apps should only be using these APIs when they
want to migrate files to a consistent location on non-FBE devices
for simplicity.

Bug: 25503089
Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
ridgeContext.java
69cc25f9017371f3a95b35283637e6d247af9da3 01-Dec-2015 Jeff Sharkey <jsharkey@android.com> API to create SharedPreferences from File.

Needed to support storage of SharedPreferences on both credential-
encrypted and device-encrypted storage paths.

Bug: 22358539
Change-Id: I576b696951b2a9de817d5be63d31b06f7e166a19
ridgeContext.java
fffd59d3d320a3acea7c915bb8fce4f05bdbd87b 25-Nov-2015 Yohei Yukawa <yukawa@google.com> Fix build breakage in BridgeIInputMethodManager.

This is a follow up CL for 35d3f37bd51268cc99d81a3f537ac364d178e851 [1],
which changed some method signatures of IInputMethodManager.

[1]: Ia1fe120af7d71495c5f3a4fc0ec6390efb8240ca

We need to update BridgeIInputMethodManager.java every time when we
change IInputMethodManager.

Bug: 25373872
Change-Id: I126dc4234f921039a9d29010ea411a0a7d2ef6c6
ridgeIInputMethodManager.java
f270991fdadbefa90c8bf600a1df33189a3c4802 20-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Implement View.cancelDragAndDrop

View.cancelDragAndDrop cancels a drag operation initiated by
View.startDragAndDrop.

It has to be called on a View in the same window (under the
same ViewRootImpl) that the view which started the drag.

Bug: 24415683
Change-Id: If9a265fd8cc4d26b207d582d0d02d5c9ae78eba1
ridgeWindowSession.java
1b6848fb69ffbc8a4a82d9591e25909c29edcd96 19-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Revert "Fix broken build"

This reverts commit 88d753291c834c41ad6c9229082146be72cf8014.

Revert required because the base class change
has been reverted in http://ag/816441

Change-Id: Iee8a8272bda0a92aed8ae46af8439910d8f1ecdc
ridgeWindowSession.java
1a7cb19bf3128e58e6c760fa4d5982732e6cb7a3 18-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Fix broken build

Followup to ag/808050

Change-Id: I9912eae6a8c09b90685e19b3a9080b2d557c857b
ridgeWindowSession.java
0668589aa9e50d4579022909e10e3f9d352145f0 06-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Bug: 22802885
Change-Id: Ie45132c22f34cc6ecfe2446912b30bd1df414406
ridgeWindowSession.java
2f6427f8b1f765307750130c67d5dd5254e4a499 07-Nov-2015 Jeff Sharkey <jsharkey@google.com> Merge "Initial file-based encryption public APIs."
285cde678f8bd03c2c0424b0bbeb301635edff7e 06-Nov-2015 Jeff Sharkey <jsharkey@android.com> Initial file-based encryption public APIs.

Define two explicit directories where device-encrypted and
credential-encrypted data will be stored. Third-party apps only
need access to the device-encrypted directory, so that's the only
API exposed for now.

General cleanup in how ApplicationInfo details are derived.

Bug: 22358539
Change-Id: If0a0108721a4aa1c3052b4912e08604bbf24e1ae
ridgeContext.java
005e05ce1b2aa0674e6a403209a8ca80d48d43a5 06-Nov-2015 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Ie716bbec49920af459ceddf8e51387ccf5946a7f
ridgeWindow.java
bf4d4f71cac987248bd42f0ebe45d93704347107 04-Nov-2015 Diego Perez <diegoperez@google.com> Merge "Remove auto-boxing during the inflate" into mnc-ub-dev am: 1c442aca0a
am: 7cdbfaf459

* commit '7cdbfaf459ede7ede430188ed4b1a990ba762144':
Remove auto-boxing during the inflate
b0c34acd150e471178b8de6ba6d7af655955ec14 04-Nov-2015 Diego Perez <diegoperez@google.com> Merge "Remove auto-boxing during the inflate" into mnc-ub-dev
am: 1c442aca0a

* commit '1c442aca0a1b054e3aa0a40ba89c08b39099be2f':
Remove auto-boxing during the inflate
41e2568ca7a5c333c57f3b8cf5d1f6294e65a062 03-Nov-2015 Diego Perez <diegoperez@google.com> Remove auto-boxing during the inflate

Change-Id: I3f9ba5d78363f878fa0c58ca8cbf736bd43fe1c0
ridgeContext.java
3f390536da9c2e4335eae648db086d9cb19f6952 03-Nov-2015 Brian Carlstrom <bdc@google.com> Fix layoutlib-tests build by adding dummy implementation of IWindowSession.repositionChild to BridgeWindowSession

Change-Id: I9c3a609c76716b35595b82a33f32883d4f46c517
ridgeWindowSession.java
3e7f5a3ba3c73380bdc72d039ef855b7e984d295 20-Oct-2015 Deepanshu Gupta <deepanshu@google.com> Fix build

Change-Id: I0e85f40955bfbf25e917f27c210c2f6f24d885a0
ridgePowerManager.java
88ac9ba856fdc7279d6d892aa60f7905fce3bd30 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Merge "Revert "Fix build.""
0accbaf0f1ea2d17c5d8319a9af9ceb064d2fc0a 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Revert "Fix build."

This reverts commit 7a9687f1d7693907189fc315d640c1ad770ab88d.

Change-Id: I5b2f68a4e2b4c399d87c18adc223500b0e1bfcc7
ridgeContext.java
6f6f016d833ebf6d759b3159879fcb8c7dc8060b 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Merge "Fix build."
24dc4bd5e7db43c83ed594804dd979f5a4edbd90 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Iade965d86ce5f53cf476468423db47c8e6a602b2
ridgeContext.java
c179bccfd754fc6ee203f2842ceac12194cf9401 13-Oct-2015 Ian Pedowitz <ijpedowitz@google.com> Fix Build

Mimicking what was done for bdbd2d9c1878432eca6933e06c980663e2579d85

Change-Id: I5aef245b7a426edaa90e7e237acd4608b431c073
ridgeContext.java
4f99983a5d341cdb79c67e07af7515e20de4c003 01-Oct-2015 Chet Haase <chet@google.com> Enable activity rendering during window animations

A change was made back in ICS that prevents the view hierarchy from rendering
during window animations. Specifically, it allows the hierarchy to render once (to draw
the results of its first layout), but further drawing is suppressed at the
ViewRoot/performTraversals level until the window animation is complete.

This change was introduced to avoid jank problems that were resulting from
thrashing the GPU by issuing drawing commands from multiple processes simultaneously,
and limited the number of rendering processes to mainly the system server (and
possibly the System UI), which allowed window animations to be much smoother.

This fix contributed to another source of jank, however, in which applications
which attempt to animate when they first appear will not render any frames of
animations until the window animation is done, resulting is a snapping to the resulting
state once the window animations are complete.

Meanwhile, hardware has gotten faster and GPUs have gotten better, and it is time to
revisit this logic. This change disables the earlier fix and allows view hierarchies
to draw normally, regardless of whether window animations are taking place.

Issue #22232939 Remove flag that prevents drawing during window animations

Change-Id: I4c960180771ff09a7088abd77b437586e835a991
ridgeWindow.java
f88ebeed1250e511adc79437a00e38611d6dc6fc 30-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am 3dde4493: am 4e27221d: Merge "Support databinding in listitem layouts." into mnc-ub-dev

* commit '3dde44935df567f840de2600a3e408f9ba7c7b1f':
Support databinding in listitem layouts.
84df22927dbd9b518e857ad5be326c5dac1b5141 30-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am 4e27221d: Merge "Support databinding in listitem layouts." into mnc-ub-dev

* commit '4e27221d49151ba91af59029659e666fa756b645':
Support databinding in listitem layouts.
97ec082dda2f1ca25d38437716583c8254740866 29-Sep-2015 Deepanshu Gupta <deepanshu@google.com> Support databinding in listitem layouts.

Add a wrapper around the PullParser to support stripping out databinding
parts.

Bug: http://b.android.com/187428
Change-Id: I88080d8f4108cb5ae27a137ad20c5dd7d516f3ea
ridgeContext.java
11f0fef6b6a932ec54515f8e37a6c7b2b680328c 23-Sep-2015 Nicolas Prevot <nprevot@google.com> Add more methods that take a userId to PackageManager.

Add methods installPackageAsUser and installExistingPackageAsUser
and deletePackageAsUser and getPackageInfoAsUser.

BUG:23516394
Change-Id: I15e30d2ec45ab18c7f8c0ac02cfc617c50fedb44
ridgePackageManager.java
d49015d4d6e0ceb99ac0c768b726be726e862c66 13-Sep-2015 Chong Zhang <chz@google.com> Fix build break with startMovingTask API

Change-Id: I4dc44ca04c75a9dfed079338e4906d317f50a1e3
ridgeWindowSession.java
d92792243909c57fd28c2454493c0e818cc3ff33 10-Sep-2015 Chong Zhang <chz@google.com> Move window moving and resizing handling to WindowManager

- add a startMoving API to initiate a window move from app, once
the move starts WindowManager will take over the event handling.

- detect touch events along window's outside border and start
a resize if necessary

Change-Id: Ic7e8baba34e0aa27a43173e044ffb46e93e219e0
ridgeWindowSession.java
2c191bd0dc314d0410fa41794fc364ee5dee37a5 03-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am ee1eed7e: am 7209945f: am 0e150a8b: am 0c5fd7e3: am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'ee1eed7e711228008dc91a7da800be6527539e87':
LayoutLib: Fix typedArray caching.
1aec4cd047cf58870c6ce812cd9ac5e980474d7f 02-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'eb54172719db60740a0b8dde6380db54d4006159':
LayoutLib: Fix typedArray caching.
3a059d806b22ff84b8732d7a806c167bb54d1395 02-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'dd21212fa1a9c907d5d2f80f3de2413f6c14da7a':
LayoutLib: Fix typedArray caching.
9f07d7c5e819577a6f638d32ffe93afeff58743d 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix typedArray caching.

The typedArray depends on the current context (more specifically, the
themes set on the context). The fact was ignored in the caching of the
typedArray and caused the android:theme attribute to be ignored in
certain cases.

Change-Id: If095580919474f12c0eb4e1f8fb7f076cf3c4ed0
ridgeContext.java
461b70041607416fe829d9e42516257c064096e5 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 5078ad32: am 6b1b651f: Fix imports. [DO NOT MERGE]

* commit '5078ad325b0da36fe798df1df428d12732548217':
Fix imports. [DO NOT MERGE]
4a0e4921e72f57b4dd75de08c4e0db0fb24f5ab5 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am e3eecca9: am b2fdaca9: Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]

* commit 'e3eecca924e7c7961c54eb37336767c995c936e7':
Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]
d94d6033adbe365af51d9664ecf5120f777c5403 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 8bfc5a9d: am b1e21330: Implement tools:list_item for RecyclerView. [DO NOT MERGE]

* commit '8bfc5a9d14000a436e54350099bd460f55418f27':
Implement tools:list_item for RecyclerView. [DO NOT MERGE]
58448f3fc229e90545d6cf700df6f624a04e98b3 26-Aug-2015 Jens Ole Lauridsen <jlauridsen@google.com> am 67b73b60: am cd4d5b3f: Support AppBar from Material Design. [DO NOT MERGE]

* commit '67b73b60bf9c9f433ed282abdc3691ee0cc6dda0':
Support AppBar from Material Design. [DO NOT MERGE]
c755420d9540ef83f621214fb1e057b4e125416d 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 9a13b1e7: am db67caa6: Add missing resolveResValue call. [DO NOT MERGE]

* commit '9a13b1e7502734fbe54d6f0e1c386f5382dfa662':
Add missing resolveResValue call. [DO NOT MERGE]
318978232e7a56b2f0897193862c54a9697ca4b5 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 15e549a8: am 4f5e6c63: Skip warnings for some unresolved references. [DO NOT MERGE]

* commit '15e549a81f59daf016f29c6ed6f1aa3d5f65d41c':
Skip warnings for some unresolved references. [DO NOT MERGE]
e6135bfef0dc277d3d60b7619aed57f83077c19a 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 669e4969: am 3e875dbb: Fix import order. [DO NOT MERGE]

* commit '669e4969a7245cf9d1febc5d4e67a0f2063e87fb':
Fix import order. [DO NOT MERGE]
2f26458f1abf6ae53f88315bd5787332976a3cea 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 6b836cd0: am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]

* commit '6b836cd06b1a2ebe5d31336486bb1b54e42439df':
Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
99b4f99457f91cbe0f911697d435f94a393377b9 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am b32e44ff: am a5ffed0b: LayoutLib: Change nullity annotations. [DO NOT MERGE]

* commit 'b32e44ff0c5fd410720bb28c87bc9cea83556edf':
LayoutLib: Change nullity annotations. [DO NOT MERGE]
27266f8b17522ca8f74220f1db3d663c0299ab35 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 1754824c: am c96ef952: Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]

* commit '1754824c2835d6f3a17c4a2c0ab668991797fcf9':
Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]
b70eba5cf79b0408e26a8d589be52b6ba82b3074 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 678f0ea2: am b318ff54: Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]

* commit '678f0ea2ba47f06387670e9f75b13637a6446899':
Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]
e2c8bbd8bd53b201cfa72ac265800841a9467567 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 2f50403f: am afedbc47: Make Context.getClassLoader() work. [DO NOT MERGE]

* commit '2f50403fe0a8a035757b047af00c7520fadb9015':
Make Context.getClassLoader() work. [DO NOT MERGE]
0a2e0e236d4a5d0b65a640fd7165006e006e7806 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix imports. [DO NOT MERGE]

Also remove null checks on return value of ReflectionUtils.getMethod()
as the method always return non null.

Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
(cherry picked from commit 671b7f9b99316f7224c1213d6923d449a2de9b62)
upport/DesignLibUtil.java
upport/RecyclerViewUtil.java
243851c91e6cd1c68b854793e5bc974649dbd01f 11-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]

Store a list of drawer layouts with tools:openDrawer encountered and
call openDrawer on them during the post-inflation processing.

Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
(cherry picked from commit ccbc11770397888cf7780925bb4c7cf1d2f2f80e)
upport/DrawerLayoutUtil.java
upport/RecyclerViewUtil.java
49d1cf63c75890ee5c8e10fb628be3438177ee10 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Implement tools:list_item for RecyclerView. [DO NOT MERGE]

It's now possible to use tools:list_item attribute for RecyclerView to
point to a default layout, rather than always using a TextView.

Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
(cherry picked from commit 61f23e9bf7d784e7a52168196758c4f6c6853e77)
upport/RecyclerViewUtil.java
1ab3c68dbd918417f489b0ab605e2685659b3cda 05-Jun-2015 Jens Ole Lauridsen <jlauridsen@google.com> Support AppBar from Material Design. [DO NOT MERGE]

This CL is a start for making the design able to render the AppBar.
We are still missing support for: system menu and the app icon.

Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
(cherry picked from commit 4dfe4d43ce5634f059a3ba669e3cac4551c3a3ee)
ridgeContext.java
upport/DesignLibUtil.java
03ccbcda5f00446f50404ffd18c90794cd9cc8e1 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Add missing resolveResValue call. [DO NOT MERGE]

Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
(cherry picked from commit 5d1eaf4a197130f561b16c4ed083cf016b20ab92)
ridgeContext.java
b683bea991ee0ae2adb1eaa12a42a206d6162247 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Skip warnings for some unresolved references. [DO NOT MERGE]

Some applications rename the newer RTL attributes to the older
attributes in order to target RTL locales, but not need to include two
attributes everywhere it's needed. For example, iosched renames
paddingStart to paddingLeft (among other attributes) for API 17 and
above. This leads to hundreds of warnings about missing attributes.
This change suppresses such warnings.

Also, skip adding unresolved attributes to the typed array. This is more
in line with the actual implementation on device, and prevents
unexpected warnings/errors/crashes later.

Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
(cherry picked from commit b3e872be9e634c8d1f34d07778ea753880bbf2d9)
ridgeContext.java
f64ea87a916e49a89b318f2f1dbb028a4f6a27f6 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix import order. [DO NOT MERGE]

Change-Id: I50bfbf4011290683a1c6adb94e0b6fa301dcc75b
(cherry picked from commit b9b8aef94e5bad8f5f03f686a2d3d8a09c045a7b)
ridgeContext.java
39adf6175b5aeae7898ff85d808bd75401276005 28-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]

Replace direct member access with getter that checks for nullness.

Change-Id: I4a56a0ee903ae7d8c89b91d74b128302e1965586
(cherry picked from commit d758e042ce08c46712db3db2d63fc84795028dfe)
ridgeContext.java
18e58a95b556336bac0d455da4f44dc30171fa44 22-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Change nullity annotations. [DO NOT MERGE]

Switch from using tools nullity annotations (com.android.annotations)
to android framework annotations (android.annotation).

A new sdk-common prebuilt is required for LayoutLib tests. The new
sdk-common requires an updated tools-common. The updated tools-common
doesn't have nullity annotations. So, instead of adding the annotation
dependency, just reuse the platform ones. This also paves the way to
include other platform annotations like IdRes etc.

Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
(cherry picked from commit 476e582d2ffdf25102d4c55f8c242baa3d21d37f)
ridgeContext.java
upport/RecyclerViewUtil.java
f91be4adf5628a0bc3dd92ae9f5975a4219531be 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]

Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
(cherry picked from commit 6330971ed293a2777bbdab09288f90ea4b2d0255)
ridgeContext.java
4f324ccc2d825991b08538093f4c15f657bdc52d 24-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]

Only cherry picked for the style not found fix.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
(cherry picked from commit d5b82845450beac2d3c7db9cd80e9fc34d43a297)
ridgeContext.java
b2f3bdfde816e8338fcadcc55965427473089b22 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Make Context.getClassLoader() work. [DO NOT MERGE]

Context.getClassLoader() is used by the LayoutInflater and can be used
by custom views. However, when called from the LayoutInflater, this
needs to return only the Framework classes. This is so that the IDE gets
a chance to instantiate the custom views, which helps in better error
reporting and better fallback in case of exceptions, like MockView.

To workaround this need of the same method returning different results
based on where it's called from, the method call in LayoutInflater is
renamed to getFrameworkClassLoader() and the new method is injected in
Context. The implementation of getFrameworkClassLoader() maintains the
existing behaviour of getClassLoader().

Context.getClassLoader() is now modified to return classes from both
Framework and the app namespace.

Also, update the list of packages to search for Framework views.

Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
(cherry picked from commit f8ea750455eec81e4e6d877b3e18e29a86d4ec95)
ridgeContext.java
81d92ac7d84e54d8db52c7ad2fab364342fb7f69 07-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 63790291: am 2081769f: am 618d96da: am 385ce0a3: Merge "Replace Locale.getDefault with custom impl." into mnc-dev

* commit '63790291a4c385d3e92680af816f4fe32d6535ef':
Replace Locale.getDefault with custom impl.
893ddc5c6c5cfdb279fe4864b6d3c88ccbb8e5b6 05-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Replace Locale.getDefault with custom impl.

In LayoutLib the default locale should always be the locale set the
rendering params. This change replaces all calls to Locale.getDefault in
the framework with calls to AndroidLocale.getDefault() which tries to
find the locale from the current context, but falls back to the original
call.

Change-Id: I496b35dcfc17fd61fedee21c7495541ab870b1fc
ndroidLocale.java
0a6a11fda95f851229464828cfbf5a15315f167b 03-Aug-2015 Yusuke Sato <yusukes@google.com> am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"

* commit 'b98e235364c2b221521f622c546733b2862e4677':
Distinguish user-requested shutdown from power-related ones
8fafc60dff53d96f0722e89f20f0b865a112e906 22-Jul-2015 Yusuke Sato <yusukes@google.com> Distinguish user-requested shutdown from power-related ones

With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
ridgePowerManager.java
8a026d94f8e984eba7ce99796bb602cf5e6d3ebd 30-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge changes I4c215676,Ib476302c,I0aede288,I9241dec7,Ibe7167a6, ... into mnc-dev

* changes:
Update status bar time.
Fix imports.
Add MockView constructor used by LayoutInflater.
Poor implementation of Path.approximate()
Include EpicenterTranslateClipReveal in LayoutLib
Fix theme namespace in tests.
LayoutLib: fix layout when nav bar is absent.
LayoutLib: Fix Status/Navigation Bar color.
c102fc0ddf298edd8c1dd17454b564acb1b2bb80 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix imports.

Also remove null checks on return value of ReflectionUtils.getMethod()
as the method always return non null.

Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
upport/DesignLibUtil.java
upport/RecyclerViewUtil.java
bad9d212a9e9c4c9ec760db70928e5d10c92329f 29-Jul-2015 Svet Ganov <svetoslavganov@google.com> Remove dependencies on the package installer's package name

bug:22700053

Change-Id: I8540eb8577fbec84e1a67e31e1c31ba654c828a4
ridgePackageManager.java
1d12f00e175c218cd61fa0e612c1efc1365c554f 16-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Add tools:openDrawer to open a DrawerLayout." into mnc-dev
9028fa93da0f9c7dad2176de347cd6e705084c9f 11-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add tools:openDrawer to open a DrawerLayout.

Store a list of drawer layouts with tools:openDrawer encountered and
call openDrawer on them during the post-inflation processing.

Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
upport/DrawerLayoutUtil.java
upport/RecyclerViewUtil.java
1b127c672db6b617783e8470d5c54462461f217e 15-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ib165c32d1d87e971902b4dd7300ccebd65e71a7d
ridgePowerManager.java
6819beb4c223e20964c09a1b2712e45a51e8b46b 14-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21626564: MMS should be receivied while Dozing

We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.

There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states... we now do that.

Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager. This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.

Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.

Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
ridgeContext.java
d3943b7bd5394c1a3af08f4d837799247039cedb 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Added sendBroadcastMultiplePermissions method

Added Context.sendBroadcastMultiplePermissions(Intent intent, String[]
receiverPermissions) method, which allows an array of required permissions
to be enforced.

Bug: 21852542
Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
ridgeContext.java
7b34c0b77eedcb27b757403baccbfd020380cf01 15-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Revert "Allow array of required permissions in sendBroadcast"

This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b.

Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
ridgeContext.java
59c1eec510aa8bf8c406f2763ae074791903a7df 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Allow array of required permissions in sendBroadcast

Added Context.sendBroadcast(Intent intent, String[] receiverPermissions)
method, which allows an array of required permissions to be enforced.

Bug: 21852542
Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
ridgeContext.java
c885d912b78cfc7c5eb65c26fdf061fd6ca727d0 10-Jul-2015 Bart Sears <bsears@google.com> Fix the build.

Correct a typo.

Change-Id: I16131cf7c0ce17fa09dedc67264e8199482cd27e
ridgePackageManager.java
a21eaf55fe5e0da99ee02d18d91219b749fdab36 10-Jul-2015 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: I1b56c07aa5b85662f25158156d2c0eff115e9544
ridgePackageManager.java
39c818ea1f1fcbe249959202d796dcb6afa44ac8 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add a default PackageManager to BridgeContext.

Needed for EditText.

Change-Id: I6c831467659ce814e86c13e928a2b77c14e1c139
ridgeContext.java
ridgePackageManager.java
baf88de1f5c435a788f6c38720354b2dbaa19e60 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Implement tools:list_item for RecyclerView.

It's now possible to use tools:list_item attribute for RecyclerView to
point to a default layout, rather than always using a TextView.

Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
upport/RecyclerViewUtil.java
c3b180a220c8ed4768d2d769479d7027e8b03ef6 01-Jul-2015 Filip Gruszczynski <gruszczy@google.com> am 3ce79f6c: am 96496e2d: Merge "Build fix after changing IWindowSession." into cw-d-mr1-dev

* commit '3ce79f6c0c3435eca05ea34c5a8b34ac59bcb992':
Build fix after changing IWindowSession.
c3ad3ec0f2fb06b109fa1bdb690263d0f3c7411f 30-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Build fix after changing IWindowSession.

Change-Id: I339fecb0138e8b8907fc53372b694021f6327260
ridgeWindowSession.java
3cf86178f3510f08452dda9ef78f431b7fbae32c 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Add missing resolveResValue call.

Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
ridgeContext.java
5434074acbbf76fbed19869fcfd5e3958da2737e 17-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21814207 and issue #21814212 (alarm manager)

Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
ridgeContext.java
c46c84ee673934f340b27b40366a5a61669a4a1e 05-Jun-2015 Jens Ole Lauridsen <jlauridsen@google.com> Support AppBar from Material Design.

This CL is a start for making the design able to render the AppBar.
We are still missing support for: system menu and the app icon.

Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
ridgeContext.java
upport/DesignLibUtil.java
ab7aef7fe5d0e7bb842bc1b65871fbe97f6687ac 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Skip warnings for some unresolved references.

Some applications rename the newer RTL attributes to the older
attributes in order to target RTL locales, but not need to include two
attributes everywhere it's needed. For example, iosched renames
paddingStart to paddingLeft (among other attributes) for API 17 and
above. This leads to hundreds of warnings about missing attributes.
This change suppresses such warnings.

Also, skip adding unresolved attributes to the typed array. This is more
in line with the actual implementation on device, and prevents
unexpected warnings/errors/crashes later.

Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
ridgeContext.java
cd23d38728a9077c15dc81f818b6755884956455 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Revert "Revert "Fix build.""" into mnc-dev
f7cc20d4131687310cc3df6da76cc4bd6ee8da00 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "Fix build.""

This reverts commit 944a6c937cd3576ecae5c3fdd0dcf265329e6bcf.

Change-Id: I7daa255f331a1e39308eb626580aa00c63c5cb3e
ridgeWindowSession.java
88b07bed99e7f0722085cf2469479a7cf3933e69 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev
20e5913c77e01b1b4c322076e3c2177c0cf76681 28-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix NPE in BridgeContext.obtainStyledAttributes()

Replace direct member access with getter that checks for nullness.

Change-Id: I4a56a0ee903ae7d8c89b91d74b128302e1965586
ridgeContext.java
6450a80f8fd722a47b1b48fde7957eb8d8e7b827 26-May-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""

This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
ridgeWindow.java
a7346f914f69702192f3f4dc4976fae9edc5b5fe 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "LayoutLib: Change nullity annotations." into mnc-dev
87332e82a481c418fe8c4620e7b362b7ad5c4374 23-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Revert "Fix build."" into mnc-dev
ffafa81f8bc785e6f2e89ba18b3f7c3af8d05c90 23-May-2015 Deepanshu Gupta <deepanshu@google.com> Revert "Fix build."

This reverts commit 97b3ae1a8766616675ebf2323a97d8adfd41bfdc.

Reverted since 4bb6b751fbbb218e8a298db4aa008472a0aa8d31 reverts
the commit that warranted this change.

Change-Id: I56d0eb8ffba44a673ae357e9543dd18f6c03c54f
ridgeWindowSession.java
442aee6bc1abfb143dcfa1ba60d696e576d066c4 22-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Change nullity annotations.

Switch from using tools nullity annotations (com.android.annotations)
to android framework annotations (android.annotation).

A new sdk-common prebuilt is required for LayoutLib tests. The new
sdk-common requires an updated tools-common. The updated tools-common
doesn't have nullity annotations. So, instead of adding the annotation
dependency, just reuse the platform ones. This also paves the way to
include other platform annotations like IdRes etc.

Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
ridgeContext.java
upport/RecyclerViewUtil.java
60f8364f5dd37a607181ba7caeb1b6f1ae029947 23-May-2015 Dianne Hackborn <hackbod@google.com> Revert "resolved conflicts for merge of 47249f2a to mnc-dev"

This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
ridgeWindow.java
d19f5edcc185e2b0ce662064100c5a9052e7b70c 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Fix build.

Cherry picking because automerger is stuck.

Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733
(cherry picked from commit c1b736a0cdf41ab5863bfe6901e46c95cc396342)
ridgeWindowSession.java
ee85d44317786fe13e0f3b0cbed5e1abc9ca5829 22-May-2015 Filip Gruszczynski <gruszczy@google.com> Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-dev
8b8e217e45dcdf4c6ad2a398282e2be94d9b9dbb 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Add documentation about hack in commit: f8ea750455

Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
ridgeContext.java
475b4f2795c95c60f0a6be4c2653965ae7536277 21-May-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 47249f2a to mnc-dev

This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
489e9ca8d8ca89b2029a7984918008eaf4eff01a 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Fix build." into cw-d-mr1-dev
1cbd761d7d8ca72db4a54f854523873a40cda769 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Fix build.

Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733
ridgeWindowSession.java
d4b46ab11d7f44dc3eb0ced1a5a0a3f144a1688d 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Make DatePicker rendering not fail.

Ensures that having a DatePicker in the layout doesn't crash the
complete rendering. The rendering is still not perfect, but at least it
works.

- Return a non-null window token so that ViewPager thinks that it's
attached to a window and doesn't skip populating the views.
- Fix a style not found issue.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
ridgeContext.java
9dc57f491f40498bee5cc05c5dd09813057ef7ac 20-Apr-2015 Filip Gruszczynski <gruszczy@google.com> Support for devices with a chin.

Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
ridgeWindow.java
f4d62181569ea4f112046a5400acd24e5c5d196b 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Make Context.getClassLoader() work.

Context.getClassLoader() is used by the LayoutInflater and can be used
by custom views. However, when called from the LayoutInflater, this
needs to return only the Framework classes. This is so that the IDE gets
a chance to instantiate the custom views, which helps in better error
reporting and better fallback in case of exceptions, like MockView.

To workaround this need of the same method returning different results
based on where it's called from, the method call in LayoutInflater is
renamed to getFrameworkClassLoader() and the new method is injected in
Context. The implementation of getFrameworkClassLoader() maintains the
existing behaviour of getClassLoader().

Context.getClassLoader() is now modified to return classes from both
Framework and the app namespace.

Also, update the list of packages to search for Framework views.

Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
ridgeContext.java
9fe7fca9bcdceade9c654c6a8dcf0c48be16d78d 12-May-2015 Deepanshu Gupta <deepanshu@google.com> Add missing delegates for M preview.

- Remove ICU dependency (use the version bundled with platform).
- Restructure intelliJ project to move dependencies to module.
- Minor fixes to layoutlib tests.

TODO:
- Load ICU data.
- Hyphenator doesn't work.
- High quality line breaker not present.

Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
ndroidLocale.java
12ce22b18dd52587997623e173ee328d9dcad8fa 14-May-2015 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Ia9277c6c983758d301c89312e39b59a2db0b29c4
ridgeWindow.java
b03660e395897b2ecf079b7dd11fe3647f68ae5e 07-May-2015 Jorim Jaggi <jjaggi@google.com> Make sure the app can draw a frame before unlocking

- The mechanism to stop windows drawing while window animator was
animating was somehow flaky. It relied on the fact that the client
would call relayout() whenever the animating state changed. This is
mostly the case, but not for lockscreen animations. Instead, we now
use a push model, where window manager tells the app that the state
has changed.
- In addition, it only stopped drawing if that window was animating,
but then only resumed drawing after all windows have finished
animating. Now, we do this per window, so we only stop drawing for
windows that are currently animating.
- We resume the top activity now at the very beginning of the
unlocking sequence. This gives the app a chance to draw a frame
before the user sees anything. If it's to slow, then we just use the
outdated framebuffer.

Bug: 19964562
Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
ridgeWindow.java
dd19a9d9764a7e1d9f03559ad8939e7d14afc636 07-May-2015 Seigo Nonaka <nona@gogole.com> Retry "Always show auxiliary subtypes from NavBar keyboard icon."

This CL relands I1e50ee42838a1bf64a612da4904aa93458d44ea4, which was
reverted by I3decaf37198e5864a1763a059df4a36ebc70c5a7 due to the build
breakage in 'layoutlib' target, with a proper fix.

Hereafter the original CL description is repeated.

The auxiliary subtypes should be listed if the input method picker is
opened from NavBar keyboard icon. However there is only
IMM#showInputMethodPicker() API to open input method picker and this is
also used from LockScreen or Settings UI. Auxiliary subtypes should not
be listed there(Id7cf5d122). Thus framework shows auxiliary subtypes
based on IMMS#mInputShown and LockScreen state, but it is not a perfect
solution. If a physical keyboard is connected, the soft input may be
gone. As the result, auxiliary subtypes won't be listed even if it is
opened from NavBar keyboard icon.

To fix this issue, this CL introduces IMM#showInputMethodPicker(boolean)
to be able to decide showing auxiliary subtypes by caller.
Note that IMM#showInputMethodPicker(boolean) is still hidden with @hide.
There is no public API change in this CL.

Bug: 20763994
Change-Id: Id156c85535a221235737ea6dcc15a67f1c4b9f71
ridgeIInputMethodManager.java
040f7446638281d80a7c6ca2b25f73b59dcef421 07-May-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of a663e012 to mnc-dev

Change-Id: I279cad7db6e9b5e97da3ea3c3bb91e09cabc7076
df7364c9ae99ba37e8a009462cc605a9189b57b4 07-May-2015 Deepanshu Gupta <deepanshu@google.com> am 7e4c1a92: am b4ca896f: Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-dev

* commit '7e4c1a92b8f3ce02df0a1502be45c450308d81b7':
RecyclerView in LayoutLib: better XML attrs.
38f07397f29ae7b3b5cba4d632c671be0ccd4bed 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build for real

Change-Id: I5742226e9b873cd5a035f11be0e228188e215365
ridgeContext.java
fe4f4ce73f499edd4b693dede0b8822480248580 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build

Change-Id: If469dce767b492c3fcc1ad8cf7ab1041eb61096f
ridgeContext.java
cb40f2cb35d559d9ea60382b6dee80022c851124 31-Mar-2015 Deepanshu Gupta <deepanshu@google.com> RecyclerView in LayoutLib: better XML attrs.

- RecyclerView now supports XML attributes natively. Thus, remove the
custom support via tools attribute. Users with older versions of
RecyclerView should update.
- Add Context.getPackageName() support used by RecyclerView.
- Update SessionParamsFlags with the new changes and rename it to
RenderParamsFlags.

The attribute behaves slightly different from the original tools
attribute. For usage, see commit 044b5b61e96 in frameworks/support.

Change-Id: I12073e37a2ba411558ca1d3e30c399e3d9a0b144
ridgeContext.java
enderParamsFlags.java
essionParamsFlags.java
upport/RecyclerViewUtil.java
2f06ed4d7b33991be7d3fea6a592423636694c1a 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 186fe7b1 to master

Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
513cbb2f07fbd32e92befc55de88c4f76ec1f90d 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev

* commit 'f18ceefcf0d3cc91e74737e0a93f16775e3bf18b':
Update golden image for tests.
Update to using LayoutlibCallback.
Remove implementation of deprecated method.
Add @empty support.
b111e84752652ec862efa7e0fcaa224430feb97f 15-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Update to using LayoutlibCallback.

Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
ridgeContext.java
upport/RecyclerViewUtil.java
9b6031e453ea5c4f3f6f98f7348c84176e2e2b59 25-Mar-2015 Bryce Lee <brycelee@google.com> add correct exception throw declaration to isScreenBrightnessBoosted.

Change-Id: I9b861002d7719ad43643d68f6795df6938bd0fc3
ridgePowerManager.java
0800373cbf7ba3595653a3fe6eb4d21e83f5aff9 25-Mar-2015 Bryce Lee <brycelee@google.com> Implement isScreenBrightnessBoosted in BridgePowerManager.

Change-Id: I7da132c7522e5c352e14123f059b900008d94c95
(cherry picked from commit 40a4f4a61fbb2172901eda763bf928ae9b1b5300)
ridgePowerManager.java
4f0853913826448414a58dd999eab869bd97a26e 25-Mar-2015 Bryce Lee <brycelee@google.com> Implement isScreenBrightnessBoosted in BridgePowerManager.

Change-Id: I7da132c7522e5c352e14123f059b900008d94c95
ridgePowerManager.java
cf236a0f75b0b61aae5bd17b5a946bb72d534adb 24-Mar-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ib0b9ffb9cbf53df3d76b8de6619d09ba18b4d345
ridgePowerManager.java
7778df5b4f3ebd67626b588e079d5a0e5d95708b 26-Feb-2015 Svetoslav <svetoslavganov@google.com> Runtime permissions: per user permission tracking.

Before all permissions were granted at install time at once, so the user
was persented with an all or nothing choice. In the new runtime permissions
model all dangarous permissions (nomal are always granted and signature
one are granted if signatures match) are not granted at install time and
the app can request them as necessary at runtime.

Before, all granted permission to an app were identical for all users as
granting is performed at install time. However, the new runtime model
allows the same app running under two different users to have different
runtime permission grants. This change refactors the permissions book
keeping in the package manager to enable per user permission tracking.

The change also adds the app facing APIs for requesting runtime permissions.

Change-Id: Icbf2fc2ced15c42ca206c335996206bd1a4a4be5
ridgeContext.java
d06eed1a651314e05c88f852c4bcaf7693c809a9 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 199a70f1: am 576801ff: am 842eee9f: am 1f9a26af: am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '199a70f1820c38a9f1db1697ad91c4f5f07d00aa':
Fix AppCompat action bar theming.
dd8d97aa14e9fc7963d47d992fad317de17c9d4b 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 842eee9f: am 1f9a26af: am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '842eee9f816a2e35bf3c9ce6c14cd5e43684265b':
Fix AppCompat action bar theming.
7645104b10b9c2e4f46bf9dc384484df9a1bfc17 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '158c08bcf1cd0bc702748ee2a4cf6aa259c26147':
Fix AppCompat action bar theming.
05509bdc8d28fff53be7755965f6b35ff9d97df0 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am ada85905: Fix AppCompat action bar theming.

* commit 'ada8590547348b77d8cbd56abdb8fadb3e72c015':
Fix AppCompat action bar theming.
1f3c4ff2ea92c67fca7b55736b7ffb432b157b65 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix AppCompat action bar theming.

Use themed context to inflate the action bar when AppCompat is used.
Also fix minor issues exposed as a result.

- Set project callback when LayoutInflater is created by
LayoutInflater.from(context).
- Remove duplication of code to get base context from context wrapper.

Bug: http://b.android.com/159711
Change-Id: I379ba2ba71c0ef547460987c3aa5db521c7de967
ridgeContext.java
b025e67cebd7c1297bc96ee4238191cc2cd22012 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix import order.

Change-Id: I50bfbf4011290683a1c6adb94e0b6fa301dcc75b
ridgeContext.java
1e36e5b3d1be8c2437f21dbdf3134844056bddc4 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am a4277e14: am a4ed5e94: am e770c5e4: am c44430a3: Merge "Tools attribute improvements for RecyclerView LayoutManager." into lmp-mr1-dev

* commit 'a4277e149355c53fde73a4e1ef44aa665af31cf0':
Tools attribute improvements for RecyclerView LayoutManager.
353b5f6a5501a4a613dd83a99d796b78dc1f13df 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am fceec0e1: am c7fc094d: am d44af610: am b3cfb334: Merge "Fix rare NPE in BridgeContext." into lmp-mr1-dev

* commit 'fceec0e124a55b25d59f2af5279c70ac045d6771':
Fix rare NPE in BridgeContext.
b117f29f6ea1bc1127339c55f690f55bf9918e0b 13-Mar-2015 Andreas Gampe <agampe@google.com> resolved conflicts for merge of ef1741d2 to master

Change-Id: I5379d5f756695f5176d92249ac6304bffcf95751
e0b26f5af33a1984486110d012fc789a354727d2 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am e770c5e4: am c44430a3: Merge "Tools attribute improvements for RecyclerView LayoutManager." into lmp-mr1-dev

* commit 'e770c5e45a139d709976f8c1dbb821733968b5a8':
Tools attribute improvements for RecyclerView LayoutManager.
0d2160f680422a44333a0cc3a1e9b6ec8a8592ab 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am d44af610: am b3cfb334: Merge "Fix rare NPE in BridgeContext." into lmp-mr1-dev

* commit 'd44af6108b18f3de05ed3f61d056d9c5b36ff8be':
Fix rare NPE in BridgeContext.
9e9dc11b2dd8215e68f93a99175799994539edd1 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 338a5a88: am b171be1a: Merge "Add RecyclerView support." into lmp-mr1-dev

* commit '338a5a88fe8ecf8a724fcfaa2888a7c0fe53cb34':
Add RecyclerView support.
285e339995fa90126405643519b0b8bb645b268e 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Tools attribute improvements for RecyclerView LayoutManager.

1. Change tools attribute for layout manager from layoutManagerType to
LayoutManager.
2. Support classnames in the tools attribute.

This change doesn't try to supprt arbitrary classnames for now. The
reason for this is that the new layoutlib API is supposed to contain a
new method for inflating custom classes that are not views. This will
allow us to throw better error messages. Without the new API, trying for
different constructors, will result in a error messages being logged.

Change-Id: I3a31359c06b7452bfd973c3e5e54f9038acccfaa
upport/RecyclerViewUtil.java
f122f22516a3ddc8b15f1cc9ab6e4a3fcad54d24 11-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix rare NPE in BridgeContext.

Also fixed some deprecation warnings.

Change-Id: I2fa00996dab0b008b9ca07a5382a059e5780529d
ridgeContext.java
432578acb80cf2fa827ddb9595cf46edf0b340b0 06-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Add RecyclerView support.

Bug: http://b.android.com/72117
Change-Id: Iba95baff59f1b715f91da25e15acf27bc052d95e
essionParamsFlags.java
upport/RecyclerViewUtil.java
a4a2d3d5936bcdda1409796179725d354e5f4400 05-Mar-2015 Andrew Shulaev <ddrone@google.com> Added function to render a drawable in all available states

This reverts commit 01cdf8b135be3bf67b9386dc929109c3db82c730.

Change-Id: I596855047d78c3c718744ad61432fc45e1239634
enderParamsFlags.java
essionParamsFlags.java
cb9e3f0a57e5d9fe9d5769427d0dc4b80f67180b 04-Mar-2015 Andrew Shulaev <ddrone@google.com> Revert "Added function to render a drawable in all available states"

This reverts commit 63483e17de4d2441acaabcee4185b0bb25e1d94c.

Change-Id: I07fced229759e63d4fa4f94b7dac48b3e9342b18
enderParamsFlags.java
essionParamsFlags.java
1df8a1ef0e45575454f0afc892080977d7f6e384 04-Mar-2015 Andrew Shulaev <ddrone@google.com> Added function to render a drawable in all available states

Change-Id: I230cc5775a09120efe9c82a4017b001aa510ddff
enderParamsFlags.java
essionParamsFlags.java
6b08f4b3e405058c78a7d176402f7158fd892856 25-Feb-2015 Jeff Brown <jeffbrown@google.com> Add Context.getSystemService(Class<?>).

Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.

Cleaned up docs.

Removed the default constructor of BatteryManager which should not have
existed.

Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
ridgeContext.java
0806140450647e550cd384decbb9534fee551e9f 24-Feb-2015 Chad Jones <chadj@google.com> resolved conflicts for merge of 57bb5f5c to master

Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
e12b3f96291cf0e3dc60d9db9ac3d3859325f3d4 16-Feb-2015 Diego Perez <diegoperez@google.com> Avoid caching mImage on the main render loop and use clipping.

+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.

Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
essionParamsFlags.java
e4be1f5e8e3140291288a789fc83c089e41724c8 21-Nov-2014 Jeff Brown <jeffbrown@google.com> Hold a wake lock while dozing when display updates are pending.

When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.

This patch is somewhat approximate but should be good enough for
most devices today.

Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock. There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing. However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).

Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.

Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
ridgeWindowSession.java
8dd2f77b62bfeb81222572fbf9447a65d15af394 18-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev automerge: 0684991 automerge: c2fa5e2
automerge: 7bf58d0

* commit '7bf58d0c5523a9b76ab1d570acb92514e8fff8ba':
Add Asset management support for fonts.
70aa2eaef46df8aa2b7f84ce50019a6a58067015 17-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev
automerge: 0684991

* commit '068499111c173fdd9869e7dbe5b9de857aca1c2d':
Add Asset management support for fonts.
d88d52268b6dea4d4a366ba952bd1e1022a6acbd 13-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev

* commit 'ad879adb65ffa577844738522ab6d7d30aba2ead':
Add Asset management support for fonts.
aa5d4b070abe5baaa82c10175e7e78dbe16754da 13-Feb-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Add Asset management support for fonts." into lmp-dev
807ee60dded3034941966f844a5e434473863660 28-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Add Asset management support for fonts.

Change-Id: I10ca67dcffe244667d4ae0bda65dbc1aa6691d50
ridgeContext.java
0b1ea962feded686d02a0b719e1535c305710db3 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev automerge: 7e683bd automerge: 1575ca6 automerge: 862cdd6
automerge: 6a43990

* commit '6a439908fcc103696dd90bc42494231b54b7a10b':
Resource resolution fixes.
dc9bdc3c714f7d533fd3f5514480e39064dae104 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev
automerge: 7e683bd

* commit '7e683bdaddff77a24a36d420c5782b47795c5ccb':
Resource resolution fixes.
001e2e0c57aae3e9d42050a10d448b17e0619844 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev

* commit '1d59871e4e8a3a657dab3931d684706c45630a2f':
Resource resolution fixes.
bcbf5cce564d0262a6c0be630ecbc0abb4989d37 28-Jan-2015 Craig Mautner <cmautner@google.com> Remove TYPE_UNIVERSE_BACKGROUND from system

An experiment that is over and has been occupying space.

Fixes bug 18088522 item #7

Change-Id: Ib0fcaa24243ed9b0581143e1d5114c1fd2b0aa6e
ridgeWindowSession.java
c8a55f3e2e36475d8a86a5967a9f2db629e02d1c 16-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Resource resolution fixes.

1. Some dynamic ids weren't created and resulted in ResourceNotFound
exceptions.
2. Prevent NPE if a style attribute (eg. style="?attr/foo"), which
cannot be resolved, is resolved. This effectively, also results in
making it harder to catch misconfigured themes. However, support
library does it, and we don't want to throw errors when the library is
working as intended.

Change-Id: I731d8fb9209eb72b464d235d1072d416e132970b
ridgeContext.java
b5ca51bd91a7c55ef30bfaad08ebe5219f6e4024 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am e69e4f8b: am f9bb0b5e: Merge "Fix DatePicker rendering." into lmp-dev

* commit 'e69e4f8b4db142f024e170cf6faabb36095799b7':
Fix DatePicker rendering.
004c77ec365fb5027f35356a6f806b849c53990f 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 8c686ddd: am d20a518c: Merge "Make Preference-cookie map non static." into lmp-dev

* commit '8c686ddd540f3a15cdba4893f104c0e8e9af5716':
Make Preference-cookie map non static.
da3c24ef76a7b7fb83127bdec8f3f754f679419f 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am cec8e5a1: am f861c0ce: Merge "Fix default initial value for preferences" into lmp-dev

* commit 'cec8e5a10de413c733223b8b1cc11b70c6254647':
Fix default initial value for preferences
bc38f817ef48071b21a655cab6c4ee80dbb1737a 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 7ed14549: am 7081a114: Merge "Add preferences rendering." into lmp-dev

* commit '7ed145493d3f5bea32c567980f77cc42f613197e':
Add preferences rendering.
2905a701136e92319313ce7397231a8e31043936 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am f9bb0b5e: Merge "Fix DatePicker rendering." into lmp-dev

* commit 'f9bb0b5e133b0c364c3f87623f0fdff0fedc5226':
Fix DatePicker rendering.
633794511053a7baf764fed5247442a7495f01e8 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am d20a518c: Merge "Make Preference-cookie map non static." into lmp-dev

* commit 'd20a518c82e5e33d33e3dc5d74bf3c17d807f7d7':
Make Preference-cookie map non static.
6ebd385cc7857b6aa28b5facf1f6856f33e18cfc 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am f861c0ce: Merge "Fix default initial value for preferences" into lmp-dev

* commit 'f861c0ce3ff42550f3d5ede837e7bfb3855f5964':
Fix default initial value for preferences
313364b8d7ab072ff0ba3272d8ad7f23bc958a7d 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 7081a114: Merge "Add preferences rendering." into lmp-dev

* commit '7081a114d4ee190c746f337057b0f84928c162dd':
Add preferences rendering.
6ba2eb811ef54a128739299b4b510c7a9c19fb2b 29-Dec-2014 Deepanshu Gupta <deepanshu@google.com> Fix DatePicker rendering.

1. Return AccessibilityManager service from context.
2. Don't throw an exception if no style specifited in
obtainStyledAttributes. Specifying no style is valid and it's supposed
to use the default theme in that case.

Bug: http://b.android.com/82712 and http://b.android.com/79218
Change-Id: Iba7097f36996e4d6f1e9db778dc73294f2854c79
ridgeContext.java
de84301edebf36de5a32fac4b68ebd1316dc3f15 08-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Make Preference-cookie map non static.

Moved the map from Preference to View Cookie to BridgeContext. This
means the map need not be static anymore.

NO_SQ: Depends on unsubmitted changes.
Change-Id: I662513def17bd6ec3a2646c3bec9bf4f9f89fc15
ridgeContext.java
ef10b6c0edbc4b7f47e7202816c734672789f52c 06-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Fix default initial value for preferences

NO_SQ: Depends on unsubmitted changes.
Change-Id: I061cf71f6167d382e9ef060abeb4d5cff83c4104
ridgeContext.java
ridgeSharedPreferences.java
8a16d5d203a48e7b13761f329333b3dcb8f8210b 05-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Add preferences rendering.

NO_SQ: Depends on updating layoutlib-api-prebuilt.jar
Change-Id: Iae93ab74c478e6f2158e1528467bec9ee2d7ee9b
essionParamsFlags.java
33e6442c31f7181c5c0b303786d226b3fc539beb 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of fb30a783 to lmp-mr1-dev

Change-Id: I91fdb76c748b97376d6469c8d1198a15c4395463
addbc08685b34aa8e1f2ff016409e74391f9000f 03-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 7e55c292: Merge "Fix typos in previous bugfixes." into lmp-dev

* commit '7e55c29281f8a62154451e87b45d95ec5f97c5ac':
Fix typos in previous bugfixes.
399b135d6af2ba50ce6e79ba4f136cb6a2a4949a 21-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4104abf8: Merge "Fix setTextAppearance for styles with dots." into lmp-dev
automerge: ddc83df

* commit 'ddc83dfa8f17db1a8a566c8b92b0fea56dedd00a':
Fix setTextAppearance for styles with dots.
14f0ff86ba06a52374de27f94537f68723e5070e 18-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix typos in previous bugfixes.

The commits 2c9fbdd and 12b6d29 introduced minor bugs. This change fixes
them.
ridgeContext.java
4cbc79667dadffc6d854bfcb71e80ef5acca4345 20-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4104abf8: Merge "Fix setTextAppearance for styles with dots." into lmp-dev

* commit '4104abf875e16ad54c248ce602e573d2144732dd':
Fix setTextAppearance for styles with dots.
42db2e87e0bb2836cfd651e258a2b928fb60c823 19-Nov-2014 Dianne Hackborn <hackbod@google.com> Fix issue with call backs from media process.

All but a few lines of this is for issue #16013164, which allowed
apps to do some operations as the media uid by having it call
back to them to open a file. The problem here is with the tempory
identity stuff in the activity manager, allowing us to make the open
call as the original caller... ideally we should figure out a way
to just get rid of all of that, but the solution here is actually
easier (even though it doesn't look it) -- we now hand a token over
to the openFile() call that it can use when doing permission checks
to say "yes I would like the check to be against whoever is responsible
for the open". This allows us to do the uid remapping for only this
one specific set of permission checks, and nothing else.

Also fix issue #17487348: Isolated services can access system services
they shouldn't be able to. Don't send any system service IBinder objects
down for the first initialization of an isolated process.

Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
ridgeContentProvider.java
ridgeContext.java
f4e461864d29d243a5b04eebc52ee1845f581b9f 18-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix setTextAppearance for styles with dots.

Bug: http://b.android.com/78842
Change-Id: I65923134b2d3812030e2b7dd8ab96363b0647c1f
ridgeContext.java
ca07183d5c88273b8b3ec5dfa2d9504a6f3d045c 11-Nov-2014 Jeff Brown <jeffbrown@google.com> Merge "Move device admin max screen off timeout to internal interface." into lmp-mr1-dev
a5edfb8fbeb7241126d2583fe378fb6d27f6bbfe 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4c0f0e6c: Merge "Fix setting styles in custom views." into lmp-dev automerge: 5c22a79

* commit '4c0f0e6c852dd933bcfaf95380cca49a46fa3912':
Fix setting styles in custom views.
7335c57e36bfb64701b690071abfa15ee400f7ce 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix setting styles in custom views." into lmp-dev
automerge: 5c22a79

* commit '5c22a79baf81727b56a85a194d678c18449b5150':
Fix setting styles in custom views.
98bfcb1c681013fb91352bc5d44a17471c5ae95e 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix setting styles in custom views.

Bug: http://b.android.com/78842
Change-Id: I5d4571d94d96b00419acc258c9e2b519367b689d
ridgeContext.java
4591784a4b15eb27c33998f95ed2d1e7e26ab975 06-Nov-2014 Adrian Roos <roosa@google.com> Fix inset hinting when adding window

Windows with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS were
getting an incorrect content inset hint, because the
hinting didn't see the adjusted systemUiVisibility.

Also adds hinting for the stable insets.

Bug: 17508238
Change-Id: If9647277feb6811b15665b801accd896c51dbd12
ridgeWindowSession.java
14fbd9368687b3b510e4bfedbd535abc70e315c1 07-Nov-2014 Jeff Brown <jeffbrown@google.com> Move device admin max screen off timeout to internal interface.

The setting was previously exposed in IPowerManager but it
doesn't need to be there.

Bug: 17656076
Change-Id: If3ed0cbe89f67c60aa00376be0c54b1bd9656144
ridgePowerManager.java
e17b8c96bd2d62f08967605872d96292b437516e 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 0a2e42d4: Merge "Fix BridgeContext.get*ResourceValue()" into lmp-dev automerge: 9b64954

* commit '0a2e42d4afe9aa81cc41674102dfc999496db845':
Fix BridgeContext.get*ResourceValue()
1d2038563186574253b196bccb9684cec94cdf3b 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix BridgeContext.get*ResourceValue()" into lmp-dev
automerge: 9b64954

* commit '9b64954cb5b30b03abaae0b24132e1b1876f8af1':
Fix BridgeContext.get*ResourceValue()
ea80b6d77096e64e391c4b5cea4c344bba53a432 01-Nov-2014 Jeff Brown <jeffbrown@google.com> am e333e674: Add a function to boost screen brightness temporarily.

* commit 'e333e674a758c39885d4d9779a1aad387fb0e6aa':
Add a function to boost screen brightness temporarily.
92d016558d9ff6efd64adf8b8d68eb474b69dff9 28-Oct-2014 Jeff Brown <jeffbrown@google.com> Add a function to boost screen brightness temporarily.

When PowerManager.boostScreenBrightness() is called, the screen
brightness is set to maximum for 5 seconds. This action is
also considered to be user activity.

Bug: 17934954
Change-Id: I1cb4a03a60705c6c1c5cc9ff84b1c5dbd2932fcd
ridgePowerManager.java
fbc9eaa49f886599939a033253c908fa379bf332 30-Oct-2014 Craig Mautner <cmautner@google.com> Merge "Add enter-animation-done callback for system windows" into lmp-mr1-dev
e4d9caed6394f0db49112c18ad16c2617bb43c52 29-Oct-2014 Craig Mautner <cmautner@google.com> Add enter-animation-done callback for system windows

Existing hidden methods allow activities to be notified when their
windows have completed animating in. This change adds that capability
to system windows using a ViewTreeObserver callback since system
windows lack an activity token.

The first subsystem to use this is the UserSwitchingDialog which was
previously using a 250 msec timeout to dismiss the dialog. That
deadline was often missed leaving the user with no dialog on the
screen during the transition.

Fixes bug 16661752.

Change-Id: I70789e0d9c07112f275e76fb82850926305f290d
ridgeWindow.java
d972ff0acb8d3e6f8ce16db8cab5802799d65511 30-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Fix BridgeContext.get*ResourceValue()

getFrameworkResourceValue() and getProjectResourceValue() never really
returned the defValue passed to them, instead creating a new id for
non-existent resources. We now checks for the existence of the resources
before trying to obtain the id.

Change-Id: Ie3103ba32af6186651a5f77c27d1efc33dc2bcc7
ridgeContext.java
ca617d8a82e46474f597fe9a9b13bf0abc89f0ba 28-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Use right theme for drawable inflation.

The theme information was lost when inflating drawables. As a result,
drawables inflated in the ActionBar did not have the right tint.

Change-Id: I13d5c78039e35085ed4902289fcb735bb15d972e
ridgeContext.java
ed67aef7a05cb9156b7b8449171596231ed5f783 14-Sep-2014 John Spurlock <jspurlock@google.com> Saver: PowerManager call to set low power mode.

- Add an explicit power manager call to set the low power mode state,
instead of trying manage everything around a single setting.
- When low-power mode is triggered by falling below the configured
threshold, it does not update the setting.
- The "is-enabled" api returns setting || below configured trigger.
- Move the snooze management into the new api call.
- Callers (sysui + settings) updated to use the api instead of the
setting.
- Handles the case where the level does an unpowered leap out of the
low battery level. (Possible if powered in-between while the device
is off)

Bug:17460535
Change-Id: Ic030504c9cad9868a7137abbe837b170da37852b
ridgePowerManager.java
7262d72499ce3f7ec961cd7ec5d51ca7deb08527 10-Sep-2014 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I92eabc35168acfe58641917179be0d90a14f2f11
ridgeWindowSession.java
82fdeddf9204e855d32d9db9fa6860e9bc780003 06-Aug-2014 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: I96eec52472bec122074b0ec2ee051c1b55eaa8f4
ridgeContext.java
d7f0902af46a322c49e3eef74385e785691ec77c 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Replace more Locale methods.

This change replaces some methods of java.util.Locale. Some of them were
added in 1.7 and some are not present in the Desktop VM.

Change-Id: Ifdf8451bb2acf55e01dce8b5e15c40c8160107cc
ndroidLocale.java
60ff47578da3cd39fa5083a9427a860127f99546 18-Jul-2014 Deepanshu Gupta <deepanshu@google.com> am cdcebcef: Merge "Fix style resolution for styles with \'.\'" into lmp-preview-dev

* commit 'cdcebcefed9a9bbf6835025d722ae31da1a93c85':
Fix style resolution for styles with '.'
a750cc8961da48ceac2e58dacf9fc7107ff57333 16-Jul-2014 Jeff Sharkey <jsharkey@android.com> Add code cache directory for apps.

This provides a directory where apps can cache compiled or optimized
code generated at runtime. The platform will delete all files in
this location on both app and platform upgrade.

Bug: 16187224
Change-Id: I641b21d841c436247f35ff235317e3a4ba520441
ridgeContext.java
c9557c315c48f163bbdf964b0a7c18cb8796ce05 15-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Support Locale.toLanguageTag on Java 6

Change-Id: I255e79e2c288cd24b350b7c26128bbbb0b2cb9a3
ndroidLocale.java
b644ac367e0e16582b869f9ba5f3587720160851 15-Jul-2014 Christopher Tate <ctate@google.com> Fix build

BridgeContext didn't show up in the working tree as a build participant.
Tsk tsk.

Change-Id: I2b52d99f319b43c2906a7fb9b25139a3df5b3676
ridgeContext.java
bcd2f118230d4a6700767507a18f7fd983a7303c 11-Jul-2014 Yohei Yukawa <yukawa@google.com> Fix SDK build breakage

This should have been included in I3c6b69bd9d79b199afe68d838f25effa6

BUG: 15812658
BUG: 16118603
Change-Id: I298206008fc28faa4f6576a77d56251f873f233c
ridgeIInputMethodManager.java
ef2f7424f96bd08e59c099f464ece61aecea5370 10-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Fix style resolution for styles with '.'

Bug: b.android.com/72698
Change-Id: I96fb549cf5787d9e8cde2245524a8173471a60ca
ridgeContext.java
091ad06498d9fbc14603efd094a8bb8d9d82c2da 02-Jul-2014 Adrian Roos <roosa@google.com> Fix layoutlib breakage due to I681b711f6f40a94c25b7acd3a44eb3539486afab

Change-Id: I141f49718c4d538875a68c00101c098fdd7e967b
ridgeWindow.java
ridgeWindowSession.java
735d7ea6864fea7aec7ae5553f43bf54e55e65ed 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am cd4b38ea: Merge "Resource resolution bug fix." into lmp-preview-dev

* commit 'cd4b38ea1d3605e0e62e5ddc70c052e221fef73c':
Resource resolution bug fix.
262f12063d5a0e147026b8a96cd5f8a6460f5687 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Resource resolution bug fix.

Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.

Change-Id: I9a56974f526774fde79685f668f01021136d68f1
ridgeContext.java
d7777b89ba7dd92bb92246b0ec18e7605dd65454 13-Jun-2014 Ji-Hwan Lee <jihwan@google.com> LayoutLib: Fix broken sdk builds

Change-Id: I301b312195eb3e57cb581d015e7c0b0492084b3e
ridgeWindowSession.java
a9ba7c77261bf2d8c8238309febded356634b8d4 09-Jun-2014 Yohei Yukawa <yukawa@google.com> Merge "Introduce a sequence number to avoid redundant IPCs"
83e43e864f39e9e5e34326d900aa8675d808374b 06-Jun-2014 Yohei Yukawa <yukawa@google.com> Introduce a sequence number to avoid redundant IPCs

This CL introduces a sequence number to avoid redundant IPCs
between IMM and IMMS. The basic concept is that:
1. IMMS maintains a sequence number for #notifyUserAction.
2. IMMS increases the sequence number whenever the current
IME/subtype is changed.
3. IMMS notifies the new sequence number to IMM.
4. IMM maintains the last sent sequence number and the next
sequence number. IMM should call #notifyUserAction only
once per particular sequence number.
5. IMMS ignores #notifyUserAction if the specified sequence
number is not the expected one.

BUG: 7043015
Change-Id: I19ad8542659bc092b92ee13eb9f1d68ddd4b815a
ridgeIInputMethodManager.java
6eb967f36f0bc70a856ff58c08971d7932d2a3d7 06-Jun-2014 Amith Yamasani <yamasani@google.com> am 87590b53: Merge "Add missing abstract method override in BridgePowerManager." into lmp-preview-dev

* commit '87590b5342c5c4b1fb7b1c6037d64cffd1806025':
Add missing abstract method override in BridgePowerManager.
21aa130183d1653386b0435e755fbeac4f0c1766 06-Jun-2014 Amith Yamasani <yamasani@google.com> Add missing abstract method override in BridgePowerManager.

Change-Id: I28a24f33f8a598e487ec21861e918a39a8875d43
ridgePowerManager.java
2933bfb862c3ea27466d3ff43054ca5cdcd60f82 05-Jun-2014 Yohei Yukawa <yukawa@google.com> Trivial method renaming for notifyTextCommitted

This CL does not change existing behavior but only renames
notifyTextCommitted with notifyUserAction so that we can use
not only text commit but also other actions such as just typing
a character will be used as a trigger to update the IME
rotation order for better IME switching experience.

BUG: 7043015
Change-Id: I7f3e13a7226ef0dceee82b67e8a0d8536f7e9807
ridgeIInputMethodManager.java
03f13e70bdebcf919bdb526f5506a82ab1961c6d 31-May-2014 Jeff Sharkey <jsharkey@android.com> Per-app media directories on external storage.

This change defines per-app directories on external storage that
will be scanned and included in MediaStore. This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.

Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
ridgeContext.java
adc7104a6d78ffc047c7b3aad9207d323027c9df 21-May-2014 Jeff Brown <jeffbrown@google.com> am c2871696: am 6099fd21: Merge "Fix build." into klp-modular-dev

* commit 'c28716964c4525bf9a291404d7f14e74de23f36f':
Fix build.
ff50b9d2e2afeed5c492d11b10300f87d0e47a58 21-May-2014 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: I00f040ab16cf8a3b7a995b4626d49e70b97fb294
ridgePowerManager.java
c042cd514139dd9a41fa474d6cf347bebe9ae5f8 16-May-2014 Amith Yamasani <yamasani@google.com> Merge "Variant of sendBroadcast with appOp flag for cross-user."
01cbfeaf2a4ea859547cf9059a760cfa2cb69b59 16-May-2014 Amith Yamasani <yamasani@google.com> Variant of sendBroadcast with appOp flag for cross-user.

Needed for delivering SMS notifications to multiple users.

Change-Id: Ib772292699aba37144621742e6f0ee5c68aadd78
ridgeContext.java
babf20eeba53b56f4bee8f13719b003ea79e40cf 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
ridgeContext.java
bad51e55e21cd00d49bfe394c001bce260685cac 19-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add DisplayManager service to BridgeContext

ViewRoot now holds a reference to the DisplayManager. The change updates
the BridgeContext to provide the DisplayManager instance.

Change-Id: I4a5f00eda337939c72bad47b0ca6a7403454228d
ridgeContext.java
67a1c37cf5562ecf026cb3d1067fbb80cc5355e3 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 86384880: am f1e71876: Fix theme/style resolution in Layoutlib [DO NOT MERGE]

* commit '863848808d005fe1d2fd84a2982adfc02a3fbb9f':
Fix theme/style resolution in Layoutlib [DO NOT MERGE]
7d3fca29a86a6f805a6df79735d967a673984cf2 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 484c88c3: am 4ccc4bd5: Action bar rendering in layoutlib [DO NOT MERGE]

* commit '484c88c3655991759dc64276404d0cf7e33b455f':
Action bar rendering in layoutlib [DO NOT MERGE]
f9bdfe0fb4e2819902e19a9228f96ff7e0757a06 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib [DO NOT MERGE]

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit bfec73c2db5a34ced248213edf5519c80727a65f)

Conflicts:
core/java/android/content/res/Resources.java
tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
ridgeContext.java
85c5ae75ab4b9041bb143f146ef5fc4547686210 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib [DO NOT MERGE]

This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. ActionBarImpl - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 14bf0cef7eeed572a67c29a328581afac4decc20)
ridgeContext.java
c8f3197aa2fadf78f967b5bb9afab5060b896e7c 15-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Action bar rendering in layoutlib"
9acbd9efdc78d0698e1589413218d98a3ccf63a7 12-Apr-2014 Jeff Brown <jeffbrown@google.com> am eaa8a6b7: am a5c8d586: Fix build break due to layout lib.

* commit 'eaa8a6b7feb4a520f48654b087223ccaf49b6a2f':
Fix build break due to layout lib.
f83b4be4aab9ea19407708874718ad0e8b13c64b 12-Apr-2014 Jeff Brown <jeffbrown@google.com> Fix build break due to layout lib.

Change-Id: I87b40125adad0a799214f6ebf0dc04ec7903efbf
ridgeWindow.java
1e55471b7fd0db8b98b235fccabeeb41be197c1b 11-Apr-2014 Narayan Kamath <narayan@google.com> am 73e78c75: am af42a91c: Fix another build breakage.

* commit '73e78c75b770b3af0d48acac9c8565f7b4d035ff':
Fix another build breakage.
901ea03411bcd8c0fb7ae4a961ca21df4ed6a7d2 11-Apr-2014 Narayan Kamath <narayan@google.com> Fix another build breakage.

Caused by 037c33eae74bee2774897d969d48947f9abe254f, which
was submitted without a checkbuild.

Change-Id: I0d48f6b941cc98a30904cdfbd7bcb56ed509734e
ridgePowerManager.java
f49117b4bfcac616d6c97d14437f0d19bad5c453 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib

This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. WindowDecorActionBar - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
ridgeContext.java
e9329eb67bd5bad41dbc2dd32b713178b72614a6 08-Apr-2014 Ying Wang <wangying@google.com> Fix sdk build.

Change-Id: I3e620315e082b46ba5fcd4511b9c258bf610ddf5
ridgeIInputMethodManager.java
b6f70e97de7380b79a31cdb8bba82726344daaf5 08-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix theme/style resolution in Layoutlib"
2532aab7c118a56f01c9c3d6d0ddcbf85ed32099 05-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix sdk build

Change-Id: Ic08b57fdf2a653071a403bcc2c6b239a19363f72
ridgePowerManager.java
6a3ba682d669a115a3850bd323eb0892d56a85a7 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
ridgeContext.java
89a447ab321282ad1ec8fc4c2f61a964530f0b84 24-Mar-2014 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I1dd79e932a551bd537d2c71e8fca29a299c9312f
ridgePowerManager.java
aeaf2f9a16fa7b1617e94cc0baee3888dac1c55f 26-Feb-2014 Jeff Davidson <jpd@google.com> Fix SDK build broken by ag/423985

Change-Id: I85480683531468b7a8a83749d9366f5cc334bd24
ridgePowerManager.java
60b7c0219ab2618fae717fae75af5574cf11893f 06-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Manual merge of changes from frameworks/base/tools

Manually merge of following changes:
9cb5f5b5233f2331748d108d71f4b685762f32a7
1cf5df38f4bdafa1beb2674ca548ad6d9650766b
083e3caf66c21f7cc9511db479726c38d90e2d2f
81f74f4bc96ea4266cebe1b785d095558f540800
39e75835399f4d979cf82069dae2bd1ec496fb81
272d1bce798a5fef42cc2ee31f629d00c89f66eb
45f5cd49fa898a59484edfd8e291dbe10df82db2

Change-Id: Ie21ca480ac117e16e28eb554474835b762ccb104
iew/WindowManagerImpl.java
65afd98c21ca6f19ab58b892fdfe6ac27731a7da 21-Oct-2013 Satoshi Kataoka <satok@google.com> Update a test corresponding to I11ed9a767588f808

Change-Id: Ic802c075390f11fa4a5c14b8397a045b2dfec75c
ridgeIInputMethodManager.java
8aa9e7916cff9b522583fb206eb2eb5fb16b3de6 19-Oct-2013 Nick Kralevich <nnk@google.com> fix build.

In frameworks/base commit 1125235da15a5655e1fdf3b5f24df48dafccee90,
the IPowerManager interface was updated to add updateWakeLockUids,
but this file was not updated.

Fixed.

Change-Id: I8d5def02b7cadf5a154634bdff18cacb84b718f4
ridgePowerManager.java
f0debb29619be2b351095f36f7625815c7c88829 15-Oct-2013 Satoshi Kataoka <satok@google.com> Update tests corresponding to I0e920ee79c526c3ae

Bug: 11035379
Bug: 5137498

Change-Id: Ief2a151bd83b75bf5b07d53b190a61f341541a21
ridgeIInputMethodManager.java
60997c475bc4fd2fbeedc408e53ec1a4fff733fa 03-Oct-2013 Marco Nelissen <marcone@google.com> Update fake powermanager to new interface

Change-Id: I6f14498d7002b4720293a1c77f4fbb66869c36fb
ridgePowerManager.java
66692437bd9f73579facc4eae6c59334e1f273a9 12-Sep-2013 Kenny Root <kroot@google.com> Add new getOpPackageName for BridgeContext

Change-Id: Ib39b0bd2d1eb794ae4565e54251e4355fa139a14
ridgeContext.java
da99076b04dd6ea44bc76cff2e10a3b35ed46d70 09-Sep-2013 Narayan Kamath <narayan@google.com> Fix build, fallout from change 451f6b981a2cd

Change-Id: Id85d06221eccbda786721a05f3f6d9d94c1cbb74
ridgeContentProvider.java
363e1cfa527a887b8d70c4c085f4383b23754948 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix layout rendering for RTL locales

This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.
Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: Icbb57ee2ac7c6d8dfc34c2f04dce34d820b9b1ed
ridgeContext.java
ab775ecdd189b32e35b0d3f4a821502f88b03a4b 24-Jan-2014 Adam Lesinski <adamlesinski@google.com> Revert "Move frameworks/base/tools/ to frameworks/tools/"

This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
ridgeContentProvider.java
ridgeContentResolver.java
ridgeContext.java
ridgeIInputMethodManager.java
ridgeLayoutParamsMapAttributes.java
ridgePowerManager.java
ridgeWindow.java
ridgeWindowSession.java
ridgeXmlBlockParser.java
iew/WindowManagerImpl.java
31f8c619ef6ec64c1aed0c01e0883edc30092fdf 16-Oct-2013 Marco Nelissen <marcone@google.com> Add a method to set a list of uids for a wake lock

Cherrypicked from master.

b/9464621

Change-Id: Ia6a9d36d55129ae87d3ec070fbf10dc02f4b6cb4
ridgePowerManager.java
7a34919973238918240f575e35ae77fd0acce2d9 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib for KK

Fix a NPE, update the native methods for NinePatch and update an ICU
method to return the right value as required by DatePicker widget.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
iew/WindowManagerImpl.java
0015275edb67c6c5b247ade3ec0fff56d75b8764 03-Oct-2013 Marco Nelissen <marcone@google.com> Fix layoutlib build

Change-Id: Ica9f506ae06311d9bcd98bc11e64a8699d4f88cb
ridgePowerManager.java
5e26a616e0d98abb96e2e257be8f16874033ff79 11-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10688644: Java crash in com.android.phone:

java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids. This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName(). This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
ridgeContext.java
91a84ae5716731edd99fad15105bccc45d175ece 08-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ifeac5d09a654ee1183ae26519c8b44f560afd636
ridgeContentProvider.java
9eee97394c428c595712c533b791695bc54e9337 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> am 97c88368: am c78d173b: am 68411471: Merge "Fix layout rendering for RTL locales" into jb-mr2-dev

* commit '97c88368e0036665507c8cd84c71d26953784c85':
Fix layout rendering for RTL locales
510148f0699abceb44a3634a648a589cc84f6cbf 20-Jun-2013 Deepanshu Gupta <deepanshu@google.com> Fix layout rendering for RTL locales

This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.

Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: I1ed0d516ab64120a0abca413ba678036661508f8
ridgeContext.java
4505a9159c7d1c6704c4bd4a4aac967689201bf1 24-Aug-2013 Jeff Sharkey <jsharkey@android.com> Merge "Add CancellationSignal support to file operations." into klp-dev
713eb2d7189b672385c968fa21fb678b77a0018d 21-Aug-2013 Jeff Sharkey <jsharkey@android.com> Add CancellationSignal support to file operations.

Since ContentProvider file operations can end up doing substantial
network I/O before returning the file, allow clients to cancel their
file requests with CancellationSignal.

Ideally this would only be needed for openFile(), but ContentResolver
heavily relies on openAssetFile() and openTypedAssetFile() for common
cases.

Also improve documentation to mention reliable ParcelFileDescriptors
and encourage developers to move away from "rw" combination modes,
since they restrict provider flexibility. Mention more about places
where pipes or socket pairs could be returned.

Improve DocumentsContract documentation.

Bug: 10329944
Change-Id: I49b2825ea433eb051624c4da3b77612fe3ffc99c
ridgeContentProvider.java
709ff02b08e6de1f03d09c8808b7e62067ed0a32 23-Aug-2013 satok <satok@google.com> DO NOT MERGE. Fix test breakage

Change-Id: I0b2b7ce4b9f50910b4795cb480aa86a662b16f7d
ridgeIInputMethodManager.java
c875f350a72eef0d204c7e8c451f9131d53835a3 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> Bring along BridgeContext for the ride.

Change-Id: Ic11c0df447c82be3922d529f18a290cfdfec6b05
ridgeContext.java
f37b00f481dd14c9864c3c37854e3923708533e6 07-Aug-2013 Satoshi Kataoka <satok@google.com> Reduce the transaction fee of getEnabledInputMethodSubtypeList

Bug: 8467480
Change-Id: If18cce8fbe567df51f29adcdcedff3f743460b8b
ridgeIInputMethodManager.java
2fbaeb5fa11a5bc50d72ffa680462d01c418ea9c 24-Jun-2013 Craig Mautner <cmautner@google.com> Fix build.

Change-Id: Icdfc6bcbe8603cf9bd3f8982a595336c0407e7d6
ridgeContext.java
7beb916f26c2a3946d2ba3dc0ca14ea30b68007e 21-May-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I3dc503a3cd30276ac10582db44732d96b68230ee
ridgePowerManager.java
9264dae53e920b5fbf9584ac5273b52a13646ff3 05-Mar-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Iaa70b05a3cfd372518ec35aa8bcea2f9d78b8292
ridgeWindowSession.java
3449b2d26d855b7603a088596be19a5b963c277a 23-Feb-2013 Dianne Hackborn <hackbod@google.com> Formalize overscan metrics.

The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
ridgeWindow.java
ridgeWindowSession.java
b22a8da0e7eb4edfea41109aea3d37fa9d665d71 21-Feb-2013 Jim Miller <jaggies@google.com> Fix the build.

Change-Id: If53878937fe1ca01ad8db9f9d201d0f9aaaec81b
ridgeContext.java
b8ff2a8d4ed8ab43908e50bc62304ea254b2d449 06-Feb-2013 Dianne Hackborn <hackbod@google.com> App ops: add op for writing settings.

Also fix a build.

And fix a bug that I think was introduced in the multi-user work
that removed the permission check for writing to settings...!

Change-Id: I5945682faa789ffc78fd3546c0df7d03693f106d
ridgeContext.java
3e6beda3c1c25c29c45b1b7d2a23fcfc07229dd0 18-Jan-2013 Dianne Hackborn <hackbod@google.com> Rework ParceledListSlice to be much easier to use.

Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation. Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
ridgeContext.java
e7904f787f5202dadb106e29f7e11a2c56a6f2f0 15-Jan-2013 Dianne Hackborn <hackbod@google.com> More work on App Ops service.

Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log. This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service. The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls... all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
ridgeContentProvider.java
76f4c3e91d8579a580569c3d079da99511309727 15-Oct-2012 Xavier Ducrohet <xav@android.com> Fix SDK layout rendering in Eclipse.

Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
ridgeContext.java
ridgeWindowManager.java
iew/WindowManagerImpl.java
94ddfccf62d5edb0a1a07d19a110cf2fba967faa 07-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
8e7e9ea136fb16b1f46fea2336348e8b18162e50 05-Oct-2012 Craig Mautner <cmautner@google.com> Adds showWhenLocked attribute to Activities.

The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
ridgeWindowManager.java
7454b01d185ecf4c0bce831ea228530b793c32a1 04-Oct-2012 Jeff Brown <jeffbrown@google.com> Coordinate screen on with the window manager.

Bug: 7267457
Change-Id: Ic2c322253639e1f0b2e4e72a7b145025d0240f93
ridgeWindowManager.java
c0abe969a731651b4a9fcb5d16cbe2eaf44c0738 04-Oct-2012 Adam Cohen <adamcohen@google.com> Plumbing to allow keyguard to be shown with user switcher (issue 7175023)

-> Also reduced calls to lockNow, and moved this call in ActivityManagerService

Change-Id: I9ba34ca902f7c0f71fa4ec302104688ca8d11f55
ridgeWindowManager.java
2e346be6a94887633c5914f62ad45f6261014884 04-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7267494, issue #7212347

7267494 Calendar is not syncing
Check for whether a content provider is dead before returning
it. This is kind-of a band-aid, but probably the right thing
to do; I'm just not sure exactly the full details of why this
problem is happening. Hopefully this "fixes" it, though I don't
have a way to repro to tell.

7212347 System power off dialog is only visible to user 0
Make it visible. Also turn on some battery debugging stuff and
clean it up so we can just keep it.

Change-Id: I5add25bf2a763c8dfe1df23bc5c753a9ea5d157a
ridgePowerManager.java
1074210d3f65aeecb4800fbf5d905ad94f162604 01-Oct-2012 Jeff Brown <jeffbrown@google.com> New internal API to eliminate poke locks.

Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.

Added a new WindowManager.LayoutParams field userActivityTimeout.

Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
ridgePowerManager.java
27f3134094912daf415623e05cda5dab08b90f36 01-Oct-2012 Jeff Brown <jeffbrown@google.com> Remove clearUserActivityTimeout().

This function is not implemented and not needed.

Bug: 7165399
Change-Id: Ib1c50fabad6292ccf670404ba70aeb1242c4614d
ridgePowerManager.java
4a2cea1d158824bd0e6d545571c5666f9e1b016c 29-Sep-2012 Jeff Brown <jeffbrown@google.com> Get rid of preventScreenOn().

Bug: 7165399
Change-Id: I1968265ecd74fff4d85efd2ca03b1983425ea518
ridgePowerManager.java
5fbd5c910116f0ebe4af7b0ddf4fb38dbd4500c6 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Make DreamManagerService more robust.

Clearly isolated the DreamManagerService and DreamController
responsibilities. DreamManagerService contains just enough logic to
manage the global synchronous behaviors. All of the asynchronous
behaviors are in DreamController.

Added a new PowerManager function called nap() to request the device
to start napping. If it is a good time to nap, then the
PowerManagerService will call startDream() on the DreamManagerService
to start dreaming.

Fixed a possible multi-user issue by explicitly tracking for
which user a dream service is being started and stopping dreams
when the current user changes. The user id is also passed to
bindService() to ensure that the dream has the right environment.

Fix interactions with docks and the UI mode manager. It is
important that we always send the ACTION_DOCK_EVENT broadcast
to the system so that it can configure audio routing and the like.
When docked, the UI mode manager starts a dock app if there is
one, otherwise it starts a dream.

This change resolves issues with dreams started for reasons other
than a user activity timeout.

Bug: 7204211
Change-Id: I3193cc8190982c0836319176fa2e9c4dcad9c01f
ridgePowerManager.java
4a27c3cccad46a2450c3c441ab49d6eb930cafc3 21-Sep-2012 Jeff Sharkey <jsharkey@android.com> Allow acquiring ContentProviders across users.

Otherwise services like SystemUI will always open content://-style
Uris as USER_OWNER. Surfaces through createPackageContextAsUser()
which points all ContentResolver operations towards a given user.

Start using in RemoteViews, so that Notifications correctly resolve
image Uris to the sending user. Also add user support for "content"
shell tool.

Bug: 7202982
Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
ridgeContext.java
ce7cac0b4a07d18ff0ceb553b01182910aa2ccc6 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Animations for user switching.

The window manager now has a facility to provide a full-screen
animation, which the activity manager uses every time a user
switch happens.

The current animation is just a simple dumb slide until we get
a design from UX.

Also some cleanup: moved the portrait task animations to the
default config so we always have an animation for them, and finally
got the java symbol stuff out of public.xml.

Change-Id: I726f77422b2ef5f2d98f961f8da003e045f0ebe8
ridgeWindowManager.java
4ea309abf5bc985949d892d242c7b80df4d83aff 07-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build

Change-Id: I123b128f5d9e50653d8d4ed73ea07920b370b0fb
ridgeWindowManager.java
02220039b095feab2a53ec14e44627ba24cef135 06-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification - feature - framework.

This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
the area around the location of the triple tap. One can think of the
location of the triple tap as the center of the magnified viewport.
For example, a triple tap when not magnified would magnify the screen
and leave it in a magnified state. A triple tapping when magnified would
clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
viewport dragging mode until the finger goes up. One can think of this
mode as a way to move the magnified viewport since the area around the
moving finger will be magnified to fit the screen. For example, if the
screen was not magnified and the user triple taps and holds the screen
would magnify and the viewport will follow the user's finger. When the
finger goes up the screen will clear zoom out. If the same user interaction
is performed when the screen is magnified, the viewport movement will
be the same but when the finger goes up the screen will stay magnified.
In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
is enabled, i.e. the user triple tapped and holds, would adjust the
magnification scale which will become the current default magnification
scale. The next time the user magnifies the same magnification scale
would be used.

4. When in a permanent magnified state the user can use two or more fingers
to pan the viewport. Note that in this mode the content is panned as
opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
fingers to change the magnification scale which will become the current
default magnification scale. The next time the user magnifies the same
magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
state no other two finger gestures in touch exploration or applications
will work unless the uses zooms out to normal state where all gestures
works as expected. This is an intentional tradeoff to allow efficient
panning since in a permanently magnified state this would be the dominant
action to be performed.

Design:

1. The window manager exposes APIs for setting accessibility transformation
which is a scale and offsets for X and Y axis. The window manager queries
the window policy for which windows will not be magnified. For example,
the IME windows and the navigation bar are not magnified including windows
that are attached to them.

2. The accessibility features such a screen magnification and touch
exploration are now impemented as a sequence of transformations on the
event stream. The accessibility manager service may request each
of these features or both. The behavior of the features is not changed
based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
which is surrounded by a glow in a magnified state. Interactions outside
of the viewport are delegated directly to the application without
interpretation. For example, a triple tap on the letter 'a' of the IME
would type three letters instead of toggling magnified state. The viewport
is updated on screen rotation and on window transitions. For example,
when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
that does not take input focus, cannot be touched, is laid out in the
screen coordiates with width and height matching these of the screen.
When the magnified region changes the root view of the window draws the
hightlight but the size of the window does not change - unless a rotation
happens. All changes in the viewport size or showing or hiding it are
animated.

5. The viewport is encapsulated in a class that knows how to show,
hide, and resize the viewport - potentially animating that.
This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
keeps track of the current trnasformation to be applied to the screen
content and the desired such. If these two are not the same it is
responsibility of the magnification controller to reconcile them by
potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
rotations, and when a rectange on the screen has been reqeusted. This
class is responsible for handling interesting state changes such
as changing the viewport bounds on IME pop up or screen rotation,
panning the content to make a requested rectangle visible on the
screen, etc.

8. To implement viewport updates the window manger was updated with APIs
to watch for window transitions and when a rectangle has been requested
on the screen. These APIs are protected by a signature level permission.
Also a parcelable and poolable window info class has been added with
APIs for getting the window info given the window token. This enables
getting some useful information about a window. There APIs are also
signature protected.

bug:6795382

Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
ridgeWindowManager.java
ridgeWindowSession.java
bcb5ca6b276f0db8970a52f61927fbdead794566 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Add registering for explicit users.

New API to register as an explicit user, which allows you to
also select ALL to see broadcasts for all users.

New BroadcastReceiver API to find out which user the broadcast
was sent to.

Use this in app widget service to handle per-user package broadcasts
and boot completed broadcasts correctly.

Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
ridgeContext.java
6cbd324c4c440d6fb1fd939cfdffa838c7f85d55 24-Aug-2012 Jeff Brown <jeffbrown@google.com> Initial draft of high-level multi-display APIs.

This patch introduces the ability to create a Context that
is bound to a Display. The context gets its configuration and
metrics from that display and is able to provide a WindowManager
that is bound to the display.

To make it easier to use, we also add a new kind of Dialog
called a Presentation. Presentation takes care of setting
up the context as needed and watches for significant changes
in the display configuration. If the display is removed,
then the presentation simply dismisses itself.

Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
ridgeContext.java
f343dcc1dfca249d299133505641e5455abcff7d 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
ridgeContext.java
5c7fc89221478e19302935cffb2bc238289adb30 24-Aug-2012 Dianne Hackborn <hackbod@google.com> Keep track of whether an app is installed for each user.

This add a new per-user state for an app, indicating whether
it is installed for that user.

All system apps are always installed for all users (we still
use disable to "uninstall" them).

Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not
installed.

When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the
GET_UNINSTALLED_PACKAGES flag.

If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.

The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.

When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.

Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.

Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
ridgeContext.java
8fa292a63949592ef88fd3ea37923e9fb765cb2f 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
ridgeContext.java
f11b7ac3a0a270ff159474c40ff72304da8800ab 17-Aug-2012 Michael Jurka <mikejurka@google.com> Merge "Adding a thumbnail scale down animation" into jb-mr1-dev
81b31d0c30c7b0a4c26ff9c527147e0139427237 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
ridgeContext.java
4748ae1379fd6a70ae6a51ac51be5a56865248d5 13-Apr-2012 Michael Jurka <mikejurka@google.com> Adding a thumbnail scale down animation

Recents animation will temporarily look a bit
wrong, but a subsequent change will fix this.
ridgeWindowManager.java
d24d004303e703779a2ada2494494d76ae74767b 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Power manager rewrite.

The major goal of this rewrite is to make it easier to implement
power management policies correctly. According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed. Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off. At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state. Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once. Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components. For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed. For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready. An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants. Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger). This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep. This change
removes ambiguity around forcing or disabling user activity
for various purposes. To wake the device, use wakeUp().
To put it to sleep, use goToSleep(). Simple.

The power manager service interface and API has been significantly
simplified and consolidated. Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
in previous version of the power manager service pending
an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
for more compactly specifying auto-brightness levels
in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
KEEP_SCREEN_ON_FLAG wake lock instead of talking
directly to the battery stats service.
- Optionally support animating screen brightness when
turning on/off instead of playing electron beam animation
(config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
ridgeContext.java
ridgePowerManager.java
96892df33dec22266e99581c1ddd26662ca5d518 15-Aug-2012 Dianne Hackborn <hackbod@google.com> Add API to create new contexts with custom configurations.

This allows you to, say, make a Context whose configuration
is set to a different density than the actual density of the device.

The main API is Context.createConfigurationContext(). There is
also a new API on ContextThemeWrapper that allows you to apply
an override context before its resources are retrieved, which
addresses some feature requests from developers to be able to
customize the context their app is running in.

Change-Id: I88364986660088521e24b567e2fda22fb7042819
ridgeContext.java
1917791f73b6827602c86946a420363c0a658e36 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
ridgeContext.java
00ae5afb0b60859729caa5f572f852854792b1de 07-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Window position not reported if the window is not moved.

1.If a window is shown but never moved the window window
is never notified for its current location. Therefore,
accessibility nodes do not contain correct bounds in
screen coordinates.

bug:6926295

Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
ridgeWindow.java
3cca89d94243316bd689b8c45822892749a8edb1 04-Aug-2012 Craig Mautner <cmautner@google.com> Fix build with density methods.

Change-Id: I95c0a4f12db40f200a3a004394763beaef904232
ridgeWindowManager.java
0c50f6f83266e8f63ed15e2ffc057f7a2160652b 30-Jul-2012 Craig Mautner <cmautner@google.com> Introduce multiple displays with DisplayContent.

Fix a couple of bugs that turned up.
Remove touch/focus from display. Add iterators for access.
Respond to comments. Remove TODOs, and some deviceId parameters.

Change-Id: Idcdb4f1979aa7b14634d450fd0333d6eff26994d
ridgeWindowManager.java
6261861c6e421b53f195bcbd9f37cdd554d67cd3 27-Jul-2012 Craig Mautner <cmautner@google.com> Fix build.

Change-Id: I52bbebae38912a4fb71c96174b3d4d8eb6be10c1
ridgeWindowSession.java
8496093e5e8fc5926cc7f6c619f82a174672e36e 26-Jul-2012 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: Ife2fd58447205407e41ce3d27e28a705b744bede
ridgeWindowManager.java
9d077803f847b9bb8d76a9b75ff7aa522a5b5581 24-Jul-2012 Jeff Brown <jeffbrown@google.com> Add display manager skeleton.

The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices. Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
ridgeWindowManager.java
0de99017d3a2ff3b4c45bd08a3d7555a882b3880 16-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
ridgeWindowManager.java
c3b7c793b3637c1c19d749e58b3b246488c664ff 11-Jul-2012 Craig Mautner <cmautner@google.com> Add missing interface method.

Fix broken build.

Change-Id: I6644df218e11a35330a985bdcb9ace33723330f5
ridgeWindow.java
41fb2853aa6de48c3b657bd6be32797dfac2103b 10-Jul-2012 Xavier Ducrohet <xav@android.com> Replace LruCache implementation for layoutlib.

The android version depends on a custom version of LinkedHashMap
which is not present on desktop VMs. This new implementation is done
in a way that minimizes the difference between the two.

Also some minor fixes.

Change-Id: Ib27b0419f9d0e6ba4d4abb26b2ccd968af59eba8
ridgeContext.java
870ce22b4e0e511b9f2ea76d97284adfe32a8ea3 21-May-2012 Dianne Hackborn <hackbod@google.com> Use two fingers to work some magic...

Change-Id: Ibcb3dbd3d158c22da8277e544d81fb47eadccd49
ridgeWindowSession.java
76ae345c107178499412d92e274eec54d45e2884 04-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I41415fed99d98406bc033289428bde59475c2917
ridgeWindowManager.java
7f3e950214468b13c6568e9021d777aa328f3b2b 23-May-2012 Dianne Hackborn <hackbod@google.com> Fix (mostly) issue #5109947: Race condition between retrieving a...

...content provider and updating its oom adj

This introduces the concept of an "unstable" reference on a content
provider. When holding such a reference (and no normal stable ref),
the content provider dying will not cause the client process to be
killed.

This is used in ContentResolver.query(), .openAssetFileDescriptor(),
and .openTypedAssetFileDescriptor() to first access the provider
with an unstable reference, and if at the point of calling into the
provider we find it is dead then acquiring a new stable reference
and doing the operation again. Thus if the provider process dies
at any point until we get the result back, our own process will not
be killed and we can safely retry the operation.

Arguably there is still the potential for a race -- if somehow the
provider is killed way late by the OOM killer after the query or
open has returned -- but this should now be *extremely* unlikely.
We also continue to have the issue with the other calls, but these
are much less critical, and the same model can't be used there (we
wouldn't want to execute two insert operations for example).

The implementation of this required some significant changes to the
underlying plumbing of content providers, now keeping track of the
two different reference counts, and managing them appropriately. To
facilitate this, the activity manager now has a formal connection
object for a client reference on a content provider, which hands to
the application when opening the provider.

These changes have allowed a lot of the code to be cleaned up and
subtle issues closed. For example, when a process is crashing, we
now have a much better idea of the state of content provider clients
(olding a stable ref, unstable ref, or waiting for it to launch), so
that we can correctly handle each of these.

The client side code is also a fair amount cleaner, though in the
future there is more than should be done. In particular, the two
ProviderClientRecord and ProviderRefCount classes should be combined
into one, part of which is exposed to the ContentResolver internal
API as a reference on a content provider with methods for updating
reference counts and such. Some day we'll do that.

Change-Id: I87b10d1b67573ab899e09ca428f1b556fd669c8c
ridgeContentResolver.java
7c7faa9d24b75d9d0b37c67f44ddfee75aa6a45b 14-May-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I53263d509559c70100cd78ad49f225f0dafd8891
ridgeWindowSession.java
a1e484a8d87d23533a5c03db2e9f31571fd08081 13-May-2012 Dianne Hackborn <hackbod@google.com> Implement new window cropping.

The window manager now performs the crop internally, evaluating
it every animation from, to be able to update it along with
the surface position.

Change-Id: I960a2161b9defb6fba4840fa35aee4e411c39b32
ridgeWindow.java
b4b1878a86ddc56efcfabe2c04a6f3995187e644 10-May-2012 Michael Jurka <mikejurka@google.com> Merge "Making transition out of recents look better" into jb-dev
9241e472fafb4ab0c9e6ed85b84a166e1be79a84 03-May-2012 Michael Jurka <mikejurka@google.com> Making transition out of recents look better

- Fading out recents first, then scaling up app
thumbnail
- Fade Recents out over 130ms
- Delay the window animation for 200ms first,
then animate for 200ms (previously we didn't delay
and then animated for 300ms)

Bug: 6390075

Change-Id: Ia8c753bf7ee03d2acef6eb2772b28d88fe10a682
ridgeWindowManager.java
13231b3bc7a7668a54dda9fc5e9ee00e28d83375 10-May-2012 Dianne Hackborn <hackbod@google.com> Add infrastructure for accessing "unstable" content providers.

We have an API and some stuff that purports to this, but no real
implementation yet.

Change-Id: I93555440014a50fdf79fa3f65318d90fb82265b4
ridgeContentResolver.java
eee64fd8083686789ef9f53cf7ab243cc4ecf3ea 08-May-2012 Jeff Brown <jeffbrown@google.com> Move CancellationSignal to android.os package.

Bug: 6427830
Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
ridgeContentProvider.java
e038b4961b9b0924b283a0ebd6fa50751d081d1f 29-Apr-2012 Dianne Hackborn <hackbod@google.com> Add system insets to windows.

This will be used to determine which parts of a window a completely
hidden by system UI elements (status bar, nav bar, system bar) so
that they can be clipped out from rendering.

Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
ridgeWindow.java
ridgeWindowSession.java
818455202b1b4114ffcc1ef78f035ddd83d1e0ff 27-Apr-2012 Dianne Hackborn <hackbod@google.com> When a window is first shown only draw once while animating.

On some hardware allocating a new graphics buffer is quite
expensive, which blocks updates to the UI. This can cause
glitches when performing window animations.

To reduce these glitches, the view hierarchy will now only
allow itself to be drawn once if its window is being shown
while the window manager is animating, not resuming draws
until it is told that the animation is done.

Change-Id: Ie15192f6fddbd0931b022a72c76ddd55ca266d84
ridgeWindow.java
94d1393685a4090e613c8c99521a2f1adead1fb6 19-Apr-2012 Dianne Hackborn <hackbod@google.com> Add new API to find smallest/largest screen size.

Change-Id: I790801fceaf84ee2e3b1c9d32828285ad3231d0e
ridgeWindowManager.java
ada75d110218f0afd8a9e1215d22fbe84f4cfdf2 17-Apr-2012 Dianne Hackborn <hackbod@google.com> Add new scale-up window manager animation.

Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
ridgeWindowManager.java
21d8cf4dc1c707114337af2936b090432546b32d 06-Apr-2012 Jeff Brown <jeffbrown@google.com> Move some APIs from window manager to input manager.

Simplified input injection API down to just one call.

Removed all input state reading API. It was only used by the
window manager policy and required a permission that applications
could not obtain. READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
ridgeWindowManager.java
772b2249e9962e6da539328e5b7685f648c28fd9 04-Apr-2012 Dianne Hackborn <hackbod@google.com> Clean up status bar, system bar, navigation bar management.

The status bar and navigation bar are two completely separate
elements, with their own semantics. The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar). This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags. To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
ridgeWindowManager.java
de1697e7d7d18fec4dff54e926172bb380917c62 20-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new thumbnail animation.

Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
ridgeWindowManager.java
1df96c56a8553a6f009ab5ce4950421da480d2a3 16-Mar-2012 Xavier Ducrohet <xav@android.com> LayoutLib: Properly support attr ns when used in styles.

Change-Id: I885864588928589d7c9a34b94339917c5be47fa5
ridgeContext.java
3e65d540dfd87d3122bc6b067e29cb930c1e5b73 22-Feb-2012 Xavier Ducrohet <xav@android.com> Fix sdk layout rendering in JB.

Since JB, com.android.internal.R does not contain all the resources,
instead only the ones that are accessed through Java.
This means we need to dynamically generate IDs for resources that are
private and only accessed from other XML resources. This is done
through the DynamicIdMap class.

Also add a PolicyManager and a PowerManager since those are now
needed by ViewRootImpl?!?

Change-Id: If2ae8ad79502fa084d852664a44aefd46e01aec6
ridgeContext.java
ridgePowerManager.java
9b0a208182f2b194744acb255218fe1eaad73002 14-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new "options" argument to all startActivity APIs.

This will be used to allow new features to be requested... such as,
say, a special kind of animation. Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
ridgeContext.java
a69e7d0f92de5f1ffed77805bfed8d236dcd8626 08-Mar-2012 Romain Guy <romainguy@google.com> Dispatch screen state change events to Views
Bug #6120957

Using this new callback, views can interrupt and resume their
animations or other periodic tasks based on the current state
of the display.

Change-Id: I398f4abd421e9c5f207107bf1009a7b92cf45daa
ridgeWindow.java
5d6e3e5b5b62e580b1403dc105cd0a45be610303 08-Mar-2012 Romain Guy <romainguy@google.com> Fix the build

Change-Id: Ia86ba9b1c432ab3f8107557e95b12c9eedc4d9f7
ridgeWindow.java
417836959a3e120ad6e01c4991fda1c3ef65de72 27-Feb-2012 Xavier Ducrohet <xav@android.com> am 77fdcbff: am f038868d: am 44e63a21: Support rendering layout that use the new res-auto namespace.

* commit '77fdcbff8b458dd3430b38e60aee1a28ca92a738':
Support rendering layout that use the new res-auto namespace.
1f7846777b6fe07d4a35997c392054f55250f974 25-Feb-2012 Xavier Ducrohet <xav@android.com> Support rendering layout that use the new res-auto namespace.

Change-Id: I9b89c965dc8c9458e74c15ab8ff765e16e1b32c2
ridgeContext.java
41e3de73390eefc5d5c29cdf0da5a7116905db1f 25-Feb-2012 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 34706a4c to master

Change-Id: I4dd24f3b917aa7e3d2c4b0fae51e951dfcf88ba8
89cc49aacf4ba1b6782d732db4d5043048f828d4 25-Feb-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Id3262bff0df598ecc81a4346dee9febd3aaa60c9
ridgeIInputMethodManager.java
df1fab60285f35d9ddb2dc280dab78769b71f7ea 09-Feb-2012 satok <satok@google.com> Add an api to switch to the next IME and subtype

Bug: 5975302

Change-Id: I48aa4220159c65f456d61a324efcdf0a1ceec91c
ridgeIInputMethodManager.java
3a02af68863dda8a9293e3d7a0e401c04cd5e1c2 03-Feb-2012 Jeff Brown <jeffbrown@google.com> Merge "Rename CancellationSignal using preferred spelling."
c80d9c62290c623bf9168e05e162d0d48902df6e 03-Feb-2012 Jeff Brown <jeffbrown@google.com> Rename CancellationSignal using preferred spelling.

Bug: 5943637
Change-Id: I12a339f285f4db58e79acb5fd8ec2fc1acda5265
ridgeContentProvider.java
d98e133b3911b8db3430ce9d85efd5a6adcf70bf 03-Feb-2012 Xavier Ducrohet <xav@android.com> Make Layoutlib compile on Java 6.

Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
ridgeIInputMethodManager.java
ridgeLayoutParamsMapAttributes.java
ridgeWindow.java
ridgeWindowManager.java
ridgeWindowSession.java
ridgeXmlBlockParser.java
6e8a5304d4fd16f5ac3c77a0da20e7b29dc7ef34 26-Jan-2012 Jeff Brown <jeffbrown@google.com> Implement a cancelation mechanism for queries.

Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object. The application
creates a CancelationSignal object and passes it as an argument
to the query. The cancelation signal can then be used to cancel
the query while it is executing.

If the cancelation signal is raised before the query is executed,
then it is immediately terminated.

Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
ridgeContentProvider.java
cea4baa29c962359f44e330f3fbe3371497f434f 21-Jan-2012 Jim Miller <jaggies@google.com> am ab9601cd: am 230a7092: Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1

* commit 'ab9601cdbb95ae94088750eff9a926a572c1a4d6':
Fix 5863053: Add method to lock screen immediately.
23ebdae560eef870dc39d46db3bec4ddd9735c99 18-Jan-2012 Jim Miller <jaggies@google.com> Fix 5863053: Add method to lock screen immediately.

This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.

The change allows DPMS to directly invoke screen lock, bypasssing the screen state.

Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
ridgeWindowManager.java
6a566299e775014c4ceb07a92e348f34024af183 29-Nov-2011 Dianne Hackborn <hackbod@google.com> am 496f6e2a: am b54980d1: Merge "Fix issue #5588689: Black camera preview after coming back from gmail" into ics-mr1

* commit '496f6e2ad656c5bb8a277e191554d16abd290b58':
Fix issue #5588689: Black camera preview after coming back from gmail
29f2e3be67248488eb040ab6b4b1e090aef6a776 19-Nov-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5588689: Black camera preview after coming back from gmail

Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window. This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
ridgeWindowSession.java
db024241a1ef078d1299ccf719147065a1f18275 01-Nov-2011 Tor Norbye <tnorbye@google.com> Set theme-tag in render log when failing to find style

Change-Id: I20461a7113eb25469deca13dca870936bdb33a29
ridgeContext.java
0297f9abe00f72d3d220e64143fce79a5da47cef 19-Oct-2011 Daniel Sandler <dsandler@android.com> Add hasNavigationBar() to the window manager.

It is no longer sufficient to check the value of
internal.R.bool.config_showNavigationBar to determine if a
navigation bar (separate from the status bar) is shown on a
device, because the emulator needs to be able to override
this value (now possible by setting qemu.hw.mainkeys to "1"
or "0", for navbar or no navbar, respectively).

This logic is now contained in PhoneWindowManager, and any
clients wishing to know whether the system has a software
nav bar should consult the new hasNavigationBar() method.

Bug: 5404945
Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359
ridgeWindowManager.java
2e2a48dd5f6870cf4b82f0a1d73501943610ca0f 09-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix ownership of CursorWindows across processes.
Bug: 5332296

Ensure that there is always an owner for each CursorWindow
and that references to each window are acquired/released
appropriately at all times.

Added synchronization to CursorToBulkCursorAdaptor to
prevent the underlying Cursor and CursorWindow from being
remotely accessed in ways that might violate invariants,
resulting in leaks or other problems.

Ensured that CursorToBulkCursorAdaptor promptly releases
its references to the Cursor and CursorWindow when closed
so they don't stick around longer than they should, even
if the remote end hangs onto the IBulkCursor for some reason.

CursorWindow respects Parcelable.FLAG_WRITE_RETURN_VALUE
as an indication that one reference to the CursorWindow is
being released. Correspondingly, CursorToBulkCursorAdaptor
acquires a reference to the CursorWindow before returning
it to the caller. This change also prevents races from
resulting in the transfer of an invalid CursorWindow over
the wire.

Ensured that BulkCursorToCursorAdaptor promptly releases
its reference to the IBulkCursor when closed and throws
on attempts to access the cursor while closed.

Modified ContentProviderNative to handle both parts of
the wrapping and unwrapping of Cursors into IBulkCursors.
This makes it a lot easier to ensure that the right
things happen on both ends. Also, it turns out that
the only caller of IContentProvider.bulkQuery was
ContentProviderNative itself so there was no need
to support bulkQuery on ContentProviderProxy and it was
just getting in the way.

Implement CloseGuard on CursorWindow.

Change-Id: Ib3c8305d3cc62322f38a06698d404a2989bb6ef9
ridgeContentProvider.java
a0d518987c613edaece958cfd59bc640d0575c61 07-Oct-2011 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately"
659b0ff0c9bc29ddc4facbec081ed7c660d7e803 06-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately

This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
ridgeWindow.java
ridgeWindowSession.java
3ab687e0724b41af6607d4c7db02a6c75511793b 06-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: I7bb00b8ee0da952f3697b23dccf32dde55733b7a
ridgeWindowManager.java
03bb4bfbe2a72bd092bad80ea8bfe98f8bdd4eb6 01-Oct-2011 Xavier Ducrohet <xav@android.com> Layoutlib: add support for ITextServicesManager.

This include a fix in layoutlib_create to properly handle
delegating a static method of an inner class (was broken and
only worked on non static method).

Added a few comments here and there to *_Accessor classes so
that it's a bit more obvious what they are for and how they are
used.

Change-Id: Ifc31dd1a006393bb0c08e22b6a17f500dd62e090
ridgeContext.java
d4ef5aafecdc2ea74e3353813d71b87cab02043e 23-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5173952: Opening a Notification From Lock Screen...

...Should Skip Unsecure Lockscreen (ICS)

Also while I am in there, clean up logging of intent objects to include
even less sensitive information, while showing the true Intent in dump
output (since apps can't get to that).

Change-Id: I35fed714645b21e4304ba38a11ebb9c4c963538e
ridgeWindowManager.java
a761e209143dd464ee22d94cfd14f7f3ccdcafdc 21-Sep-2011 Jeff Brown <jeffbrown@google.com> Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager. Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out. For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes. The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise. We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened. We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
ridgeWindowManager.java
9a6a7270b6452ce6b71e58a192e8dfee0ac0e28c 19-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ife2b4b207270f8017d3acd80c76eaf1c7a50986d
ridgeWindowManager.java
8c180d62df2a5800236f25ee2f7d36f6a43fe528 02-Sep-2011 satok <satok@google.com> Make setAdditionalInputMethodSubtypes async

Bug: 5120261
Change-Id: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
ridgeIInputMethodManager.java
dc5860124e445ddffcc088c68d7d44e0da5c4162 19-Aug-2011 Dianne Hackborn <hackbod@google.com> Fix issue #4279860: previous UI flashes before showing lock screen...

...(when turning display on after recently turning it off)

Also clean up when we decide to turn the screen on to improve that
transition. There are still problems here with turning it on
before the wallpaper gets dispayed.

Change-Id: I2bc56c12e5ad75a1ce5a0546f43a845bf0823e66
ridgeWindowManager.java
994236e95e9809ec8c1d06a218f606f1af2083af 11-Aug-2011 Xavier Ducrohet <xav@android.com> Make some methods/fields package private so that layoutlib can access them.

Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
ridgeAssetManager.java
ridgeContext.java
ridgeInflater.java
ridgeWindow.java
ridgeWindowManager.java
ridgeXmlBlockParser.java
ridgeXmlPullAttributes.java
5347beff58f02841fb061bef5514fd2cdf15ab55 06-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5011824 - New Holo overflow menu for physical menu key devices

The new Holo-style overflow menu now appears from the edge of the screen
where the device's physical menu key can be found. The policy determining
this lives in getPreferredOptionsPanelGravity() in WindowManagerService.

Change-Id: I8851a2265547156591e82044e50b5cfc58d3eefa
ridgeWindowManager.java
7c0ad1b03679253affbd8177e3178e2e135e9910 30-Jul-2011 Xavier Ducrohet <xav@android.com> Misc layoutlib fix in preparation of the access change in framework code.

Change-Id: I873adb7345514be6daa5c4fea4ebabb515f203e2
ridgeContext.java
ridgeResources.java
ridgeTypedArray.java
e74f6aa33178f07a22b00edf74fb2dfec4071920 25-Jul-2011 Jeff Brown <jeffbrown@google.com> Report the external display size to the input reader.

The input reader needs this information so that it knows how to
interpolate touches on an external touch screen.

Changed Display so that it asks the WindowManager what the real
display size is (as opposed to the raw display size). This means
it now takes into the forced display size set by
adb shell am display-size.

Replaced all calls to getRealWidth() / getRealHeight() /
getRealMetrics() in the WindowManager and replaced them with direct
usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM
doesn't end up making a reentrant Binder call into itself.

Fixed the table status bar HeightReceiver so that it updates the
height on all configuration changes since it is possible that the
display size changed independently of an external HDMI display
being plugged / unplugged.

Improved the Display class documentation to make the distinctions
betweeen the various sizes clearer.

Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
ridgeWindowManager.java
0fb362cbd32fd4fc68a35ef79df50f2d65d823ca 20-Jul-2011 Xavier Ducrohet <xav@android.com> Layoutlib: misc fix + start of AndroidBidi support.

Change-Id: If2ce0b683da8cce01679322d503eed8dd474e521
ridgeIInputMethodManager.java
4ad3e7b3f590c8dbe484039e0baff89729ff2d35 18-Jul-2011 satok <satok@google.com> Enable IMEs to set additional subtypes in background

Bug: 4591792

Change-Id: I7e61a576c56d1a3a56001bdf2fd51ad3801add01
ridgeIInputMethodManager.java
84ac5b670b9320afd84c71ce42e1ac30bf5cbdf8 13-Jul-2011 Xavier Ducrohet <xav@android.com> am 9163a4a6: am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.

* commit '9163a4a686fc25fefc77d5b41c24a4538486a48e':
Merge 36a3a392 from mr1.
445aa602b947ab3b21dfa813a2b561993d51ac06 12-Jul-2011 Xavier Ducrohet <xav@android.com> LayoutLib: updated fake accessbility manager and ensure there's an InputMethodManager

We had replaced the accessibility Manager but it lacked some new API. Obvisouly
this is fragile and should be fixed, but this works for now.

After fixing this there was another issue with the lack of InputMethodManager.
To fix this I had to create an implementation of IInputMethodManager which
normally comes from a binder object.

I may want to do a similar trick with the accessibility manager later.

Change-Id: I28c6494e333f39072f348d0199124efac93256a5
ridgeIInputMethodManager.java
b90271578d01dc8a16a3da04c18180c98295c8b8 12-Jul-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Delegate for Display and IWindowManager implementation.

This allows ViewConfiguration to be properly implemented which is now
required for the rendering to happen.

Change-Id: I55629689fa8f5f874b43fcac2aa0789ce02d58f4
ridgeContext.java
ridgeWindowManager.java
7e9e2481177ef79c38f42137c1d419da734f99e4 08-Jul-2011 Xavier Ducrohet <xav@android.com> Merge 36a3a392 from mr1.

Protect against OOB index in BridgeTypedArray.

Change-Id: I40be1e039f9eb36c182b6522bd50d6ed98e15b5c
ridgeTypedArray.java
d7e9eda58981700df39f08ee8465de236eeed2d4 10-Jun-2011 Xavier Ducrohet <xav@android.com> Bring in more layout lib changes from hc-mr1.

fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser.

A lot of the init code was duplicated so I made a ParserFactory class.

Also created an extension of the KXmlPullParser to override toString().
This allows easier debugging when dealing with multiple parsers (which
is always the case).

Also added some (disabled) debugging printf to deal with parser stack
as it can be tricky figuring out which parsers are in the stack at
which point.

8969147c : Fix case where the int[] attrs doesn't directly match a styleable.

In the case of the FastScroller the int[] is a custom mix of attr
instead of a int[] that exists as R.styleable.foo.

This makes our reflection based mechanism used to find the styleable
fail, so instead we search for each attribute separately (like
we probably should have done from the beginning).

0c264b35: Fix various cases of getDimension to report error if unit is missing.

if getDimention###() is called for a string that has no unit,
then an error is output through LayoutLog, but the rendering keeps
going by using dp as a default.

0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt()

Only getInt() resolved attribute flags/enum and I'm not sure why
there's two to begin with.
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlBlockParser.java
e7b2e4ee8a1c86374b07d27534b18916f871585b 08-Jun-2011 Xavier Ducrohet <xav@android.com> Merge 06942bc4 from hc-mr1.

Layoutlib - use the new getParser callback when possible.

Change-Id: Idbb70f5391addd539afa5c2f5b55c70beefed223
ridgeContext.java
ridgeResources.java
0603c4a94b0b38fc9d1d5cc989cc296049fec91d 08-Jun-2011 Xavier Ducrohet <xav@android.com> Merge 988eeeb5 from hc-mr1.

Support for custom declare-styleable attr with enum/flag in layoutlib.

Change-Id: I10426a3f2c76bed207c03fab7885b4269337a70f
ridgeContext.java
ridgeResources.java
ridgeTypedArray.java
35cd9992e5e757d9b4f2829ef4b67b75c3ef74b5 04-Jun-2011 Xavier Ducrohet <xav@android.com> Import the Layoutlib from hc-mr1.

This is squash commit of all the missing patches.

Change-Id: Ie081c46a173290646deddbde503a720d50c4400f
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
7062c1ad9adcb216ac49100ca1044e9d89e8f8c1 29-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: implement data binding for most AdapterView

Change-Id: I27be96ed2c37573eb22cfbb391d96b6137b3df8c
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeXmlBlockParser.java
c69d69e8a305f0dc088df01491588a35829f2fb6 17-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: TypedArray.getDimensionPixelSize can actually return <0

Change-Id: I17853dc242e28f0c59916cad1b2a57beed480a57
ridgeTypedArray.java
4ab7d8c5e088d46feb3de17dfef5a50744d6a5e3 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix Capabilities and getDimensionPixelSize

Commented out a Capability that is not in ADT 10.

BridgeTypedArray.getDimensionPixelSize shouldn't call
getDimension since most of the code is duplicated, and
it prevents use from properly detecting malformed attribute
values.

Change-Id: I005b17061590dc0668729af16e896fad815f1973
ridgeTypedArray.java
22a225fd0aa023adc339389e4b7e6af9827cf088 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix dimension parsing to handle negative value.

Also make TypedArray.getDimensionPixelSize properly
handle negative values (which are not allowed).

Change-Id: I960fc1c9e8ad97852d4a14e4f0f71a2c2034b4e7
ridgeTypedArray.java
9277d8043c4d1745bd8878df309bafd31b3eb94f 03-Mar-2011 Dianne Hackborn <hackbod@google.com> Fix issue #3485923: Gmail crash

Allow application to try to recover if a surface OOM error
happens on the client side.

Change-Id: I0308bd99647a35e4bcac448340b7fc6330a828f6
ridgeWindowSession.java
e10dcb72f3ccfc23d3793d69fddf68b083ac4058 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove assert in resource resolution.

These code paths were valid in case there's a mismatch
between the style/theme/version of Android

Change-Id: I8cb3b2a3f3a1ef5c37ccec0c8ddbb7add69bfbe0
ridgeTypedArray.java
9bc9aff27068732ad7be5c4eeea4e47a842e0d6b 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: support defStyleRes in obtainStyledAttributes.

This fix the Spinner rendering.

Change-Id: I20a71d9e07f6c86652a74fba3fc05a027a057ff8
ridgeContext.java
13aad32e1c34d519bfdbc432ffae1c186a02d36f 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly handle @null references in more places.

Change-Id: I240298ab79c19ab0e49cb6da19d6b0187493d3b5
ridgeTypedArray.java
aefae10f27f3c63866fa205d8e1b090e9e41403a 14-Feb-2011 Xavier Ducrohet <xav@android.com> am 1858c95e: am 02d2b5a4: LayoutLib: When possible ensure parsers are popped from the stack.

* commit '1858c95e99f81ac46eea93288cb8866260b3d5d8':
LayoutLib: When possible ensure parsers are popped from the stack.
a732a0101ad07b28e828bbbc8fb81be0580d53b5 14-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: When possible ensure parsers are popped from the stack.

Some parser consumers (seems to be mostly resource inflation)
don't use the pull parser up to the END_DOCUMENT tag, making
the parser not pop itself from the parser stack automatically.

This is likely due to the XML resources being very shallow (1-2 levels
max), and the inflater just reading the content that it expects instead
of parsing till the document is done.

This ensures that *some* parsers are pop'ed from the stack when
used. Some other parsers we don't really control and hope the
user will parse till END_DOCUMENT.

Change-Id: Ie1f5762983fed2b2ae97b896218ae12b493e7ad9
ridgeTypedArray.java
ridgeXmlBlockParser.java
1eeaea0f020e05a208abbcfbbf99f3777e681bdb 10-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove some exceptions.

We need to move away from throwing anything and instead
log errors/warnings.

Change-Id: Ib1af71a90c06e8565fbd0c061ba56f4d19baa3df
ridgeTypedArray.java
9956b3d8a2053f1632c71d0c55da9f8fb231163f 07-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Handle color state list in methods returning an int.

Change-Id: Ia35ea09b992a239873026c7ef1629a01dd2e6cec
ridgeTypedArray.java
0fde9af6be75b32a401eafc8904426424e00e70c 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: split RenderSession's base method into RenderAction.

This will allow us to create RenderDrawable that extends RenderAction.

Change-Id: If9cd350453ceffae4859a925a7b436502b311f9c
ridgeContext.java
02316e55ed65eeffc0eeefeaa3b1cce58f789387 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Replace custom BitmapFactory by a simpler delegate

Change-Id: Ie61a0a5b4426e64bb71a22d76d05efa4c0865e5e
ridgeResources.java
799fe3b371c812a0e94872f896b54afa44e94868 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: render system/title/action bars.

Also a few generic fixes in the layoutlib itself to support
this.

Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
ridgeResources.java
ridgeTypedArray.java
a2378f55b81e7d29f451d7f65527de49417a3f0c 03-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix some rendering issues

Change-Id: I662a39a783de5bc7f3063f46cedaab11c7e6496e
ridgeContext.java
88aa1f36d93e9e214c3c64864a8c692d6a733892 02-Feb-2011 Xavier Ducrohet <xav@android.com> Make TimePicker/DatePicker/CalendarView render in Eclipse.

Change-Id: Id5313a6f0f53bf45f6eaabc0e10fcf0660eeac08
ridgeContext.java
947b979a91ac1cd556244d875d8b8d4fec8fd474 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update with Pair API.

Change-Id: Iba945153f7544872ea84e3311584223aea740e2e
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlPullAttributes.java
1b5ef2d19e1d7cb491c1c79f867e38ec0bde2770 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update with the new resource map APIs.

Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlPullAttributes.java
a6a38c02bfd3f6a678ac1671f5744b8e439e075a 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Properly compute available space to layouts.

Also display placeholders for status/title/action bars depending
on if the app is a tablet and its theme.

Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
ridgeContext.java
596608bc518705be0fab10c1fa77d21d4bd864b4 24-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use special view cookie for include-merge case.

All items directly under the <merge> tag now return the view cookie
of the referencing <include> tag using a special class for
easy differentiation in the calling client.

Change-Id: I7a2a4e642be9564f47e256fd1586012497d34792
ridgeInflater.java
0d09c27f46e13f7f4e955d0d3ba3c0e302f01356 24-Jan-2011 Joe Onorato <joeo@google.com> visibility ("lights out") API.

1. Views may setSystemUiVisibility() to recommend that
the system chrome (status bar or other UI) show or hide
itself. (This functionality was previously available only
via the FLAG_FULLSCREEN window flag for some SystemUI
implementations.)

2. Views may register a OnSystemUiVisibilityChangedListener
on a view, and find out when the system UI actually
appears or disappears, allowing apps to coordinate the
appearance of their own UI if desired.

Bug: 3241144
Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
ridgeWindow.java
0d8c2a8b1c307453a54211fdcebb68b564344fea 18-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly configure ApplicationInfo with targetSdkVersion.

Change-Id: I1bfef890206552843d1a7a8d0564741f2a37494f
ridgeContext.java
0d829bd739dfcb3374971c776676bf2e53bab43c 17-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update to use the new RenderResources API.

Change-Id: Ic64eff3f324c4519da89bab10e6d59f0a9341a04
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlPullAttributes.java
91cabff7867556a0aa4b24a712d090ee18e0863f 17-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: extract resource resolution into its own class." into honeycomb
7c076a9b32838ebfb8f353af54f9fce710a33cea 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Support non-rectangular input regions.

This enables the system bar to carve out a region through which
events will be sent to the IME behind it.

Bug: 3238092
Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
ridgeWindowSession.java
089143ffed72bb47fd8d870f29caffb646138781 16-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: extract resource resolution into its own class.

Next step is to make it a jar that will also live in
ADT.
The version in layoutlib will be through a prebuilt jar
file, like ninepatch.

Also add ninepatch.jar inside the layoutlib.jar file.

Change-Id: I4a0cc9f2dd99709de6408386054c6d4abae7c824
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlPullAttributes.java
f69bb29490b24ed4c31ad248e87bffbf923fd4da 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update logs to use new data bundle

Also change some resource.resolve tags to resource.format

Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
5577dad6bdc2af3551593d2bc82c919ef77c8f9c 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Misc fixes.

- Fix resource resolution for framework
resources of type "id" that are dynamically generated
through "@+id/..."

- Proper implementation of setBitmap on a canvas that
already has a bitmap. Transform/clip are kepts but the
existing layers are replaced with the new bitmap

- return a null service for INPUT_METHOD_SERVICE in
Context.getSystemService

Change-Id: I35e46fff50e6492a8995e95427d5f38bc945429d
ridgeContext.java
3f9b0376c69a5f679661d773ea7b59b1e6787090 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use the new log tag constants from LayoutLog

Change-Id: I29dd578ae16405358d3673caf13528be393f0967
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
f968eafd2d024bd476909f5f9163af72a060850e 13-Jan-2011 Xavier Ducrohet <xav@android.com> LAyoutLib: Fix build by adding missing IWindowSession implementation.

Change-Id: I0af178d149b782cac3ae0c36fa5fc03f4dc6118b
ridgeWindowSession.java
241fbc09c902462919967eeb3e4d5f772fc15337 13-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: move MockView back into its original package." into honeycomb
06c31fc125a9ba984244407d6716ef074a91ab49 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: move MockView back into its original package.

This is used by Eclipse when the custom view is not found.
It couldn't find the view in the new package either.

We should probably move this logic of creating a mock view
into the layout library instead.

Change-Id: Ifa1a717cddf7004a7719bb4d0798cd53b43273ea
ockView.java
a9e91fcea7053fefaa46d7079a5f11b5368835bd 13-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: use tags in logs." into honeycomb
ef78fd2b92ad4155d48b02d194ebc2925e9e579b 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: use tags in logs.

Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
8f408779da2e592acb4464e4a8b91f2d6062f524 11-Jan-2011 Christopher Tate <ctate@google.com> API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly"

There will be, in the future, a flag (View.DRAG_FLAG_GLOBAL) that means
for the drag to be cross-application. For now that flag constant is @hide
and furthermore the server-side implementation strips it, enforcing
local-only drags.

Change-Id: I8db840480ab90e18a5b8ecf29d62b4e6eafd405e
ridgeWindowSession.java
ba04f98df3199b22ef479cfcc4f7aad9aa3ad6bb 12-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Log error when style can't be found.

Change-Id: I9a88cdac44a2d31c053e7f0c92a14e69bd82ac83
ridgeContext.java
66fec89231b7cfa5223c0b5ff0d471d624e99e02 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Improve error reporting.

Change-Id: I37cad7e2efb959202960c57b271c55c759867139
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
551346323dace2bdb2509a7f5c9a0a200794b29c 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix some issue with resource resolution.

TypedArray.getResourceId() is not only about id/foo,
it can be any type of resources.

Change-Id: Ia5e147bc078bb349a3fa500a04c596ae44ea34ce
ridgeContext.java
ridgeResources.java
ridgeTypedArray.java
ffe7484b582c45c2820e437d7866d3a57d76193a 10-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: move asserts around.

Change-Id: I6fcfcf2e6fad1d9fa172b9a8c20c72fa2533e7fa
ridgeTypedArray.java
bc47dd48954e3543986f004ba2fefe2fb16a43e5 10-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: display warning when a resource reference fails to resolve.

Also fixed some warnings where a field hid one from a parent class.

Change-Id: I04ed19ebc49ae0bb0abdb0b25bc1c182fa0db440
ridgeContext.java
ridgeTypedArray.java
ecb67b629266bd616da571c1e391164a4f8c8e93 16-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Update layoutlib with revised API.

Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlBlockParser.java
ridgeXmlPullAttributes.java
ec235e65a843564c7fb0d01c82f73e426374c6b3 11-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: parsed resources were always set as platform res.

I broke this last week when adding the support for
layout params in moveChild.

Change-Id: Iaaf9b9f685ca301638d4037e98428ea0a00279c9
ridgeContext.java
ridgeTypedArray.java
6a5b91fceb1913cab6416bef99d7b28530d16ecf 10-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Adapt to new LayoutLib

API now uses ResourceValue instead of IResourceValue
Capabilities renamed Capability

Change-Id: Ia5d2b6c8d536e020a1f5496fb2285f67fc4346c4
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeXmlPullAttributes.java
3054fe698a6be732e24128541a1db867ec606a59 06-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Fix logging.

- Use the new logging API
- remove log object reference everywhere but in Bridge
- all logging code accesses Bridge.getLog()
- prepareScene sets the current scene log object in Bridge.

Change-Id: Ib0517ccd6454c4baf218b6baa978a126f91671e7
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ce63b05275ddd2acd9d2f39e9ab3cb3039f26677 03-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Create new layoutparams when moving a child

Change-Id: Ie2183490e8d26ef194030a9d87fe7745f24f1d83
ridgeContext.java
ridgeLayoutParamsMapAttributes.java
ridgeXmlBlockParser.java
ddea50d03cdda807bbaea54beffd7a341c51f770 24-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Animation support.

New locking mechanims to prevent concurrent renderings.

There's now a thread specific prepareThread() method (only
prepares the looper) and its associated cleanupThread().

For the rendering itself, acquire must be called before doing
any type of Android specific work on the scene (inflate or rendering)
After instantiation, init() must be called, which also acts as acquire.

Added a lot of checks to make sure method aren't called without
acquire or if scenes try to be rendered while acquire was called
from the same thread but on another scene.

Animation implementation:
- Handler delegate to use our own queue (since the animation runs
through handler messages). This uses a callback to process
the message. This callback is per-thread and only used in
animation threads.
- SystemClock delegate to provide clock implementation.
- AnimationThread to handle playing the animation and calling back
to the animation listener.

Change-Id: Ia39aba7ed476759df1da3200e413fe3e92590d15
ridgeResources.java
e4d978793ab8b4fdf88c7a6235d9ba17860c7bda 23-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: use default nine patch classes.

Move away from using our own implementation of NinePatchDrawable.
Now use native delegate for a few methods of NinePatch.

The byte[] used to describe the 9-patch chunk is entirely controlled
by the delegate. Therefore, while the default version (JNI) use the
array as a representation of a C struct, this version uses the array
as a serialized version of NinePatchChunk.

A cache mechanism using SoftReferences allows us to not deserialize
the array every time rendering needs to access the chunk itself.

The Bridge-level cache mechanism for bitmaps and nine-patches as
changed. Since the new nine-patches doesn't hold the bitmap
data anymore (it's stored in a normal Android bitmap which
is cached itself through the cache), then the nine-patch cache
has been changed to only contain the nine patch chunk.

Also initialize the canvas with the display metrics to prepare
for correct scaling when density of the assets don't match the target
density.

Still to come: actual density support in the 9-patch drawing code.

Change-Id: Ibefcccf4432e1986e8436e0c41a0107741593536
inePatchDrawable.java
f7c92077f0fa54a75dc03d788a344a8c8b5c6760 20-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support for editing embedded layouts.

When Resources.getLayout(int) is called to return a parser
for an embedded layout, this queries the current parser for
a custom parser (Eclipse will provide one on top of the current
XML model being edited)

Change-Id: Ia9e837358f67daed0a835e1b3f4f50c0516ceee9
ridgeContext.java
ridgeResources.java
ridgeXmlBlockParser.java
e0eb72cb01708e6691d96768198caca54b4521c1 19-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support viewkey in include nodes.

When an include tag is parsed, the custom bridge
code never has access to both parsers at the same
time.
The child parser is created out of an in (representing
the layout id), and the code inflating the content of
the include layout doesn't see the parent parser either.

This changeset adds a parser stack in the BridgeContext
in order to allow access to the parent parser when setting
the viewkey. This is only used if the current parser depth
is 1 (top node), as we only want to set the include
node to the top node of the included layout.

Change-Id: I2ac3b72a0c84a269d9019f44f98cbc0b615ab959
ridgeContext.java
ridgeInflater.java
ridgeXmlBlockParser.java
6e79b959850a5eabe4af39830f757c6c49aa5577 18-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support XML based ColorStateList.

This fixes the rendering of the TabHost in Eclipse.

Change-Id: I333c4d65b18df76871e24a04f0a888ae42ba40ef
ridgeResources.java
2d240967c9bc38cbf69967457b33f953f8826e96 12-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Fill the default prop value map for View objects.

Change-Id: I35426ced17a10eb092fac2153276f1202692876f
ridgeContext.java
7e3988879c2a3253e2f4151a8d787b2a8fe89ddd 11-Nov-2010 Xavier Ducrohet <xav@android.com> Misc fix in layoutlib bridge + View.isIneditMode as delegate.

Change-Id: Ideab29167e933203da99d4270cebcb777726201f
ridgeContext.java
ridgeTypedArray.java
ridgeWindow.java
3bd98986a97e4e1921616a0a86983307e68ceb6c 10-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: New bridge implementation using the new API 5.

Since the new API prepare for stateful layoutlib, major
reorganization of the code.

New "android" sub-package for all extended android classes.
Also moved BridgeInflater in here so that all extended classes
are in this package. Only delegates and classes replacing
renamed classes are in their original android.* packages.
Also created full file for the empty implementations of
IWindow and IWindowSession.
New "impl" for the dirty work implementation.
Main package contains the basic implementation of the API.

Most of the code that was in Bridge is now in .impl.LayoutSceneImpl,
with the main init/inflate/render code split into the contrustrutor,
inflate() and render().

Change-Id: Ie15b15e5a1b2388cd6ef82e518345b1fc02ec981
ridgeAssetManager.java
ridgeContentProvider.java
ridgeContentResolver.java
ridgeContext.java
ridgeInflater.java
ridgeResources.java
ridgeTypedArray.java
ridgeWindow.java
ridgeWindowSession.java
ridgeXmlBlockParser.java
ridgeXmlPullAttributes.java
ockView.java
inePatchDrawable.java