Commit Graph

1756 Commits

Author SHA1 Message Date
Winson
032e3d008e Add cert digest separator to pm app link output
For easy copy-paste if someone is configuring their server to host an
assetlinks.json.

Bug: 184954099

Test: manual, pm get-app-links on device

Merged-In: I5ed3505d72b5522202743a49559fbf1230b5767e
Change-Id: I5ed3505d72b5522202743a49559fbf1230b5767e
2021-04-22 19:15:16 +00:00
Felipe Leme
188601a826 Removed Slog methods that support message formatting.
Slog is a core class provided by frameworks.jar, and these new methods
were causing performance regressions, so they were moved to a
system_server only class (com.android.server.utils.Slogf).

Test: m

Fixes: 183523451
Bug: 182476140

Change-Id: I511dd57faee194b58cf77c0c39c92dd0e876566e
2021-04-06 22:53:25 -07:00
Almaz Mingaleev
bcb4204697 Merge "Use isShownInPickerAt instead of isShownInPicker." am: bc3fff46d9 am: 7851e524e7 am: e314e455b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655727

Change-Id: I6fc3e9784eeb85de32b26e6bd56c7e7f661aeb33
2021-04-06 14:03:13 +00:00
Felipe Leme
fec71a7117 Moved string-formatting methods from Slog to Slogf.
Slog is a core class provided by frameworks.jar, and these new methods
were causing performance regressions, so they were moved to a
system_server only class.

Bug: 182476140
Bug: 183523451

Test: atest --rebuild-module-info FrameworksMockingServicesTests:SLogfTest

Change-Id: I98cbb122d5410b61812edc85162aa6b10b995fdc
2021-04-02 22:35:20 +00:00
Almaz Mingaleev
66f4e63633 Use isShownInPickerAt instead of isShownInPicker.
The latter is being removed.
The date(1 Jan 2019 00:00) was a cut-off date used in
SettingsUI. This change moves it to reuse that date without
duplication.
Affected method is used in setup wizard to answer "What time zone
IDs should we show for a country?". The question is vague, but
the change keeps user experience consistent across device w/o
breaking method contract.

Bug: 155738410
Test: presubmit
Change-Id: Ib139b316e5909cab18d015b7c163bb9c79bcef5b
2021-03-31 17:03:40 +00:00
Weng Su
c2da105ad9 [Provider Model] Enable Provider Model by default
Bug: 183671325
Test: manual test
Change-Id: I1a3d2da39a6f278fa852827d6730ad3303970eeb
2021-03-31 10:08:18 +08:00
Slava Shklyaev
128e6bb54f Revert "[Provider Model] Enable Provider Model by default"
This reverts commit 48270e3029.

Reason for revert: suspected culprit for http://b/183926475

Change-Id: I49a5abbe7d91110956f66ce7a63a8715a3f24a2b
2021-03-29 15:20:32 +00:00
Weng Su
48270e3029 [Provider Model] Enable Provider Model by default
Bug: 183671325
Test: manual test
Change-Id: I9546d0212f62304cda7227cbe1a6cce3442dc997
2021-03-25 12:02:54 +08:00
TreeHugger Robot
19a4ab305f Merge "Fix typo in SparseLongArray" into sc-dev 2021-03-24 00:51:32 +00:00
Ruslan Tkhakokhov
416b199d3a Merge "Enable new backup eligibilities rules by default" into sc-dev 2021-03-23 22:37:10 +00:00
Yohei Yukawa
9416d8ded2 Merge "Add "cmd input_method tracing save-for-bugreport"" into sc-dev 2021-03-23 06:27:57 +00:00
Felipe Leme
0b7567444c Merge "Added Warning about extra object allocation on SLog methods." into sc-dev 2021-03-23 05:32:14 +00:00
Yohei Yukawa
5735569904 Add "cmd input_method tracing save-for-bugreport"
This CL reworks our previous CL [1], which enabled "adb bugreport" to
include ime-tracing files into bugreport with some unpleasant
side-effect described in Bug 177462676.

Basically what this CL aims to do is to mirror my CL [2] for
InputMethodManagerService.  Instead of relying on heuristics, this CL
introduces a clear and dedicated command

  adb shell cmd input_method tracing save-for-bugreport

so that "adb bugreport" can explicitly tell IMMS to dump the tracing
files.

See the corresponding CL for frameworks/native [3] about how it's
triggered from "adb bugreport".

 [1]: Ie87eb8423e2bb70f28c330983d45b95e2e07062d
      ac24994aaa
 [2]: I887ae6941b4844a606675b447f67ecee88d7f192
      96a51f9971
 [3]: I62105334e4efbb4514390ffa8be5416482ca3b29
      02b1d2c70b2f4703a9dd51ba69d78604d66916e1

Bug: 177462676
Test: Manually done as follows.
  1. adb shell cmd input_method tracing start
  2. adb logcat -d -s imeTracing:*
       Make sure ime tracing is running
  3. adb shell dumpsys input_method \
         --dump-priority CRITICAL --proto > /dev/null
  4. adb logcat -d -s imeTracing:*
       Make sure ime tracing has not been stopped.
  5. adb shell cmd input_method tracing save-for-bugreport
  6. adb logcat -d -s imeTracing:*
       Make sure ime-tracing was dumped and is still running.
  7. adb root && adb shell ls /data/misc/wmtrace/ -al
       Make sure ime tracing files are saved.
Test: Manually done as follows.
  1. adb shell cmd input_method tracing start
  2. adb logcat -d -s imeTracing:*
       Make sure ime tracing is running
  3. adb bugreport bugreport.zip
  4. adb logcat -d -s imeTracing:*
       Make sure ime-tracing was dumped and is still running.
  5. unzip -v bugreport.zip | grep ime_trace_
       Make sure ime_trace_{clients,service,managerservice}.pb are
       included.
Change-Id: Ib106e077a10eb6a4f37b38aa9172e7c99a81f898
2021-03-22 18:29:42 -07:00
Adam Bookatz
6b8c61c8fc Merge "SparseDoubleArray" into sc-dev 2021-03-22 21:45:29 +00:00
Zhomart Mukhamejanov
bb57907a60 Add docs to Slog class.
Docs will be super useful, especially to new developers.
I see several docs and questions inside/outside google asking
what is it and when to use it.

Bug: 182476140
Test: m -j
Change-Id: Ibb41ab0b6fd808f2a1e5475103860fc415a502d6
2021-03-22 17:23:25 +00:00
Adam Bookatz
8bcb4c9219 SparseDoubleArray
Introduces a SparseDoubleArray class.
It is based on a SparseLongArray, storing the double values
in the bits of the long in the SparseLongArray.

This is a hidden class.
Not all long-term desired features of SparseDoubleArray
have necessarily been implemented here; only the ones needed
right now have been written.

Bug: 182845832
Test: atest BatteryStatsTests
Test: atest FrameworksCoreTests:android.util.SparseDoubleArrayTest
Change-Id: Id68b22328f2660839e2005990766d99140b00c16
2021-03-19 17:31:56 -07:00
Felipe Leme
5395b2af57 Lazy load the allocation of Slog message formatting objects.
Test: manual verification looking at logcat output
Fixes: 182963900

Change-Id: If62ccfe085b20cda8755fefc3ec757ad59986685
2021-03-19 12:39:19 -07:00
Ruslan Tkhakokhov
1add3eee67 Enable new backup eligibilities rules by default
This feature (b/174216309) has been flagged off during development.

Bug: 174216309
Test: m -j
Change-Id: I171583fcdf5a7b2df64096853032409e5544aa5f
2021-03-19 12:55:31 +00:00
Adam Bookatz
5400b371db Fix typo in SparseLongArray
Bug: 182845832
Test: N/A
Change-Id: I9178e7962282ab998613f1d1a4df701cc4036dfd
2021-03-17 18:43:19 -07:00
Felipe Leme
08e7e12982 Added Warning about extra object allocation on SLog methods.
Test: m
Bug: 182476140
Change-Id: Id210956dcc060f0570d1f5c95e11e0effc7d0d24
2021-03-16 12:01:38 -07:00
TreeHugger Robot
cec96c0d0b Merge "Overloaded Slog methods with versions that support string formatting." into sc-dev 2021-03-13 02:55:58 +00:00
Yurii Zubrytskyi
e32f0d1c01 Merge "[hardening] Use read() instead of mmap() for incfs files" into sc-dev 2021-03-12 08:07:38 +00:00
Felipe Leme
ff340887c2 Overloaded Slog methods with versions that support string formatting.
Test: none
Fixes: 182476140

Change-Id: I60c8ca83f09b9da02c3ef20bcc5f88aec5204e74
2021-03-11 09:31:03 -08:00
Yohei Yukawa
11919f5d83 Inline ImeTracing#onShellCommand()
This is a preparation to add new command:

  adb shell cmd ime tracing save-for-bugreport

which is to be an important piece of functionality to get rid of an
unintentional behavior change (Bug 177462676).

Anyway this CL itself is still a mechanical refactoring hence there
should be no observable behavior change.

Bug: 177462676
Test: "adb shell cmd input_method tracing start" works.
Test: "adb shell cmd input_method tracing stop" works.
Test: "adb shell ime tracing start" still works.
Test: "adb shell ime tracing stop" still works.
Test: "adb shell ime list" still works.
Change-Id: I972f287bddda962dd42d4dd5226cb8b42e759121
2021-03-10 16:54:54 -08:00
Beth Thibodeau
5b1beb3963 Merge "Remove screenrecord flag code from global actions" into sc-dev 2021-03-10 17:10:00 +00:00
David Coffin
d68e92249b Merge "Add feature flag for settings security hub" into sc-dev 2021-03-08 09:12:46 +00:00
TreeHugger Robot
a9171adcbe Merge "Correct API for new sizes in App Widgets." into sc-dev 2021-03-05 22:44:57 +00:00
David Coffin
1b8b687f33 Add feature flag for settings security hub
Adds a feature flag to enable the security hub functionality in
settings.

Bug: 181764276
Test: tested manually by checking the flag in developer options
Change-Id: I1a8c70b7f1037f8fdab95206c2a719e43d9254f4
2021-03-05 12:44:19 +00:00
TreeHugger Robot
c74a9955d5 Merge "Revert "Revert "Revert "Revert "Turn on the feature flag for And..."" into sc-dev 2021-03-05 11:15:02 +00:00
Yurii Zubrytskyi
3880f29949 [hardening] Use read() instead of mmap() for incfs files
Digest calculation is currently optimized for perfromance, and
it uses fine-tuned mmap() to access the APK. As IncFS-based APKs
aren't supposed to be fully digested, this code will probably
never run for those. But just in case, it's better to switch
over to a slightly slower read()-based implementation that
doesn't have any chance of crashing the whole process via a
SIGBUS signal

Bug: 175632872
Test: atest framework/base/core
Change-Id: Id3dc4cd5090679120d95da40c0dfdde0d72b6bb0
2021-03-05 01:42:18 -08:00
Pierre Barbier de Reuille
3e443e6b24 Correct API for new sizes in App Widgets.
This follow recommendations from the API council review.

Based on those recommendations: I updated the API and updated the
comments to make the function behavior clearer.

Bug: 181611658
Test: atest android.widget.cts.RemoteViewsSizeMapTest
Test: Local widget to check rendering
Change-Id: Ie9fcedbc7b18b83f6d1220f99240f264e53e3649
2021-03-04 23:27:08 +00:00
Beth Thibodeau
749dea4ada Remove screenrecord flag code from global actions
The flag was added before screen record was a full feature and is no
longer necessary to maintain

Fixes: 118826991
Test: atest com.android.systemui.globalactions
Change-Id: I728a2d8c7c8527d8a6a61c1bc9feb833724afeb8
2021-03-02 20:06:07 -05:00
Jeff Sharkey
31c33020fd Merge "Add to owners" am: 41a4f1e44c am: a9a58d94a1 am: c22eeb41a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611655

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id0aace3e9d38d7b0ef8e5ce5a4586bffdaa7fe22
2021-03-02 21:36:44 +00:00
Winson Chiu
90b5c66337 Merge "Accept generic in SparseArray contentEquals" into sc-dev 2021-03-02 18:38:59 +00:00
Todd Kennedy
27cc2cecda Add to owners
Change-Id: Ib4f60234f2633f954ab86f7dbf6c21439ee5b24d
2021-03-02 18:38:57 +00:00
Mill Chen
9c9c42bf49 Revert "Revert "Revert "Revert "Turn on the feature flag for And..."
Revert submission 13519571-revert-13479025-multiuser_test-BVTHGRYHSS

Reason for revert: b/179457252 has been fixed.
Reverted Changes:
I35e436e99:Revert "Fix the broken test"
I4f77afda4:Revert "Revert "Revert "Turn on the feature flag f...

Change-Id: I92f7ce09a4e4a7ccf302dd67e13bf97e7ecb47e8
2021-03-02 03:01:25 +00:00
Riddle Hsu
ed46310238 Merge "Optimize the Parcel read/write of common window data" into sc-dev 2021-02-26 04:07:39 +00:00
Chris Li
7ff46d7137 Merge "DisplayContent rotateBounds not keeping same physical position for 180" into sc-dev 2021-02-25 02:40:34 +00:00
Ruslan Tkhakokhov
6e1b079c9a Add a feature flag to control new opt out behaviour
Introduce a lever we can use to enable / disable all new backup
eligibility behaviours from one place.

Bug: 174216309
Test: m -j
Change-Id: I17618a72c04f138204c5c0ca2c23330044c169e7
2021-02-24 23:21:35 +00:00
Winson
84bf25d6d3 Accept generic in SparseArray contentEquals
Also updates the JavaDoc.

Bug: 181100924

Test: atest android.util.cts.SparseArrayTest

Change-Id: I3704b2519d10e20d02437037c7f92f5d2ed90dcd
2021-02-24 12:58:06 -08:00
Riddle Hsu
b293d933e0 Optimize the Parcel read/write of common window data
The Parcel read/write speed of MergedConfiguration/InsetsSource
becomes 4x+ faster.

Because writeParcelable sends additional type info which is
unnecessary if the type is known on the reading side, replace
the usages to writeTypedObject and well-written readFromParcel.
That saves the time of class lookup and object creation.

Bug: 181025587
Test: vogar --mode app_process --benchmark \
frameworks/base/core/tests/benchmarks/src/android/os/ParcelableBenchmark.java

Change-Id: I29548ce6c2e5886f0e90a5dc70d8e9ecc0fb25a8
2021-02-24 23:33:16 +08:00
Chris Li
29f24a134c DisplayContent rotateBounds not keeping same physical position for 180
Rotation_90 + rotation_90 is different from the result of rotation_180
with the current implementation. Should also take care of rotation_180.

Fix: 180751251
Bug: 173124775
Test: atest WmTests:DisplayContentTests
Test: atest WMShellUnitTests:DisplayLayoutTest
Test: atest FrameworksCoreTests:RotationUtilsTest
Change-Id: Ia1c87409b4c4cc412c3fd89e58d08b6ae2069fd0
2021-02-23 17:34:26 -08:00
TreeHugger Robot
ea1c8b3a76 Merge "Revert "Revert "Revert "Turn on the feature flag for Android S S..."" into sc-dev 2021-02-08 21:45:00 +00:00
Daniel Chapin
0ded361ef4 Revert "Revert "Revert "Turn on the feature flag for Android S S..."
Revert submission 13479025-multiuser_test

Reason for revert: Bug: 179457252
Reverted Changes:
I9e3d23f93:Fix the broken test
Id05757c49:Revert "Revert "Turn on the feature flag for Andro...

Change-Id: I4f77afda470b226007bfffda7f536df3b1d4d28a
2021-02-08 18:50:05 +00:00
Winson
e803a1bd33 Add internal domain verification data classes
Eventually will be used to store state that's included as part of
com.android.server.pm.Settings.

Also adds equality and  Kotlin index operator mutation support to
SparseArray, to improve ease of use.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163565712
CTS-Coverage-Bug: 179382047

Test: none, will be tested as part of follow up change

Change-Id: Ie4eca3a99633465337758ee165e07f35c8db87c8
2021-02-04 10:26:57 -08:00
TreeHugger Robot
debc58e074 Merge "Revert "Revert "Turn on the feature flag for Android S Settings.""" into sc-dev 2021-02-04 18:13:48 +00:00
Jason Chiu
2b4207db12 Revert "Revert "Turn on the feature flag for Android S Settings.""
This reverts commit 5ad13e0c25.

Reason for revert: Test case has been fixed

Change-Id: Id05757c494628c1d84943b383cf7639098a3fa3a
2021-02-04 15:57:13 +00:00
TreeHugger Robot
81f656e07f Merge "Revert "Turn on the feature flag for Android S Settings."" into sc-dev 2021-02-03 20:12:00 +00:00
Fan Zhang
5ad13e0c25 Revert "Turn on the feature flag for Android S Settings."
This reverts commit 0197d41019.

Reason for revert: DroidMonitor: Potential culprit for Bug 179262029 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ifed6374b417d10ca76c3c2805ac985282174b367
2021-02-03 18:11:54 +00:00
TreeHugger Robot
421ce84db7 Merge "Turn on the feature flag for Android S Settings." into sc-dev 2021-02-03 04:58:28 +00:00