Commit Graph

3131 Commits

Author SHA1 Message Date
Erik Kline
94887874e3 Don't flush DNS cache on route changes.
Since Lollipop, routes are isolated within Networks.  Flushing a
Network's DNS cache whenever that same Network's routes are updated
doesn't provide any benefit.  Any system components depending on this
behaviour need to uncovered and fixed.

Additionally, clean up no-longer-used flushNetworkDnsCache().  This
should be replaced, when needed, by a proper binder interface to netd.

Change-Id: I34bf79e4839da014d466058a876d754209d0c007
2016-04-06 11:30:51 +09:00
Dianne Hackborn
4345904050 Merge "(Docs only) Make battery stats process state docs more clear." into nyc-dev 2016-04-05 16:54:55 +00:00
Dianne Hackborn
a0200e3702 (Docs only) Make battery stats process state docs more clear.
Change-Id: I7e86705ec5fa7be8d6a74e708bbf166bec17494f
2016-04-05 09:54:02 -07:00
Glenn Kasten
5cb05f810b Merge "Fix typo" into nyc-dev 2016-04-05 15:00:22 +00:00
Glenn Kasten
570f1c8b23 Fix typo
Change-Id: I973dfaa17adbb7dce4ceda2e6985937823ef039c
2016-04-04 12:27:32 -07:00
Ruchi Kandoi
b4aa2e9c37 PowerManager: Adds isSustainedPerformanceModeSupported()
isSustainedPerformanceModeSupported() returns true if the device
supports the mode. It checks for the boolean config
"config_sustainedPerformanceModeSupported" to be set.

Bug: 22864186
Change-Id: I0f9f0bcbb8c02b19f37e9c87570d88e8f78f7992
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-04 19:25:23 +00:00
Christopher Tate
250985f556 Handle interaction of Bundle.hasFileDescriptors() with removal
Removing entries from a Bundle may change its has-FDs state, so now
induce a recheck after removals.  In support of that, make the
recheck set the known state in all cases, not just in the has-FDs
case; and note that filterValues() inherently produces a result that
is known to have no FDs.

Bug 26676151

Change-Id: Ida07b77ad2046aeafb98e0b164cd571ce45d064f
2016-03-31 13:57:42 -07:00
Ruben Brunk
ee1062e4c0 Merge "Include VR throttling limit in hardware properties." into nyc-dev 2016-03-31 18:03:37 +00:00
Jeff Sharkey
2c0ae91f2d Merge changes Ifecff4f1,Ia302de46 into nyc-dev
* changes:
  Make preferred activities direct-boot aware.
  Make Parcelable classes final, API cleanup.
2016-03-31 06:48:55 +00:00
Jeff Sharkey
70168dde6e Make Parcelable classes final, API cleanup.
Remove some Context methods that leaked through.  Add lint rule to
recommend using List<? extends Parcelable> instead of Parcelable[].

Bug: 27932224, 27930145, 27932911
Change-Id: Ia302de46cdb0c5101fa175a09316df91aeefcf0d
2016-03-30 23:31:39 -06:00
Adam Lesinski
ac4dfec1c6 Merge "BatteryStats: Add ble scans to checkin data and start global ble scan timer" into nyc-dev 2016-03-31 02:58:26 +00:00
Jeff Sharkey
27c49d5790 Merge "Fix a deadlock due to wtf in BaseBundle" into nyc-dev 2016-03-31 02:18:53 +00:00
Adam Lesinski
d9b99be587 BatteryStats: Add ble scans to checkin data and start global ble scan timer
Bug:27930206
Change-Id: Ieb81eddeb0ac54ad93615f3abdc18cbcab19a729
2016-03-30 18:58:27 -07:00
Ruchi Kandoi
93cfef460c Merge "Revert "PowerManager: Hide the SUSTAINED_PERFORMANCE API."" into nyc-dev 2016-03-31 00:54:25 +00:00
Amith Yamasani
2387932b74 Fix a deadlock due to wtf in BaseBundle
Use Slog.wtf instead of Log.wtf, so that it is
asynchronously reported.

Mark incoming application restrictions as defusable
since they are being unparceled.

Bug: 27811728
Change-Id: I166de69a74417e439ec5ef9159fbbfbfe711dde6
2016-03-30 17:28:53 -07:00
Felipe Leme
2ac876945b Minor tweaks on Scoped Directory Access:
- Only allow entire directory access on non-primary volumes.
- Do not display primary storage label on scoped access.

BUG: 27743842
BUG: 27676858
Change-Id: I9884fb1e2df3534fceebc5d5bef44adfb758724c
2016-03-30 16:42:10 -07:00
Ruchi Kandoi
7ef20dd340 Revert "PowerManager: Hide the SUSTAINED_PERFORMANCE API."
This reverts commit 302710deaa.

Change-Id: I3e7e071838bae9460e126aac099b31f5213e3c6c
2016-03-30 14:23:58 -07:00
Tao Bao
9971d02c38 Merge "UpdateEngine: Add resetStatus() as system API." into nyc-dev 2016-03-28 19:51:36 +00:00
Jeff Sharkey
c02bfae73e Include "invisible" volumes in new storage API.
The purpose of the new StorageVolume API is to grant access to
volumes that aren't typically "visible" to a developer, so include
them in the returned results.

Also return the real mounted state instead of augmenting based on
the caller's storage permissions.  Clean up API naming slightly and
return as List.

Bug: 27615770
Change-Id: Ida921a4b91e5af81e418e76f672d9108f45a9781
2016-03-27 15:06:57 -06:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Ruben Brunk
946ef6417b Include VR throttling limit in hardware properties.
Bug: 27549685
Change-Id: I0e7f06c772c6547bb3357218c1ebf295cbd1dbd2
2016-03-25 14:56:34 -07:00
Felipe Leme
771d0c2be4 Merge "Refactored NetworkManagerService to support Data Saver." into nyc-dev 2016-03-25 20:39:59 +00:00
Felipe Leme
65be3025fd Refactored NetworkManagerService to support Data Saver.
Netd provides 2 bandwidth control rules to restrict which uids can use
metered networks:

- bw_penalty_box is a blacklist-based firewall chain used to determine
  which uids do not have access to metered interfaces.

- bw_happy_box is whitelist-based firewall chain used to determine which
  uids have access to metered interfaces.

Currently, both NetworkManagerService (NMS) and
NetworkPolicyManagerService (NPMS) uses just the bw_penalty_box rule,
which makes turning Data Saver mode on / off too slow (since NPMS needs
to build the bw_penalty_box on demand); this CL adds support for both
rules on NMS, although NPMS doesn't take advantage of it yet (it will be
refactored in a separate CL).

BUG: 27127112
BUG: 26685616
Change-Id: Ib954574f7c86269fc9b4cf8ce4ba72ba5878c23d
2016-03-25 12:33:47 -07:00
Griff Hazen
d3c454db29 Detect ranchu as emulator
Bug: 27780791

Change-Id: I23e5511acfba22260714874baf5e9380480b22bf
2016-03-25 09:35:20 -07:00
Dianne Hackborn
966f1c9348 Merge "Fix issue #25817435: Batterystats missing UIDs for secondary users" into nyc-dev 2016-03-25 01:50:33 +00:00
Ruben Brunk
41f02e5d50 Merge "Allow current VrListenerService to read thermal info." into nyc-dev 2016-03-25 01:08:18 +00:00
Dianne Hackborn
9cfba35020 Fix issue #25817435: Batterystats missing UIDs for secondary users
Change-Id: I9ad907571f04b5825d234758347659544a4de6ab
2016-03-24 17:31:28 -07:00
Felipe Leme
541af9b119 Removed obsolete @NonNull.
BUG: 27676858
Change-Id: Ic3916769c1fa9d557294bcdbbc94e00c68376a5d
2016-03-23 16:05:57 -07:00
Felipe Leme
9eb5555aa6 Merge "Allow Scoped Directory Access on whole volume." into nyc-dev 2016-03-23 17:58:48 +00:00
Ruben Brunk
8f1d5cbabb Allow current VrListenerService to read thermal info.
Bug: 27549685
Bug: 22855417
Change-Id: I2d0cb85b54767876bcbf503b5f198bd7f4065680
2016-03-23 08:23:15 -07:00
Tao Bao
b7e47ae84f UpdateEngine: Add resetStatus() as system API.
It calls update engine to reset an already applied payload.

Also change all the RemoteExceptions in UpdateEngine class to be
rethrown as RuntimeExceptions according to API guidelines [FW9].

Bug: 27123767
Change-Id: I936331019cdb00f4f225f5605e51cc94bb491e24
2016-03-22 16:16:34 -07:00
Aga Wronska
5f7d673f3b Merge "Add config flag to show/hide internal storage. Hide internal storage by default." into nyc-dev 2016-03-22 17:04:28 +00:00
Tony Mak
8673b2899e Revert getUserInfo change and add isManagedPorfile(int userId)
Bug: 26469166
Change-Id: I60b70170ddc80432fc8f638b1f63c4e9f5212785
2016-03-22 15:26:05 +00:00
Jeff Sharkey
a17b7d0163 Merge "Store trace files in app-specific dirs." into nyc-dev 2016-03-22 15:12:44 +00:00
Lorenzo Colitti
bf4a6574b1 Delete dead code.
Change-Id: If8052efaa00f15e5c7eb038435be33206d54276a
2016-03-22 16:27:41 +09:00
Aga Wronska
1719b3555d Add config flag to show/hide internal storage.
Hide internal storage by default.

Revert "Always show intern storage."

This reverts commit 7c4395804e.

Bug: 27683276

Change-Id: I04ea8b9a307babcea003f9bec200d41265a42c7f
2016-03-21 17:33:27 -07:00
Jeff Sharkey
3a6e0ec223 Store trace files in app-specific dirs.
The previous default location of "/sdcard" became painful to use
starting in M, because it required a runtime permission.  So now we
default to storing trace files in app-specific directories on shared
storage, which apps always have write access to with no additional
permissions.

Update docs to be consistent between all overloads.

Bug: 22807654
Change-Id: If4feca7c8778dfdf4ccce8cfb68418dc416260b5
2016-03-21 16:54:11 -06:00
Felipe Leme
db892b84e5 Allow Scoped Directory Access on whole volume.
There are some scenarios where an app needs access to the whole SD Card,
not subdirectories. For example, user might have a SDCard with
directories like vacation_pictures (instead of Pictures/vacation);
another example is a file management app.

BUG: 27676858
Change-Id: I20ef713de7e4dfa7e2d7d07bab11898af186d673
2016-03-21 14:25:17 -07:00
Polina Bondarenko
eb84552ef0 Added skin temperature, thresholds to HardwarePropertiesManager
Bug: 27425887
Change-Id: I13f69ae37906b71d93edbf6bea6daf809d97cfd5
2016-03-19 10:49:18 +00:00
Dianne Hackborn
2fefbcf0d1 Fix issue #27653326: Sync doesn't work in doze maintenance
Add a (configurable) delay between when we start a maintenance
window until the minimum time we will end it.

Also switch to using the alarm manager callback API.  (Yay!)

Also fix a little printing problem in the alarm manager dump
so we put the package name and not some class hash in the
summary string of an alarm entry.

Change-Id: I4281e5c80bc8b26ebc1fb6f603ec33ec0e379daa
2016-03-18 16:52:30 -07:00
Jeff Sharkey
620a28bad2 Merge "Mark more Bundles as being defusable." into nyc-dev 2016-03-18 19:54:52 +00:00
Tony Mantler
e6e08b4a5a Merge "Add safe-mode reboot to PowerManager" into nyc-dev 2016-03-18 18:40:21 +00:00
Tony Mantler
b8009fddd8 Add safe-mode reboot to PowerManager
b/12787723

Change-Id: If7e6ff63532b49b9e758db290a877f7dbfa8a8b7
2016-03-18 11:36:16 -07:00
Jeff Sharkey
a04c7a7c64 Mark more Bundles as being defusable.
They're destined for the system, so they're okay to look inside.

Bug: 27726127
Change-Id: Ic85c308a8efe6f9b8652952717c72b3c663d328a
2016-03-18 12:20:39 -06:00
Jeff Sharkey
2a4e495448 Merge "Update direct boot related documentation." into nyc-dev 2016-03-18 16:32:16 +00:00
Jeff Sharkey
cf3f0a11a8 Update direct boot related documentation.
Also hide a few APIs as requested by council.  Add a method to
easily determine if a given File would already be encrypted at rest
by the OS.

Bug: 27531029
Change-Id: Icad5f1cd56411ad3ac707db85fd7449acdcc4b94
2016-03-17 19:58:05 -06:00
Phil Weaver
6fdd3afdcc Merge "Treat accessibility actions as user activity" into nyc-dev 2016-03-17 22:19:17 +00:00
Jeff Sharkey
8a372a0a28 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
2016-03-17 14:49:08 -06:00
Phil Weaver
da80d676c7 Treat accessibility actions as user activity
Resurrecting ag/665912.

Bug: 19531976
Change-Id: Ibdddd507215e61b9f4313c36eab8845e9940a7ac
2016-03-17 10:09:39 -07:00
Daichi Hirono
1360868de8 Merge "Add suffix number when copying a file." into nyc-dev 2016-03-17 04:53:35 +00:00