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
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
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
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
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)
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
Protobufs make it easy to confuse default and unset values.
Test: atest NotificationManagerServiceTest
Fixes: 149760215
Change-Id: Ia27f33cb8331960369f86e75ac3cfa148dad887a
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
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)
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
Adding a new method to trigger OEM config store removal after migration
is complete.
Bug: 149418926
Test: Compiles
Change-Id: Ie22ff99931cc5f2ccbc47a55a2ac6e3b2baa41d7
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
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)
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
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
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
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
- 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)