Commit Graph

6254 Commits

Author SHA1 Message Date
Jorim Jaggi
74860c6032 OWNERS for SysUI Jank (2/2)
Change-Id: Ibbff0f34497eee521abb5fc1c93c4a2bd320907b
2020-12-10 18:10:48 +00:00
Riddle Hsu
c7a457ff24 Merge "Send IActivityClientController to client when launching activity" 2020-12-10 15:15:41 +00:00
TreeHugger Robot
0ba049d769 Merge "Create parcelable VibratorInfo to expose HAL profile" 2020-12-10 15:13:38 +00:00
Dmitri Plotnikov
62d862082b Merge "Use eBPF-based time-in-state monitoring for groups of threads" 2020-12-10 03:31:06 +00:00
Dmitri Plotnikov
a7b599b824 Use eBPF-based time-in-state monitoring for groups of threads
Bug: 169279846

Test: atest FrameworksCoreTests:com.android.internal.os.KernelSingleProcessCpuThreadReaderTest
Test: atest FrameworksCoreTests:com.android.internal.os.SystemServerCpuThreadReaderTest
Change-Id: Ic06fe30bc1b602470c18bf89d3380ae2bca7ed3c
2020-12-09 16:44:23 -08:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Riddle Hsu
8d2b58b210 Send IActivityClientController to client when launching activity
This reduces 2 binder transactions when launching activity:
- Get IActivityTaskManager from ServiceManager
- Get IActivityClientController from IActivityTaskManager

Bug: 174800802
Bug: 174041144
Test: "am start -n ${activity_name} -W -S -P /data/local/tmp/test.trace"
      There should not have ActivityTaskManager#getService and
      IActivityTaskManager#getActivityClientController from any
      methods of ActivityClient.

Change-Id: I5ebf8d0764205f338ef53bbb8dfd8b5d0b7f9811
2020-12-08 15:53:59 +08:00
Xin Li
8836e88707 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I26bed08456197721d07f2fab563be0c54e43efd2
Change-Id: Ic1ac100efa50687ccfcbb87ee91a57703105afad
2020-12-07 00:39:42 -08:00
Alexander Dorokhine
2b8c1ecae4 Merge "Update AppSearch code from Jetpack." 2020-12-07 06:24:53 +00:00
Jeff Sharkey
db4ae71beb Merge changes from topic "nov30"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Mechanical refactoring to new typed XML classes.
  Additional hand-migration to TypedXml interface.
  "Resolve" both human-readable and binary XML.
2020-12-04 21:32:44 +00:00
Lais Andrade
61ddb9473f Create parcelable VibratorInfo to expose HAL profile
This parcelable will replace the separated methods hasAmplitudeControl,
areEffectsSupported and arePrimitiveSupported from VibratorService.

VibratorManagerService will return this single parcelable, per vibator
id, to represent the HAL profile of that individual vibrator and be used
by Vibrator.java to explose some of that to the public API.

Bug: 167946816
Test: atest VibratorInfoTest
      atest VibratorManagerServiceTest
Change-Id: I09c191dd15a3cf38122ec6dc87b2d73f46c8cde6
2020-12-04 16:26:02 +00:00
Alexander Dorokhine
1e6072d831 Update AppSearch code from Jetpack.
* 31db05: Move visibility settings into SetSchemaRequest.
* af6646: Support retrieving the current database's schema.
* 468ec2: Minor comment fix.
* b67963: Refactor AppSearchImpl to use List instead of Set.
* 1ae2bc: Delete an assertion that bundle.equals(bundle).

Bug: 169883602
Bug: 172260083
Bug: 162450968
Bug: 174825775
Test: Presubmit
Change-Id: I485bc9d1d9980467f6bdde1f36b077c0a3e7f5b4
2020-12-04 02:57:22 -08:00
Jacky Kao
9e73bfc2f3 Allow A11yService to customize accessibility focus
1. Define and implement new APIs to set and get the stroke width
and color of the A11y focus rectangle.
2. New an AccessibilityFocusApperanceData variable with the default
value in the A11yUserState class, and it would be used in the A11y
framework.
3. When A11y services sets the stroke width and color of the focus
rectangle, A11yUserState will apply the same value through
A11yServiceConnection and notify this change to A11yManager.
4. When A11y services customized the data is disabled, reseting the
data in the A11yUserState and notifying this change to A11yManager.
5. When the ViewRootImpl gets the A11yFocusDrawable, it changes the
strokewidth and the color of this drawable based on the value from
A11yManager.

Bug: 141144573
Test: a11y CTS & unit tests

Change-Id: I1493f17f7cc25744e1435c9070218c6f7efa8bcf
2020-12-04 09:55:11 +08:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Kohsuke Yatoh
ef091d3ff7 Merge "Prepare switching font loading to system server." 2020-12-02 07:14:27 +00:00
Kohsuke Yatoh
b11b963ed1 Prepare switching font loading to system server.
Currently, fonts are loaded in Zygote.
This CL adds a preparation to switch it to system server and
bindApplication(), so that system server will be able to update font map
at runtime.

(1) Zygote will be initialized without fonts.
(2) System server will maintain a serialized font map in ashmem.
(3) Apps will load font map from the ashmem in bindApplication().

The change is guarded by Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION,
and the new behavior is disabled by default.
I tested with ENABLE_LAZY_TYPEFACE_INITIALIZATION = true.

Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I40832962a4b27f6160c4dc6268689c52f6a4dd33
2020-12-01 16:05:33 -08:00
Flavio Fiszman
c36d7b0fb4 Merge "Substitute ShortcutInfo for PeopleSpaceTile." 2020-12-01 20:10:06 +00:00
Flavio Fiszman
e3d7a74db9 Substitute ShortcutInfo for PeopleSpaceTile.
Change-Id: I35570d8ef47822598450e958c1bcbd0d298a1371
Test: Build and run.
2020-12-01 17:14:06 +00:00
Jeff Sharkey
236c03b5c3 Mechanical refactoring to new typed XML classes.
Related changes are introducing new TypedXmlSerializer and
TypedXmlPullParser interfaces which offer efficient access to
primitive attributes.

Bug: 171832118
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ibd93f353ff3cb1f0b7073ebbeae17fe5194b046b
2020-11-30 20:45:25 -07:00
Jeff Sharkey
42bd76058f "Resolve" both human-readable and binary XML.
Recent refactorings have pivoted many XML users across the system
to call resolveSerializer() and resolvePullParser(), which gives us
an easy path to pivot between human-readable XML and our binary XML
wire format.

This change introduces a feature flag (still disabled by default)
for emitting binary XML by default when serializing.  It also adds
logic to automatically select the relevant parser by sniffing the
magic file header.

This is the key to our upgrade strategy: we'll gladly parse
human-readable XML from old devices, or binary XML from new devices.

Bug: 171832118
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Change-Id: I14fdab9a6667819db38116a8ce126f5f2a5a04df
2020-11-30 20:45:25 -07:00
Nikita Dubrovsky
83de85f7b6 Merge "Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo" 2020-11-30 22:33:03 +00:00
Yinglei Wang
0a993aac9a Merge "setAccessibilityFocused for NumberPicker" 2020-11-30 22:17:43 +00:00
Nikita Dubrovsky
10f027f69f Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo
Bug: 174125311
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: atest FrameworksCoreTests:TextViewOnReceiveContentTest
Change-Id: If3988dfe9dbed6bcd5e1f1566cb3ecdb111aef3f
2020-11-27 15:50:31 -08:00
Alex Johnston
0a6b674c91 Merge "Add credential management app to platform" 2020-11-27 11:20:27 +00:00
Alex Johnston
eff614db00 Add credential management app to platform
- This is part of the work to support
  a credential management app on
  unmanaged devices.
- Add intent and method in KeyChain to allow
  an app to request to become the credential
  management app.
- Add the class CredentialManagementApp to store the
  current credential management app.
- Add the class AppUriAuthenticationPolicy and an
  extra in KeyChain to allow an app to set an
  authentication policy.
- Add API methods to KeyChainService to set, get
  and retrieve the credential management app.

Bug: 165641221
Test: atest CredentialManagementAppTest
      atest AppUriAuthenticationPolicyTest
      adb shell am start -n com.android.keychain.tests/.KeyChainTestActivity
Change-Id: I1e57ed9c18a1ada463c55dbf17ce30e31aa7bad2
2020-11-27 08:25:56 +00:00
TreeHugger Robot
bf598cdfbc Merge "SharedLibraryInfo.isNative() returns true for native libs" 2020-11-26 23:14:13 +00:00
TreeHugger Robot
45315bc37c Merge "Attempt to reduce flakiness of ActivityThreadTest" 2020-11-26 09:22:40 +00:00
yingleiw
8f72ffcbfa setAccessibilityFocused for NumberPicker
NumberPicker uses AccessibilityNodeProvider. When creating
AccessibilityNodeInfo, the accessibility focus boolean property should
be set. Otherwise, talkback doesn't think it is accessibility focused
and won't speak the usage hint.

Fix: b/170267520

Test: tested manully with talkback on. Unit test added.

Change-Id: Icd280bce4a394ccff2a60314518109c07808338d
2020-11-25 19:46:18 -08:00
Abodunrinwa Toki
bc9ba87f5a Merge "Ensure the toolbar refreshes its PendingIntents when it changes." 2020-11-25 22:40:13 +00:00
Riddle Hsu
9b773c7acc Attempt to reduce flakiness of ActivityThreadTest
Make sure:
 - The test activity can be resumed. Such as any unexpected event
   unrelated to the test causes the device to sleep.
 - Test virtual displays are closed after test.

Bug: 169550676
Test: ActivityThreadTest
Change-Id: Icf6571deba11b58cbf309989c9525f245f4ea0b6
2020-11-25 18:53:24 +08:00
Jiyong Park
4e4e82225a SharedLibraryInfo.isNative() returns true for native libs
This CL fixes a bug that SharedLibraryInfo.isNative() returns false
even for native shared libraries. This was because when a
SharedLibraryInfo is copied to a new SharedLibraryInfo (to add some
extra info about declaring package, etc.), the native-ness was
mistakenly ignored. Fixing the issue.

Also, the old constructor of SharedLibraryInfo that doesn't accept the
native-ness was removed to prevent similar mistakes.

Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Test: write an app that calls PackageManager.getSharedLibraries()
and inspect the mIsNative fields in the returned list. Entries for
native shared libs all have mIsNative=false. Will add a testcase to
the CTS test when isNative() becomes an API.

Change-Id: I35d9530f332614e0444448feec70a4461c9bbfa8
2020-11-24 18:35:37 +09:00
TreeHugger Robot
c826b936b9 Merge "Decouple font collection logic from fallback building logic" 2020-11-23 22:07:30 +00:00
Michael Wachenschwanz
26acf27957 Merge changes I9b91ed27,Ia77d0eac,I014c2ee9
* changes:
  Fix PowerStatsView AppPicker activity start
  Utilize Measured Energy data in PowerStatsViewer
  Introduce MeasuredEnergyStats to BatteryStatsImpl
2020-11-23 17:38:05 +00:00
TreeHugger Robot
bc34eb88e3 Merge "Add comments to the arguments passed to FrameTracker" 2020-11-23 06:17:18 +00:00
Todd Kennedy
c0b203cc38 Add package name and class name to Property
Instead of returning the package/property name from the
query methods, make it part of the Property object itself.

Bug: 169258655
Test: atest FrameworksServicesTests:PackageParserTest
Change-Id: I1c620cde317dc05fb49367a226a612bc01ae7f55
2020-11-20 21:31:13 -08:00
Seigo Nonaka
4823031728 Decouple font collection logic from fallback building logic
Bug: 173752727
Test: atest SystemFontsTest
Change-Id: I87030852a31c48a702becd406a56d7af6a101c48
2020-11-20 16:52:13 -08:00
Alexander Dorokhine
16afc7f463 Merge "Re-export with google-java-format --aosp running on all exported classes" 2020-11-21 00:09:25 +00:00
Alexander Dorokhine
a6bcae1664 Merge "Update framework from androidx." 2020-11-21 00:09:02 +00:00
Michael Wachenschwanz
d23a7c4f03 Introduce MeasuredEnergyStats to BatteryStatsImpl
Initial checkin that plumbs the flow of energy consumption data through
BatteryStatsService, BatteryStatsImpl, and BatteryExternalStatsWorker.

Also, start monitoring the display subsystem measured enegy consumption
and attribute energy to screen on and screen doze state.

Fixes: 171728122
Test: atest FrameworksCoreTests:MeasuredEnergyStatsTest
Change-Id: I014c2ee99da773ebc93e18d026b2e2e694d0d4b2
2020-11-20 14:59:36 -08:00
Alexander Dorokhine
f4a8941ff8 Re-export with google-java-format --aosp running on all exported classes
This cleans up formatting issues arising from automatic rewriting.

There are no functional changes in this CL.

Bug: 162450968
Test: Builds
Change-Id: I58a6f7af5ca48c6989b00f1afb8110d49f7552a7
2020-11-20 14:03:41 -08:00
Alexander Dorokhine
2c94499193 Update framework from androidx.
Changes included:
* 285c252: Updates and clarifications to GenericDocument comments.
* 3c2a58e: Updates and clarifications to SearchSpec/SearchResult comments.
* 764cec9: Cleanup locking strategy.

Test: Presubmit
Change-Id: I4e9954db7cc3f02cf7a30ee09cb5a4533641c585
2020-11-20 14:03:28 -08:00
Todd Kennedy
e2d6cd588a Merge "Add PackageManager.Property class" 2020-11-20 16:35:37 +00:00
Marcin Oczeretko
7080b677a5 Add comments to the arguments passed to FrameTracker
Test: n/a
Change-Id: I2bca428d7a92006fb370a8608696b34b77a35941
2020-11-20 15:26:38 +00:00
TreeHugger Robot
4e3d12dd50 Merge "Add PeopleSpaceTile object for UI functionality" 2020-11-19 20:15:38 +00:00
Alexander Dorokhine
6c850e577a Merge "Sync framework from jetpack." 2020-11-19 18:28:31 +00:00
Anna Zappone
7d7a8b6fa8 Add PeopleSpaceTile object for UI functionality
Primarily based off ShortcutInfo.

Test: PeopleSpaceTileTest
Change-Id: I2292bca47f52d36c3e85cc5c9e10a3b280358253
2020-11-19 17:44:22 +00:00
Abodunrinwa Toki
c132a22873 Ensure the toolbar refreshes its PendingIntents when it changes.
A bug in FloatingToolbar.isCurrentlyShowing(menuItems) caused the
toolbar not to update the menu item action in certain cases where the
text selection changed but the toolbar menu items did not change.
e.g. Fires a Translate PendingIntent with the wrong text selection.
This CL fixes that.

isCurrentlyShowing(menuItems) aims to help avoid the re-building of
toolbar views when unnecessary. This fix still maintains this idea
but ensures that the menuItem references are updated so that the
correct click listener is triggered when the menu item button is
clicked.

Bug: 150973392
Test: Manually tested. See bug for how to reproduce.
Test: atest android.widget.TextViewActivityTest
Test: atest android.view.textclassifier.cts.TextViewIntegrationTest
Test: atest android.widget.cts.TextViewTest

Change-Id: Iefedf40e1ea6f9499401918ab34d3ebac53fc385
2020-11-19 13:49:09 +00:00
Marcin Oczeretko
d620436ba7 Merge "Add configuration options to InteractionJankMonitor" 2020-11-18 23:00:53 +00:00