8649 Commits

Author SHA1 Message Date
TreeHugger Robot
df42638f04 Merge "Revert "Change screen rotation animation"" 2020-01-11 00:21:53 +00:00
Soonil Nagarkar
9ec0185628 Fix bug with provider enabled state across profiles
Pull all user logic out into a utility class (which can be mocked for
unit testing!).

Provider useability was not properly being updated for all current user
profiles, only for the current user. This fix ensures that all profiles
see the correct useable status for the provider.

Test: atest CtsLocationManagerFineTestCases
Change-Id: I799b16613d6a98e52eb2c561b6605d2c872fbf23
2020-01-10 13:42:38 -08:00
Dmitry Dementyev
e8f4f72419 Merge "Use new params for platform key protection." 2020-01-10 21:14:10 +00:00
Mohammad Samiul Islam
a2fbe126c9 Merge changes from topic "rollback-of-apk-in-apex"
* changes:
  Check if number of packages enabled for rollback is equal to number of sessions
  Rollback user data of apks-in-apex while rolling back the apex
2020-01-10 21:13:26 +00:00
TreeHugger Robot
d8468f82fe Merge "Adding additional listeners (onNotificationVisibilityChanged, onPanelHidden, onPanelRevealed) to NotificationAssistantService." 2020-01-10 20:59:29 +00:00
Rob Carr
57b072545f Merge "Introduce TaskOrganizer" 2020-01-10 20:27:27 +00:00
Automerger Merge Worker
60579b88eb Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d am: 16f33e4381
Change-Id: I7827a9ed8fa46cdac667d1af42719e7d84133a91
2020-01-10 19:34:50 +00:00
Vinit Nayak
c17f3924c6 Revert "Change screen rotation animation"
This reverts commit 4f62f21a30523d6767a75437b9d3183a62173be1.

Reason for revert: Might be causing Camera CTS tests to fail b/147384764

Change-Id: I0e0abeee90287cb290fbf41cab5d90fff25df304
2020-01-10 18:23:55 +00:00
Automerger Merge Worker
16f33e4381 Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d
Change-Id: I10f8439a8e8dbca17c163f9a5561b4ebbd2372be
2020-01-10 18:16:03 +00:00
David Su
84464cae37 Merge changes I401c064c,I16431a4d
* changes:
  NetworkScoreServiceTest: Remove usages of @hide Wifi APIs
  NetworkKeyTest: remove @hide Wifi API usages
2020-01-10 17:54:10 +00:00
TreeHugger Robot
0df353738f Merge "Add support for conversation notification channels" 2020-01-10 17:46:58 +00:00
Jorim Jaggi
fa833b69b4 Merge "Move visible insets calculation to client" 2020-01-10 17:17:42 +00:00
Nicholas Ambur
bcc216f212 Merge "add supportedModelArch to SoundTrigger properties" 2020-01-10 17:09:00 +00:00
Mohammad Samiul Islam
3fcecfc1ce Rollback user data of apks-in-apex while rolling back the apex
Currently, the RollbackManager is not aware of the apk-in-apex being
installed since the install is done by PM during scan phase of boot. As
such, RM does not backup the user data of the apk-in-apex.

In the new implementation, we ask the RM to snapshot/restore user data
of apk-in-apex while resuming the apex session in StagingManager.

Bug: 142712057
Test: atest StagedRollbackTest#testRollbackApexWithApk
Test: atest AppDataRollbackHelperTest
Test: atest RollbackStoreTest
Test: atest RollbackUnitTest
Change-Id: Ibbaa5d0c98cb883588c085d77bc89c3e8217d76a
2020-01-10 16:15:47 +00:00
Julia Reynolds
0f76734e36 Add support for conversation notification channels
Bug: 137397357
Test: atest, cts
Change-Id: I3d8f9ec2f318ba8a16e6b82f656884cf142adf9c
2020-01-10 16:01:03 +00:00
Jorim Jaggi
4e04eb24ae Move visible insets calculation to client
As otherwise they may be out of sync, leading to shifting when the
IME disappears.

Bug: 111084606
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest
Change-Id: Ifd7dfa6694efccf8693fd46bec1a9dea879790ff
2020-01-10 15:36:51 +00:00
Chandan Nath
101f60b732 Merge "Dump information for all users running backup in backup dumpsys." 2020-01-10 15:01:47 +00:00
nathch
5d51c314c2 Dump information for all users running backup in backup dumpsys.
Currently backup dumpsys in bugreport only contains information
for system user making it hard to debug backup bugs in non-system
users. Therefore, add dumpsys information for all users running backup.

For system user, keep the dumpsys format the same for compatibility with
cts and gts tests. For non-system users, add a prefix "User <userid>:"
to all dumpsys headers.

The changes in Android.bp and AndroidManifest.xml are to support mocking
of the static method DumpUtils.checkDumpAndUsageStatsPermission in the
test testDump_systemUserFirst

Bug: 143867387

Test: atest com.android.server.backup.BackupManagerServiceTest

Test: atest com.android.server.backup.UserBackupManagerServiceTest

Test: adb shell pm create-user test1 -> say this gives 11
adb shell am start-user 11
adb shell bmgr --user 11 activate true
adb shell dumpsys backup users -> "Backup Manager is running for users: 0 11"
adb shell dumpsys backup -> contains both
"Backup Manager is enabled / setup complete / not pending init" and
"User 11:Backup Manager is disabled / not setup complete / not pending init"
adb shell pm remove-user 11

Test: "adb bugreport" on device with secondary user as created above and check that result
contains dumpsys for both system and secondary users.

Test: atest -v CtsBackupTestCases
Test: atest -v CtsBackupHostTestCases

Change-Id: Ib94c168f8e89b0ba8f398152ea744fe3d626efc4
2020-01-10 13:10:45 +00:00
Alan Stokes
5835b591d2 Merge "Preserve install initiatior package on uninstall." 2020-01-10 09:57:45 +00:00
TreeHugger Robot
5049573e20 Merge "Move setAppStandby logic inside AppStandbyController." 2020-01-10 09:42:05 +00:00
TreeHugger Robot
3ac0f19a6a Merge "Modify the RuleBinaryParser to only parse the ranges that are within the index ranges." 2020-01-10 09:37:31 +00:00
Automerger Merge Worker
aa58c0d5c3 Merge "Rename android.util.TimestampedValue to android.os" am: 641fa6730a am: fee904a5fb
Change-Id: Ib439759dbee692a624491267d07f72b0d754779d
2020-01-10 09:18:38 +00:00
Ömer Nebil Yaveroğlu
99266924d5 Merge "Implement a tracked bit reader (BitTrackedInputStream) which is capable of moving the file reading cursor forward when needed." 2020-01-10 08:29:03 +00:00
Neil Fuller
641fa6730a Merge "Rename android.util.TimestampedValue to android.os" 2020-01-10 08:11:14 +00:00
Robert Carr
8a2f913ac4 Introduce TaskOrganizer
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
        1. The interface itself for implementation by SysUI
        2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.

Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
2020-01-09 13:04:18 -08:00
Hongming Jin
d261711e49 Merge "System action registration API for SystemUI" 2020-01-09 21:00:39 +00:00
Kweku Adams
c4ee998be8 Move setAppStandby logic inside AppStandbyController.
Since we've moved AppStandbyController inside the JobScheduler mainline
module boundary, we need to move the logic of setAppStandby over so that
it's consistent for callers and easy to do the right thing.

Bug: 137763703
Bug: 145551233
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Test: atest UsageStatsTest
Change-Id: Ie2ccb0508c3a3887ab3debc47e78427477d2d77b
2020-01-09 12:33:44 -08:00
Gavin Corkery
3df3e3b0bf Merge "Integrate Rescue Party with Package Watchdog" 2020-01-09 19:59:28 +00:00
Omer Nebil Yaveroglu
053ee29ff0 Modify the RuleBinaryParser to only parse the ranges that are within the
index ranges.

Bug: 145493956
Test: atest FrameworksServicesTests:RuleBinaryParserTest
Change-Id: I5a453cf49b937fa4516ae9939ec6d7bba02e7ac0
2020-01-09 17:57:27 +00:00
TreeHugger Robot
838a664628 Merge "Ensure adb key store is instantiated before revoking grants" 2020-01-09 17:11:24 +00:00
Alan Stokes
72b7e673c7 Preserve install initiatior package on uninstall.
Previously when an installer package was uninstalled we removed all
reference to it in InstallSource.

Now we retain the initiator package name (but not installer or
originator). We set a flag to remember it has been uninstalled, and we
also store its signatures which would otherwise cease to be
available. Update persistence logic.

Also minor refactoring of InstallSource#create to separate the normal
case from those that need to set every field.

This information is not yet exposed in the API, but it will be.

Test: atest PackageManagerTests PackageVerifierTest
Test: Manually verify XML contents before & after uninstalling an installer.
Bug: 134746019
Bug: 146555198
Change-Id: I1452402de554b916e5f79bd386c5857d4860ba12
2020-01-09 16:16:18 +00:00
Neil Fuller
35cc296228 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e5445fcfc0b3e4084095e2850d28a3fb4)
2020-01-09 15:34:43 +00:00
Omer Nebil Yaveroglu
918e0ec580 Implement a tracked bit reader (BitTrackedInputStream) which is capable
of moving the file reading cursor forward when needed.

Bug: 145493956
Test: atest FrameworksServicesTests:BitTrackedInputStreamTest
Change-Id: I18f95e17f3cce4d5d818219cdde07b354bfa9081
2020-01-09 15:00:58 +00:00
TreeHugger Robot
b22fc1bea4 Merge "Use START/STOP messages to update visibility" 2020-01-09 14:30:37 +00:00
Automerger Merge Worker
785d0be343 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e am: e4601e0a58
Change-Id: I1bb272727cbaec0102669b3f3b8141994f8e1f9a
2020-01-09 09:37:50 +00:00
Automerger Merge Worker
e4601e0a58 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e
Change-Id: I771bf8836f9b754fc05fd743de8cc5a15aecddf1
2020-01-09 09:18:36 +00:00
Steven Thomas
363154b173 Merge "Rename DesiredDisplayModeSpecs.defaultModeId to baseModeId" 2020-01-09 04:11:29 +00:00
TreeHugger Robot
9cb1238490 Merge "Update WmTests file docs" 2020-01-09 03:22:49 +00:00
junyulai
d27a1725e8 [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
Steven Thomas
ec161948e0 Rename DesiredDisplayModeSpecs.defaultModeId to baseModeId
This is followup from a code review comment at ag/9588196. In display
manager, each display already has a concept of a default mode id, so
rename DesiredDisplayModeSpecs.defaultModeId to baseModeId, to avoid
confusion.

Bug: 142507213

Test: atest FrameworksServicesTests:DisplayModeDirectorTest
Change-Id: I5cc137bb6f79dc120c29abda4e352e185c3aff5b
2020-01-08 18:16:10 -08:00
Michael Groover
938fa456df Ensure adb key store is instantiated before revoking grants
If adb is not enabled on a device then the adb key store is not
instantiated when the AdbDebuggingManager's handler is started as
in most cases it will not be needed. However if the user attempts
to revoke any previous adb grants when a device is booted with adb
disabled it will result in a NPE. This commit ensures the key store
is instantiated before attempting to revoke authorizations.

Test: atest AdbDebuggingManagerTest
Test: Manually invoked 'Revoke USB debugging authorizations' after
      a boot with adb disabled.
Fixes: 145790817

Change-Id: Id00e531c18412be009a211eec80a72867659608f
2020-01-08 17:42:48 -08:00
Andrii Kulian
f5d1411eb2 Update WmTests file docs
Test: atest WmTests
Change-Id: Ic2881d0abb6423f549080e83517343874ebed04c
2020-01-08 17:23:56 -08:00
Andrii Kulian
b9faa03b90 Use START/STOP messages to update visibility
Activity visibility messages simply move the activity to STOPPED or
STARTED state. We can use the lifecycle messages to do the same and
simplify the logic/remove duplicated code.

This CL also removes the option to send STOP message without making
the client invisible and actually calling onStop(). This option
caused a mismatch of the state between server (STOPPED) and client
(PAUSED). Also, in cases when the device was going to sleep, STOP
message was always followed by SLEEP message, which called onStop()
anyway.

Bug: 137329632
Bug: 129750406
Test: AM/WM CTS and unit tests
Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
2020-01-08 15:29:57 -08:00
Nicholas Ambur
38027cd860 add supportedModelArch to SoundTrigger properties
Bug: 142414689
Test: atest SoundTriggerMiddlewareImplTest
&& GTS assist test suite

Change-Id: I201a8ab919b0a27fa1ed2fd7804c78edccefc647
2020-01-08 14:49:49 -08:00
Gavin Corkery
69395659e3 Integrate Rescue Party with Package Watchdog
Integrate Rescue Party as an observer for Package
Watchdog, for managing package failures. Rescue Party
will be a persistent observer, meaning it may receive
failure calls for packages it has not explicitly asked
to observe.

Remove app failure calls and thresholding logic from
Rescue Party. Remove obsolete Rescue Party tests
and add persistent observer tests to
PackageWatchdogTest.

Test: atest PackageWatchdogTest
Test: atest RescuePartyTest
Test: atest StagedRollbackTest
Bug: 136135457
Change-Id: I55ec0de48acd5434255811feba758d38c9304478
2020-01-08 22:17:00 +00:00
Eran Messeri
76a011ba2a Merge "DPM: Add method for Organization-owned device detection" 2020-01-08 19:35:46 +00:00
Neil Fuller
540f003086 Merge "Rename android.util.TimestampedValue to android.os" 2020-01-08 19:35:27 +00:00
Hongming Jin
bc76112e0b System action registration API for SystemUI
Bug: 136286274
Test: atest AccessibilityManagerTest
      atest AccessibilityManagerServiceTest
Change-Id: I6bbdf3627bfc9b39551cc7809dda1cf43d1d6ea4
2020-01-08 11:22:48 -08:00
Dmitry Dementyev
b5b22b19f9 Use new params for platform key protection.
UnlockedDeviceRequired=true keys survive LSKF removal.
Generation id for keys created with new param will start from 1000000.
New parameter only works for primary user.
Added 2 seconds delay between phone unlock and running sync task.

Test: atest com.android.server.locksettings.recoverablekeystore
Bug: 111561213
Change-Id: Ifc48ef823a72fdbdff1a09563de0d0be0b004f79
2020-01-08 10:58:00 -08:00
Automerger Merge Worker
a067a7bc05 Merge changes from topic "fix-policy" am: e7194bfdfc am: e2e382b125 am: 577d6b2be5
Change-Id: Ibd6fe5d8220983b94fb4ce480f6d71da342cf21d
2020-01-08 18:55:29 +00:00