5386 Commits

Author SHA1 Message Date
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
TreeHugger Robot
227bdecf02 Merge "fallout of cleaning-up libutils includes" 2017-03-04 00:52:50 +00:00
TreeHugger Robot
ae3c244944 Merge "AAPT2: Fix Plural::Equals() method" 2017-03-04 00:50:51 +00:00
Adam Lesinski
136fd0764f AAPT2: Fix parsing ResTable_type
ResTable_type's size changes due to it containing
ResTable_config. Make sure we check for the minimum size
required to read it.

Bug: 35861796
Test: Manual (don't have an integration test harness setup yet)
Change-Id: Ifb0cd1d732625f59835c8ed0449adb78129636de
2017-03-03 14:01:09 -08:00
Mathias Agopian
df7707cb4f fallout of cleaning-up libutils includes
Test: run & compile
Bug: n/a
Change-Id: I0f6a0be03f4b120b1b5876aae0c0618c025d9f2b
2017-03-03 12:37:54 -08:00
TreeHugger Robot
dd13361f53 Merge "AAPT2: Fix escaping sequence processing in XML parsing" 2017-03-03 18:36:31 +00:00
Adam Lesinski
ac6edc501b AAPT2: Fix escaping sequence processing in XML parsing
Bug: 35483813
Test: make aapt2_tests
Change-Id: I68baba17ab3639c220b734a2a68d86aad0dedf8c
2017-03-02 19:32:32 -08:00
Adam Lesinski
8f7c550e20 AAPT2: Fix Plural::Equals() method
Test: make aapt2_tests
Bug: 35902437
Change-Id: I8797f89af58876f891f0b0c5cce85fd7781c4e24
2017-03-02 17:45:51 -08:00
Dianne Hackborn
594ea5f8b0 Merge "Implement issue #34842682: Add ability to limit permissions based on features" 2017-03-02 18:31:15 +00:00
Charlie Tsai
3f7408fcd9 Merge "Add the test function for rectangle shadow" 2017-03-02 16:51:56 +00:00
Diego Perez
a624099635 Merge "Add perf tests to Main" 2017-03-02 07:42:16 +00:00
David Christie
31a1655191 Create PackageManager.isInstantApp API to query whether
a given package name is an instant app.

Test: refactor existing codepaths retained

Change-Id: I6253fe8cc398d6547566d11043bffd1c4ffaa74a
2017-03-01 16:36:48 -08:00
Dianne Hackborn
cd154e9535 Implement issue #34842682: Add ability to limit permissions based on features
Two new attributes for <uses-permission>: android:requiredFeature and
android:requiredNotFeature.

Also update aapt to include this information in badging:

uses-permission: name='android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED' requiredNotFeature='android.software.cts.undefined'
uses-permission: name='android.content.cts.REQUIRED_MULTI_DENY' requiredFeature='android.software.cts.undefined' requiredNotFeature='android.software.cts'

Test: new PermissionFeatureTest suite.

Change-Id: Icc1f815a4675ae9dd2cb7f61730ab28b5c11228a
2017-03-01 12:40:57 -08:00
Charlie Tsai
79062f6fc3 Add the test function for rectangle shadow
Add an XML layout file which contains some buttons
with different elevations to test the shadow generation
algorithm.

Test: Added new rectangle shadow
Change-Id: Ifcb5a48200846c33d89f66c162521f2c8565c95d
2017-03-01 17:56:10 +00:00
Diego Perez
06a7ff3557 Add perf tests to Main
Test: N/A
Change-Id: I907ebdc28043e3ac92bae6b6a19451c2ca24423f
2017-03-01 16:06:59 +00:00
Diego Perez
9a7be3a3eb 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
2017-03-01 14:21:01 +00:00
Jerome Gaillard
434968aa2f Add stroke width property used by animated vector drawables
This is for example used in displaying a checked radio button.

Test: Modified widget render test to include a checked radio button
Change-Id: I43074ce038f69f28c0cf5fb396d393722b02b142
2017-02-27 14:44:46 +00:00
Eric Laurent
330ac1223a Merge "Load hyphenation patterns for Bulgarian and Church Slavonic"
am: 70bc4a8036

Change-Id: Iac325d28a09f4ddceb93ec85beba0eabfd393992
2017-02-24 19:45:28 +00:00
Roozbeh Pournader
e626fb53e2 Load hyphenation patterns for Bulgarian and Church Slavonic
Patterns for Bulgarian (bg) and Church Slavonic (cu) are now loaded
too.

Also make changes to fontchain_lint.py, so it knows the script for Bulgarian
and Church Slavonic is Cyrillic.

Test: make -j works and creates .hyb files for bg and cu
Change-Id: I0586f6c49380279ef88fe952b5cfd2d3594c5524
2017-02-24 11:23:48 -08:00
TreeHugger Robot
bdecfe1445 Merge "Load hyphenation patterns for Bulgarian and Church Slavonic" 2017-02-24 01:14:01 +00:00
TreeHugger Robot
b5a0ef8188 Merge "AAPT2: Few tweaks to get shared-libraries working" 2017-02-23 20:24:27 +00:00
Jerome Gaillard
88403817a2 Add autofill service to BridgeContext
Test: layoutlib tests
Change-Id: I52b360a64518165eefee4250b1c32e9f5f87845d
2017-02-23 15:15:49 +00:00
Roozbeh Pournader
033b2226ba Load hyphenation patterns for Bulgarian and Church Slavonic
Patterns for Bulgarian (bg) and Church Slavonic (cu) are now loaded
too.

Also make changes to fontchain_lint.py, so it knows the script for Bulgarian
and Church Slavonic is Cyrillic.

Test: make -j works and creates .hyb files for bg and cu
Change-Id: I0586f6c49380279ef88fe952b5cfd2d3594c5524
2017-02-22 23:39:24 -08:00
Adam Lesinski
b5dc4bd49a AAPT2: Few tweaks to get shared-libraries working
Test: manual (building shared support library demo)
Change-Id: I4730645aa92ba1893baf67ffe35fbd4aac0f8e46
2017-02-22 19:54:43 -08:00
Adam Lesinski
d48944a745 AAPT2: Rename strip phase to optimize
- Allow resource deduping, version collapsing, and sparse resource
  encoding.

Test: manual
Change-Id: Ia4aa892ab5b06ba1d5ea4a6efb51b00bc3a980c4
2017-02-22 11:41:55 -08:00
Adam Lesinski
ceb9b2f80f AAPT2: Shared library support
Test: make aapt2_tests
Change-Id: I98dddf1367e6c0ac425bb20be46e6ff05f4f2f45
2017-02-22 11:16:13 -08:00
Diego Perez
5780637259 Merge "Set MockView.setGravity to public" 2017-02-21 15:20:20 +00:00
Diego Perez
c98c16ded8 Merge "Add support for aapt:attr attributes" 2017-02-21 12:55:14 +00:00
Diego Perez
67ac03043c Set MockView.setGravity to public
The method is used from Studio so it needs to be public.

Test: N/A
Change-Id: I603de9ae0c8b719f5173eff152cc2558f734017e
2017-02-21 10:41:18 +00:00
Diego Perez
bc9d2a13f0 Add support for aapt:attr attributes
Test: Tested from the studio side
Change-Id: Id506801f53cfc976c7352bd7f9632804862668b7
2017-02-21 09:34:49 +00:00
Diego Perez
8f52705b48 Merge "Fix BridgeContext.resolveThemeAttribute color parsing" 2017-02-21 09:30:05 +00:00
Jerome Gaillard
b01d3db742 Merge "Update FontFamily_Delegate following Change I1d6e1c4c" 2017-02-20 11:35:57 +00:00
Diego Perez
3d3e69ce6d 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
2017-02-20 11:08:26 +00:00
Aurimas Liutikas
75e7d1d73e Removes an already defined warning in aapt.
Apps that expect to use the current SDK don't specify anything in their
manifest and the build system rightfully injects the current SDK.

Any apps that specify their own <uses-sdk> or versionCode are telling
the build system that they are purposely using some other minSdkVersion,
etc (support library demos).

Test: None
Change-Id: I0aba3a71e15703c7bcafcf4d35608a1851dd8567
Fixes: 34901699
2017-02-17 18:44:28 -08:00
Adam Lesinski
edb88a2b94 Merge "Add ResTable_sparseTypeEntry support" 2017-02-18 00:39:18 +00:00
TreeHugger Robot
96b9832163 Merge "API for accessing preloaded files cache" 2017-02-17 21:09:28 +00:00
Fyodor Kupolov
61221290f5 API for accessing preloaded files cache
Added @SystemAPI method Context.getPreloadsFileCache.

Bug: 31008665
Test: manual
Change-Id: Id61ab5e1b78d8bfbd40f61985406a8de4082b30f
2017-02-17 10:40:54 -08:00
Jerome Gaillard
1db0d3cd04 Update FontFamily_Delegate following Change I1d6e1c4c
Test: layoutlib tests
Change-Id: I3fda9b0eaf36d74c8a64f2a5c7aeb063b4df8d1a
2017-02-17 15:46:05 +00:00
Andrii Kulian
b047b8bd7e 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
2017-02-16 17:33:59 -08:00
Diego Perez
b9014f356a Merge "Add BridgeXmlPullAttributesTest to the Main suite" 2017-02-16 17:47:10 +00:00
Jerome Gaillard
65febdd300 Merge "Fix LayoutlibTestCallback.getResourceId" 2017-02-16 13:31:38 +00:00