Completely remove the system UI visibility from the SystemUI side.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
Test: build on specific target
Change-Id: Ibc866c5fbb35582dad8fd1a90376ce47dc501377
Use Slog.w instead of Slog.wtf for a few empty cases when reading
proc files.
There have been quite a few issues around reporting error at Slog
.wtf level in the past. Although Slog.wtf should not crash itself,
it has indirectly caused a few crashes due to improper handling of
wtf errors e.g. arose from incorrectly mocking BatteryStatsImpl.
Test: Manual
Change-Id: Idce018c928a1bb0f3d4c139382d090be009c291d
These apis are required for adding UI in the Developer options for
modifying compatibility change overrides.
Bug: 138280620
Test: atest CompatConfigTest
Change-Id: If55aa68f9bdd6bed0765324e972de3683bacb553
Add new attribute capability to ProcessRecord, it represents what this
process is allowed to do. Capability is a separate dimension for
process state (ProcState).
In OomAdjuster.java, capabilities can be passed from client to service.
Add PROCESS_CAPABILITY_FOREGROUND_LOCATION to represent the capability
that can access location while-in-use.
For permission such as foreground location access, AppOpsService
checks for FOREGROUND_LOCATION capability, also checks if the process
is in one of the foreground process states, if both conditions meet,
the locaton operation is allowed.
Remove PROCESS_STATE_FOREGROUND_SERVICE_LOCATION.
Bug: 136274596
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
atest CtsAppTestCases:ActivityManagerApi29Test
atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
Change-Id: Ie1c8e670fb0789208b753eb49b7e2fce6a2f211f
The system shouldn't be granting read URI permissions as itself. This
means that heap dumps aren't successfully shared. Moving the heap dump
sharing mechanism to SHELL, which already has the permission to dump
heaps so that dumps can be shared properly.
The Shell changes are submitted separately.
Bug: 126885951
Bug: 135150619
Test: collect a heap dump and confirm it's successfully shared with an app
Test: do manual test on a secondary user & confirm it's not available to
other user
Change-Id: I6d2230bb2d9ca42a105b3fedee9d075de35e3dd3
Since this flag does not do any check during start input,
Remove this flag and the related parameter for IMM#onPostWindowFocus
to keep the logic simpler (included removing
ViewRootImpl#mHasHadWindowFocus).
This is refector CL and does not impact any behavior change.
Bug: 141738570
Test: Refector CL, make sure all existing test passed.
Change-Id: I9119f4846cbbd2b15246dea9a3b1fc5845dce951
Wifi/telephony mainline modules uses IBatteryStats which is an AIDL &
hence cannot be made a @SystemApi. Create a new manager class to wrap
around this AIDL to expose @System Api.
Bug: 138806762
Test: Device boots up & connects to wifi networks.
Change-Id: Ib8816c3df17ccc562b9664e7bea1ef01ab61f697
Refactor the loading of target labels. Make them on demand and
asynchronously. Also, use AsyncTask to update and sort alphabetical
list.
Bug: 142659056
Test: Passed all unit tests in ChooserActivityTest. Passed most
ResolverActvitiy unit tests after modification in another CL under same
topic, except setMaxHeight and setShowAtTopToTrue.
Change-Id: I9d0e2343d7ae549990b898fab7ab97f79ad57366
UsageStatsManagerInternal is also no longer an API surface for
registration of app idle state change listeners. AppStandbyInternal has
become a proper LocalService and interested clients can just use that
directly.
Bug: 140833849
Test: boot & run normally
Test: verify system package backup
Change-Id: Ie63f438f129cd8f41169778a3045d131ca7322fb
Since the clinits may execute methods, we should avoid preloading
classes to avoid executing methods that may not be required. These
samples could cause inaccuracy in the boot image profile.
Test: manual: adb logcat | grep preloadClasses
Bug: 139883463
Change-Id: I5b4568a477724606105196cba010109f80eecec1
The service would query package manager with the provided userId, and
will return true if the package is not visible.
Test: locally, b/143129258
Change-Id: Iab8ddaa76358d5fad63e10d7c4c3f92e2a0f51a2
Merged-In: I92ea650b49743c388bff9943a7ec620e3d61a5d6
The service would query package manager with the provided userId, and
will return true if the package is not visible.
Bug: 142942524
Bug: 143129258
Test: m, treehugger
Change-Id: I92ea650b49743c388bff9943a7ec620e3d61a5d6
On automotive's reference implementation it can take up to 500ms, although
during this CL tests it took just 56ms:
10-22 16:14:53.241 30451 30525 D SystemConfig: readAllPermissions took to
complete: 56ms
Bug: 143112379
Test: adb logcat SystemConfig *:s
Change-Id: I21462482cd8d6d595220af716bbe6547c7637e49
* Add CREDENTIAL_TYPE_PIN as the fourth credential type.
* Rename existing CREDENTIAL_TYPE_PASSWORD
to CREDENTIAL_TYPE_PASSWORD_OR_PIN which is still referenced
by password data persisted on disk.
* No longer store quality for new credentials (PASSWORD_TYPE_KEY).
Credential type stored in synthetic password blob is now the single
source of truth on what credential (None/Pin/Pattern/Password) the
device currently has.
* Adapt lockscreen FRP to work on a similar fashion (no more quality
being passed around and stored)
* Adapt RecoverableKeystore to use the new PIN credential type.
* Fix existing unit tests
* Add new unit tests for lockscreen FRP.
Upgrade path:
* Existing credentials will have CREDENTIAL_TYPE_PASSWORD_OR_PIN, and when
LSS sees this, it will further consult PASSWORD_TYPE_KEY to distinguish
between PIN and Pattern. The credential will stay this way until the next
password change i.e. no automatic credential upgrade.
* Existing FRP credential will have CREDENTIAL_TYPE_PASSWORD_OR_PIN, and
when LSS sees this, it will further consult the saved quality
PersistentData.qualityForUi to make that distinction.
* Normal and FRP credential enrolled after this CL will store
CREDENTIAL_TYPE_PIN to indicate this is a numeric PIN.
Bug: 65239740
Test: atest com.android.server.locksettings
Test: atest com.android.internal.widget.LockscreenCredentialTest
Test: atest com.android.internal.util.LockPatternUtilsTest
Test: atest LockSettingsShellCommandTest
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest FrameworksCoreTests:PasswordMetricsTest
Test: atest FrameworksCoreTests:PasswordPolicyTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
Test: flash an old build, enroll password and flash to new build.
Verify everything still works.
Test: manually set an PIN/Pattern/Password; then change to
PIN/Pattern/Password; finally remove password
Test: manually create a work profile; try unify and ununify work
challenge.
Test: manually test lockscreen FRP flow (change password via Settings /
DPC)
Change-Id: I781cea4c32d567aac4af692697c4569161580102
Use LockscreenCredential as the representation format for credentials
throughout the LSS system service, until when the raw credential bits
are needed. Most of the changes are just mechanical, except in places
when null was used to represent empty credential, but now it has its
own concrete object.
Test: atest com.android.server.locksettings
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
Bug:65239740
Change-Id: I3997c3c2b6651d11a0e447448ac3a8523a18fa36
Wire up the appearance and the transient state of system bars between
WMS and System UI. The derived classes of CommandQueue.Callbacks no
longer listen to setSystemUiVisibility, but listen to showTransient,
abortTransient, and onSystemBarAppearanceChanged instead.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest
Test: build on specific target
Change-Id: Ie35f4b4468bce7ef8c76f091e306610c069fba85
In order to get a correctly translated error messages, getString(...)
should be called on the application context, as opposed to the system
context. This is because the system context is unaware of the user's
locale.
Bug: 141025588
Test: Face Unlock works E2E
Test: Works with BiometricPromptDemo
Test: atest BiometricServiceTest
Test: atest AuthControllerTest
Test: atest CommandQueueTest
Change-Id: Ic228bb7ebb0d6a4ebaf96b9f1d2d70ed4e9dd79a
Two issues fixed:
1. Resetting to empty password was rejected. Fixed credential type
for this case.
2. Credential type was passed instead of quality.
Bug: 138375712
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Change-Id: I58e9e28e9ee0942f67ea8eedb5fd63e8e56a5f75
Separate the decision on whether to log to two separate ones - logcat
and statsLog to allow separate policies.
Also add startLogAll and endLogAll in preparation for an adb command
that will enable/disable logging to logcat every time.
Test: atest ChangeReporterTest
Bug: 138374585
Bug: 140910281
Change-Id: Ie49368b838a19845f51a2670035f611d3e4b9a1b