Commit Graph

77057 Commits

Author SHA1 Message Date
Peter Visontay
79af02db03 Merge "Fix outdated docs of permission protection levels." 2017-11-23 11:06:46 +00:00
TreeHugger Robot
a98bd9989e Merge "Captures metrics on disk when devices reboot and shutdown. Specifically," 2017-11-23 04:52:35 +00:00
TreeHugger Robot
e8ebb8cd8d Merge "Changed FillResponse so it can have only a client state." 2017-11-23 02:42:07 +00:00
yro
947fbce521 Captures metrics on disk when devices reboot and shutdown. Specifically,
1. Create intent receiver in StatsCompanionService to listen to shutdown
events.
2. Create StatsWriter class to handle disk writes and deleting files.
3. Update StatsLogProcessor, ConfigManager, and StatsService to handle
files on disk using StatsWriter.
4. Add a wrapper for ConfigMetricsReport.

Still TODO is to be able to add a guardrail to prevent accumulating
excessive amount files on disk, which will be followed up by another
change.

Test: statsd, statsd_test
Change-Id: Ia0b3af315af545daa8b0078b3700c600aa7c285f
2017-11-22 18:39:23 -08:00
Amith Yamasani
5719bceb4e Merge "The job scheduler now backs off jobs based on standby bucketing" 2017-11-23 00:00:23 +00:00
Yifan Hong
6f813c6a98 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs" am: e72b6f0d31 am: 8cf7761747
am: 523665a293

Change-Id: I901c938c2c56ab1c1649c218b37d4ab131cd3c7b
2017-11-22 23:28:56 +00:00
Yifan Hong
523665a293 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs" am: e72b6f0d31
am: 8cf7761747

Change-Id: I842bf4791467620e597018ce0e9441cfb0732026
2017-11-22 23:18:46 +00:00
Felipe Leme
430a757ff0 Merge "Minor improvements on autofill javadocs and logging." 2017-11-22 23:14:56 +00:00
Yifan Hong
8cf7761747 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs"
am: e72b6f0d31

Change-Id: I7ea5895cdfd09786732b597be600329a334c1cb4
2017-11-22 23:06:33 +00:00
Yifan Hong
e72b6f0d31 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs" 2017-11-22 22:51:19 +00:00
Christopher Tate
a732f014c5 The job scheduler now backs off jobs based on standby bucketing
The default parameters here translate to roughly this rate limiting:

  ACTIVE:   run jobs whenever
  WORKING:  ~ hourly
  FREQUENT: ~ every 6 hours
  RARE:     ~ daily

Bug: 63527785
Test: cts & manual (WIP)
      atest CtsJobSchedulerTestCases
Change-Id: I58f8e53e5bdf40601823e5a10a9f2383a6f67ae5
2017-11-22 22:07:06 +00:00
Evan Rosky
560d5f851e Merge "Revert "Don't allow 0-sized views to be focused."" 2017-11-22 21:31:54 +00:00
Peter Visontay
51fbad5a76 Fix outdated docs of permission protection levels.
1) Added deprecation notice to the 'system' and 'signatureOrSystem' protection levels.
These were deprecated in API Level 23:
https://developer.android.com/reference/android/content/pm/PermissionInfo.html#PROTECTION_SIGNATURE_OR_SYSTEM
https://developer.android.com/reference/android/content/pm/PermissionInfo.html#PROTECTION_FLAG_SYSTEM

2) Removed an outdated list of protection levels from PermissionInfo.protectionLevel's JavaDoc.
Its Javadoc has a link to an up-to-date list.

Test: Ran "make docs".
Change-Id: Ia6dc88ba3a66f248f60f010323d5ba40200c1cda
2017-11-22 20:31:14 +00:00
Felipe Leme
601d220074 Minor improvements on autofill javadocs and logging.
Test: m update-api
Bug: 69456547

Change-Id: I2cab6d7d6ecbe7c1842a5be37af923dd20355b73
2017-11-22 12:17:01 -08:00
Todd Kennedy
916c83d227 Merge "Make sense out of scan & parse flags" 2017-11-22 20:02:48 +00:00
Dianne Hackborn
1edf09c99b Merge "Fix issue #67019445: Detect BATTERY_LOW/OKAY" 2017-11-22 18:27:59 +00:00
Eran Messeri
3daba14f25 Merge "DevicePolicyManager: Make installed keys user-selectable by default." 2017-11-22 17:12:29 +00:00
TreeHugger Robot
7430d8d896 Merge "Notify apps when channels/groups are blocked/unblocked" 2017-11-22 15:55:53 +00:00
TreeHugger Robot
8377006984 Merge "Show warning when app was compiled against incompatible preview SDK" 2017-11-22 15:54:05 +00:00
Todd Kennedy
232d29e0cd Make sense out of scan & parse flags
Parse flags are often used confusingly to control policy during
APK parsing. Additionally, some flags [such as PARSE_IS_PRIVILEGED
or PARSE_IS_SYSTEM] aren't always determined based upon APK location
[they change based upon which apps are installed]. This means we
have to perform some gymnastics to set them correctly _before_
parsing a package.

Instead, these should be scan flags that can be determined at a
later point during package parsing. Then, based upon the scan flag
we apply policy on the package object to create the resulting
data structures.

Bug: 63539144
Bug: 69663125
Test: Manual; it builds, runs and applications can be installed / removed
Test: bit FrameworksServicesTests:com.android.server.pm.
Change-Id: I53fb18e58544e0a39f35eb6fb53c950e5c696aee
2017-11-22 15:39:04 +00:00
TreeHugger Robot
e19dc30bd3 Merge "Check camera permissions for any devices using the VIDEO class" 2017-11-22 12:50:19 +00:00
Hugo Benichi
90e68c6869 Merge "Light refactors to packet wakeup events." am: e887e2b9c1
am: c6dc6baf4f

Change-Id: I4c19f1cdfe7a9fb47aad23a21b0aa0ae8e03277a
2017-11-22 05:27:11 +00:00
Hugo Benichi
c6dc6baf4f Merge "Light refactors to packet wakeup events."
am: e887e2b9c1

Change-Id: I40f637114cbfc04bce4058af0a1f43f38bd461db
2017-11-22 05:19:01 +00:00
Hugo Benichi
e887e2b9c1 Merge "Light refactors to packet wakeup events." 2017-11-22 05:08:50 +00:00
TreeHugger Robot
f8d6392430 Merge "Output doze mode power in BatteryStats" 2017-11-22 02:55:50 +00:00
Jonathan Basseri
66e6139b00 Merge "Javadoc cleanup of IpSecManager API." am: d09d106ec0 am: 2a82aa70b5
am: 9f6a3431a1

Change-Id: Id10e39da5495f9367332cbc5c754506fc64f3c75
2017-11-22 02:10:32 +00:00
Jonathan Basseri
9f6a3431a1 Merge "Javadoc cleanup of IpSecManager API." am: d09d106ec0
am: 2a82aa70b5

Change-Id: I53e9b3d18fda1122f6a8a6300185c743cc26dbf6
2017-11-22 02:00:53 +00:00
Jonathan Basseri
2a82aa70b5 Merge "Javadoc cleanup of IpSecManager API."
am: d09d106ec0

Change-Id: Iaf206b0980d3bed14fe6b8318d2073577212b460
2017-11-22 01:51:46 +00:00
Suprabh Shukla
2ffa7f0d12 Merge "Delaying jobs while coming out of doze" 2017-11-22 01:38:26 +00:00
Jonathan Basseri
d09d106ec0 Merge "Javadoc cleanup of IpSecManager API." 2017-11-22 01:32:06 +00:00
Hugo Benichi
2ccba0e0e1 Light refactors to packet wakeup events.
This patch uses the recently added MacAddress class in WakeupEvent and
WakeupStats for replacing the byte array representation of dest mac
addresses in packet wakeup events.

Bug: 28806131
Test: runtest frameworks-net
Merged-In: I5a3c76498a4b720f0d9308a65b5dd4b32377d0d1

(partial cherry pick from 884970e0ba)

Change-Id: I878d51d4cc53c6d9a2cc3c55faa15b86156afbd7
2017-11-22 10:09:09 +09:00
Dianne Hackborn
74ed6ecdc4 Fix issue #67019445: Detect BATTERY_LOW/OKAY
Add a new extra that indicates the battery is low.

Test: BatteryConstraintTest updated
Change-Id: I9ff92e15974ea092283a840cd01c860d6586c9b5
2017-11-21 16:33:44 -08:00
Suprabh Shukla
106203bc53 Delaying jobs while coming out of doze
Foreground uids can run their jobs immediately given other constraints
are met. Other jobs will be delayed by 3 seconds when coming out of
doze to ensure imminent user tasks like screen-on can use resources.
Also added an API to allow apps to indicate their job is important to
the user enough that it is allowed to run when the app is in the
foreground or on the temp whitelist regardless of the dozing state of
the device.

Test: cts-tradefed run singleCommand cts-dev -m JobScheduler -t \
android.jobscheduler.cts.DeviceIdleJobsTest

Bug: 64291952
Bug: 64071030

Change-Id: Id52cb4386e683d4f8297e873b3a68c573e5be743
2017-11-21 15:38:20 -08:00
Alan Viverette
b6a25737d6 Show warning when app was compiled against incompatible preview SDK
Adds publicly-visible API for compile SDK version and codename. AAPT2 does
not support these yet, but that will be included in a follow-up CL.

Also refactors the Unsupported Display Size dialog out to a generic app
warnings manager class and fixes a bug there where the "always show"
preference was not persisted.

Improves documentation around threading and concurrency guarantees.

Bug: 64107584
Fixes: 68995409
Test: CtsActivityManagerDeviceTestCases
Change-Id: Ic86efa554b8b1caf80e5e004fda897d3483a68e8
2017-11-21 21:11:38 +00:00
TreeHugger Robot
911fbd2313 Merge "Special handling of processes with recent tasks." 2017-11-21 20:36:28 +00:00
Fyodor Kupolov
bc8d3e6049 Merge "Updated JavaDoc for onStartLoading" 2017-11-21 20:32:26 +00:00
TreeHugger Robot
9253eeadbd Merge "The pm command is no more." 2017-11-21 20:31:47 +00:00
Fyodor Kupolov
a8f07c0b1e Merge "Use newline to separate stack trace lines" 2017-11-21 20:26:00 +00:00
TreeHugger Robot
fe731413da Merge "Global a11y action to lock screen" 2017-11-21 20:08:11 +00:00
TreeHugger Robot
8c44ed1f85 Merge "Close available secondary connections if schema changes" 2017-11-21 19:56:41 +00:00
Fyodor Kupolov
679d998796 Use newline to separate stack trace lines
It was unintentionally removed in patchset 3 of ag/3221176

Test: manual
Change-Id: Iede0bfe1b5d622fda794ddf4a0bcdbdaeeb4939d
2017-11-21 10:42:23 -08:00
Dianne Hackborn
1704e3cf0c The pm command is no more.
It is now just a shell of itself. :)

Also brings in a few fixes to never try to open files from the system
process.

Test: manual
Change-Id: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
2017-11-21 10:17:14 -08:00
Kenny Guy
e9a4b16ea1 Merge "Daily idle job for writing out brightness events." 2017-11-21 17:57:39 +00:00
Eran Messeri
19d19048e4 DevicePolicyManager: Make installed keys user-selectable by default.
After Change-Id: Ibaba2ddd4f94fced1a2a7bfcfb91189302ec7f3a was merged,
KeyChain, by default, made keys installed in it not user-selectable,
which means users could not choose those keys in the Certificate
Selection prompt.
This is the correct behaviour (secure by default), but means the
DevicePolicyManager has to explicitly set keys as user-selectable
to be compatible with the previous behaviour.

This CL does the following:
* Adding an installKeyPair variant to the DevicePolicyManager to
  allow specifying user-selectability of the key.
* Make old installKeyPair variants delegate to the new variant,
  with the default of setting installed keys user-selectable.
* Modify the DevicePolicyManager service definition and service to
  take the extra user-selectability parameter and set the value
  in KeyChain.

Note that the reason the CTS test started failing is not related to
this change but a CTS Verifier test should catch the problem this
CL is solving.

Part of the fix for b/69337278

Bug: 69337278
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement
Change-Id: Ifc240ed4a20a9d00bc6140dfb45bd1140e1f8260
2017-11-21 17:01:39 +00:00
Scott Main
14c1da31c4 Merge "add list of supported views to RemoteViews docs Found by searching for all framework views with the @RemoteViews annotation" 2017-11-21 16:41:00 +00:00
Julia Reynolds
3eb3ffd9c3 Notify apps when channels/groups are blocked/unblocked
So that apps can disable/enable receivers/jobs/etc. that
would only need to run to post notifications to the blocked
channel(s).

Additionally let apps retrieve an individual group so they
can inspect blocked state.

Change-Id: I733b70c62cd0482d0cf9692ea9b00cf313ad7b81
Fixes: 36530302
Test: runtest systemui-notification, cts
2017-11-21 11:28:07 -05:00
Jason Monk
59955dcc06 Merge "Convert Slice type to string and add optional sub-type" 2017-11-21 16:05:39 +00:00
Kenny Guy
cfe7b70e99 Daily idle job for writing out brightness events.
Schedule a job for idle + charging to kick off
writing out brighness slider events.
While writing events discard ones outside our
time window.

Bug: 69405990
Test: Manual using adb to kick off job.
Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services
Change-Id: Ibc79d1c80ced26827d6f985bc70ae165df106a42
2017-11-21 14:44:26 +00:00
Jason Monk
a5f64a363c Merge "Add SliceSpec to Slice API" 2017-11-21 13:50:09 +00:00
Gustav Sennton
d7e5d09a9e Merge "Fix WebViewUpdateService test expectation to match reality." 2017-11-21 12:00:00 +00:00