Commit Graph

20162 Commits

Author SHA1 Message Date
TreeHugger Robot
c307a592a2 Merge "Refine missing InputBindResult" 2022-12-12 03:52:24 +00:00
Dmitri Plotnikov
6ed715cf16 Merge "Include released wake lock UID and name in battery history event" 2022-12-09 18:38:02 +00:00
Wilson Wu
27a1198fe4 Refine missing InputBindResult
The SUCCESS_WITH_ACCESSIBILITY_SESSION result code
was introduced from CL[1].

-. Add the result code into getString() to avoid the
   unknown case.
-. Add comment for the result code.

[1]: Ia651a811093a939d00c081be1961e24ed3ad0356

Bug: 236920321
Test: presubmit
Change-Id: Ieb567237ad0a9cbde6eee47dbbd6c6609eb46688
2022-12-08 18:51:17 +08:00
Thomas Leu
f5887cba0a Merge "Disable the Accessibility Shortcut dialog on TV." 2022-12-08 07:32:47 +00:00
TreeHugger Robot
dca85cd154 Merge "Add SelfTargeting test plan" 2022-12-08 03:51:20 +00:00
Tracy Zhou
a8d7cfdae9 Merge "Map split from the current running app to META+CTRL+DPAD_LEFT and META+CTRL+DPAD_RIGHT" 2022-12-07 00:38:20 +00:00
Hassan Ali
7660c6341f Merge changes from topic "remove_read_permission"
* changes:
  Stop calling Enforcereadpermission from DeviceConf
  Move enforceReadPermission to Setting.config
2022-12-07 00:18:09 +00:00
TreeHugger Robot
61698140ce Merge "Utilize per RAT info to calculate modem power consumption" 2022-12-07 00:13:35 +00:00
Tracy Zhou
c6ab679af3 Map split from the current running app to META+CTRL+DPAD_LEFT and META+CTRL+DPAD_RIGHT
Fixes: 246661484
Test: https://recall.googleplex.com/projects/f4cc906f-d337-414e-aea8-d5434a0c6e88/sessions/06cc05b5-c032-40f3-af8b-3b90860d2f37
Change-Id: I8b293a0eb7e198fc2ff25c4c5a57dbd58f6be2f4
2022-12-06 18:32:22 +00:00
Tracy Zhou
686f2652dd Merge "Implement Split to fullscreen with META+CTRL+DPAD_UP" into tm-qpr-dev am: 977d57cd5b am: 460277688a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20059260

Change-Id: Icd9885bb7898a49eec418b30d99c087b8aed2c14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 16:48:24 +00:00
felkachang
06aa20724a Add SelfTargeting test plan
This patch adds a trigger. The trigger is triggered when someone
changes the followin files
* core/java/android/content/om/*
* core/java/com/android/internal/content/om/*
* core/jni/*Overlay*

The trigger triggers the following tests to run.
* SelfTargetingOverlayDeviceTests
* CtsContentTestCases
    * android.content.om.cts
    * android.content.res.loader.cts

Bug: 205919743
Test: atest --collect-tests-only -p \
      frameworks/base/core/java/android/content/om/
Test: atest --collect-tests-only -p \
      frameworks/base/core/java/com/android/internal/content/om/
Test: atest --collect-tests-only -p \
      frameworks/base/core/jni
Change-Id: I6018d5806c93b7b0a87331a95e144a6ab45c068c
2022-12-06 14:52:10 +00:00
Hassan Ali
65c2dc2452 Move enforceReadPermission to Setting.config
As part of moving DeviceConfig.java to packages/modules/ConfigInfrastructure.
Need to move activity thread dependency to setting.config as the new
module will not have access to hidden apis (ActivityThread).

For security purpose we cannot expose enforceReadPermission so we need
to move it to Settings.Config

Bug: 258220607
Test: m
Change-Id: Ibdd7c0489eb4f5238272705fd45e15b2b146a656
2022-12-06 11:53:49 +00:00
Tracy Zhou
460277688a Merge "Implement Split to fullscreen with META+CTRL+DPAD_UP" into tm-qpr-dev am: 977d57cd5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20059260

Change-Id: Ia07f6111f456d25decc0abfd15c16a50826e5a08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 04:04:34 +00:00
Michael Wachenschwanz
6f1a65aae7 Utilize per RAT info to calculate modem power consumption
The modem's power drain can vary greatly depending on what Radio Access
Technology (RAT) is being used and at what frequency. Utilize available
modem RAT and frequency data in the MobileRadioPowerCalculator.

Bug: 231331285
Test: atest MobileRadioPowerCalculatorTest

Change-Id: Ibe9e2842f9c3f1869a5564fbfc0c218d831cd940
2022-12-05 17:54:02 -08:00
Dmitri Plotnikov
55102ab098 Include released wake lock UID and name in battery history event
Bug: 236393844
Test: atest FrameworksServicesTests:BatteryStatsTests
Change-Id: I0c27a094a0e1658de9392333ea3dabdf1cedb3d9
2022-12-05 11:17:18 -08:00
Tracy Zhou
0fce291799 Implement Split to fullscreen with META+CTRL+DPAD_UP
Bug: 246661489
Test: https://recall.googleplex.com/projects/f4cc906f-d337-414e-aea8-d5434a0c6e88/sessions/77b9b268-4abb-4703-af72-fc0412f7312e
Change-Id: Ie68e2c8a83879d3a9e91baea0be68e14d5dd9604
2022-12-05 18:56:40 +00:00
Makoto Onuki
ad758fca1f Update ANR latency tracker for short-FGS
Bug: 257270313
Test: atest CtsShortFgsTestCases CtsAppFgsTestCases
Change-Id: If6ca1fc37bc71e6b8369acc4815cd456d781fc40
2022-12-05 10:18:57 -08:00
TreeHugger Robot
8a871ae898 Merge "Add logic to show apps running certain jobs in Task Manager." into tm-qpr-dev am: 816123320d am: 1d46223708
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20405795

Change-Id: I80338eee8546d9f33a15f6a6024b4233eab36dc6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 07:21:43 +00:00
TreeHugger Robot
1d46223708 Merge "Add logic to show apps running certain jobs in Task Manager." into tm-qpr-dev am: 816123320d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20405795

Change-Id: I8ac8b3302b35c442cce27e05adb56f795367a04a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 06:48:54 +00:00
TreeHugger Robot
816123320d Merge "Add logic to show apps running certain jobs in Task Manager." into tm-qpr-dev 2022-12-03 06:20:53 +00:00
Justin Ghan
691cbb963a TextView implementation of select and delete gesture previews
Bug: 240436893
Test: atest android.widget.cts.TextViewHandwritingGestureTest
Change-Id: Ia4f02636b3bcaf2e2ac8a1baaa1c7b40c33d0dd6
2022-12-02 17:13:07 -08:00
Kweku Adams
4167f0c3d6 Add logic to show apps running certain jobs in Task Manager.
For now, we will show apps with an active FGS or jobs that the user
should be aware of (ie. "user-visible jobs") in the exact same way.
Users will be able to stop the ongoing FGS and user-visible jobs
using the same button. This won't be used to show apps on TM, so
the JobScheduler implementation is empty.
We'll add the JobScheduler implementation in U.

Bug: 255767350
Change-Id: Iaf482926c1f568aee26a2798ce827c6138f3f779
Test: atest SystemUITests
Test: Manually start jobs and interact with the Task Manager
2022-12-02 23:26:38 +00:00
Dennis Song
b82ea935ae Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3 am: 8579fa7af4 am: 0c7d4135fb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: Ic8a455217f9c56970d5b1b9917fc38fe005f3001
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 05:18:01 +00:00
Dennis Song
0c7d4135fb Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3 am: 8579fa7af4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: I808b41aaf25d8546b508e6041a844c873dc88208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 04:42:14 +00:00
Dennis Song
8579fa7af4 Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: I55dfc0f2933d956f924a1017d1aa94ad04aeff5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 04:13:08 +00:00
Sewook Seo
c894d0adda Merge "Notify IMS Call info via CallAttributesListener" 2022-12-01 06:58:22 +00:00
TreeHugger Robot
439e94fa09 Merge "Initialize ImsConfigurationTracker when IME#onCreate" 2022-12-01 03:05:12 +00:00
Ming-Shin Lu
9d42c3324a Initialize ImsConfigurationTracker when IME#onCreate
To parse InputMethod_configChanges locally without waiting system
callback with initializeInternal, in case IME#mInputView may not
able to call resetStateForNewConfiguration in time before
IME#initializeInternal when it's required.

Fix: 260198823
Test: atest InputMethodServiceTest
Change-Id: I0268360f1b60ebc1f2676d3edab1910a9ce0f050
2022-12-01 00:52:17 +08:00
felkachang
f661351bad Add self-targeting constructor in FabaricatedOverlay
When the app wants to overlay its resource in runtime, it’s a
SelfTargeting scenario. This patch adds a new builder
constructor in FabaricatedOverlay for SelfTargeting.  It's
 `Builder(@NonNull String overlayName, @NonNull String targetPackage)`.

The app needs to pass 2  parameters.
* the overlay name
* target package to be overlaid

This patch also marks the nullability and checks the arguments of
`setResourceValue` and it needs related CTS tests to verify the
nullability.
* setResourceValue

Test: atest \
          OverlayHostTests \
          OverlayDeviceTests \
          SelfTargetingOverlayDeviceTests \
          OverlayRemountedTest \
          FrameworksServicesTests:com.android.server.om \
          CtsContentTestCases:android.content.om.cts \
          idmap2_tests

Bug: 205919743
Change-Id: Ie8e2de13076c9d28bbcf7ee52deab91114f7ec57
2022-11-30 13:08:13 +08:00
Sewook Seo
0e47845a27 Notify IMS Call info via CallAttributesListener
Notify IMS call type & IMS call ID through CallAttributes.
List of CallAttributes mapped to whole calls will be passed to the
listener.

Bug: 242928210
Test: atest FrameworksTelephonyTests, Device test b/260350954
Change-Id: I1584524cec49af0694f691efdcbec4210f06e09a
2022-11-30 04:10:01 +00:00
RD Babiera
ed0abd0287 Merge "Usb non-compliant port partner frameworks api" 2022-11-30 01:39:19 +00:00
TreeHugger Robot
f7d1c837e4 Merge "OverlayManagerImpl support to commit OverlayManagerTransaction" 2022-11-29 12:13:22 +00:00
Dennis Song
040471fb38 Respect partition precedence while deciding overlay priority
Strict partition precedence is enforced now, and the legacy
android:priority is no longer able to reorder overlays across
partition boundaries.

Should use OverlayConfig instead to do the custom configuration
if a cross partition reorder is needed.

Bug: 254407173
Test: atest OverlayConfigTest
Change-Id: I915957bee2ce00286c1bad853206e7e5cb1d140b
2022-11-29 17:14:05 +08:00
TreeHugger Robot
2e29531489 Merge "Enforce the overlayable mechanism for self-targeting" 2022-11-29 08:40:11 +00:00
Sewook Seo
00a6676069 Merge "Revert "Notify IMS Call info via CallAttributesListener"" 2022-11-29 05:52:19 +00:00
Sewook Seo
6c1fe270cb Revert "Notify IMS Call info via CallAttributesListener"
Revert "Adding Ims Call Info to CallAttributes"

Revert submission 19673329-IMSCallInfo_In_CallAttributes

Reason for revert: <phone crash at CS call>
Reverted Changes:
Id5c4ba0b6:Add CTS for CallAttributesListener
Ic7b5adefd:Adding Ims Call Info to CallAttributes
I1584524ce:Notify IMS Call info via CallAttributesListener

Change-Id: Ia875f7441fbaac28d9220b9ed42da42ab286440c
2022-11-28 21:50:29 +00:00
Makoto Onuki
f273c10f59 Implement SHORT_SERVICE ANR
- Also implement oom-adjuster timeout
- Also fix the FGS type change check.

Bug: 257270313
Test: atest FrameworksServicesTests:OomAdjusterTests MockingOomAdjusterTests AnrLatencyTrackerTests
Test: Manual test with a test app, using `dumpsys activity services`

Change-Id: I92e137bb09ac35a380e012ab9674aafc61d97084
2022-11-28 08:48:54 -08:00
felkachang
deaee3b90a OverlayManagerImpl support to commit OverlayManagerTransaction
The major task of OverlayManagerImpl is to create not only a frro
file but also an idmap file for a FabricatedOverlay instance. The
app attaches multiple FabricatedOverlay instances into an
OverlayManagerTransaction.

This patch makes OverlayManagerImpl process multiple requests in the
OverlayManagerTransaction in one commitment.

Test: atest \
          OverlayHostTests \
          OverlayDeviceTests \
          SelfTargetingOverlayDeviceTests \
          OverlayRemountedTest \
          FrameworksServicesTests:com.android.server.om \
          CtsContentTestCases:android.content.om.cts \
          idmap2_tests

Bug: 205919743
Change-Id: I22e45fb6b3935cea4b24038dbd82d84bc9ca7db3
2022-11-28 17:27:27 +08:00
felkachang
a8fc015345 Enforce the overlayable mechanism for self-targeting
The overlayable mechanism has defined which roles can overlay the
specified resources and which resources are overlayable.

In order to reduce the argument between platform and applications,
self-targeting applications should enforce the overlayable mechanism.
It makes the overlay range be defined in the overlayable list. It
also defines the limitation of what kind of package can overlay the
resources of the self-targeting application.

To fill the policy flag, OverlayManagerImpl.java gets the following
information and passes them as bool type to JNI OverlayManagerImpl.
* SYSTEM_PARTITION
* VENDOR_PARTITION
* PRODUCT_PARTITION
* ODM_PARTITION
* OEM_PARTITION
* SIGNATURE

Not support
* ACTOR_SIGNATURE
* CONFIG_SIGNATURE

JNI OverlayManagerImpl fills the policy flags according to the
information from the ApplicationInfo. 'enforce_overlayable'is true to
enforce checking overlayable before generating an idmap.

Fixes: 238061808
Bug: 205919743

Test: atest \
              OverlayHostTests \
              OverlayDeviceTests \
              SelfTargetingOverlayDeviceTests \
              OverlayRemountedTest \
              FrameworksServicesTests:com.android.server.om \
              CtsContentTestCases:android.content.om.cts \
              idmap2_tests

Change-Id: I749d1a90a00f0a91e7796bc0f9f668f9ecfdb8b0
2022-11-28 17:06:06 +08:00
Sewook Seo
ca32463c07 Merge "Notify IMS Call info via CallAttributesListener" 2022-11-24 22:16:22 +00:00
TreeHugger Robot
a526f37aae Merge "Add OverlayManagerImpl to create frro, idmap and get overlayInfos" 2022-11-24 18:47:11 +00:00
Nick Chameyev
c3bbd7a1de Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev am: 814ef64f49 am: 2fcb916dcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20139164

Change-Id: Ie64989a9e4a4f05405f47a9fcfe4d79627e24f05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 12:50:24 +00:00
Nick Chameyev
2fcb916dcb Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev am: 814ef64f49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20139164

Change-Id: I94044049f2d8be9984e8fa110345ca5dd9141a48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 12:11:28 +00:00
Nick Chameyev
814ef64f49 Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev 2022-11-24 11:30:47 +00:00
Sewook Seo
fddca1d3b9 Notify IMS Call info via CallAttributesListener
Notify IMS call type & IMS call ID through CallAttributes.
List of CallAttributes mapped to whole calls will be passed to the
listener.

Bug: 242928210
Test: atest FrameworksTelephonyTests
Change-Id: I1584524cec49af0694f691efdcbec4210f06e092
2022-11-24 08:19:06 +00:00
felkachang
1039d61b36 Add OverlayManagerImpl to create frro, idmap and get overlayInfos
Add OverlayManagerImpl to let applications create frro and idmap files
for overlaying itself's android resources.
* OverlayManagerImpl.java
  * check the FabricatedOverlayInternal.
* com_android_internal_content_om_OverlayManagerImpl.cpp
  * convert and read Java objects to native data.
  * call the APIs in libidmap2 to create frro and idmap files.

Add OverlayManagerImpl.cpp into AndroidRuntime by modifying Android.bp
* Add register_com_android_internal_content_om_OverlayManagerImpl
  register JNI methods
* add com_android_internal_content_om_OverlayManagerImpl.cpp
    * It's a adapter to delegate the tasks to SelfTargeting.cpp
    * dynamic link with libidmap2 by using dlopen and dlsym to call
      functions in libidmap2.

Add SelfTargeting.cpp into libidmap2
* createFrroFile
* createIdmapFile
* getFabricatedOverlayInfo

for interoperability between libandroid_runtime and libidmap2.
* move OverlayManifestInfo from libidmap2 to libandroidfw
* add FabricatedOverlayEntryParameters into libandroidfw

Bug: 205919743

Test: build
Test: atest \
                  OverlayHostTests \
                  OverlayDeviceTests \
                  SelfTargetingOverlayDeviceTests \
                  OverlayRemountedTest \
                  FrameworksServicesTests:com.android.server.om \
                  CtsContentTestCases:android.content.om.cts \
                  idmap2_tests

Change-Id: I5425f3229e9a3858e57427ef84e6abaf32e89b6e
2022-11-24 10:09:07 +08:00
Kenneth Ford
96cb37ca35 Merge "Add rear display dialog methods to CommandQueue and StatusBarService" into tm-qpr-dev am: 9bb27a054d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20522102

Change-Id: I74361aa6e5db6330751a0c5d11a07ca2045245f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 22:07:59 +00:00
Kenneth Ford
b8bb4dd906 Add rear display dialog methods to CommandQueue and StatusBarService
Creates new methods through CommandQueue and StatusBarService
to allow DeviceStateManagerService to notify SystemUI
to show the rear display education dialog

Bug: 207686851
Test: CommandQueueTest
Change-Id: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
Merged-In: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
2022-11-22 17:47:40 +00:00
Kenneth Ford
ed77dad0cc Merge "Add rear display dialog methods to CommandQueue and StatusBarService" 2022-11-22 17:34:22 +00:00
Riddle Hsu
28bc7eed7a Reduce overhead of writing logcat from protolog method
String.format contains more loop, creates more temporary object
with more conditions than TextUtils.formatSimple.

And the basic syntax provided by formatSimple is enough for use
so far, it would be better to reduce the general cost while
enabling logcat output of protolog.

Bug: 259683790
Test: atest ProtoLogImplTest ProtoLogIntegrationTest LogParserTest
Change-Id: Icbf55c9e75c2343a961a57f83823a90e1f057075
2022-11-22 14:41:37 +00:00