Commit Graph

3162 Commits

Author SHA1 Message Date
Svet Ganov
ae0e03a9e0 Cleanup of the PackageInstaller API - Frameworks
The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
2016-04-22 14:18:32 -07:00
Ruchi Kandoi
a2689dcf71 fix build: remove SUSTAINED_PERFORMANCE_WAKE_LOCK link
Change-Id: Ic12b98cbafcc8c81eadba119ab416a9eddb7214a
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 17:22:27 -07:00
Ruchi Kandoi
9c36c02f0e Revert "PowerManager: Adds the Sustained performance API."
This reverts commit 0abc001275.

Bug: 28150358
Change-Id: I99c71b3d6641310a33e898d6fd475d37c79ba9d0
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 20:49:18 +00:00
Ruchi Kandoi
a645c9753f Merge "window: Adds a Sustained Performance Mode window flag." into nyc-dev 2016-04-20 20:35:21 +00:00
Andreas Gampe
58f20726e9 Merge "Frameworks/base: Add holder to BaseBundle" into nyc-dev 2016-04-20 18:58:32 +00:00
Ruchi Kandoi
43e38de253 window: Adds a Sustained Performance Mode window flag.
Adds setSustainedPerformanceMode(boolean) API for applications to set
the mode for a given window. The mode will be disabled automatically when the
window is no longer in focus.

Bug: 28150358
Change-Id: Ibe8bc564eeaaccbcaad5c4f792cda16da931dffd
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-20 09:57:11 -07:00
Andreas Gampe
52764cba59 Frameworks/base: Add holder to BaseBundle
Move EMPTY_PARCEL into an inner holder class. Add holder to
preloaded-classes. Clean up dependencies.

Allows to compile-time initialize:
* android.os.BaseBundle
* android.os.Bundle
* android.os.PersistableBundle
* android.telephony.CarrierConfigManager

Bug: 27265238
Change-Id: Ib8017aa419c2985963b3c68a8046462a38652ef2
2016-04-19 20:46:43 -07:00
Joe Onorato
bee44ae8e5 Consolidate the HealthStats UI to only use milliseconds.
BatteryStats uses a mix of microseconds and milliseconds, and keeping
which one is which straight is difficult.  The internal bookkeeping
is left using us where it already does, for the extra precision. But
having the API be mixed will only make it harder for developers, and
lead them to make the same mistake that I did in the API where I
missed some conversions.

Bug: 28197858
Change-Id: I99114bae259b9bdd47ce5c22e724d87bbd63336d
2016-04-19 11:27:05 -07:00
Jeff Sharkey
d3a25ad4b9 Merge "Disable "defusable" logging for now." into nyc-dev 2016-04-19 17:10:56 +00:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00
Jeff Sharkey
cb45951cad Disable "defusable" logging for now.
Bug: 28240784
Change-Id: I2c259867a8169eef220fb9faea6cdcafdde675b8
2016-04-18 13:56:11 -06:00
Jeff Sharkey
ad14b884f4 Merge "Consistent creation/destruction of user data." into nyc-dev 2016-04-18 19:43:18 +00:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Adam Lesinski
010bf374d8 BatteryStats: Introduce Async external stats requests
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.

This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.

Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
2016-04-15 15:27:52 -07:00
Amith Yamasani
0696434c62 Address API review for UserManager user creation
Don't return null from createUserCreationIntent()
Provide a way for apps to query if the device
supports multiple users.

Some additional documentation for UserManager class to
make things clear about the types of users and relationship
with accounts.

Change-Id: I768d816e73a1d7f61cdc415f9e482adc79e2715a
Fixes: 28150359
2016-04-15 14:10:02 -07:00
Jeff Sharkey
fcf1e55821 Consistent creation/destruction of user data.
Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

When preparing user directories on a storage device, always enforce
the serial number and destroy data if we run into a mismatch.  When
deleting a user, write the updated user list first before we start
destroying data.  Also start reconciling users on internal storage
at boot, so we can recover from stale data left behind from partially
destroyed users.

Check both CE and DE user directories when reconciling user storage
on a newly mounted storage device.

Bug: 27896918
Change-Id: I4536c82b0196e2720628c4f73fccb742c233350b
2016-04-15 13:35:36 -06:00
Benjamin Franz
f02420c5e1 Maybe decrypt user when quiet mode is disabled
When quiet mode is disabled for a user and that user is not currently
decrypted, we show a confirm credentials screen to trigger decryption
of that user. Only if that was successful, do we actually disable quiet
mode.

Bug: 27764124
Change-Id: Ib1f649194d89e225dad62c14f3ddba1fa3d79da2
2016-04-15 14:12:41 +01:00
Jeff Sharkey
cadfc77d03 Merge "Fix broken javadoc." into nyc-dev 2016-04-12 23:37:38 +00:00
Jeff Sharkey
f82c2f0854 Fix broken javadoc.
Change-Id: I9f2050fd6040234bb1d759ab346f79fc41247aa9
2016-04-12 15:22:57 -06:00
Felipe Leme
93c442e44f Merge "Make getStorageVolume(File file) public." into nyc-dev 2016-04-12 20:44:06 +00:00
Adam Lesinski
ba9d893976 BatteryStats: Don't log BluetoothScanTimer when it doesn't exist
Bug:27998591
Change-Id: I80ca8a2353141c16595b4be0b0aed195f40e366a
2016-04-12 12:06:03 -07:00
Felipe Leme
c250e45eda Make getStorageVolume(File file) public.
BUG: 27951594
Change-Id: I354f6a29b3fa3374ea07bcbe14096e9673d282c5
2016-04-11 18:52:28 -07:00
Fyodor Kupolov
4c74334c44 Merge "Added getProfileIds method returning array of userIds" into nyc-dev 2016-04-11 16:40:55 +00:00
Ruchi Kandoi
0f36ba81e7 Merge "batteryService: Add Charge Counter." into nyc-dev 2016-04-08 01:09:24 +00:00
Ruchi Kandoi
6361e22fea batteryService: Add Charge Counter.
Bug: 27174034
Change-Id: Ib8bc8f617288c0ad543c67e0fa609c5a0c87b5fd
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-04-08 01:09:02 +00:00
Fyodor Kupolov
7f98aa4aa9 Added getProfileIds method returning array of userIds
Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.

A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.

Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
2016-04-07 16:41:57 -07:00
Jeff Sharkey
8b704d4474 Merge "Revert "Remove old FUSE bypass now that we have sdcardfs."" into nyc-dev 2016-04-07 17:56:21 +00:00
Jeff Sharkey
8575da1cc0 Revert "Remove old FUSE bypass now that we have sdcardfs."
This reverts commit feef8b62ee.

Change-Id: I90a3b8edf95cb5b631a85168671cf8b5a406d9ea
2016-04-07 17:56:06 +00:00
Jeff Sharkey
33dd156ed0 Give users and devices control over sdcardfs.
Instead of relying only on kernel support for sdcardfs, give each
device the ability to quickly toggle between sdcardfs and FUSE.  Also
add the ability to users to explicitly enable/disable the behavior
for testing and debugging purposes.

Bug: 27991427
Change-Id: Ia57f12f6ead888ab85101004bdd8c8003537b116
2016-04-07 11:30:55 -06:00
Jeff Sharkey
74cd3de6f4 Automatically trace messages on shared loopers.
There are a handful of looper threads in the system_process that
are shared by dozens of different internal services.  To help track
down what these operations are, tag the processing of each message
with a string that tries describing where it originated from: the
class name of the Handler, and the message number or class name of the
Runnable.

Bug: 28046299
Change-Id: I409ec43fea8daaae4fd70df05d4fed929a7249ae
2016-04-07 00:14:53 -06:00
Jeff Sharkey
feef8b62ee Remove old FUSE bypass now that we have sdcardfs.
This forces everyone to go through sdcardfs, instead of letting them
around the back door.

Bug: 27992761
Change-Id: If1d4d5daa4b32bb3be7de10102bab24d63552b65
2016-04-06 15:27:11 -06:00
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