According to new requirements in b/121179845, we are changing the
API pattern from "add/remove" to "set(set<string>)" to support
"enable all packages" operation. Setting the whitelist to null
will enable all packages. This behavior is consistent with existing
methods in DevicePolicyManager, e.g. setPermittedInputMethods.
Also corrected some languages in the comments and annotations.
Bug: 121179845
Test: atest ManagedProfileTest#testCrossProfileCalendar
atest DevicePolicyManagerTest
Change-Id: I87f17a2094792e44fdeb672658bddb871c2c1eeb
Added a new AppUsageLimit group observer which follows the same pattern as
other UsageGroups. This specific observer allows the launcher to query
for the AppUsageLimit, available via the new LauncherApps API below. The
observer can be registered and unregistered via the respective new APIs in
UsageStats.
LauncherApps has a new API which allows it to get the AppUsageLimit for
a specified package and user, initally set via the API in UsageStats.
This new API allows the launcher to query specifics about the limit such
as how much usage time the limit has, and how much total usage time is
remaining.
Bug: 117409586
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForUnregisterObserver
Test: manual (mmma frameworks/base/tests/UsageStatsTest/)
Change-Id: Ifaffab629409e9191e40404a949c8df70bd3f7cb
Bug: 121198030
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases
Manual testing:
1. Start secondary user -> verify fb-schedule file is created, full backup queue initialised
2. Verify fullbackup of 1 package for system/secondary users, [package] only exists for current user:
* bmgr --user [user-id] fullbackup [package]
* Verify in logs that backup is successful
* Uninstall/install [package]
* Verify data is restored
3. Verify fullbackup of 1 package for secondary user, [package] eixtst for user 0:
* bmgr fullbackup [package]
* bmgr --user [user-id] fullbackup [package]
* Verify in logs that backup is successful
* Uninstall/install [package] for secondary user
* bmgr --user [user-id] restore [token] [package]
* Verify the data restored is different from system user data and belongs to [user-id]
3. Verify backup of all packages for system/secondary users:
* bmgr --user [user-id] backupnow --all
* Verify system packages (android, settings, wallpaper) are skipped for secondary user
* Verify in logs that backup is successful
* Uninstall/install [package]
* Verify data is restored
Base -> Patchset 2: Update method calls to use asUser versions
Patchset 2 -> Patchset 3: Update opComplete callback to accept userId
Patchset 3 -> Patchset 4: Gate system packages from backup/restore for non-system users
Change-Id: Ic3986709ba4d46c0af9da45bb4dd682ee2aef3ce
A system API VrManager#setVrInputMethod(), which was originally
introduced in Android P [1], has hever been used actually. To avoid
unnecessary maintenance burden in the Android Framework, this CL makes
VrManager#setVrInputMethod() no-op.
For those who want to develop VR Keyboard, they should be able to use
Android P build to see if it actually works and it's actually what
they want. In the future, if we can have a working prototype, we can
revisit here to see if we want to restore the framework implementation
or not.
Note that with this CL IMEs that have android:isVrOnly="true" will
always be ignored.
There should be no user/developer visible behavior change because this
is about an unused system API.
[1]: I1db7981b5198e7e203d4578cae7e5b6d20037d0d
89a6c48a8b
Bug: 72522822
Fix: 122058241
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:InputMethodInfoTest
Test: atest FrameworksServicesTests:InputMethodManagerServiceTests
Change-Id: I5464ff74b92ff4a0d30002d643bd3c89925f0f0c
* changes:
Unhide parts of SurfaceControl API in SDK.
Replace SurfaceView background with boundless color layer.
SurfaceControl: Accept instance rather than handle for reparent
WebView will use the node addresses as the id, and these address are 64 bits.
Fixes: 123234726
Test: atest ContentCaptureSessionTest ViewNodeTest ContentCaptureSessionTest \
CtsContentCaptureServiceTestCases \
CtsAutoFillServiceTestCases:VirtualContainerActivityTest \
CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest
Test: m update-api
Test: manual verification with Webview, as CtsAutoFillServiceTestCases:WebViewActivityTest is broken
Change-Id: Iaf3008ed2dd530e596489cb144da678a4dac48ca
go/heapprofd is a native heap profiler for android Q+. Its triggering is
implemented within /bionic/libc. App processes (i.e. zygote children) are not
considered profileable by default on "user" builds. To opt-in into being
profileable, the app's manifest needs to have the Q+ go/profileable flag set
(or be marked as debuggable, which is its superset).
With this change, if the app is supposed to be profileable, post-fork runtime
init calls into bionic to mark itself as such, and possibly start "from
startup" profiling.
On userdebug, all zygote children are marked profileable via the same
mechanism. System server is also marked profileable on userdebug (and needs a
separate codepath, as it does not have an activity thread).
See go/heapprofd-java-trigger for details on why we're taking this approach.
Context on the profiler itself: go/heapprofd-design.
Test: flashed blueline-userdebug, confirmed that java profiling activates from startup and at runtime.
Test: flashed crosshatch-user, confirmed that no java profiling is enabled by default.
Bug: 120409382
Change-Id: Ia038871acfa6b9cae7b6a81f666aecce4b68a4fc
Test Harness Mode is a feature for device farms that want to wipe
their devices after each test run. It stores the ADB keys in the
persistent partition (used for Factory Reset Protection) then performs
a factory reset by broadcasting the MASTER_CLEAR intent.
Upon rebooting, the Setup Wizard is skipped, and a few settings are set:
* Package Verifier is disabled
* Stay Awake While Charging is enabled
* OTA Updates are disabled
* Auto-Sync for accounts is disabled
Other apps may configure themselves differently in Test Harness Mode by
checking ActivityManager.isRunningInUserTestHarness()
Bug: 80137798
Test: make && fastboot flashall -w
Test: adb shell cmd testharness enable
Change-Id: I91285c056666e36ad0caf778bffc140a0656fcfa
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.
Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)
Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
- updated complexity bucket metrics order and comments so that the
buckets metrics are sorted in ascending order of quality
- added helper method to sanitize complexity level (default to none if
invalid)
- added helper method to get min quality allowed at a complexity level
- added helper method to return the minimum metrics to fulfil minimum complexity
and dpm requirements
Bug: 111173457
Test: atest FrameworksCoreTests:PasswordMetricsTest
manual test with TestDpc (ag/5901733)
Change-Id: Icf7c81bea0b66a47c4ee5913cfa0e713b3fa77b6
Starting from Q, downloads added using
DownloadManager.addCompletedDownload are by default going to
be added to MediaProvider regardless of isMediaScannerScannable
argument specified by clients. Update the javadoc to reflect this.
Bug: 120876251
Test: n/a
Change-Id: Ie091703d801bb9cecc9574a122e13a242f4cca95
Test: wake up with power
Test: look at shelf on lock screen
Test: lock device w/ notifications from home screen
Test: receive notification on AOD
Test: atest KeyguardClockPositionAlgorithmTest
Test: atest NotificationRoundnessManagerTest
Test: atest ScrimControllerTest
Test: atest NotificationContentViewTest
Bug: 111405682
Change-Id: I9b4f2febd56a62256124567bffebc9f5f8255847
Starting from Q, on Phones, SYSTEM_ALERT_WINDOW is by default denied for
all callers.
Bug: 63697002
Test: m, flash, boot
Change-Id: I7f2f697ce6cafb43b6e4075ad1985a9041605a0a
This is a follow up CL to our previous CL [1], which enabled spell
checker for background users. In that CL, we assumed that spell
checker user ID can and should always be determined by the calling
user ID. This assumption is not valid at least for direct-reply
notifications on System UI, because System UI always runs as user 0 no
matter who is the current active user.
In order to allow TextServicesManagerService (TSMS) connect to the
right user for such a special use case, this CL introduces a hidden
parameter "userId" to each IPC so that clients that have
INTERACT_ACROSS_USERS_FULL can override the target user ID when
necessary.
For instance, to interact with user 10's spell checker services, you
can obrain a special instance of TextServicesManager as follows.
TextServicesManager tsmForUser10 = context
.createPackageContextAsUser("android", 0, 10 /* userId */)
.getSystemService(TextServicesManager.class)
If the calling process does not belong to user 10, any operations on
that TextServicesManager will result in SecurityException unless the
calling package needs to have INTERACT_ACROSS_USERS_FULL.
This CL is just a preparation. There should be no user-visible
behavior change yet.
[1]: I06c27ef834203a21cc445dc126602c799384527b
06a2624049
Bug: 123043618
Test: spell checker still works
Change-Id: I31dda3ae8795190d44b0622b8335c34ddbc5dd48
1) New api for a11y service to specify display id and return
per display magnification controller.
2) Updae MagnificationController to support multi-display.
3) Update AccessibilityController to support multi-display
magnifier.
Bug: 112273690
Test: atest MagnificationControllerTest
Test: atest MagnificationGestureHandlerTest
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I643a8f96e7d57f729daf8df7f26c9014b1dfd476