Commit Graph

23934 Commits

Author SHA1 Message Date
Riddle Hsu
30f15ae1ca Merge "Reduce sending unnecessary CompatibilityInfo" 2022-07-28 01:32:42 +00:00
Julia Reynolds
fc4c1a4d65 Merge "Revert "Fix binder error when an app has many channels"" into tm-qpr-dev am: 517d2b2293 am: 503172d4d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19419546

Change-Id: Id66a891bc9f80d6810bfe2d398424ca369e165e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 15:32:06 +00:00
Julia Reynolds
503172d4d0 Merge "Revert "Fix binder error when an app has many channels"" into tm-qpr-dev am: 517d2b2293
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19419546

Change-Id: I3a2aecc51e5aa0750b11741da1c45cd11b2d9872
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 15:13:06 +00:00
Julia Reynolds
517d2b2293 Merge "Revert "Fix binder error when an app has many channels"" into tm-qpr-dev 2022-07-26 14:56:20 +00:00
Neha Jain
34b3e4b51c Revert "Fix binder error when an app has many channels"
Revert submission 19290255-jr-bind-flicker

Reason for revert: b/240100577
Reverted Changes:
I9a1c96f75:Improve App notification loading
I391ce0b10:Fix binder error when an app has many channels

Change-Id: I43777d003de5742056f600980ab52d58dbdb3ad8
2022-07-25 22:16:16 +00:00
Riddle Hsu
76422f53a9 Reduce sending unnecessary CompatibilityInfo
Originally, compatibilityInfoForPackage is called for delivering
broadcast to receivers or starting services, which may easily
encounter lock contention between activity manager and window
manager.

Because CompatibilityInfo is package based, it is known when binding
application. If the info is changed, the update will be done by
IApplicationThread#updatePackageCompatibilityInfo. Hence this change
only keeps the 2 places to send CompatibilityInfo. Which would
improve performance and simplify the code path.

Bug: 204870457
Test: atest TransactionParcelTests

Change-Id: Ie030c9aa8ed363469e22061f959fa8f40e03965d
2022-07-25 20:28:15 +08:00
Rubin Xu
e946cbd20f Merge "Update javadoc of setUserControlDisabledPackages" 2022-07-22 12:54:07 +00:00
Julia Reynolds
88c5ff5499 Merge "Fix binder error when an app has many channels" into tm-qpr-dev am: e01425ec92 am: 6b9b1ea3e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19290255

Change-Id: I4f662236d99d50a952603b97912fdf756526d7e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 21:06:49 +00:00
Julia Reynolds
6b9b1ea3e7 Merge "Fix binder error when an app has many channels" into tm-qpr-dev am: e01425ec92
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19290255

Change-Id: Ied4b67bf7eb7a8ca5167c8b60f3742b87a1dceeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 20:48:46 +00:00
Julia Reynolds
e01425ec92 Merge "Fix binder error when an app has many channels" into tm-qpr-dev 2022-07-21 20:30:21 +00:00
Neil Fuller
e08df1a31c Merge "Change the allowed lower bound for date changes" 2022-07-21 16:46:47 +00:00
Neil Fuller
67a2b84970 Merge "Centralize upper/lower time bound logic" 2022-07-21 09:22:33 +00:00
Neil Fuller
8eb0fbeae2 Merge "Non-functional tidy-ups" 2022-07-20 10:19:37 +00:00
Rubin Xu
a717c1183d Update javadoc of setUserControlDisabledPackages
Mentions that it exempts apps from battery optimizaiton.

Bug: 238891963
Test: None
Change-Id: I61232c39c54832b52c571e682407600d18fbc7d2
2022-07-20 11:03:24 +01:00
Louis Chang
90f327ac8c Merge "Prevent waiting if no new activity instance launched" into tm-qpr-dev am: f2a5491fda am: 86b9c1b83a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19098653

Change-Id: Idb78088b5bb45360e069390b2646798f8f544eec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 09:09:45 +00:00
Louis Chang
86b9c1b83a Merge "Prevent waiting if no new activity instance launched" into tm-qpr-dev am: f2a5491fda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19098653

Change-Id: I392f246a4ad0a3e42fc13936239da2241b9e14ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 08:40:51 +00:00
Louis Chang
f2a5491fda Merge "Prevent waiting if no new activity instance launched" into tm-qpr-dev 2022-07-20 08:14:27 +00:00
Andrii Kulian
fc65499a29 Merge "Add a dedicated method to check task windowing mode" into tm-qpr-dev am: 945dbc0427 am: 731db2fd4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19223678

Change-Id: I6265eb91f64583b79135b83c20a2a8cd3a01ca90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:13:48 +00:00
Chris Tate
ed8716bb24 Merge "BroadcastOption for "this is an alarm broadcast"" into tm-qpr-dev am: 3420a4e6fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19323855

Change-Id: I98a9f11b506dbacfcb1e5b066598d213f990d42d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 18:39:56 +00:00
Chris Tate
3420a4e6fa Merge "BroadcastOption for "this is an alarm broadcast"" into tm-qpr-dev 2022-07-19 18:22:22 +00:00
Louis Chang
5a36e6bc9e Prevent waiting if no new activity instance launched
An existing task can be brought to front while starting
an Intent. In that case, the launching TaskFragment will
remain empty because no new activity instance created.

Monitor the activity launch result and prevent waiting
if the activity instance was not created and cleared the
pending appeared intent.

Bug: 233989810
Test: atest TaskFragmentContainerTest
Test: atest SplitControllerTest
Change-Id: I1bdf516673b71892921da14bdcdb9d1c23ce0a9a
2022-07-19 15:12:37 +00:00
Neil Fuller
ae911cc91d Change the allowed lower bound for date changes
Change the allowed lower bound for date changes to 2015. The previous
lower bound of 2007/2008 is a long time ago. This is most likely to
affect automated / manual tests, not real user needs: real users should
have no need to set the clock that far back, and may cause TLS issues if
they do.

This is primarily a proof of concept and can be rolled back easily if
needed. No CTS tests for these bounds are planned.

Bug: 228967927
Test: build only / manual inspection of SettingsUI
Change-Id: I9b8ba632038c7d02d630f96da27303f5d0d109fc
2022-07-19 11:54:47 +01:00
Neil Fuller
1341519762 Centralize upper/lower time bound logic
Move the upper / lower bound constants for valid time suggestions into a
single class TimeDetectorHelper, which can be accessed by both server
and client (SettingsUI) code. This reduces the number of places that
need to be touched when we change those values.

See also the associated change in packages/apps/Settings which removes
bounds checks from the client code and switches that code over to use
TimeDetectorHelper methods.

Test: services/tests/servicestests/src/com/android/server/timedetector/
Bug: 228967927
Change-Id: I952ecd4fc2e0d80ffeda4e288fb838253142953e
2022-07-19 10:25:41 +01:00
Andrii Kulian
731db2fd4b Merge "Add a dedicated method to check task windowing mode" into tm-qpr-dev am: 945dbc0427
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19223678

Change-Id: Ib724bc4fb67162962502026e38c37f67d17cf622
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 03:22:03 +00:00
Andrii Kulian
945dbc0427 Merge "Add a dedicated method to check task windowing mode" into tm-qpr-dev 2022-07-19 03:01:15 +00:00
Yeabkal Wubshit
9f7e72b976 Merge "Fix NotificationChannel#setVibrationPattern API Documentation" 2022-07-18 23:57:36 +00:00
Julia Reynolds
3d354d3ec2 Fix binder error when an app has many channels
By making the channel list inside of NotificationChannelGroup
a ParceledListSlice also

Test: NotificationChannelGroupTest
Test: NotificationManagerServiceTest
Test: PreferencesHelperTest
Bug: 215072888
Change-Id: I391ce0b104af99a11b3a5db31fb8d0321f3a4988
2022-07-18 20:12:14 +00:00
Christopher Tate
cd915062dc BroadcastOption for "this is an alarm broadcast"
Instead of a callback/observer mechanism between the alarm subsystem and
the broadcast delivery subsystem, there will be a direct
BroadcastOptions tag that the Alarm Manager uses to annotate broadcasts
that originate from an alarm firing.  Only the OS itself can use this
BroadcastOptions annotation.

Fixed unchecked null reference situation.

Bug: 161537193
Test: atest CtsAlarmManagerTestCases
Test: atest BroadcastOptionsTest
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest

Merged-In: I70a7be35f198bcf9a3cfa232c309a381b2391e34
Change-Id: I70a7be35f198bcf9a3cfa232c309a381b2391e34
2022-07-18 13:06:20 -07:00
Rocky Fang
507823d510 Merge "Skip WTF log for missing CONTEXTHUB_SERVICE" 2022-07-18 16:09:58 +00:00
TreeHugger Robot
c18d3bf828 Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev am: 3d8c880d4c am: 6502316c77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18874182

Change-Id: I17efc7f63f26512204ec60adcf6a4ad59aedddd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 16:00:53 +00:00
TreeHugger Robot
6502316c77 Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev am: 3d8c880d4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18874182

Change-Id: I9e7d3374d4c8934099f57675a2b6b753bae52f74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 15:42:06 +00:00
TreeHugger Robot
3d8c880d4c Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev 2022-07-18 15:29:41 +00:00
Neil Fuller
422354c931 Non-functional tidy-ups
Changes to source for non-functional reasons, i.e. unnecessary code, doc
improvements.

Bug: None - just docs/java cleanups
Test: build only
Change-Id: Id6c71f4e6dbee750cf22138dca28e861b5aaad47
2022-07-18 14:50:24 +01:00
Matt Gilbride
831e91190d Merge "@EnforcePermission migrations - other services" 2022-07-15 17:55:24 +00:00
Yeabkal Wubshit
12b1297938 Fix NotificationChannel#setVibrationPattern API Documentation
NotificationManagerService has a logic to fallback to a default vibration pattern if the channel has vibration enabled. Accordingly, this CL fixes the message in the setVibrationPattern API Javadoc.

Change-Id: I909819eb98e5fe3ab8b80f25db7437860ac560ca
2022-07-15 17:09:31 +00:00
TreeHugger Robot
d54dd08f1a Merge "Add a test api, TaskInfo#getDisplayId()." 2022-07-15 16:14:50 +00:00
Andrii Kulian
356b008ce9 Add a dedicated method to check task windowing mode
Trying to get a task information via ActivityManager#getAppTasks()
will not report tasks that aren't associated with calling package
by the root activity package name. For activities that are from
a different package the task wasn't found, so the windowing mode
couldn't be checked and WM Extensions didn't report any display
features.

This CL adds a dedicated method to check the task windowing mode
for a given activity token.

Bug: 236295340
Test: ActivityEmbeddingIntegrationTests#testDisplayFeaturesWithEmbedding_differentPackage
Change-Id: If2dbc337c4b8cb909914cc28ae4db28a82ff9de3
2022-07-15 02:44:38 +00:00
rockyfang
2f456040b8 Skip WTF log for missing CONTEXTHUB_SERVICE
Wtf dump will record unnecessary log if device does not support
ContextHubMangager and impacting the performance in low RAM device.
Adding CONTEXTHUB_SERVICE in the switch statement creates a
exception to not log it.

Fixes: 236768432
Test: TreeHugger test
Change-Id: I724f7b1e1c7aa30f37d578ca302c3f57a5187075
2022-07-15 00:26:23 +00:00
Hongwei Wang
99396aa6c9 Merge "Adjust PiP source rect hint for window bounds" into tm-qpr-dev am: 4805fa7d5b am: c47f1d7a97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19212498

Change-Id: I34266334f5e794397f7f06e2eb8015f4d6553743
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 23:36:09 +00:00
Hongwei Wang
c47f1d7a97 Merge "Adjust PiP source rect hint for window bounds" into tm-qpr-dev am: 4805fa7d5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19212498

Change-Id: I738258ce2a62e14c0bfc1a06fba3224c05679cf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 23:25:45 +00:00
Hongwei Wang
4805fa7d5b Merge "Adjust PiP source rect hint for window bounds" into tm-qpr-dev 2022-07-14 23:00:01 +00:00
TreeHugger Robot
c44755d08a Merge "Create a new Bundle object if mExtras is null." into tm-qpr-dev am: 5abc26927b am: 836d445ead
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19016479

Change-Id: I08230811c13ad7fe0afc43d4ca67c95cc152fdaa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 17:41:50 +00:00
TreeHugger Robot
836d445ead Merge "Create a new Bundle object if mExtras is null." into tm-qpr-dev am: 5abc26927b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19016479

Change-Id: I4c1a787369ed85459c592d4d3ff6f6c636e5fafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 17:20:52 +00:00
Hongwei Wang
ccfa7d8b50 Adjust PiP source rect hint for window bounds
The source rect hint specified by the app is normally a result of
View#getGlobalVisibleRect (or equivalent) that does not count the window
offset in scenarios like the app is placed in the middle of display by
the system when
    - app specifies sensorLandscape
    - display is actually in portrait mode (on large screens)

Fixed this by adjust the source rect hint on ActivityRecord whenever the
internal PictureInPictureParams is updated.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dr7uy1qxB1RGjZVvElo7kr
Bug: 235599028
Test: Verify entering PiP animation working as intended for \
      app specifies sensorLandscape when auto-enter-pip and \
      make-launch-into-pip (aka. content-pip).
Test: atest WmTests:ActivityRecorderTests \
            WmTests:ActivityStarterTests
Change-Id: Id991adbae45a7b61d09105a9aee9cbfecd6b66be
2022-07-14 10:17:38 -07:00
mattgilbride
5bdb1218cc @EnforcePermission migrations - other services
Immediate calls to Context.enforceCallingPermission.  Fixes
applied by Android Lint (ag/18432857).

Bug: 232058525
Test: N/A
Change-Id: I7e488596ad4438506b68e5148bc69a8172c1eb5e
2022-07-14 16:06:21 +00:00
Anushree Ganjam
85b632c71b Create a new Bundle object if mExtras is null.
Bug: 236191017
Test: Manual
Change-Id: I00d925e243335c447e1bb7513148f8735d160c0e
2022-07-14 00:07:17 +00:00
Rajeev Kumar
b80346fbf7 Merge "Add PM checker for AppOpsManager" 2022-07-13 22:23:05 +00:00
Nikita Dubrovsky
2d3ffe0826 Merge "Deprecate and no-op test API getContentCaptureServicePackageName" 2022-07-13 21:59:32 +00:00
Neil Fuller
34dd242671 Merge "Switch GnssTimeUpdateService to internal service" 2022-07-13 09:31:59 +00:00
Nikita Dubrovsky
22f3baa869 Deprecate and no-op test API getContentCaptureServicePackageName
After the fix for b/222231605, permission pre-grants are no longer tied
to the package that provides ContentCaptureService, so this test API is
no longer needed. However the API is still referenced from GTS tests
(though it won't be invoked on T and above), so we need to keep the
method in the SDK to compile the test code.

Bug: 229662628
Test: Presubmit
Change-Id: Iddc201ba8afde816446377e509a3f2de35215f61
2022-07-12 22:43:36 -07:00