Commit Graph

4010 Commits

Author SHA1 Message Date
TreeHugger Robot
ef8297e275 Merge "Send broadcast when user restrictions change." 2017-03-17 20:48:36 +00:00
Jeff Sharkey
f5299f1b88 Disable large-ish parcel logging.
This logging was originally added to track down very large log
messages that were causing Binder transactions to fail.  We fixed
a handful of bugs that could have been causing this over in 32575987,
so this logging should no longer be needed in live builds.  (In fact,
this logging is being triggered often enough to push other important
debugging information out of logs.)

Test: builds, boots
Bug: 36372780
Change-Id: I640192fbec35693673a2f22b7a82ce54f27937da
2017-03-17 10:25:10 -06:00
Makoto Onuki
e72f81b64d Send broadcast when user restrictions change.
- Send UserManager.ACTION_USER_RESTRICTIONS_CHANGED, which is a runtime receiver
only broadcast.

Bug 36355208

Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_deviceOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_primaryProfileOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_secondaryProfileOwnerOnly'
Change-Id: Ifd82e39ce2c08ed5accdf017f4a1ea3af6face63
2017-03-16 15:51:11 -07:00
Martijn Coenen
d45b626e2b Merge "Add HwParcel::releaseParcel()" am: 210b9afe64 am: cea6624ffa
am: 388af9c9db

Change-Id: Idadca897d444807dbb037eee33d8485717ceaae3
2017-03-16 19:53:49 +00:00
Martijn Coenen
cea6624ffa Merge "Add HwParcel::releaseParcel()"
am: 210b9afe64

Change-Id: If08cb12187e9694144d5c07d9f6fcd67142b8af9
2017-03-16 19:42:45 +00:00
Martijn Coenen
210b9afe64 Merge "Add HwParcel::releaseParcel()" 2017-03-16 19:35:58 +00:00
Martijn Coenen
3d726d16b6 Add HwParcel::releaseParcel()
To be able to free native Parcel objects as soon
as a transaction is done.

Test: hidl_test_java
Bug: 36088202
Change-Id: I50b3eb7e9fe06958c64575923730d3467e73b9a5
2017-03-16 17:58:22 +00:00
Elliott Hughes
ec50f7031c Merge "Restore SystemProperties.PROP_NAME_MAX to keep Kindle running." am: ef9c425416 am: 40c4210f8f
am: 5c8e3edf48

Change-Id: I4fbdbbb12b7854fcca22de2790c14d315ef44c53
2017-03-16 05:50:23 +00:00
Elliott Hughes
40c4210f8f Merge "Restore SystemProperties.PROP_NAME_MAX to keep Kindle running."
am: ef9c425416

Change-Id: I0ea94267a6d6cfa137e77edde288632d04a71bcd
2017-03-16 05:40:47 +00:00
Kweku Adams
134c59bb40 Renaming the second active event to avoid confusion.
BUG: 23532995
Test: make -j 32 ...

Change-Id: I8d44e98520f40f46727cb57ba77932eee2b1b0ea
2017-03-16 00:33:33 +00:00
Elliott Hughes
70cfefa01a Restore SystemProperties.PROP_NAME_MAX to keep Kindle running.
The limit has been lifted in O, but without this constant, Kindle crashes here:

  Caused by: java.lang.NoSuchFieldException: PROP_NAME_MAX
    at java.lang.Class.getField(Class.java:1607)
    at com.amazon.android.webkit.AmazonWebKitFactories$Implementation.<clinit>(AmazonWebKitFactories.java:59)

The code seems to want to truncate a system property name to avoid the
exception that SystemProperty.get threw if passed a name that was too long.

Bug: http://b/36095274
Test: select a word in Kindle
Change-Id: Id1881a8a7c6386400a1024beb0d1b741bdaefba7
2017-03-15 13:01:53 -07:00
Felipe Leme
104b932b7b Fixed obsolete TODOs.
Test: not needed
Bug: 35395043
Bug: 26742218

Change-Id: I0e5adb574610374055a6546b66529a7aed7cc413
2017-03-14 08:41:49 -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
Jeff Sharkey
02d4e3441b Move PackageInstaller over to AppFuse.
When PackageInstaller was originally written, we needed a way to
ensure that untrusted apps were fully hands-off of any opened
FileDescriptors before we could proceed with certificate checks.

The best way to satisfy this security constraint was to build
a utility called FileBridge which was a (terribly slow) RPC
mechanism that could be cut off when needed.

However, a new feature called "AppFuse" offers to create a "proxy"
FileDescriptor which relays file operations back into userspace, and
it's much more performant than FileBridge.  (Local benchmark tests
that deliver a 64MB APK show that AppFuse is about 45% faster than
FileBridge.)  Because userspace is still involved in every operation,
we can still "revoke" access at any time to deliver on our security
requirements.

This change adds support for AppFuse, while keeping around FileBridge
as the default for now.  An upcoming flag-flip CL can be used to
easily switch between the two modes.

Test: builds, boots, benchmarking, stress tests
Bug: 35728404, 31332379, 25510838
Change-Id: I2a70c0ca922a5ba468ffdef7b2fd8ab79f7cfefd
2017-03-13 13:59:12 -06:00
Eugene Susla
36e866b8e0 Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided

Change-Id: I0a978787551a1ee5750ec5544b241d3bbfed5a7c
2017-03-09 17:52:49 -08:00
Hector Tellez
7986b529f7 Merge "Revert "Support multiple filters per association request"" 2017-03-09 18:30:53 +00:00
Hector Tellez
d66c95fa90 Revert "Support multiple filters per association request"
This reverts commit e70e6aa62c.

Change-Id: I12857cbbea0a0c74521191ab5e3713db230626ab
2017-03-09 17:55:43 +00:00
Eugene Susla
acddd2c2ae Merge "Support multiple filters per association request" 2017-03-09 17:19:20 +00:00
Martijn Coenen
c16b8a3b4c Merge "Remove interfaceChain from IServiceManager::add()" am: 4a75e32f1d am: 7665332a7a
am: 7669e41d8a

Change-Id: Ide4a33b8532954659a9c7c997d8d5203279a270e
2017-03-09 08:48:59 +00:00
Martijn Coenen
7665332a7a Merge "Remove interfaceChain from IServiceManager::add()"
am: 4a75e32f1d

Change-Id: I9443e22ed730c44abc6fd6f697f8b3f04b667f37
2017-03-09 08:39:15 +00:00
Martijn Coenen
4a75e32f1d Merge "Remove interfaceChain from IServiceManager::add()" 2017-03-09 08:33:04 +00:00
Eugene Susla
e70e6aa62c Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided
Change-Id: I6621da388e2bf4ed97c5af2692629a321d0b63c7
2017-03-08 16:52:14 -08:00
TreeHugger Robot
932eb90eb4 Merge "Surrounding some field names with quotes to avoid breaking CSV assumptions." 2017-03-08 21:06:21 +00:00
Lei Yu
30d69eaf86 Merge "Add BatterySaverPolicy for power save mode" 2017-03-08 20:02:46 +00:00
TreeHugger Robot
2277480ef2 Merge "Add metric for openProxyFileDescriptor." 2017-03-08 19:55:43 +00:00
Kweku Adams
e0dd9c1293 Surrounding some field names with quotes to avoid breaking CSV assumptions.
Some names can include commas, and if they're not surrounded by quotes,
then CSV parsing breaks, as was the case in
https://github.com/google/battery-historian/issues/94#issuecomment-282790498
and several other circumstances.

Test: flashed local device and ran batterystats output through Historian

Change-Id: I070c5d873d9f79996a581bf0a5f664136c0af454
2017-03-08 19:19:46 +00:00
Santos Cordon
9c2886ba5d Merge "Map STATE_VR to STATE_ON for Battery Stats." 2017-03-08 18:40:27 +00:00
TreeHugger Robot
cf8a98af48 Merge "Grumble, nobody likes kibibytes." 2017-03-08 18:16:42 +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
Daichi Hirono
d61817e07f Add metric for openProxyFileDescriptor.
Bug: 35300828
Test: None
Change-Id: I5175a8ab51ef4d93d032777a71295874a1189969
2017-03-08 14:11:52 +09:00
Jeff Sharkey
09734df8bc Grumble, nobody likes kibibytes.
All the cool kids are using storage in increments of 1000 instead
of 1024, so find a balance somewhere between the two.  We still round
to nice values like 32GB, 64GB, etc, but we represent them using
kilobytes under the hood.

Test: runtest -x frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
Bug: 28327846
Change-Id: I573aea43790816291e2b5c784b344b51b4444c06
2017-03-07 20:52:29 -07:00
Dianne Hackborn
3744d8ba14 Merge "Fix issue #35813125: API Review: android.os > Bundle" 2017-03-07 23:30:33 +00:00
Dianne Hackborn
11e8636889 Merge "Fix issue #35813031: API Review: RemoteCallbackList" 2017-03-07 23:30:04 +00:00
TreeHugger Robot
aae1cc597d Merge "Expose Instant App API defined in MR1" 2017-03-07 23:20:53 +00:00
Amith Yamasani
a94c4b5b2e Merge "Collect background network data stats in BatteryStats" 2017-03-07 22:40:49 +00:00
Calin Juravle
b1818b8a36 Merge "PackageManager: Clean up code related to foreign dex use"
am: eef66fd0c7

Change-Id: I443f001c15daddd63a17685c2e82fc9a619c45ee
2017-03-07 21:23:03 +00:00
Todd Kennedy
9c9fdf27ff Expose Instant App API defined in MR1
These were created in MR1 but couldn't be submitted because
they were defined too late [after API freeze].

Change-Id: Ie6884236776bd26e9d0b557fd125b8c77b0ad93b
Fixes: 34890162
Fixes: 35193180
Fixes: 35193418
Test: manual
2017-03-07 11:40:59 -08:00
Calin Juravle
4c06f55f14 PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170

(cherry picked from commit 74f0a3450c)

Change-Id: I2a9daca15e5120518852584fa17aa94012af8f1a
Merged-In: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-07 11:39:24 -08:00
Calin Juravle
9108ae1a16 Merge "PackageManager: Clean up code related to foreign dex use" 2017-03-07 18:48:17 +00:00
Calin Juravle
74f0a3450c PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-06 17:59:12 -08:00
Santos Cordon
e94f05019c Map STATE_VR to STATE_ON for Battery Stats.
Also, sets STATE_VR to be a public API value for Android O release.

Test: Switch to VR mode, ensure "Unexpected screen state: 5" no
longer logs from BatteryStatsImpl
Bug: 35636815

Change-Id: I1f8be334967e1af1f92a3ed571c063e7b00106b1
2017-03-06 13:51:01 -08:00
Amith Yamasani
59fe841e60 Collect background network data stats in BatteryStats
Keep the original values the same, to avoid messing
up existing pipelines and stats, and keep additional
counters for background traffic stats for mobile and
wifi.

Bug: 35677165
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases
Change-Id: I5f5ac3d5b659fe3d0b13703e6666a8751c5d9469
2017-03-06 10:38:36 -08:00
Makoto Onuki
845dcf0471 Merge "Mention the relaxed security check on UM.isUserRunningOrStopping()." 2017-03-06 17:22:55 +00:00
Martijn Coenen
85d12da977 Remove interfaceChain from IServiceManager::add()
Bug: 32742469
Test: hidl_test, hidl_test_java, binderized marlin boots
Change-Id: I418a5123e62517961a685a6433fe4ba384264862
2017-03-06 15:43:42 +01:00
Dianne Hackborn
2510b37518 Fix issue #35813125: API Review: android.os > Bundle
- Renamed deepcopy to deepCopy.
- Clarified docs about when a shallow vs. deep copy happens.

Test: booted and ran

Change-Id: I2b4400770d781ff51423cd1c860454742e1d3c9c
2017-03-03 17:02:29 -08:00
Dianne Hackborn
59359d06c4 Fix issue #35813031: API Review: RemoteCallbackList
Review comments addressed:

- Docs fixed.
- getRegisteredCallbackItem() added.

Test: booted system

Change-Id: Ib5228c566eedc5dcf72933bb375eba4257293cfc
2017-03-03 16:13:25 -08:00
Tobias Thierer
f063264d3a Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" am: 3e6c189c68 am: 50351bd85c
am: e8903c666a

Change-Id: I45e9a8b2b084a892f754f27a044d70318eb99772
2017-03-03 12:19:35 +00:00
Tobias Thierer
50351bd85c Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore"
am: 3e6c189c68

Change-Id: I981b746a28cda09d7a75fa79faeacb2cc58b1fc4
2017-03-03 12:07:59 +00:00
Tobias Thierer
3e6c189c68 Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" 2017-03-03 12:02:09 +00:00
Makoto Onuki
5eef50d86b Mention the relaxed security check on UM.isUserRunningOrStopping().
Bug: 35801468
Test: Javadoc only, make.
Change-Id: Iff44217b63e6ce8d354665719a84c37f8c2e569a
2017-03-02 16:38:45 -08:00