8649 Commits

Author SHA1 Message Date
Automerger Merge Worker
25457a966a Add test for OverrideValidatorImpl am: 1828d218d6 am: 261d85b7ce am: 7311ee7976
Change-Id: I9df678420e589c3b76284047038d5f0d0cf20365
2020-01-08 18:55:23 +00:00
Automerger Merge Worker
f1c5228703 Enforce overriding methods for IPlatformCompat am: 465b214383 am: ed7fc22f27 am: f4115dd50f
Change-Id: I62f976d42d30ac2b4ab5891f6f5b68ccfa33c81f
2020-01-08 18:55:13 +00:00
Automerger Merge Worker
577d6b2be5 Merge changes from topic "fix-policy" am: e7194bfdfc am: e2e382b125
Change-Id: I3c22013be3e281c0a94a2e22114009407eb7d2d4
2020-01-08 18:54:26 +00:00
Automerger Merge Worker
7311ee7976 Add test for OverrideValidatorImpl am: 1828d218d6 am: 261d85b7ce
Change-Id: I85702ddaa1c801e8078a6e25d2457af264e778ed
2020-01-08 18:54:19 +00:00
Automerger Merge Worker
f4115dd50f Enforce overriding methods for IPlatformCompat am: 465b214383 am: ed7fc22f27
Change-Id: Id4eafc4f2700b0c7e4578471059204dbc756fdd9
2020-01-08 18:54:13 +00:00
Andrei Onea
261d85b7ce Add test for OverrideValidatorImpl
am: 1828d218d6

Change-Id: I8a07c6c7542db7b7a2654f45aaaa39d452101605
2020-01-08 10:48:02 -08:00
Andrei Onea
ed7fc22f27 Enforce overriding methods for IPlatformCompat
am: 465b214383

Change-Id: I2f6ff12c492eaf9cc9b8852b0d2b12facb622596
2020-01-08 10:47:55 -08:00
Andrei-Valentin Onea
e7194bfdfc Merge changes from topic "fix-policy"
* changes:
  Refactor CompatConfigTest and PlatformCompatTest
  Add test for OverrideValidatorImpl
  Enforce overriding methods for IPlatformCompat
2020-01-08 18:42:44 +00:00
TreeHugger Robot
28b4fc8d1b Merge "Only update non-empty last frame in the first layout" 2020-01-08 18:02:20 +00:00
TreeHugger Robot
e3c53e7082 Merge "Identify the index ranges that needs to be read for a query." 2020-01-08 17:41:41 +00:00
Vinit Nayak
9b451a609a Merge "Change screen rotation animation" 2020-01-08 17:31:14 +00:00
Riddle Hsu
12c0545656 Only update non-empty last frame in the first layout
So the window will be notified to resize, then it may
compute a new non-zero requested size according the
result of the first relayout.

Fix: 147086315
Test: atest DisplayContentTests#testRequestResizeForEmptyFrames

Change-Id: Ibaef927b045041398c3ed0c069af930bd7466163
2020-01-08 17:01:37 +00:00
Neil Fuller
d159015e54 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
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
2020-01-08 17:00:34 +00:00
Omer Nebil Yaveroglu
01f7ece3f0 Identify the index ranges that needs to be read for a query.
Bug: 145493956
Test: atest FrameworksServicesTests:RuleIndexingControllerTest
Change-Id: I0bf4dca861725683fffdb14af175ae3eb4992d74
2020-01-08 16:40:58 +00:00
Automerger Merge Worker
2d1ce374af Merge "Remove AppWidgetManagerInternal instance before adding to global registry of LocalServices" am: d92149a76a am: 2adbc88c08 am: 74cc5401c0
Change-Id: I5d4270d37d8598f94d0bc59009dd6ae4a7fb718e
2020-01-08 16:32:06 +00:00
Automerger Merge Worker
74cc5401c0 Merge "Remove AppWidgetManagerInternal instance before adding to global registry of LocalServices" am: d92149a76a am: 2adbc88c08
Change-Id: I4f529c067e7ba577874c15f5910f5d085cd97e8a
2020-01-08 16:17:45 +00:00
Eran Messeri
a1015c8c95 DPM: Add method for Organization-owned device detection
Add a method to the DevicePolicyManager for finding out if the device is
an organization-owned device with a work profile (i.e. it has a work
profile but the work profile was created during the provisioning flow).

This method is currently available for privileged callers (system API),
since other methods (e.g. isDeviceManaged) are also restricted.

NOTE: Addition of GTS tests is pending final decision on whether this
will be public API or not.

Bug: 143518237
Bug: 144978467
Bug: 147340575
Test: atest FrameworksServicesTests:DevicePolicyManagerTest#testIsOrganizationOwnedDevice
Test: CTS tests that are on hold for now.

Change-Id: I26ce1de10844dc297924427a6d46df9208931ab0
2020-01-08 16:02:44 +00:00
TreeHugger Robot
ac3def4018 Merge "Test disabling of wireless charging animation" 2020-01-08 16:01:13 +00:00
Sunny Goyal
d92149a76a Merge "Remove AppWidgetManagerInternal instance before adding to global registry of LocalServices" 2020-01-08 15:22:09 +00:00
David Su
543edf2416 NetworkScoreServiceTest: Remove usages of @hide Wifi APIs
Bug: 138801922
Test: atest NetworkScoreServiceTest
Change-Id: I401c064cf3be7a59b54e4c60bccc011cac7e5128
2020-01-07 20:23:50 -08:00
Nicholas Ambur
76cbe0eb15 Merge "fix sanitize soundtrigger hidl properties" 2020-01-08 04:22:31 +00:00
Nicholas Ambur
ff12557fac fix sanitize soundtrigger hidl properties
RecognitionModes property field was not being properly sanitized from
hidl layer. Unit test updated to test this also.

Bug: 142070343
Test: atest SoundTriggerMiddlewareImplTest
Change-Id: I8452c38faaae79d768345cf0ef3d00a335a7a10e
2020-01-07 18:50:20 -08:00
Mady Mellor
00f61363ba Merge "NoMan bubbles policy: remove non-communication bubbles when app is foreground" 2020-01-08 02:48:40 +00:00
Kenny Root
155d5648fd Merge "Support Resume on Reboot" 2020-01-08 01:51:17 +00:00
Srinivas Paladugu
edfdd4153a Merge "Add new dpm api to disable user control over apps" 2020-01-08 01:32:55 +00:00
TreeHugger Robot
0669ee1e44 Merge "UserManager.isUserOfType" 2020-01-08 00:36:55 +00:00
Danning Chen
e569d7b0c2 Merge "Add the skeleton code for People Service which is a new system service with only internal APIs" 2020-01-07 22:10:19 +00:00
TreeHugger Robot
318d9e82dd Merge "CountryDetector: Enable detector class override for automotive" 2020-01-07 22:07:03 +00:00
Kweku Adams
986dad6da3 Merge "Add CountQuotaTracker." 2020-01-07 22:06:41 +00:00
Mady Mellor
9e923e1c83 NoMan bubbles policy: remove non-communication bubbles when app is foreground
We're no longer allowing any notification to be a bubble if the app is
foreground when the notif was sent; it must always fulfill the communication
policy.

- removed check & FLAG_BUBBLE when app is foreground
- removed the tests for FLAG_BUBBLE on foreground produced bubbles
- added a test to ensure that FLAG_BUBBLE doesn't happen just because the
  app is foreground
- attempted to clean up some of the bubble helper methods

- no foreground service bubbles unless its a phone call (test for this
  in CTS CL)

Test: atest NotificationManagerServiceTest
Test: atest NotificationManagerTest (needs CTS CL)
Bug: 138116133
Bug: 144352570
Change-Id: Idba370c23a3ccaa6479f61a94632f29d623a1e76
2020-01-07 13:28:35 -08:00
TreeHugger Robot
04c349e76e Merge "Add DisplayContent to hierarchy after stubbing." 2020-01-07 20:52:38 +00:00
TreeHugger Robot
ff2fc36979 Merge "Skip forwardInset with adjustResize test for IME insets" 2020-01-07 20:47:57 +00:00
Alex Mang
509e55481f Adding additional listeners (onNotificationVisibilityChanged,
onPanelHidden, onPanelRevealed) to NotificationAssistantService.

Bug: 147149509
Test: atest NotificationManagerServiceTest#testOnPanelRevealedAndHidden,testStats_updatedOnVisibilityChanged
Change-Id: If17070677d01b00d7c3cdda9a0e9d3e8f47f9062
2020-01-07 12:07:24 -08:00
TreeHugger Robot
e4f93070ed Merge "Collect historical appops by feature" 2020-01-07 19:20:21 +00:00
Kweku Adams
fd05b019c5 Add CountQuotaTracker.
This adds a utility class that can track instantaneous app behavior and
manages count quotas for the owning system. A system service just needs to
create a tracker, set the limits, and call the relevant APIs to determine
what to do for each behavior. JobScheduler will use it to prevent apps from
calling JobScheduler.schedule() too often.

Bug: 135764360
Test: atest CountQuotaTrackerTest
Change-Id: Iacd4286bd7f4ab3fc428d8e2ec573671b287f225
2020-01-07 11:16:05 -08:00
TreeHugger Robot
83d651f798 Merge "Introduce a RuleIndexingParser class that will help us to identify the range of the bytes to be read and parsed." 2020-01-07 19:06:03 +00:00
Christophe Koessler
34147601d8 CountryDetector: Enable detector class override for automotive
The detector class to be used by the CountryDetectorService can be set
by overlaying config_customCountryDetector in the device config.
For automotive devices only.

Test: atest CountryDetectorServiceTest
Bug: 141626568
Change-Id: I158abd6397e3102d13e431ba043e8ce45061b64a
2020-01-07 10:43:31 -08:00
Garfield Tan
fbd233aa86 Add DisplayContent to hierarchy after stubbing.
doAnswer type of stubing doesn't completely eliminate race conditions.
The failure happens because when answers are commited to
InvocationContainerImpl it uses a local variable invocationForStubbing
to save the stubbing method, which could be changed from a different
thread by a natural call into the mock/spy before answers are added to
InvocationContainerImpl.

Sequence of events:
1) [testing thread] Commiting stubbing by calling method into the
mock/spy. In this case it could be
DisplayContent#supportsSystemDecoration() in line 159 in
TestDisplayContent in this case. The call was intercepted by
MockHandlerImpl#handle() and further handled by
InvocationContainerImpl#setMethodForStubbing(), in which it already set
invocationForTesting field and didn't clear doAnswerStyleStubbing yet.
2) Another thread calls into the same mock/spy regularly. In this case
it is DisplayContent#getDisplay() as shown in the stack trace in the
bug. It's intercepted by MockHandlerImpl#handle() as well and likely it
thinks we're in the process of doAnswers style procssing and calls into
setMethodForStubbing(). It then mistakenly think we're stubbing
DisplayContent#getDisplay() and found the answer we offered isn't
compatible in the return value.

This is a caveat in Mockito thread safety, though it can be fixed in
Mockito if they're willing to do so. However it's certainly a lot faster
to fix it in our test code.

Also check the caller holds global lock in lieu of synchronization
clause because caller is supposed to be in tests with
RunWith(WindowTestRunner.class) annotation.

Bug: 144611135
Test: atest com.android.server.wm.AnimatingActivityRegistryTest
Change-Id: I8cc4b6ce11ad6c205309476c9eeb4db315f558d6
2020-01-07 09:41:51 -08:00
TreeHugger Robot
1d63fa9ae0 Merge changes I842f377d,Id9708781
* changes:
  Make WC#applyAnimation can apply on Task / TaskStack layer (2/N)
  Make WC#applyAnimation can apply on Task / TaskStack layer (1/N)
2020-01-07 17:26:52 +00:00
Beverly
569c8d1a78 Test disabling of wireless charging animation
Also added tests for toggling on/off the charging vibration setting

Test: atest NotifierTest
Fixes: 141468374
Change-Id: Ie5443e02ba3bec30561460f01dbf1262f041d66e
2020-01-07 17:00:15 +00:00
Kenny Root
f76cfc314c Support Resume on Reboot
When an OTA is downloaded, the RecoverySystem can be triggered to store
the user's lock screen knowledge factor in a secure way using the
IRebootEscrow HAL. This will allow the credential encrypted (CE)
storage, keymaster credentials, and possibly others to be unlocked when
the device reboots after an OTA.

Bug: 63928581
Test: atest FrameworksServicesTests:RebootEscrowDataTest \
            FrameworksServicesTests:LockSettingsServiceTests \
            FrameworksServicesTests:RecoverySystemServiceTest \
            FrameworksServicesTests:RebootEscrowManagerTests
Test: use fake OTA console app to apply update
Change-Id: I59df6942b27ea2bdd11b757922f5169085a325f0
2020-01-07 08:18:02 -08:00
Omer Nebil Yaveroglu
4f5ceae96a Introduce a RuleIndexingParser class that will help us to identify the
range of the bytes to be read and parsed.

Note that the tests for the RuleIndexingController will be implemented
when its identifyRulesToEvaluate method is implemented.

Bug: 145493956
Test: atest FrameworksServicesTests:BinaryFileOperationsTest
Change-Id: Ie43e292f1a19c6c067a61d1d03da911d67620516
2020-01-07 15:50:28 +00:00
TreeHugger Robot
5f7bd9b8a9 Merge "Output the identified index maps into the indexing file." 2020-01-07 12:21:05 +00:00
Kholoud Mohamed
b848a1017c Merge "Add default cross-profile package APIs" 2020-01-07 11:29:09 +00:00
Omer Nebil Yaveroglu
2935a21b12 Output the identified index maps into the indexing file.
Bug: 145493956
Test: atest FrameworksServicesTests:RuleBinarySerializerTest
Change-Id: I892cc01e1395bbd16734fe30be70748a82cd536e
2020-01-07 10:59:53 +00:00
Automerger Merge Worker
8303c9def2 Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756 am: ef100e45fe
Change-Id: Ie4ab2ecaa0778fa6ff7d75e5677dfb4bed1d443d
2020-01-07 10:45:04 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Tiger Huang
e611e8c42e Merge "Wait for the right handler in TaskPositioningControllerTests" 2020-01-07 09:37:09 +00:00
lumark
5341d1c7cc Make WC#applyAnimation can apply on Task / TaskStack layer (1/N)
- Use WC#getDisplayContent instead WC#mDisplayContent in
WC#okToAnimation and WC#okToAnimate.

- Fix some places that calls isAnimating() needs to add PARENTS flag.

- Add unit tests to verify Task / Stack can applyAnimation with expected
  animation state.

- In Task#createRemoteAnimationTarget(), use WC#getTopMostActivity to
  get top most activity rather than using getTopVisibleActivity, to
  prevent closing activity may not get corresponding activity instance
  case.

- Fix WC#isWaitingForTransitionStart and WC#isAppTransition won't get
  correct result when animating app transition on Task / TaskStack container.

- To ensure onAppTransitionFinished will be called when enabling
  hierarchical animation, needs to let activity.onAnimationFinished()
  also be called.

- Implement Task#getAnimationBounds to get stack's bounds when
appStackClipMode is STACK_CLIP_BEFORE_ANIM.

Bug: 142617871
Bug: 131661052
Test: atest WindowContainerTests

Change-Id: Id97087819cab54ba35fb4b9ae4b5b95a572ad377
2020-01-07 14:54:44 +08:00