5324 Commits

Author SHA1 Message Date
Guang Zhu
8c2df71739 Revert "AAPT: Version <adaptive-icon> to v26"
Bug: 36462965
Bug: 35908647

This reverts commit c7614e5d1e8f9139cccf6ab9b78dda16b98f7656.

Change-Id: I25279e7c53823dad0703c7e2ea8ff91bdbc1a0f2
2017-03-21 03:53:43 +00:00
Adam Lesinski
03b0a277e8 Merge "AAPT: Version <adaptive-icon> to v26" 2017-03-21 00:15:31 +00:00
Adam Lesinski
06460ef0d7 AAPT2: Fix up file IO
This also enables an AAPT behavior that CTS tests have
come to depend on.

Small files that compress negatively (get larger) are stored
uncompressed. Some CTS tests assume this and try to open these
files by mmapping them, which is only possible if they are
uncompressed.

Bug: 35461578
Test: make aapt2_tests
Change-Id: Id622a6150fe72477ad65d67d1bad897a8ee2ffb9
2017-03-20 16:53:46 -07:00
Adam Lesinski
ed69ce84bd libandroidfw: Fix mass logspam of ResourceTypes warnings
An overlay was incorrectly leaking its own resources into the
framework resource package, which caused warnings for every app
that tried to access framework resources (all of them).

This change skips including any resources that are not overlaying
anything (not present in IDMAP).

Bug: 36256974
Test: make libandroidfw_tests
Change-Id: I8c710af6849bb848938825aacca02799ee96c003
2017-03-20 14:51:13 -07:00
Roozbeh Pournader
6099e75df2 Merge "Read emoji addtions from data file" 2017-03-20 02:59:25 +00:00
Charlie Tsai
3ccd67dc9c Merge "Replace rectangle shadow algorithm" 2017-03-19 01:18:39 +00:00
Charlie Tsai
e18bf49be6 Replace rectangle shadow algorithm
Test: Rectangle Shadow test
Change-Id: Id9635df8769e85d835dc6f99201b86e5bba110d2
2017-03-18 21:34:00 +00:00
Roozbeh Pournader
1800ba4ffe Read emoji addtions from data file
We now read the emoji additions from a data file, instead of keeping
them in code.

Test: updated lint script passes.
Change-Id: Ica1ca10eaba0ca2b4a178d08354e31729cb88ce5
2017-03-17 18:28:16 -07:00
Adam Lesinski
10eb1455b9 Merge changes from topic 'configForSplit'
* changes:
  libandroidfw: Search all packages for an identifier
  AAPT2: Finish support for feature splits
  Add support for configForSplit
2017-03-17 23:19:13 +00:00
TreeHugger Robot
935cd789f2 Merge "Update fontchain_lint.py to read Emoji 5.0 data" 2017-03-17 22:49:22 +00:00
Diego Perez
37ecda0eba Merge "Fix BitmapShader to work with adaptive icons" 2017-03-17 18:01:30 +00:00
Jerome Gaillard
3ce947f482 Merge "Update ColorFilter_Delegate following Change I5f74addd" 2017-03-17 16:29:36 +00:00
Andrii Kulian
c1b59ed73e Merge "Separate global and override config sent to client" 2017-03-17 15:39:37 +00:00
Diego Perez
f4291b03cc Fix BitmapShader to work with adaptive icons
Test: Existing test should pass
Change-Id: Ie4c78eab4dfacf1eb6060d71edb98b836c4eff78
2017-03-17 15:09:00 +00:00
Jerome Gaillard
5aa62827ca Update ColorFilter_Delegate following Change I5f74addd
Test: layoutlib tests
Change-Id: Ifb18946edb0c40e0120868e211c99a304801e740
2017-03-17 12:15:36 +00:00
Andrii Kulian
446079600e 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
2017-03-16 19:13:02 -07:00
Roozbeh Pournader
fabeed6910 Update fontchain_lint.py to read Emoji 5.0 data
This corresponds to an update in emoji-zwj-sequences.txt in
I956ba139737bd79f5e31324ed77df9182342df4e.

Test: The updated script passes with the update data file.
Bug: 30999328
Change-Id: I989dee6e571645daa324ae3eb667e3a92a31511f
2017-03-16 18:00:48 -07:00
Adam Lesinski
c7614e5d1e AAPT: Version <adaptive-icon> to v26
Bug: 35908647
Change-Id: I307fb2f666cb8519adb9a7f676b87706dc6c683f
Test: manual
2017-03-16 16:54:23 -07:00
Adam Lesinski
b0c47ef877 AAPT2: Finish support for feature splits
- Prefix the config split name generated from a feature split with the
  name of the feature split.
- Add the 'configForSplit' attribute to the <manifest> tag of a config
  split and give it the same name as the feature split it was generated
  from.
- Look for the featureSplit attribute in <manifest> and automatically
  convert it to 'split' and inject 'android:isFeatureSplit="true"'.

  Feature splits should be written like so:

  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="com.foo.example"
            featureSplit="feature_b">

        <uses-split android:name="feature_a" />

        ...
  </manifest>

Bug: 34703094
Test: manual
Change-Id: I01b5c4a9aa03a2d25ef1e87bc7874b57c9deede9
2017-03-16 15:45:16 -07:00
Jerome Gaillard
95f36e23c3 Update layoutlib following Changes I2500bd4c and If456266f
Test: layoutlib tests
Change-Id: Idd3993bdc4010fa80a8c78ad80998bc7586322a5
2017-03-16 12:42:37 +00:00
Rob Carr
287452cf40 Merge "Delete some SurfaceView support code." 2017-03-16 05:07:10 +00:00
Robert Carr
d0a2cd3061 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
2017-03-15 14:40:20 -07:00
TreeHugger Robot
5fff20cac1 Merge "Clean up public FontConfig APIs" 2017-03-15 18:52:04 +00:00
Seigo Nonaka
ac873c9f25 Clean up public FontConfig APIs
This CL contains following clean up:

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

Test: ran android.content.res.FontResourcesParserTest

Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
2017-03-15 10:16:55 -07:00
TreeHugger Robot
be4cf58436 Merge "Add API to mark apps that have an update available" 2017-03-15 17:04:22 +00:00
Todd Kennedy
ab53289c59 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
2017-03-15 07:31:09 -07:00
Diego Perez
f33a037907 Merge "Workaround for broken BitmapShader in AdaptiveIconDrawable" 2017-03-15 12:43:24 +00:00
Adam Lesinski
22b0d5dc6b Merge "AAPT2: Add -A (assets) support" 2017-03-15 02:30:37 +00:00
Adam Lesinski
b39ad7c9f6 AAPT2: Add -A (assets) support
Looks like the build system doesn't support assets/ for
resources, so we will re-introduce them in aapt2, even though
we're just copying them around and they would be better
suited for inclusion in the APK when classes.dex gets inserted.

Bug: 35461578
Test: CTS test android.content.res.cts.AssetManager#testAssetOperations should pass
Change-Id: I18361d7367d476806bcf7154ee76df3f0e83b565
2017-03-14 12:26:28 -07:00
Diego Perez
e49ba39172 Workaround for broken BitmapShader in AdaptiveIconDrawable
This removes the need of using BitmapShader while we debug the problem
in layoutlib.

Bug: 36204957
Test: Added new test for adaptive icons
Change-Id: I4ff9968b996a1563be8caa0873e7aec8fb5cb151
2017-03-14 14:45:36 +00:00
TreeHugger Robot
376c6471da Merge "Associate rotation watchers with displays" 2017-03-14 08:30:05 +00:00
Andrii Kulian
35fa3c26ad Associate rotation watchers with displays
Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.

Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
2017-03-13 18:27:24 -07:00
Eugene Susla
ef4351cc72 Dont dispatch a11y events that have no subscribers
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no
subscribers to a given event

Test: steps:
  - Enable A11yManager.DEBUG
  - Navigate through a few random activities
  - In logcat, ensure log messages are present, notifying that certain events
  won't be dispatched
Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227
2017-03-13 17:51:04 -07:00
Andrii Kulian
ca6d48f337 Merge "Move rotation tracking to DisplayContent" 2017-03-13 22:09:34 +00:00
Chad Brubaker
ebf3a0d57f Merge changes from topic 'receiver_IA'
* changes:
  Enforce visibleToInstantApps for receivers
  Only send exposed broadcasts to Instant Apps
2017-03-13 20:52:18 +00:00
Adam Lesinski
2d6fa033e1 AAPT: Process XML in mipmap directory
Mipmap directories should be treated like drawables.
They are just a convention that prevents them from
being split or stripped for multi-apk.

Bug: 36068314
Test: manual
Change-Id: I93ab3871c7d9d403b77989bcc88304e9939866c4
2017-03-10 18:43:56 -08:00
Andrii Kulian
8ee7285128 Move rotation tracking to DisplayContent
This CL moves rotation tracking from WindowManagerService to
DisplayContent. This way displays can be rotated independently and
rotation of the main display won't affect rotation of secondary
ones.

Bug: 34242678
Test: android.server.cts.ActivityManagerDisplayTests
Test: testRotationNotAffectingSecondaryScreen
Change-Id: Ic46aaa523482b31ff5ec77f0c2908ceda1156fc0
2017-03-10 18:34:18 -08:00
Jerome Gaillard
afac7771f4 Update Shader delegates following Change Ib5d33a80
Test: layoutlib tests
Change-Id: If0db59dd2400ced9019bb999c014d7d655021fd3
2017-03-10 14:03:05 +00:00
Felipe Leme
640f30a776 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
2017-03-09 08:14:49 -08:00
Tenghui Zhu
fd7e897193 Merge "Disable versioning for pathInterpolator when no-version-vectors is on." 2017-03-08 21:42:49 +00:00
Lei Yu
30d69eaf86 Merge "Add BatterySaverPolicy for power save mode" 2017-03-08 20:02:46 +00:00
jackqdyulei
455e90add2 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
2017-03-08 09:20:36 -08:00
Jerome Gaillard
80447d42f0 Ignore native color spaces following Change I0164a18f
Test: layoutlib tests
Change-Id: I2fc2f13621524142d00fb86c45e75ecdb250479a
2017-03-08 14:15:51 +00:00
ztenghui
010df88f90 Disable versioning for pathInterpolator when no-version-vectors is on.
Test: manually build demo app for support lib, and works!
bug:33527757

Change-Id: I3badea18b2eb8cddea94f7e44f9129bb55ed9649
2017-03-07 16:12:07 -08:00
Chad Brubaker
816c83bf03 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
2017-03-07 15:28:03 -08:00
TreeHugger Robot
6213e82f0c Merge "AAPT2: Add --package-id flag for feature-split suppport" 2017-03-07 20:42:30 +00:00
Adam Lesinski
f34b6f4f2b AAPT2: Add --package-id flag for feature-split suppport
Bug: 35928935
Change-Id: Ia8496505e61cfcfdb8f9f62366d2f36e453db111
Test: make aapt2_tests
2017-03-07 11:06:16 -08:00
Jerome Gaillard
013edba605 Update layoutlib following Change Ia12d448a
Test: layoutlib tests
Change-Id: I66632bcef3a05d3d89e7fc6a37f099100feed0ad
2017-03-07 12:34:37 +00:00
TreeHugger Robot
df2870df9a Merge "AAPT2: Fix parsing ResTable_type" 2017-03-06 20:01:17 +00:00
Charlie Tsai
dea48d61df Implement drawPoint and drawPoints of BaseCanvas_Delegate
Test: Layoutlib tests
Change-Id: Ic6d81b9581db9dab4ecbacb8f08ab41e0077bab0
2017-03-06 11:39:22 +00:00