Bug:136080195
Test: install UsbAccess and UsbPersistentPermissionsTestApp
(both want to handle USB connection events). Notice the
new warning message for the app(s) that haven't been
granted record permission.
Change-Id: I651ae5e6314a2d59ed4537aa7d7785e27e3b1a52
Bug: 142492493
Bug: 137398133
Test: Unit tests pass. Manual testing with an app configured to receive images via RemoteInput can access and display image URIs after the notification has been canceled, but before the notification entry has been removed from the shade.
Change-Id: If64ae7eff7293df3317a1f629977aaaccd866b32
Instead of showing a notification, the screenshot animates into the
bottom left corner of the phone. Tapping on it leads to the same
intent as tapping "Edit" on the notification would. The screenshot
disappears after 8 seconds.
Bug: 137153302
Test: adds feature behind flag, tested that behavior remains the same
if flag is false
Change-Id: I4f48ba7de36f298bd6a66439ea6885fc92a8cb9c
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
Previously, any static RRO could change the manifest value of any
resource in any package. The initial component-override change
restricted this to only partitions with the ALLOW_APP_CONFIGS flag
are allowed to configure component enabled state.
This change allows any partition to use component-override.
Bug: 135048762
Test: adb shell pm query-services \
com.android.bluetooth/.sap.SapService
Change-Id: I035b2233bceb4ed7b091295e5aaa99b61dad851e
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
Also logs which sysconfig file is read, which helps debugging the multiple
layers (OEM, Vendor, system, etc...)
Bug: 134605778
Test: adb shell dumpsys user | tail -5
Change-Id: I4b312d6573818144864f7b6bb403c59e722978ad
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