Commit Graph

1659 Commits

Author SHA1 Message Date
Mathew Inwood
8e742f928e Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.

APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-29 11:51:12 +00:00
Hongwei Wang
050275cd83 Revert "Add maxTargetSdk restriction to unused APIs."
This reverts commit 72f07d6a8a.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397

Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-28 20:16:22 +00:00
Mathew Inwood
72f07d6a8a Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-27 15:46:07 +00:00
Treehugger Robot
4aad7e9d83 Merge "Cleanup references to system/core/liblog -> system/logging/liblog" am: f8f8acfe12 am: 5a42765d79 am: 5074242416 am: 787e21b77b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1474156

Change-Id: Idfe4567808bf33f29bbe4c8072640e6d4955aba7
2020-10-27 05:04:42 +00:00
Baligh Uddin
f2c42889fb Cleanup references to system/core/liblog -> system/logging/liblog
BUG: 170387172
Test: TH
Change-Id: Ifb2bd2c3db97c52baeac6f2e3643dabf6fcfde6e
2020-10-26 14:36:03 +00:00
Jeff Sharkey
305ef9e1cf Migrate hot codepaths to formatSimple().
The recently added TextUtils.formatSimple() can efficiently format
simple strings, roughly 6.5x faster than using String.format().

This change starts using this new method in hot codepaths identified
from pprof traces, and this CL alone should reduce system_process CPU
usage by 0.24%.  Linked bug has detailed pprof screenshots.

Bug: 170978902
Test: atest FrameworksCoreTests:android.text.TextUtilsTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ie5a21a24be6dfcdb29768fe235e20f050fc111c7
2020-10-22 12:48:13 -06:00
Jeff Sharkey
1992cdb4de Merge changes from topic "oct16c"
* changes:
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStringsChecker.
  Apply fixes for EfficientCollections.
  Trivial refactor for consistent naming.
  Expand formatSimple() to support widths.
  Refinement of EfficientStringsChecker.
2020-10-21 15:27:15 +00:00
Jeff Sharkey
c603ca2dd8 Apply fixes for EfficientStrings.
Refactoring to avoid StringBuffer synchronization overhead.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ibf843ed780c1202d5d96a11eaca889e592f19263
2020-10-20 22:00:20 -06:00
Jeff Sharkey
df8dc2b4a5 Apply fixes for EfficientCollections.
Drop-in replacements suggested for inefficient collections.  Also
annotate a handful of places where we're unable to update.

Bug: 155703208
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I48b600508df8160ac9b40fea7afca974b2c972f6
2020-10-20 21:57:00 -06:00
Jeff DeCew
db19728e1c Remove unused SEAMLESS_TRANSFER constant
Fix: 171298072
Test: atest SystemUITests
Change-Id: I26d17744c68c2c41ccdcab4ceab377a937d2888a
2020-10-20 10:42:08 -04:00
Roman Kalukiewicz
34573d564a Merge "Add @Nullable annotation to the parameter of Object.equals() methods." 2020-10-16 01:25:15 +00:00
Roman Kalukiewicz
24403f7ef2 Add @Nullable annotation to the parameter of Object.equals() methods.
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.

The change was generated by running

find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'

in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.

Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
2020-10-15 10:48:01 -07:00
Torne (Richard Coles)
cac8d63543 Remove incorrect statement from Log docs.
The javadoc for Log stated that verbose logs are not compiled into apps
and debug logs are stripped at runtime, but this doesn't happen
automatically and is up to the app's Proguard/R8 configuration and/or
explicit use of isLoggable. Just remove this.

Fixes: 27286343
Test: m offline-sdk-docs
Change-Id: I0376b20e5c324f422a5fff0201f144e447d8eac2
2020-10-13 15:30:39 -04:00
Adam Bookatz
0570c29094 Merge "Use hasBadge instead of isManagedProfile" 2020-10-08 17:39:58 +00:00
Adam Bookatz
82194b8fe0 Use hasBadge instead of isManagedProfile
To determine whether a user has a badge, the
correct call is now hasBadge, rather than isManagedProfile.

Currently, the only user that actually can have a badge
is a managed profile, so this change is a no-op. In the future,
if further profile support is expanded, then hasBadge will
be correct.

Bug: 170249807
Test: Treehugger (this cl is a no-op)
Change-Id: I9144c4dc519936dfc5a2aeae0eb0bd91bea89db2
2020-10-06 15:04:16 -07:00
Ioana Stefan
88cefeb2c9 Merge "Add proto-based client side dumping for IME tracing" 2020-09-29 15:27:30 +00:00
Anmol Gupta
cf9e5123ce Add proto-based client side dumping for IME tracing
This CL implements a mechanism to dump IME related client states into
a proto file which can later be imported to winscope to allow easy
debugging. A new abstract class ImeTracing.java declares the methods
related to scheduling, collecting and dumping logs. Two child class
implement these methods for server and client separately.

The Design Doc for the IME tracing project is: go/ime-tracing

Bug: 154348613
Test: start trace by calling "adb shell ime tracing start"
      end trace by calling "adb shell ime tracing stop"
      pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb"
Change-Id: Ia89f11d5ef8a220ea7746191b18769cea5a8359d
2020-09-29 15:05:18 +02:00
Shanthanu Bhardwaj
4d32b19208 Fix minor error in documentation of isLoggable
The change which removed the IllegalArgumentException was released in O (API level 26) (8143fa57ad), so the exception is thrown till API level 25, NOT 23 as the documentation currently states.

Bug: 124593220

Change-Id: Ia4c094cd7ae68f978bd5f49a9b294286dbe5bb61
2020-09-26 21:55:32 +00:00
TreeHugger Robot
fbffe3f137 Merge "Refactor PermissionsState to be a data class for migration." 2020-09-22 22:18:40 +00:00
Hai Zhang
36744c7167 Refactor PermissionsState to be a data class for migration.
PackageManager Settings will now read permission state from
PermissionManager as well, to maintain compatibility for dump and the
package list file. As a result, we no longer need to write back to
this legacy state before dump and writing package list. We still need
to do so before we finish persistence migration though.

The new AppIdPermissionState will be a system API once we finish
migration of BasePermission.

Bug: 158736025
Test: presubmit
Change-Id: I3c7f20cef54084255108a0a889d8a3d7e3ab9d88
2020-09-21 22:25:50 -07:00
TreeHugger Robot
21943c538a Merge "Create the feature flag for Provider model development" 2020-09-18 05:08:06 +00:00
Kweku Adams
e1e67c57a6 Merge "Generalize SparseArrayMap." 2020-09-16 20:17:45 +00:00
Kweku Adams
0c22b1da5e Generalize SparseArrayMap.
SparseArrayMap required Strings as keys, which restricted its uses. Now
it can take any object as a key, which better reflects the underlying
ArrayMap generalization.

Bug: 138469672
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: atest QuotaTrackerTest
Test: atest SparseArrayMapTest
Change-Id: If6da7dfdf3cdd9be0fe9006484c78c574ef2028b
2020-09-16 10:07:55 -07:00
Arc Wang
b96ea47567 Create the feature flag for Provider model development
Provider model is a feature which improves networks
Settings UX.

Bug: 167474581
Test: compile
Change-Id: Ib9a5a3fb1026fa5863afd4e23121391bf762fd08
2020-09-17 00:15:07 +08:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Khaled Abdelmohsen
f2afb166d4 Merge "Parse source stamp lineage in platform" 2020-09-14 10:18:03 +00:00
Khaled Abdelmohsen
5aa65c1967 Parse source stamp lineage in platform
Bug: 167962287
Test: atest FrameworksCoreTests:SourceStampVerifierTest
Change-Id: I9e30dde9cebe97ff7b92f02feb5c82b3a58a97b1
2020-09-11 18:17:07 +01:00
Yi-Ling Chuang
eb87796994 Add a feature flag for settings contextual home.
Bug: 168179764
Test: rebuild
Change-Id: I6e1baa34e1d38ed9c4848cdcea902aaaf52c4192
2020-09-10 17:13:01 +08:00
Yanting Yang
b95a193c1f Add a feature flag for silky home
Bug: 168166015
Test: robotest & rebuild
Change-Id: I16df742156e4bfb18ac0f80bcd14bf1c27a952eb
2020-09-10 12:57:43 +08:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Alex Buynytskyy
ec6f3e189c APK digest API and initial implementation.
Bug: 160605420
Test: atest ChecksumsTest

Change-Id: I08ef0b131c44313f2c6acddad00dfa03598cc1ff
2020-08-24 19:54:02 -07:00
Treehugger Robot
bc32d3e0a0 Merge "Update language to comply with Android's inclusive language guidance" am: 1d2417fa16 am: 436fe675e1 am: 37be2eefe9 am: d82657834a am: 9185ac265b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1383976

Change-Id: Ia104a8eae3cd39299b7bb61185ded1cc026a4835
2020-07-31 22:09:57 +00:00
Treehugger Robot
37be2eefe9 Merge "Update language to comply with Android's inclusive language guidance" am: 1d2417fa16 am: 436fe675e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1383976

Change-Id: I318defffeb05aeb6d742fe95c5ca84f46604e55e
2020-07-31 21:14:04 +00:00
Alice Kuo
2658f931df Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

  #inclusivefixit

Bug: 162536543
Change-Id: Id328052e95765170520bd35f1872ce4c6457fecb
2020-07-31 18:52:16 +00:00
Zim
a813bc1f05 Remove persist.sys.fuse == false code paths
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported

Test: m
Bug: 160159282
Change-Id: Ia815c39d898b05bf8082ec5b7dfd903cc9e150bc
2020-07-09 11:54:45 +01:00
Alex Buynytskyy
f4f1218d18 V4 signature check refactors.
- expose all v2/v3 digests to compare against v4: this is more robust
and don't rely on a comment to maintain compatibility,
- renamings and cleanups.

Bug: 160605420
Test: refactoring CL

Change-Id: Ib46855e0e1985fae244bb8aabbb40a7231a3736d
2020-07-08 00:52:11 +00:00
vichang
ff40caf3e2 Merge "Move libcore.timezone to the i18n module - Final part" am: 35d6ab6a89 am: 1c44c3b771 am: 4d9269062b am: 542d231ddd am: 7b4b6813d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348602

Change-Id: I59697d039272ae4a2c12995812b4dd9094a21007
2020-07-02 11:45:30 +00:00
vichang
4d9269062b Merge "Move libcore.timezone to the i18n module - Final part" am: 35d6ab6a89 am: 1c44c3b771
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348602

Change-Id: I89413242c6497114e8e533cff43d17b44fd758eb
2020-07-02 10:50:07 +00:00
vichang
26ed852eaf Merge "Use new package name for ZoneInfo and libcore.timezone" am: af6f8e2301 am: 64937407f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1346485

Change-Id: I5ded5092e4c7706f58417a5c97f3207524b44a95
2020-06-30 17:23:46 +00:00
Victor Chang
f61ae810c6 Move libcore.timezone to the i18n module - Final part
Bug: 141747409
Test: atest CtsLibcoreTestCases  CtsLibcoreTestCases
Change-Id: Id3c9a56dcf86b6f5ec81d09d12e432fc97f178c0
2020-06-30 14:30:46 +01:00
Victor Chang
2ea241f6ee Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Merged-In: Id99a345ec024179295063c3644f72c062cb50554
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-30 13:53:47 +01:00
Victor Chang
6c22f6adb0 Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-25 18:30:29 +01:00
Khaled Abdelmohsen
1682154105 Merge "Modify source stamp format" into rvc-dev am: 592da34c0b am: 6413ab89b1 am: 75f12a997a am: bab5d2ff0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837613

Change-Id: Idd2e42054f293c4bd188bb1d625c253630106435
2020-06-19 19:07:25 +00:00
Khaled Abdelmohsen
bab5d2ff0b Merge "Modify source stamp format" into rvc-dev am: 592da34c0b am: 6413ab89b1 am: 75f12a997a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837613

Change-Id: I43a9bbb813f56c2b3f90409dad44f1a913e515f1
2020-06-19 18:43:29 +00:00
Khaled Abdelmohsen
b629527d92 Merge "Modify source stamp format" into rvc-dev am: 592da34c0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837613

Change-Id: Ie6ece79118a75ffac46e4d665844717cb6ba9c57
2020-06-19 18:42:36 +00:00
Khaled Abdelmohsen
592da34c0b Merge "Modify source stamp format" into rvc-dev 2020-06-19 18:36:27 +00:00
TreeHugger Robot
c8f40fee57 Merge "Remove the feature flag of contextual home V2" into rvc-dev am: 1471727cdb am: be044b011a am: bb65605a2f am: 980fa106e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907890

Change-Id: Ie993b5a659a0298adc1a5caf2d1a3d6628d38024
2020-06-19 06:44:11 +00:00
TreeHugger Robot
980fa106e5 Merge "Remove the feature flag of contextual home V2" into rvc-dev am: 1471727cdb am: be044b011a am: bb65605a2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907890

Change-Id: Ie2cdc06b030dd582a7e962f57d90e781b8f1ba64
2020-06-19 06:18:41 +00:00
TreeHugger Robot
41505c9616 Merge "Remove the feature flag of contextual home V2" into rvc-dev am: 1471727cdb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907890

Change-Id: Iecbd4b65bf2025ee26aa1d550878b176f4abba34
2020-06-19 05:44:59 +00:00