Commit Graph

468813 Commits

Author SHA1 Message Date
Dave Mankoff
3c6aaab6c4 Make PhoneStatusBarPolicy injectable.
Add DateFormatUtil that makes DateFormat methods non-static,
(is24HourFormat specifically).

PhoneStatusBarPolicy no longer needs a context.

Bug: 147505562
Test: atest SystemUITests
Change-Id: I7b272441971f5a74f2736cd545498b8b4077fca6
2020-02-25 15:46:28 -05:00
Fabian Kozynski
a43c4b2872 Fix starting user in Controls controllers
Before this CL, the starting user was assumed to be 0 (from the
Context). This may not be true if the controllers are instantiated for
the first time while on a secondary user (thanks to Dagger).

This retrieves the correct current user when the controllers are
created.

Test: manual, open Power menu for the first time after switching users
and look at dump
Fixes: 150219351

Change-Id: I69a7ac32b82700feb707972693bd9b672d179f19
2020-02-25 15:45:25 -05:00
Mathieu Chartier
5c8a5051b3 Use shell commands instead of ITestDevice for BootImageProfile test
For some reason, ITestDevice property getting and setting is flaky on
GCE. This causes frequent test failures.

(cherry-picked from commit 94d9a21ccb)

Test: tested on cuddlefish device
Bug: 149802360

Merged-In: Iba48c173bdea2d55d8f2aa7f0fa382628582fe1c
Change-Id: Iba48c173bdea2d55d8f2aa7f0fa382628582fe1c
2020-02-25 12:44:02 -08:00
Mathieu Chartier
75446bc101 Make BootImageProfileTest less flaky
Use the system properties instead of phenotype since GMS can change the
values more arbitrarily for PH properties.

Test: manual
Bug: 149645847

(cherry-picked from commit 599079b381)

Merged-In: If0a716075597f45e95b8357480e4b4a7c52fbb2a
Change-Id: If0a716075597f45e95b8357480e4b4a7c52fbb2a
2020-02-25 12:41:38 -08:00
Evan Rosky
e84ef9ea64 Use hierarchy focusability to pause the minimized tile
When split-screen minimizes, it should pause whatever is
in the minimized tile.

Bug: 133381284
Test: updated focusability test and existing tests pass.
      Also manually open split minimized and check that
      the primary stack is PAUSED.
Change-Id: I91cd6634f7078a3007d80bb924de508869b6a2d6
2020-02-25 20:11:25 +00:00
Svet Ganov
17a647eee0 Use display context all the way
Bug: 149958394
Test: core/java/android/service/autofill/InlineSuggestionRenderService.java

Change-Id: I15c3149dfe37adef95ffd47454975761d6e624f0
(cherry picked from commit 8cdf9ebc5c)
2020-02-25 20:07:31 +00:00
TreeHugger Robot
10398d29f3 Merge "Atom for when fgs accesses appop" into rvc-dev 2020-02-25 19:59:16 +00:00
Evan Rosky
55bddd83ea Generalize change transition into WindowContainer
Created a SurfaceFreezer class which lives in WindowContainer
and manages/will-manage per-container freezing (snapshots).
This replaces the one-off change transition code.

Change Transitions used to create its own temporary leash
on initialization and that leash would be replaced/cleaned-up
as soon as the animation leash was created.

Now, the SurfaceFreezer creates the animation leash immediately
and SurfaceAnimator can take a SurfaceFreezer instance when it
starts an animation. At this point it will take the leash that
was already created by the freezer and use that. This removes
the messy reparenting/cleanup.

To deal with this, though, leash callbacks into Animatable
needed an extra stage: onLeashAnimationStarting. This is called
when SurfaceAnimatior is actually starting to animate the leash.

Next, DC.mChangingApps was converted to list of WindowContainers
rather than ActivityRecords. Some of the existing change code was
cleaned up (ie. there was some visibility stuff that doesn't make
sense because changing apps are visible->visible) and some of the
Activity-specific functions were generalized. For now, there are
a couple things that use the top-activity for changing Tasks.

The result of this means that windowing-mode change transition can
now fully live at the Task level. This also should allow freezing
at any hierarchy level which enables app-freezes that don't freeze
the whole screen and potentially mixed seamless/snapshot-based
rotations.

Bug: 149490428
Test: existing tests pass. Manually open app in freeform and
      maximize/restore it.
Change-Id: Ib32524ebbbb084a98442d3d035897306a11ee6c2
(cherry picked from commit e55b9e0f9d)
2020-02-25 11:51:36 -08:00
TreeHugger Robot
5291e518a4 Merge "Populate uniq field in uhid." into rvc-dev 2020-02-25 19:39:47 +00:00
TreeHugger Robot
7973854504 Merge "Fix widget restore flow" into rvc-dev 2020-02-25 19:31:08 +00:00
Dave Mankoff
6e63679e52 Ensure that FalsingManager is not active when phone unlocked.
If the phone owner does not have a password setup, the FalsingManager
can be left registered when it should not be. This resolves that
issue.

Bug: 147340089
Test: atest SystemUITests && manual
Change-Id: I7fe925668561d31ab0191d4d97c5d22e110d4675
2020-02-25 14:23:03 -05:00
TreeHugger Robot
0253cc8f2f Merge changes from topics "input_events_id", "wire_input_event_id" into rvc-dev
* changes:
  Send input event ID in InputEventSender.
  Add ID to InputEvent.
2020-02-25 19:20:17 +00:00
TreeHugger Robot
6d03d973c0 Merge "Fix SecurityControllerTest" into rvc-dev 2020-02-25 19:08:38 +00:00
Fabian Kozynski
0fcf7f11a7 Merge "Prevent early destroying HotspotTile" into rvc-dev 2020-02-25 19:03:54 +00:00
Will Brockman
4f0f9d2d85 Start InstanceIDs at 1.
Protobufs make it easy to confuse default and unset values.

Test: atest NotificationManagerServiceTest
Fixes: 149760215
Change-Id: Ia27f33cb8331960369f86e75ac3cfa148dad887a
2020-02-25 18:57:32 +00:00
Julia Reynolds
3e4c88087d Merge "Add owners file Fixes: 150217454" into rvc-dev 2020-02-25 18:54:45 +00:00
Julia Reynolds
36ff1ea03f Add owners file
Fixes: 150217454

Change-Id: I80e624dd3de150cbf1cf50465cadb676256a4063
2020-02-25 18:54:36 +00:00
Siarhei Vishniakou
09bd9d12b3 Add key layouts for Xbox clones
There are a lot of controllers that are essentially 'clones' of the xbox
controllers. They follow the same key layouts.

To support these clones, we add these layouts as a copy of the xbox
layout. They were generated using a small python script.

The layouts will be manually verified for now, on a select subset of
these controllers.

Test: these will be selectively verified manually
Test: we will add CTS for some of these in the future

Bug: 144469012
Bug: 136263708
Change-Id: Id453f103824a1ba2bf03a9309378dafde418e594
2020-02-25 10:54:28 -08:00
TreeHugger Robot
a074a4b230 Merge "Removed permission check" into rvc-dev 2020-02-25 18:51:58 +00:00
Song Pan
85bdb47bcb Catch all exception from statusReceiver.sendIntent.
Any exception here (e.g., NPE) will crash the entire system process.

Bug: 150217444
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I86eaa0bf7cb9d39fb23ee6aa71e80547bb95cc7e
(cherry picked from commit 1787f31065)
2020-02-25 18:50:54 +00:00
Hui Yu
5c8ceade92 Exempt callingUid that has START_ACTIVITIES_FROM_BACKGROUND
permission.

From background FGS while-in-use permission restriction.

Bug: 149835015, 136219221
Test: adb shell dumpsys activity -a
Change-Id: I1a23689a2939d15101a1d8bb21a85fc9a9cca31f
(cherry picked from commit d731201cac)
2020-02-25 18:40:45 +00:00
Kevin Han
a052c0ca0b Fix inflating content views after removal
Fix a crash with NotifBindPipeline where we try to inflate a group child
after it's removed. This is due to some edge case logic where we delay
view hierarchy updates til later (i.e. after the notification is
removed) and inflation logic and group change logic being precedented on
view hierarchy changes.

This fixes that by checking if the row is already removed in order to
stop inflation. We add a similar check for redaction since that is
similarly triggered at the view hierarchy stage.

Bug: 149989491
Test: Repro from bug
Change-Id: I42114bcdaf0d135bcbb68f0b634b77252ea7b8b0
2020-02-25 18:40:10 +00:00
TreeHugger Robot
2c89e32d34 Merge "Make MediaParser match ExoPlayer's sniffing order" into rvc-dev 2020-02-25 18:30:35 +00:00
Peter Kalauskas
81a320279e Merge changes from topic "new-task-snapshots-rvc-dev" into rvc-dev
* changes:
  Disable reduced scale if reduced scale config is 0
  Store original task width and height instead of scale
2020-02-25 18:29:50 +00:00
TreeHugger Robot
7def6932cb Merge "Tablet-specific UI updates to user switcher. DO NOT MERGE" into rvc-dev 2020-02-25 18:24:59 +00:00
TreeHugger Robot
c5162ed949 Merge "media: fix MediaCodecTest#testException" into rvc-dev 2020-02-25 18:21:19 +00:00
Roshan Pius
4c7baf7ba2 WifiMigration: Add a method for removing config store
Adding a new method to trigger OEM config store removal after migration
is complete.

Bug: 149418926
Test: Compiles
Change-Id: Ie22ff99931cc5f2ccbc47a55a2ac6e3b2baa41d7
2020-02-25 10:18:52 -08:00
Amy Zhang
282b5c2043 Merge "Add @NonNull annotation per API Council's suggestion" into rvc-dev 2020-02-25 18:16:49 +00:00
Chavi Weingarten
87293fda8d Merge "Fix Display SurfaceControl leak" into rvc-dev 2020-02-25 18:11:54 +00:00
Samuel Fufa
086e11fdb6 Merge "Clear registered prediction callbacks on destroy" into rvc-dev 2020-02-25 18:08:32 +00:00
Sunny Goyal
c444b514bf Removing possible user defined strings from bugreport view-dump
Bug: 64101886
Test: Verified build
Change-Id: Ifad98a268fc17a2e1572ca3e0962a89447083294
2020-02-25 10:00:37 -08:00
Automerger Merge Worker
c644bff0c2 [automerger skipped] Merge "DO NOT MERGE Hold onto NotificationListener when reconnecting notifications UI." into qt-qpr1-dev am: b896072638 -s ours
am skip reason: subject contains skip directive

Change-Id: I45d10cb78a32e891fc3fcd05b6b5232ba7762457
2020-02-25 17:51:59 +00:00
Kevin Hufnagle
c027fa0d0d docs: Fix spelling of "environments"
Test: make ds-docs

Bug: 150187311
Change-Id: Id8ecd7a7e4014e8256b60d6ce2f2f1085ee9cdfb
2020-02-25 17:50:14 +00:00
Sunny Goyal
9962f03b77 Merge "Updating documentation for isDefaultApplicationIcon API" into rvc-dev 2020-02-25 17:46:23 +00:00
Fabian Kozynski
c6616838c3 Merge "Set default for controls as enabled." into rvc-dev 2020-02-25 17:40:14 +00:00
Eric Berglund
b896072638 Merge "DO NOT MERGE Hold onto NotificationListener when reconnecting notifications UI." into qt-qpr1-dev 2020-02-25 17:37:15 +00:00
Santhosh Thangaraj
2ae4ec02f9 Merge "Fix the delay time for Assistant" into rvc-dev 2020-02-25 17:26:10 +00:00
Fabian Kozynski
8014ffec99 Merge "Migrate QS_EDIT metrics to WW" into rvc-dev 2020-02-25 17:11:27 +00:00
Fabian Kozynski
17623bfa8f Prevent early destroying HotspotTile
Due to the switch to Async HotspotControllerImpl, if the controller is
created with the tile it will think that tethering is not available
(because it hasn't received callbacks saying otherwise yet) and the tile
will be preemptively destroyed. This was observable on OTAs (or when
doing a full flash).

With this change, HotspotControllerImpl will assume that tethering is
available by default and will signal callbacks if it learns that it's
not.

There are currently no other consumers of
HotspotControllerImpl#isHotspotSupported.

Fixes: 149492796
Test: atest HotspotControllerImplTest
Test: manual full flash
Change-Id: Id1461b7fbe973b732bc69c7ad77a30e0f66247d8
2020-02-25 12:10:49 -05:00
Adam Bookatz
38767932a2 Atom for when fgs accesses appop
statsd logs when an sensitive appop is accessed while a foreground
service is held. These appops include
OP_FINE_LOCATION
OP_COARSE_LOCATION
OP_RECORD_AUDIO
OP_CAMERA

It logs the number of times each of these appops is requested per session
during which the uid holds any foreground service.
Appops requested while the app's process state is TOP are ignored.

Also, the pre-existing ForegroundServiceStateChanged atom has an
additional field that logs whether the fgs is considered 'in-use' in the
context of being allowed while-in-use permissions.

Bug: 149497535
Test: atest UidAtomTests#testForegroundServiceState UidAtomTests#testForegroundServiceAccessAppOp
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\((60|256)\)'

Change-Id: I991a427dc2ab00399188b10b266ab2d9aa92696d
Merged-In: I991a427dc2ab00399188b10b266ab2d9aa92696d
(cherry picked from commit 0c8637c067)
2020-02-25 17:09:48 +00:00
Rubin Xu
47fa2a88bd Fix SecurityControllerTest
Bug: 149912024
Test: atest com.android.systemui.statusbar.policy.SecurityControllerTest
Change-Id: Ia8e00a6fcd052dfcbe868b17d64f800b73da857f
2020-02-25 16:46:44 +00:00
Santiago Seifert
98127bca05 Make MediaParser match ExoPlayer's sniffing order
Bug: 148940600
Test: CTS.
Change-Id: I7c867f476e1e0b9ef1d7fc9d6779b56b739f5a01
2020-02-25 16:37:10 +00:00
Dave Mankoff
55d5d8c76c Use alternative prox sensor when specified.
This is a manual upstream merge of http://ag/10320285 from Q to R.
It does not merge cleanly since the usage of prox sensors has been
consolidated in R.

With this change, devices are able to specify an alternative proximity
sensor via R.string.proximity_sensor_type, along with a threshold
value below which the proximity sensor is considered "near".

Prior to this, the R.string.doze_brightness_sensor_type value was
serving double duty for this purpose, but, for at least some devices,
we want to have a different brightness sensor vs proximity sensor.

Bug: 149420648
Test: manual
Change-Id: Ifd2006cce1c7a653fd67a7a33b63c5f638384bab
2020-02-25 16:25:41 +00:00
Evan Severson
087b5773f7 Persist the one-time permission flag if set
This flag will now be used to show different ui if the permission has
been previously set as one-time

Test: Reboot and verify ui is consistent
Bug: 144389816
Change-Id: I86fb595b79819a604aaed613d9edf30c883d1440
2020-02-25 15:54:08 +00:00
Patrick Baumann
cb2d2ec786 Merge "Grants visibility on uri permission grant" into rvc-dev 2020-02-25 15:52:29 +00:00
Patrick Baumann
710d720db7 Grants visibility on uri permission grant
When permission is granted to another app via URI, we implicitly grant
visibility to that app of the app ID that that URI resolves to.

Test: atest AppSecurityTests
Fixes: 149781706
Fixes: 145677500
Exempt-From-Owner-Approval: Owner approved prior to cherry-pick
Change-Id: I7c8967a4464fd821e4f95d8eb6c0bcfadadb912e
2020-02-25 15:48:30 +00:00
Patrick Baumann
667af98d38 Merge "Disable caches for perf tests" into rvc-dev 2020-02-25 15:45:32 +00:00
Fabian Kozynski
0424ab1416 Set default for controls as enabled.
From this CL onwards, the default for controls is enabled (still not a
Setting).

The controls section in power menu and the new layout will only be used
if there's at least one app that can provide controls.

Test: manual
Bug: 149992619
Change-Id: I4e78735d642d24fe0080a0f0f4cbc58ffa2d5a94
2020-02-25 10:41:14 -05:00
Ben Murdoch
2724b00212 Tablet-specific UI updates to user switcher. DO NOT MERGE
- Draw a background pill instead of frame on the keyguard
   for the currently active user.
 - Set a different text style for the user switcher

Bug: 146426568
Test: Manual inspection

Change-Id: I5cfefbe375bb0f3b7df8729c473867b97578f81f
(cherry picked from commit d457eef32c)
2020-02-25 15:28:32 +00:00
Makoto Onuki
db91e18075 Make sure always reuse ApplicationInfo when generating ProviderInfo
Bug: 148588589
Test: atest CtsContentTestCases (modulo preexisting failures)
Change-Id: If81f3b343fb018ba52127d038d02e62ca516c18f
2020-02-25 15:18:34 +00:00