Commit Graph

46619 Commits

Author SHA1 Message Date
Jeff Sharkey
8d729e8c14 Merge "Initial API shape for storage statistics." 2017-01-07 16:18:38 +00:00
TreeHugger Robot
54f0fd1071 Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED." 2017-01-07 02:48:44 +00:00
Dmitry Dementyev
ed92d5b55b Merge "Implement Account Discovery API." 2017-01-07 02:41:44 +00:00
Alex Naidis
09e3c9b78c Merge "DefaultPermissionGrantPolicy: Pass correct arguments" am: 0b325c6634 am: fd55f834c8 am: 80888cdcbe
am: 2603aab95c

Change-Id: Iaca178d58a657ed59e3b9cbc08c3d2909cbf0811
2017-01-07 01:52:33 +00:00
Adam Lesinski
6224a32197 Merge changes from topic 'learned_capacity'
* changes:
  BatteryStats: Report learned battery capacity as event
  Parcel/unparcel charge_full state from BatteryProperties
2017-01-07 01:51:07 +00:00
Alex Naidis
2603aab95c Merge "DefaultPermissionGrantPolicy: Pass correct arguments" am: 0b325c6634 am: fd55f834c8
am: 80888cdcbe

Change-Id: I9852107278f6206582393a57be60074763a6cb81
2017-01-07 01:48:19 +00:00
Alex Naidis
80888cdcbe Merge "DefaultPermissionGrantPolicy: Pass correct arguments" am: 0b325c6634
am: fd55f834c8

Change-Id: Ia53faad0ba004233d0ee031e1ca83d705f5bd379
2017-01-07 01:44:14 +00:00
Alex Naidis
fd55f834c8 Merge "DefaultPermissionGrantPolicy: Pass correct arguments"
am: 0b325c6634

Change-Id: I5d217037bececb7a096ccfa018fafaa4280e4537
2017-01-07 01:40:42 +00:00
Dmitry Dementyev
58fa836210 Implement Account Discovery API.
Bug: https://b.corp.google.com/issues/33046496
Test: cts tests, manual tests.

Change-Id: I03d1ae5dfa1577f191817aa7d508f6b4d0e625ed
2017-01-06 16:44:27 -08:00
Andrii Kulian
6fd63e4df6 Merge "Fix selecting focused stack with secondary displays" 2017-01-07 00:16:49 +00:00
Jeremy Joslin
5519d7cf71 Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I7d91fa9a4f6ef4f9170c6af98567ce443c805e74
2017-01-06 15:42:57 -08:00
Alex Naidis
f030a28a6b DefaultPermissionGrantPolicy: Pass correct arguments
After parsing the xml files in the "default-permissions"
system, we are passing the arguments in the wrong order.

The method we are targeting is:
private void grantRuntimePermissionsLPw(PackageParser.Package pkg, Set<String> permissions,
            boolean systemFixed, boolean isDefaultPhoneOrSms, int userId) {

However we are passing our argument for "systemFixed"
to "isDefaultPhoneOrSms" and the other way around too.

This patch fixes it by using the version of the method
which takes 4 arguments and sets "isDefaultPhoneOrSms"
as false.

Change-Id: I3604a5d6045aadcd91b6dd3f6f1b47b561403b23
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-06 22:21:24 +00:00
Fyodor Kupolov
51d34bf06a Merge "Always use multi-dex for FrameworksServiceTests" 2017-01-06 21:45:11 +00:00
Fyodor Kupolov
c0c1123124 Always use multi-dex for FrameworksServiceTests
Otherwise it exceeds ids limit:
ERROR: Dex writing phase: classes.dex has too many IDs. Try using multi-dex

Test: manual - device builds, tests are running
Change-Id: I042cd1b8cb8d41c8db055ba8c6ceb56eb592c30f
2017-01-06 13:36:40 -08:00
Makoto Onuki
2e83edb4b0 Merge "Revert "ShortcutManager: Floating shortcuts shouldn't have target activities."" 2017-01-06 21:32:35 +00:00
Ruben Brunk
7b95418bfe Fix unexpected VR mode exit on package update. am: 1ad4a2d32e
am: 4e61a045e1

Change-Id: Ib5b02c1d27da030cf9f8e75328507b791d934cef
2017-01-06 21:22:57 +00:00
Ruben Brunk
4e61a045e1 Fix unexpected VR mode exit on package update.
am: 1ad4a2d32e

Change-Id: Ic0c025d3f360197dc41fe2b999b5d20763285cd5
2017-01-06 21:14:27 +00:00
TreeHugger Robot
f51b4ff7b1 Merge "Make sure cleanup is always done when task is removed" 2017-01-06 21:00:19 +00:00
TreeHugger Robot
a8d123de10 Merge "Support for WindowContainer controllers and listeners" 2017-01-06 20:07:31 +00:00
Ruben Brunk
1ad4a2d32e Fix unexpected VR mode exit on package update.
Bug: 33809651
Change-Id: Ifbaf705e74eda2bde3e4b2d9092360a1c658e660
2017-01-06 11:23:49 -08:00
Makoto Onuki
9fd9019cf1 Revert "ShortcutManager: Floating shortcuts shouldn't have target activities."
This reverts commit 106ff7a0a1.

Test: All the unit tests (ShortcutManagerTest1*) CtsShortcutHostTestCases and CtsShortcutManagerTestCases

Change-Id: Iadce2b3785cbf728daa60c4e2ff103e516d85896
2017-01-06 11:17:08 -08:00
Andrii Kulian
45a61fe529 Make sure cleanup is always done when task is removed
When Stack#removeImmediately() was called it also recursively
called Task#removeImmediately(), which remove tasks from stack.
This lead to Task#mStack reference being nullified, but task
dim layer user was still registered in DimLayerController.
Therefore there was a crash when dim layer animation occured.

This CL moves most of the logic from Task#removeIfPossible() to
Task#removeImmediately() to make sure that cleanup is performed
every time when task is removed.

Change-Id: Id8d72dc8c66b9eeefbf5c918cf0a0df4ea027fde
Fixes: 34052466
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackTests
Test: #testStackRemoveImmediately
2017-01-06 11:06:19 -08:00
Andrii Kulian
7fc22812ce Fix selecting focused stack with secondary displays
When the last activity finishes in the stack we're looking for other
stacks and making it focused. However we weren't doing that if the
stack was on a secondary display, so the focused stack records were
not updated in stack supervisor.

Now we're looking for other stacks on the same display first. If there
is nothing focusable left - shifting focus to next focusable display.

Test: android.server.cts.ActivityManagerDisplayTests
Test: #testStackFocusSwitchOnDisplayRemoved
Test: #testStackFocusSwitchOnStackEmptied
Change-Id: Ifbb893e12cbe9c4928b949a86fc8bc027de181e4
2017-01-06 10:51:01 -08:00
Yorke Lee
92b504cb9e Merge "Fix for onTaskRemovalStarted callback being sent incorrectly" 2017-01-06 18:32:48 +00:00
Wei Wang
202b862be0 Merge "Move ProcessCpuTracker.init into CpuTracker thread" 2017-01-06 17:43:52 +00:00
TreeHugger Robot
424bce6ec6 Merge "Use internal volume controller and status bar." 2017-01-06 17:39:08 +00:00
Wale Ogunwale
26c0dfed7a Support for WindowContainer controllers and listeners
- WindowContainerController class allows a component outside window manager
to create a window container and communicate directly with it to make
changes. For example, the ActivityRecord class in activity manager uses the
AppWindowContainerController class to create and communicate with
AppWindowToken window container class which is its counterpart on the window
manager side.
- WindowContainerListener interface allows a component outside WM to get
notified of changes to a window container. For example, the ActivityRecord
class in AM implements the AppWindowContainerListener interface to get
notified of changes to the AppWindowToken container.

Bug: 30060889
Test: Existing tests pass and manual testing.
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Change-Id: I2896bfa46a80b227052528c7da8cf4e56beab4bc
2017-01-06 09:11:02 -08:00
Julia Reynolds
bb983d20d2 Use internal volume controller and status bar.
Remove code that let these components be replaced by external
processes.

Bug: 33006669
Bug: 34106436
Test: manual. reboot device, play music, change volume,
view notifications
Change-Id: I458f11537ab9db6f23735487513815553004613f
2017-01-06 15:59:45 +00:00
Julia Reynolds
f35e3976e3 Allow apps to enable notification badging.
Test: runtest systemui-notification
Change-Id: Ia16d671d864d1eee902652e31f023e30dc6b7387
2017-01-06 10:57:51 -05:00
Tony Mak
aedb707aa3 Merge "Allow current profiles to disable keyguard" 2017-01-06 12:06:33 +00:00
Narayan Kamath
6453db68ca PackageManagerService: Enable package parse cache.
Bug: 30792387
Test: FrameworksServicesTests

Change-Id: I817adea928832993afa6182d0510be8abf38e4bb
2017-01-06 09:47:44 +00:00
Narayan Kamath
3aea733059 Merge "PackageManagerService: Implement packageParser cache in ParallelPackageParser." 2017-01-06 09:14:03 +00:00
Lorenzo Colitti
9f19a7f3b9 Merge "Temporarily restore the net.dnsX system properties." 2017-01-06 03:15:28 +00:00
Lorenzo Colitti
e3b85dfbc1 Temporarily restore the net.dnsX system properties.
This will limit app breakage in dogfood. The plan is to remove
these obsolete system properties again in O developer preview
builds so that application developers can move away from them.

Test: marlin boots and net.dnsX exists and is updated correctly

Bug: 33308258
Bug: 33807046
Bug: 34028616
Bug: 34115651
Change-Id: Iaf2fa213c314b7ba251c065b304e7e9869bafe9f
2017-01-06 03:09:18 +00:00
TreeHugger Robot
a4a3e9df7a Merge "Null checks on content resolver query" 2017-01-06 02:42:05 +00:00
Julia Reynolds
d791bbcf81 Merge "Wait 100 ms for assistant response before posting." 2017-01-06 01:30:47 +00:00
Yorke Lee
64fd1ce256 Fix for onTaskRemovalStarted callback being sent incorrectly
Bug: 34114125
Test: Manual - onTaskRemovalStarted is not sent when
activity requests different orientation.

Change-Id: I76e907b299ebf95de73e1f4ba142bb9857d6eda4
2017-01-06 01:27:52 +00:00
Jeff Sharkey
e8cece9f20 Initial API shape for storage statistics.
This API is designed to provide both UID-level stats and overall
summary data for a given storage device, as identified by UUID.

The use of UID-level granularity might appear a bit clunky, but it
matches other usage statistics (such as network and battery), and it
allows us to implement it using an extremely fast quota kernel
feature.

A future CL will wire up the implementation to installd.

Test: builds, boots
Bug: 32206268
Change-Id: I7b51877682d0370c2402c19346f57809f0e7ac53
2017-01-05 15:39:16 -07:00
TreeHugger Robot
54217e5c25 Merge "Added SystemServerInitThreadPool" 2017-01-05 22:37:44 +00:00
Fyodor Kupolov
e29a5a1152 Added SystemServerInitThreadPool
System services can use it during the boot to submit tasks that can be run in
parallel with the main thread.

Switched PersistentDataBlockService and FingerprintService from FgThread to
the new thread pool.

UiModeManagerService: update initial configurations on init thread. They run
while holding the mLock so no extra synchronization barriers are needed at a
later stage.

Test: manual - device boots without errors
Test: ParallelPackageParserTest passes
Change-Id: I548f34b0a18f61924e09a39afb12e085cde35442
2017-01-05 13:12:37 -08:00
Tony Mak
555a59ad27 Allow current profiles to disable keyguard
Test: make cts -j20 && cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testScreenCaptureDisabled_allowedPrimaryUser
      It is not really a CTS verifies the change directly.
      But I can observe that keyguard is dismissed by a test running in managed profile

Bug: 34049587
Change-Id: I94e3d0cd01b10f31745781f35fdc8e3554994db8
2017-01-05 20:42:31 +00:00
Julia Reynolds
4b82f6ddb0 Wait 100 ms for assistant response before posting.
Test: make cts-verifier
Change-Id: Idf04c2d24f02a32634e2308da6d1599c9ea29bd4
2017-01-05 20:26:23 +00:00
Julia Reynolds
9bbe0bb413 Null checks on content resolver query
Bug: 33584356
Test: manual
Change-Id: I05dac1ead1ec1f868f8422d82f245e34a4986ccf
2017-01-05 15:05:02 -05:00
Narayan Kamath
5c50e86301 PackageManagerService: Implement packageParser cache in ParallelPackageParser.
We save about 2800ms of cold startup time over baseline on a marlin,
and ~1200 ms over the parallel parsing case.

                   warm     cold
		   ---------------
Baseline         : 1700ms   4300ms
Parallel         : 1400ms   2700ms
Cache            : 1000ms   1600ms
Cache & parallel : 900ms    1500ms

Note that further changes will improve the speed of cache processing.

This change also includes support for :
- a flag that been flipped in code (currently set to false).
- disabling the cache via a system property.
- wiping the cache on system upgrades.
- cache versioning.

Bug: 30792387

Test: FrameworksServicesTests
Test: manual timing

Change-Id: I281710c110af5307901dd62ce93b515287c91918
2017-01-05 19:15:31 +00:00
TreeHugger Robot
8e780f4c33 Merge "AudioService playback activity notif: check origin of player updates" 2017-01-05 18:59:16 +00:00
Wei Wang
a5c336c32d Move ProcessCpuTracker.init into CpuTracker thread
ProcessCpuTracker.init is slow to start, moving it out of main thread
will accelerate the boot up. ProcessCpuTracker.init is protected with
synchronized keyword, so once the CpuTracker thread is up and running,
we should not see any racing condition caused by this move.

This changes saves ~140ms starting time on marlin

Test: run test frameworks/base/tests/ActivityTests
Bug: 33681304
Change-Id: I260a57ca721999be3a84c0e43837d684e47e3941
2017-01-05 10:38:40 -08:00
Jean-Michel Trivi
46e310b34f AudioService playback activity notif: check origin of player updates
When receiving updates about players, check the validity of the call:
 - the piid must be valid
 - the uid of the caller and that of the player must match

Test: adb shell dumpsys audio
Bug: 30955183
Change-Id: Id15e2b69764ed7db0b93e2c0c96472c30b1d2070
2017-01-05 09:28:08 -08:00
Nicolas Prévot
b4413f694f Merge "Make disallow add/remove managed profile restriction not global." 2017-01-05 14:54:45 +00:00
Nicolas Prevot
2ea46fe658 Make disallow add/remove managed profile restriction not global.
Otherwise: if the DO sets remove managed profile user restriction:
the profile owner of a managed profile cannot remove this managed
profile.

BUG:33854430
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I90b2028ea627a2073298bf9ef3c07b4fdf8d13a1
2017-01-05 11:58:21 +00:00
Martijn Coenen
3a3a4acae4 Update GNSS to use elided interface return values.
Test: mma
Bug: 31830743
Change-Id: I315723bc50f682d90c7afd75357a10ed5d4db03f
2017-01-05 11:12:30 +01:00