Commit Graph

1736 Commits

Author SHA1 Message Date
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
Wilson Wu
d8343be5ac Merge "Make IInputMethodManager to oneway (11/N)" into sc-dev 2021-02-02 07:35:56 +00:00
Yi-Ling Chuang
0197d41019 Turn on the feature flag for Android S Settings.
Bug: 169467375
Test: launch Settings and see the the UI.
Change-Id: I1d789c6ed0c5e98549c40e74faef8181d6733b30
2021-02-02 15:31:07 +08:00
Wilson Wu
418598ff85 Merge "Add OWNERS for imetracing" into sc-dev 2021-02-02 00:56:42 +00:00
Wilson Wu
35d4790aa0 Add OWNERS for imetracing
Bug: 178769649
Test: N/A
Change-Id: I6b1279887d37cb1ac6708307312d9400b4bdd47d
2021-01-29 16:02:43 +08:00
shawnlin
f7ff55217c Create an API to get a cutout path
- Added a new API to get the cutout paths.
- Create a @hide class CutoutPathParserInfo
  - Used to store the needed info to create the cutout paths.
  - Will be used when DisplayCutout.getCutoutPath() is called to
    create the cutout paths.

Bug: 172646505
Test: atest DisplayCutoutTest DisplayContentTests WmDisplayCutoutTest
Change-Id: Ief92ce4466f6bffb2a9375388b71de43049b4eef
2021-01-28 19:12:54 +08:00
Wilson Wu
f226a79fee Make IInputMethodManager to oneway (11/N)
Comply following methods to IVoidResultCallback to emulate
current behavior and apply them to one-way.

-. startProtoDump
-. startImeTrace
-. stopImeTrace

Bug: 163453493
Test: atest CtsInputMethodTestCases
Test: 1) Enable the Winscope Trace tile
      2) Do some actions like open keyboard
      3) Disable the Winscope Trace tile
      4) Grad a bugreport and verify trace on go/Winscope
Change-Id: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
2021-01-28 17:09:39 +08:00
Jackal Guo
199d13c73d Merge "Refactor PackageParser (4/n)" into sc-dev 2021-01-28 00:19:02 +00:00
Jeff DeCew
52b003326d Merge "Add 'Android Resources' team as OWNERS of classes in android.util" am: 6671f75e1d am: ce917a8f14 am: d64f05737b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542391

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I40c11677140a9f4e7d9fe629e2606c978d22a610
2021-01-27 14:16:32 +00:00
Jeff DeCew
6671f75e1d Merge "Add 'Android Resources' team as OWNERS of classes in android.util" 2021-01-27 13:18:49 +00:00
Jackal Guo
f9f526f296 Refactor PackageParser (4/n)
Replace the usage of the constant and Package/ApkLite from
PackageParser by the alternative in order to move away from
PackageParser.

Bug: 174723245
Test: make
Test: atest -p core/java/android/content/pm \
        core/java/com/android/internal/content \
	services/core/java/com/android/server/pm \
	services/tests/servicestests/src/com/android/server/pm
Change-Id: I4e2a7666b2feede3994a6075edfe4d18e80433e9
(cherry picked from commit ce0715ba54)
2021-01-27 07:14:40 +00:00
Yo Chiang
cb42566590 Remove feature flag "settings_dynamic_system"
The API surface of com.android.dynsystem is already protected by
privileged permission android.permission.INSTALL_DYNAMIC_SYSTEM,
which is only granted to system apps or priv apps.
Thus the feature flag check here is redundant, because eligible
callers of this API (system app) can also set the feature flag.

Bug: 176795908
Test: Presubmit
Test: Test DSU installation Intent
Change-Id: Iedac8763372ef6f11754d3f272f70753fb3d4829
Merged-In: Iedac8763372ef6f11754d3f272f70753fb3d4829
2021-01-14 15:45:53 +08:00
Yo Chiang
091f514bf5 Remove feature flag "settings_dynamic_system"
The API surface of com.android.dynsystem is already protected by
privileged permission android.permission.INSTALL_DYNAMIC_SYSTEM,
which is only granted to system apps or priv apps.
Thus the feature flag check here is redundant, because eligible
callers of this API (system app) can also set the feature flag.

Bug: 176795908
Test: Presubmit
Test: Test DSU installation Intent
Change-Id: Iedac8763372ef6f11754d3f272f70753fb3d4829
2021-01-13 09:34:37 +00:00
TreeHugger Robot
b078a29814 Merge "Add SparseArray#set for Kotlin index= operator" 2021-01-12 18:30:17 +00:00
Winson
590e9ffb4c Add SparseArray#set for Kotlin index= operator
Just an alias for put to allow `array[index] = value` syntax in Kotlin.

Bug: 163565712

Test: manual, used in tests for separate feature

Change-Id: Ie9e17b8f4d16a52f4dc213e1ada8d61fce9eedaf
2021-01-12 07:59:07 -08:00
Jeff DeCew
d9d24e4489 Add 'Android Resources' team as OWNERS of classes in android.util
Change-Id: If56558ebc4733b8266c231385fab4fb6b9316976
2021-01-07 20:43:22 +00:00
Jeff DeCew
a2114a56c8 Fill out RemoteViews methods for editing LayoutParams.
* All these methods are still hidden
* Methods take either a dimen or a value with a TypedValue COMPLEX_UNIT (as used for TYPE_DIMENSION)
* Rather than having 8 margin methods, I chose to have only 2, and create an @IntDef MarginType
* Created a set of methods in TypedValue for creating typed value data equivalent to that of dimension resources.

Bug: 175345582
Test: atest TypedValueTest
Change-Id: I3a8a5a1511158a6dbf55d4f9931ba100a369cb35
2021-01-07 14:30:57 -05:00
vichang
397070ce13 Merge "Deprecate Patterns.IP_ADDRESS" am: 4eb4e375f7 am: 442a80ba19 am: 538caa7bf7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1533540

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89c8f8865d1ee7cfb0e9d9257c39a2b05894109d
2021-01-06 00:30:49 +00:00
Victor Chang
97006e6b51 Deprecate Patterns.IP_ADDRESS
Bug: 165470548
Test: n/a
Change-Id: Ic1e188ea118c87514815ec9581bb158ab66e22e4
2020-12-24 17:41:19 +00:00
Jeff Sharkey
fe2d1aca7f Enable binary XML by default.
This change enables the feature-flag which pivots most of the XML
data stored by the system_server to using a binary XML wire format.

Benchmarks have shown this binary format can be written over 4x
faster and parsed over 8x faster than human-readable XML while
seamlessly enabling client code to pivot between the two formats.

Bug: 171832118
Test: atest FrameworksServicesTests
Change-Id: Id43edc0627866aba55e580d17958c689a6cfcfad
2020-12-17 08:16:32 -07:00
Jeff Sharkey
e09d74c644 Prepare for binary XML pivot.
As part of preparing to enable the new binary XML wire format across
the device, we ran a large suite of unit tests which uncovered a
handful of bugs where client code was assuming that the serializer
would create TEXT tokens for newlines between tags.

Also relaxes all binary XML classes to accept either "UTF-8" or
"utf-8" as the encoding name.  Slight bug fixes to clear names, text,
and attributes for each event to match XmlPullParser documentation.

Fixes for existing unit tests that were assuming human-readable XML,
or assuming that the serialization would perform UTF-8 validation.

Bug: 171832118
Test: atest FrameworksServicesTests
Change-Id: I841fe41e4967b36ab17551294ae0f42fb87a8e71
2020-12-17 08:16:06 -07:00