IACC#activityTopResumedStateLost was reported to ATMS later than
IACC#activityPaused sometimes because one is one-way binder call
while the other one is two-way binder.
Also make IACC#activityTopResumedStateLost a two-way binder
Bug: 185810414
Test: atest ActivityLifecycleTests
Change-Id: Ib87de693f5ebcfd836208924aa8fc2a035ca7c82
Problem:
RenderThread blocked during dumping gfx info.
Root Cause:
Though dumpGfxInfo() uses an async binder invocation ,When the caller is system server, this invocation is not IPC that means it is not asynchronous, it will keep waiting if dumpGfxinfo output size larger than 16*4KB as reader thread start by transferpipe.go cannot be executed because write pipe waiting. Ensure this invocation is asynchronous to prevent writer waiting if buffer cannot be consumed.
Solution:
Send write action to handler thread so reader thread can be started to consume the data in buffer.
Fix: 185806813
Test: dumpsys gfxinfo
Change-Id: I37b1c1881a857970019eddfb762ae620e0353744
permissions.
1. Create a generic FgsTempAllowList class, mFgsStartTempAllowList and
mFgsWhileInUseTempAllowList are instantiated from FgsTempAllowList.
2. For mFgsWhileInUseTempAllowList, the uid on this list is allowed to
have while-in-use permission when the FGS is started from background for
a duration of time.
3. When media button is pressed, the targetUid is added to
mFgsWhileInUseTempAllowList, for the duration of 10 seconds, this way the
targetUid can start FGS from background and have while-in-use permission.
4. When checking for ProcessRecord.
mAllowBackgroundActivityStartsTokens, it is the caller app's
ProcessRecord should be checked instead of the service's ProcessRecord.
Bug: 182481312
Test: use b/167998084 reproduce steps, make a voip call, the
receiver side screen is unlocked, the receiver side uses bluetooth
headset button to pick up the call, "dumpsys activity -a" shows the FGS
has "allowWhileInUsePermissionInFgs=true" and "isForeground=true".
Change-Id: Ic80aefe4202fe2210881bb8eea24b6e34cb1e7d0
This is already used for similar events such as icon drops and user taps. Using it to indicate that the user has woken/slept the device (and passing along location information) makes sense!
This was previously rolled back since WallpaperManager can be null in Car environments. This CL now checks if WallpaperManager is null.
Bug: 169693662
Test: locally with modified wallpaper, it receives events
Change-Id: Ie9d21b4ff4a1edf871540481bc0c4216ed686b7f
This ensures that the major action buttons have a minimum visual emphasis in the layout.
Bug: 179178086
Test: manual
Change-Id: I58744ada45d789a9acb53b0f4965354835595b19
Add the ability to override time detector "origin priorities" config
with device_config. This is primarily intended for use by tests to set
the device into known states, regardless of the static xml OEM partner
config.
For example, to test the new "external" suggestion code in CTS, even a
device that does not support it "out of the box" can be set to just use
external suggestions and verify the associated code paths are working.
Previously, external time suggestions were untestable on devices that
didn't use it "out of the box".
Similarly, carrier acceptance tests could use this to just set "nitz"
from the priority list and ensure that NITZ behavior is working as
expected.
An initial TimeDetectorShellCommand implementation has also been written
to provide help that lists the device_config key, and expose settings
state. The set_auto_detection_enabled command can be added after bug
172891783 is complete.
This change also makes the origin priorities more dynamic. i.e. config
overlays like locale or MCC-based resource configs could now also affect
the origin priorities, previously the string was read once and cached
forever.
Bug: 183239968
Bug: 172891783
Bug: 172230856
Test: build / treehugger only
Change-Id: Ic67f35aa6d417bbbb4172643c10a796d484ccd1f
This is already used for similar events such as icon drops and user taps. Using it to indicate that the user has woken/slept the device (and passing along location information) makes sense!
This does require an API modification to add the new string constants to WallpaperManager. This change is being requested by 1P apps (the Live Wallpapers, which are not bundled with the OS and thus can't use system APIs).
Bug: 169693662
Test: locally with modified wallpaper, it receives events
Change-Id: I0cc1bc70dbea509a049b08f8119ed875ffc2e8d5
This method is added to change capabilities
more easily in Robolectric's TimeManager shadow class.
Bug: 159891384
Test: atest core/tests/coretests/src/android/app/time/*
Change-Id: I10b964666e93af9c2c4ead50088773a77521db65
This adds a new API on Activity such that app developers can get signals
when certain PiP UI states change, e.g. stash/unstashed. The idea is that
when PiP is stashed, the activity will get a signal to do anything they
wish, such as pausing/resuming video-like contents.
Bug: 182409584
Test: atest PinnedStackTests#testPictureInPictureStateChangeCallback
Change-Id: I308f3f1c3af8d1a54b63311fb3beaee77d6c7922
* If the password quality is NUMERIC
or NUMERIC_COMPLEX, the credential
type should be CREDENTIAL_TYPE_PIN
Bug: 184103377
Test: atest com.android.server.devicepolicy.PasswordPolicyTest
atest android.app.admin.PasswordMetricsTest
atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
CtsVerifier > Device owner tests > policy transparency test
> set password quality
Change-Id: Ibad35d22c34b6cd9ed34b2e671b38503becd7da5
Before returning result from the API, we go through the list
of all AttributedOpEntries and those which have the same
timestamp are merged into single AttributedOpEntry without
losing any information (it is still possible to query
AttributedOpEntry with different flags / uidstates and get
all the same information).
This CL addresses issue with duplication due to accesses
with different flags / uidstates.
Test: in development
Bug: 176965672
Bug: 183961838
Change-Id: I319dd321a3bfddf0855c10213c49824e9599eb66
A Window Provider Service is a Window-Context-like Service which handles
UI
components and is able to obtain the latest configuration.
The differences between a Window Context and a Window Provider Service
is that:
1. It is always associated with the primary display before
attachWindowToken() or WM#addView is called. It is suggested to
render UI
components after calling the APIs mentioned above.
2. A window context registers the listener in constructor and
unregisters it in finalize(), while a window provider service
registers the listener in onCreate() and unregisters in onDestroy().
3. Like the API Context#createWindowContext(int windowType, Bundle
options),
the users of a Window Provider Service need to override
provideWindowType and
provideOptions to pass the attributes.
4. When there's a configuration updates from the server side,
the Service#onConfigurationChanged callback will be invoked.(TBD)
It is suggested to use window context when possible. This class is to
migrate the
Service to show UI components to the window context concept. We can't
migrate them
to WindowContext directly because developers are used to use this kind
of Service as
the container of UI components and may change its property at runtime.
An example is that keyboard developers may apply a new theme by
InputMethodService#getResources#setTheme(newTheme).
Bug: 159767464
Test: atest WindowContextTests#testWindowProviderServiceLifecycle
Change-Id: I7d537fd2d128efa28aa6e771d77aa105fb497672
Details in design doc go/pip-and-back
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/g8lbXnC8ln0t54ARxfPELo
Bug: 184758170
Test: ensure back stack works for Netflix, see video
Test: atest PinnedStackTests
Test: atest RootWindowContainerTests
Change-Id: I9e2f8d0d50dd107ff30fd7afe6273d8347aac803
Added a builder class for UsageStats and StorageVolume. This allows
us to create these data classes for testing.
Currently, a test in ExtServices creates these objects by using some
hidden APIs. Those tests are part of the mainline test suite, we should
not use hiden APIs there. Otherwise, the test APK cannot be installed on
older platforms.
Test: atest ExtservicesUnitTest
Bug: 182546925
Change-Id: I32939dedfa55233dfb27337cee8818a9dc25d786