Commit Graph

22773 Commits

Author SHA1 Message Date
Alan Viverette
7d1188244c Merge "Migrate frameworks/base javadocs references to androidx" 2022-02-10 18:02:28 +00:00
Sally Yuen
6bb459d3de Merge "Expose prefetching strategies to services" 2022-02-10 17:09:37 +00:00
Shan Huang
27d450afa5 Merge "Avoid leaking Activity from OnBackInvokedCallback." 2022-02-10 14:58:38 +00:00
Charles Chen
c69e76f3e9 Merge "Enable to add ComponentCallbacks to Activity" 2022-02-10 13:14:15 +00:00
Pat Manning
7412dc8ce7 Merge "Change invalid input exception to IllegalArgumentException." 2022-02-10 12:56:44 +00:00
Wei Sheng Shih
761e58ee17 Merge "Make getSplashScreenStyle public." 2022-02-10 07:18:22 +00:00
Charles Chen
ba29cdb63e Enable to add ComponentCallbacks to Activity
This CL is mainly from the requirements to receive WindowMetrics
updates in Jetpack Library. It also benefits the developers if
they want to listen to Activity's configuration changes outside
Activity

Test: atest RegisterComponentCallbacksTest
Bug: 199442549
Change-Id: Iff5c0a4d9c61d30b84ff9aee465f1b6b06f1a48d
2022-02-10 14:55:33 +08:00
Shan Huang
b533660125 Avoid leaking Activity from OnBackInvokedCallback.
- Remove mTopCallback field
- Cleanup compat and default callbacks
- Remove the callback held by WindowState when the window is removed.

Bug: 218328707
Test: atest packages/apps/Launcher3/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
Test: atest frameworks/base/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
Change-Id: I38fd760a617500c874aef10bc8de165880837008
2022-02-10 04:46:24 +00:00
Tim Murray
a9a0b5b7c9 Merge "Improve broadcast tracing" 2022-02-10 01:09:47 +00:00
Antonio Kantek
63ae30e1cd Merge "(TouchMode Permission 2.6/n) Revert Instrumentation#setInTouchMode" 2022-02-10 00:38:26 +00:00
Shannon Chen
65f122bd45 Merge "Fix build warning about permissions for startActivityFromGameSessionForResult." 2022-02-10 00:38:18 +00:00
Peiyong Lin
31a292957c Merge "Update Test API." 2022-02-09 23:21:55 +00:00
Alan Viverette
406e0f6553 Migrate frameworks/base javadocs references to androidx
Does not remove Support Library artifacts from docs classpath (ApiDocs.bp)
because they are still used in development/samples, which is not as easy
to migrate as javadoc.

Bug: 158779503
Test: make docs
Exempt-From-Owner-Approval: Mass find/replace for androidx migration
Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
2022-02-09 22:25:14 +00:00
Yuri Lin
16e1bd9a25 Merge "Update matchesCallFilter guidance to recommend tel: codes" 2022-02-09 20:55:14 +00:00
Felipe Leme
48f8424371 Merge "Fixes some DPM APIs to use the context user." 2022-02-09 20:42:58 +00:00
Felipe Leme
601d3e82ab Fixes some DPM APIs to use the context user.
This APIs are primarily used by CarService, which always runs as
system user, so they cannot rely on the calling user id.

Test: atest CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_newUserDisclaimer # on automotive and phone

Test: manual verification

Change-Id: I56bb8cd12be766ef9da6c71a524912f7f8680aad
2022-02-09 20:41:19 +00:00
Antoan Angelov
d87092533c Merge "API to get the device manager role holder package name" 2022-02-09 20:15:11 +00:00
Antoan Angelov
274ad40ff2 Merge "Add remaining DPM constants" 2022-02-09 20:14:38 +00:00
Kathy Chen
4ff2a4e611 Merge "Add query API for apps to check the event status. The detection service sends back the response with a status. Add client API for apps to start the consent activity." 2022-02-09 19:05:21 +00:00
Nikita Dubrovsky
d8ef185f33 Merge "Update ActivityId to implement Parcelable" 2022-02-09 19:02:56 +00:00
Antonio Kantek
6615233957 (TouchMode Permission 2.6/n) Revert Instrumentation#setInTouchMode
Allow Instrumentation#setInTouchMode to always switch touch mode when
running in instrumented environment.

Bug: 198487159
Fixes: 218118731
Test: atest FrameworksCoreTests
Test: atest CtsWindowManagerDeviceTestCases
Test: atest android.app.cts.ListActivityTest
Test: atest AlertDialog_BuilderCursorTest
Change-Id: I22e4bf0245dcf75a354f2cdc19d7f6107d0abaee
2022-02-09 10:55:43 -08:00
Wenhao Wang
9756d738a0 Merge "Revert "Revert "Revert "User consent for Logcat data access"""" 2022-02-09 18:53:33 +00:00
arangelov
5ed5e86ce8 API to get the device manager role holder package name
Test: atest cts/DevicePolicyManagerTest.java
Fixes: 218515670
Change-Id: Ia4f92d422334cf6069fe87008416f73d06ab80d0
2022-02-09 18:06:03 +00:00
arangelov
aa77a5d077 Add remaining DPM constants
Fixes: 218315234
Test: none, just adding constants
Change-Id: I44ea3499d9e1d6d2e1d832e534bc1308a42ab0a1
2022-02-09 18:06:01 +00:00
Sally
026c7ac01f Expose prefetching strategies to services
Make the prefetching strategies public so a service can choose
which strategy works best in a particular spot. This should reduce
unnecessary/redundant prefetching.

For example, the FW currently only allows hybrid descendant
prefetching, but a service may want to do depth-first or
breadth-first traversal of the view hierarchy.

Currently, if there is another user interactive request, we
immediately return prefetched nodes. Also allow services to prevent
this interruption and force prefetching to a max of 50 nodes.

Services could potentially request a certain number of nodes, but
since asynchronous prefetching immediately returns the requested
node, the  service can force prefetching of 50 nodes if desired,
and only exposing strategies touches less code, I prefer limiting this.

Also use a LinkedHashMap so ordering is kept when prefetching
descendants.

Test: Manual, talkback builds
atest AccessibilityCacheTest,
AccessibilityInteractionControllerNodeRequestsTest
Bug: 192489177

Change-Id: I3d8358411ece5d2e1380282824cd3cf1835658ac
2022-02-09 17:55:50 +00:00
Yuri Lin
6dfaa935c4 Update matchesCallFilter guidance to recommend tel: codes
Using tel: or mailto: works for repeat callers, and the new documentation recommends against using a contacts content lookup URI, as we don't explicitly look up phone numbers associated with the contact at the time of the matchesCallFilter call.

Bug: 183924362
Bug: 203806689
Bug: 192592755
Test: NotificationManagerTest
Change-Id: I4786f3206f145ab4273a1151a9356101582e9044
2022-02-09 16:50:16 +00:00
Sanjana Sunil
ef75a778eb Merge "Modify bindSupplementalProcess parameters" 2022-02-09 16:26:08 +00:00
Yinglei Wang
e7e3dd676c Merge changes from topic "ime"
* changes:
  Add accessibilitySessions to InputBindResult
  Add FLAG_INPUT_METHOD_EDITOR to a11y
  Allow a11y services to enter text via the path IMEs use
2022-02-09 15:42:22 +00:00
Chavi Weingarten
650ce9aea4 Merge "Make setRecentsScreenshotEnabled public" 2022-02-09 15:41:12 +00:00
Pat Manning
b03e357980 Change invalid input exception to IllegalArgumentException.
Test: manual
Bug: 203749295
Change-Id: I826769d02aa76ab5f0bb9889052ca2ca59d73219
2022-02-09 13:17:31 +00:00
Jonathan Scott
e1a2b6a026 Merge "Expose Activity#startActivityForResultAsUser as a System API." 2022-02-09 10:16:26 +00:00
yingleiw
fb17e5ae7a Allow a11y services to enter text via the path IMEs use
InputMethodService is the primary and a11y is the secondary.
InputMethodService is not
affected by a11y status. When the session from input method is
established, app can start input (pass input context to input method).
When an a11y session comes back, it will be passed to the app. When
InputMethodManagerService binds to/start input with
InputMethodService, it does the same to a11y services which
requested IME functionalities.

It is possible that input method can edit text before ally sessios are
established. So the EditorInfo passed to a11y could be stale.
So when an a11y session is passed to client, client will send
a notification (input method doesn't have this extra notification) for
the current selection. I think since the time for a11y session establish
shouldn't be long, and we get the current state later, it should be fine
for a11y services.

When input method is disconnected from app (client) (even for input
method switching), we cleared a11y and sessions too. When
input method request sessions, we must rerequest sessions for a11y. This
is mainly because when we unbindCurrentClientLocked(SWITCH_IME), we set
active to false for the current client. Suppose we don't want to
change the current structure of input method, an inactive client
probably should clear accessibility sessions too.

When we switch to a client which already has a session with input
method, there might be some a11y sessions with this client, and
some a11y services might be disabled or enabled while the client was
switched out. We pass unchanged a11y
sessions to client, and request sessions for newly enabled a11y services.
When an a11y service is disabled, it removes its session
from all clients in InputMethodManagerService.

Test: type word through modified "switchToInputMethod". Tested session
notification through logs. Tested client switching, input method
switching, a11y service enabled/disable, multiple a11y services,
a11y service enabled before device reboot.
Also tested work profile.

Bug: 187453053

Change-Id: Ia651a811093a939d00c081be1961e24ed3ad0356
2022-02-08 22:14:19 -08:00
Tim Murray
291dc44ee9 Improve broadcast tracing
Include the name of the broadcast that is being handled in the
tracepoint for receivers registered both at runtime and in the
manifest.

Test: TH, traces
Bug: 208747905
Change-Id: I624cd434c5066296e55f4c8bb8c46de65bfe635c
2022-02-08 17:10:09 -08:00
Kathy Xiaoming Chen
f8f605c44e Add query API for apps to check the event status. The detection service sends back the response with a status. Add client API for apps to start the consent activity.
It implements Option 5 in this proposal doc: http://go/ambient-consent-api

Test: atest CtsAmbientContextDetectionServiceDeviceTest
Bug: 192476579
Change-Id: I923911fa8f73d973fd22587af74ed27c5045da34
2022-02-08 16:25:39 -08:00
Nikita Dubrovsky
aeca7c3793 Update ActivityId to implement Parcelable
This API change is safe because all constructors of ActivityId were
hidden, so we can mark this class as final and update it to implement
the Parcelable interface.

Test: atest CtsAssistTestCases:ActivityIdTest
Bug: 215589465
Change-Id: I4f233b4cf93e0bdd40ed371fad151e6fe6c104c7
2022-02-08 14:29:35 -08:00
Antoan Angelov
d29b21b8e3 Merge "Add logic to support custom error messages from DPM APIs" 2022-02-08 19:23:53 +00:00
Charles Chen
18ef32b5b3 Merge "Report Activity config changes only if it handles the change" 2022-02-08 14:27:57 +00:00
arangelov
4b7a914b02 Add logic to support custom error messages from DPM APIs
Bug: 215105442
Test: atest ProvisioningExceptionTest
Change-Id: I3da36554c103cb41202ff19ee84711915a53a9c4
2022-02-08 14:21:20 +00:00
Sanjana Sunil
585ce26c07 Modify bindSupplementalProcess parameters
Allow to pass different flags to the API as opposed to setting it to
BIND_AUTO_CREATE by default. The API is renamed to
bindSupplementalProcess accordingly. Additionally, the process name is
allowed to be passed from the caller side.

Test: Manual, install suplemental process test apps and see processes
Bug: 218314884
Bug: 209058402
Change-Id: I0809f824c64d2512feff44e131c40f0ea8bc8ed3
2022-02-08 13:03:52 +00:00
Aleks Todorov
5696b4de37 Expose Activity#startActivityForResultAsUser as a System API.
Test: atest cts/tests/devicepolicy/src/android/devicepolicy/cts/ActivityTest.java
Bug: 216087958
Change-Id: I683b0b7c7416d0432f81d80392c9f65cf9a13611
2022-02-08 12:34:20 +00:00
wilsonshih
64d96eba95 Make getSplashScreenStyle public.
Bug: 217953215
Test: atest ActivityOptionsTest#testActivityOptionsBundle_fromBundle
Change-Id: I16c5ffbbbc2c40a6216b4338943ae45fadc92f76
2022-02-08 06:19:21 +00:00
Daniel Chapin
761d4a0ccf Revert "Revert "Revert "User consent for Logcat data access"""
This reverts commit ec8c5511af.

Reason for revert: Droidfood Blocking Bug: 218267535

Change-Id: I313f3fb7fdfbefb1c62b474b09f5b14e6ca0afd5
2022-02-08 00:57:38 +00:00
Makoto Onuki
58956e4afc Merge "Disable per-process app class to investigate" 2022-02-08 00:06:36 +00:00
Makoto Onuki
855548719d Disable per-process app class to investigate
Test: treehugger
Bug: 185177290
Change-Id: I87f16857bc0c2b6ed5ff00a0c042a4706864d21a
2022-02-07 10:46:02 -08:00
Felipe Leme
969f745873 Merge "Changes Activity to use Dumpable for "legacy" cases." 2022-02-07 17:32:52 +00:00
Kholoud Mohamed
e7dd38e563 Merge "Add getDrawable API overrides with Icon" 2022-02-07 10:47:06 +00:00
Remi NGUYEN VAN
8f497e5c43 Merge changes from topic "ms52-movenetstats"
* changes:
  Expose MATCH_PROXY as a module-lib API.
  Add setPollForce to module API
  Move networkstats JNI to connectivity module
  [MS54.1] Move NetworkStats to updatable sources
  [MS62.1] Start NetworkStatsService from the module
2022-02-07 10:27:37 +00:00
Stephanie Bak
f5cdd6f9a7 Merge "WifiSsidPolicy replace static method with constructor" 2022-02-07 06:57:18 +00:00
TreeHugger Robot
472bc8d932 Merge "Changes the interpretations to icon vlues" 2022-02-07 03:32:02 +00:00
Junyu Lai
937076ef12 [MS62.1] Start NetworkStatsService from the module
NetworkStatsService is going to be moved into Connectivity mainlne
module and it will be not visible to SystemServiceResistry after
migration done. Thus:
1. Register service in NetworkStatsServiceInitialalizer, a separate
   initializer is needed because the service needs to be created
   before NetworkPolicyManagerService's initialization.
2. Call SystemReady at PHASE_ACTIVITY_MANAGER_READY phase where
   it needs to be ready before StatsPullAtomService pulls at
   PHASE_THIRD_PARTY_APPS_CAN_START.
3. Register manager in ConnectivityFrameworkInitializerTiramisu
   instead of SystemServiceRegistery.

Test: atest FrameworksNetTests CtsNetTestCases NetworkUsageStatsTest
Bug: 204830222
Change-Id: I95020d816ed613ce3480a0720a5b71dcdc7fab72
2022-02-07 11:45:17 +09:00