Commit Graph

688302 Commits

Author SHA1 Message Date
Anton Hansson
39ebb3b0c0 Merge "Use lint database from api_version_public" 2022-05-11 08:11:45 +00:00
Roman Kiryanov
c079a82c70 Merge "Label emulator clipboards with SUPPRESS_CLIPBOARD_OVERLAY" 2022-05-11 03:06:57 +00:00
Dmitry Dementyev
197653158e Merge "Ignore tests in RecoverableKeyStoreManagerTest" 2022-05-11 01:51:51 +00:00
Dmitry Dementyev
7ea5f4fff7 Ignore tests in RecoverableKeyStoreManagerTest
Expired cerificate causes tests failure.

Bug: 231667368
Test: N/A
Change-Id: I2bbc952a95f983d0ea4d85e519b55322a5d88568
2022-05-10 23:32:17 +00:00
Roman Kiryanov
f7a05bd2fa Label emulator clipboards with SUPPRESS_CLIPBOARD_OVERLAY
Emulator QA found this popup too noisy
to be useful.

Bug: 222604628
Test: boot the emulator, copy on the host
Test: check if there is no popup in the guest
Change-Id: I46323732a64202dabdd3a43bf17df7e7f3f9dd9c
Signed-off-by: Roman Kiryanov <rkir@google.com>
2022-05-10 13:56:17 -07:00
Kiwon Park
cf4cc8c1b9 Merge "Populate carrier id in anomaly reports." 2022-05-10 20:13:07 +00:00
Roman Kiryanov
217b0fdbda Merge "Add wrappers around IO functions to check the return values" 2022-05-10 16:54:27 +00:00
Kiwon Park
7b2da8207f Populate carrier id in anomaly reports.
Test: statsd_testdrive
Bug: 188462677
Change-Id: Id3859dad6a64be61d38865562887879878d08af9
(cherry picked from commit 9e41ab3c4b)
Merged-In: Id3859dad6a64be61d38865562887879878d08af9
2022-05-10 16:31:47 +00:00
Vinh Tran
f1a6e001fd Merge "Unset platform_apis if sdk_version is already set" 2022-05-10 15:29:23 +00:00
Neil Fuller
808b9f1b73 Merge "Add a Y2038 check into the time_detector" 2022-05-10 11:44:09 +00:00
Eran Messeri
fa8aac4629 Merge "Keystore: Support Ed25519 keys" 2022-05-10 11:38:58 +00:00
Neil Fuller
2ff5ec1aad Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-10 10:01:58 +00:00
Eran Messeri
51d7088287 Keystore: Support Ed25519 keys
Implement support for Ed25519 signing keys in Android Keystore.
Because Conscrypt does not yet handle those keys, the Keystore classes
implement EdECPublicKey directly and parse the keys.

Specifically, AndroidKeyStoreEdECPublicKey can take an encoded X.509 key
specification, validate the encoding is of an Ed25519 key, then parse
the oddity and Y point on the curve.
RFC8032 describes EdDSA signature scheme, particularly Ed25519.
RFC8410, Section 3, defines the OID for Ed25519 keys (1.3.101.112).
RFC8410, Section 4, describes the encoding of the public key.

Bug: 195309719
Bug: 194359292
Bug: 214203951
Test: atest android.security.keystore2.AndroidKeyStoreEdECPublicKeyTest
Merged-In: I07b793cbd5029630768368ad4a863bbc1c828ced
Change-Id: I477e87658b98bc3340da9a062d81508aad041c07
2022-05-10 10:19:39 +01:00
Roman Kiryanov
8883415f71 Add wrappers around IO functions to check the return values
Os.read and Os.write don't throw exceptions if
`fd` is closed on the other end.

Bug: 231345789
Test: save a snapshot
Test: use clipboard both, check if there is no
Test: infinite loops which sets the clipboard
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: If98fb3adf58f2e4e13d483b78ea05ea9d8d61b58
2022-05-09 20:14:39 -07:00
Vinh Tran
625cb76f14 Unset platform_apis if sdk_version is already set
Unsetting platform_apis while keeping sdk_version as is does not affect
the module's deps

Test: m queryview && builozer 'print soong_module_deps' :target (to
ensure the deps aren't affected

Bug: 219755537
Change-Id: Ic0d02c5e7fec24843e4cd2541cc5106381c7180e
2022-05-09 19:36:38 +00:00
Vinh Tran
aca9b26c93 Merge "Revert "Remove sdk_version if platform_apis is set"" 2022-05-09 16:51:02 +00:00
Treehugger Robot
c8f3e70f59 Merge "Keep ArtStasLog write() functions" 2022-05-09 16:00:47 +00:00
Jack Yu
78f46dd41e Merge "Improved data fail cause debug message" 2022-05-09 15:47:21 +00:00
Eric Biggers
350433edc8 Merge changes from topic "deny-create-user-dirs"
* changes:
  Zygote: relabel to either system_userdir_file or system_data_file
  BrightnessTracker: don't create stuff directly in /data/system_de
2022-05-09 14:45:11 +00:00
Vinh Tran
cfb43cae24 Revert "Remove sdk_version if platform_apis is set"
This reverts commit 160172d92d.

Reason for revert: Should have removed platform_apis instead because
removing platform_apis doesn't change the module deps (done in aosp/2085943)

Test: CI
Bug: 219755537
Change-Id: I9657e569d942bf845c79352a042553c6fc6b0fd3
2022-05-09 13:18:44 +00:00
Anton Hansson
247c5f26ec Use lint database from api_version_public
These two databases are (nearly) identical but the latter is generated
in a much more efficient way.

The diffs are very minor and it's not clear to me which versions is more
correct than the other, though I'm fairly confident they don't matter.

https://paste.googleplex.com/5567994005553152

Droidstubs now support using the api-versions.xml from another
droidstubs module, so reuse the one from api_versions_public
in framework-doc-stubs.

Bug: 187398174
Test: diff api-versions.xml
Test: diff stubs of framework-doc-stubs
Change-Id: I774be9097e97d6b180fe54d799c94515780be6ec
2022-05-09 12:18:46 +00:00
Jack Yu
fcb5553d10 Improved data fail cause debug message
Test: Manual
Fix: 228611718
Merged-In: Ic3a5a64a4e57ed49dd4445ff31018b78e833f73f
Change-Id: Ic3a5a64a4e57ed49dd4445ff31018b78e833f73f
2022-05-08 23:28:05 -07:00
Jack Yu
0d0729a62f Merge changes from topics "enterprise_internet", "set_data_enabled"
* changes:
  Improved the network type to string
  SetDataEnabled indicate calling package
2022-05-09 03:19:56 +00:00
Jack Yu
1780b1aece Improved the network type to string
Bug: 227781379
Test: atest DataNetworkControllerTest DataProfileManagerTest
Merged-In: I6d09ade1650e226a965547e3f78e74f3f2ffec59
Change-Id: I6d09ade1650e226a965547e3f78e74f3f2ffec59
2022-05-08 13:42:20 -07:00
Sarah Chin
967c10b103 SetDataEnabled indicate calling package
Test: atest TelephonyManagerTest
Bug: 226149142
Merged-In: I769437e9332f27c0990c37f60ad6d9db284e86cf
Change-Id: I769437e9332f27c0990c37f60ad6d9db284e86cf
2022-05-08 12:22:43 -07:00
Treehugger Robot
22a9bec54c Merge "Don't send null data call list response" 2022-05-07 00:54:03 +00:00
Alan Stokes
fdab6d7600 Keep ArtStasLog write() functions
Some of these functions are called from IsolatedCompilationMetrics, a
class added to the system server classpath by the (non-updatabale)
com.android.compos APEX. Without this they are stripped as apparently
unused, leading to system server crashing when we try to call them.

Bug: 231271783
Test: Stage APEX, observe no crash, job scheduled successfully
Test: atest CompOsSigningHostTest#verifyArtUpgradeGeneratesAnyArtifacts
Change-Id: I5ad0249b0aae87e98ebdd3deb6e8c58bfb691ebc
Merged-In: I5ad0249b0aae87e98ebdd3deb6e8c58bfb691ebc
2022-05-07 00:59:32 +01:00
Hans Boehm
5ee3cfe147 Merge "Document VirtualRefBasePtr hazards" 2022-05-06 23:54:45 +00:00
Sarah Chin
50b8df99a7 Don't send null data call list response
Test: atest DataServiceCallbackTest
Bug: 223473056
Merged-In: I2919fff4abe1ccc234ae2b5d45582eadce440986
Change-Id: I2919fff4abe1ccc234ae2b5d45582eadce440986
2022-05-06 14:54:59 -07:00
Treehugger Robot
1e3e69212a Merge "Set an edit uri to data of ACTION_EDIT" 2022-05-06 20:38:05 +00:00
Hans Boehm
d72e472407 Document VirtualRefBasePtr hazards
Test: Treehugger
Change-Id: I6f364b4e0f73a2eb554f2902a67e774ef5890b00
2022-05-06 11:11:37 -07:00
Treehugger Robot
39e3a67feb Merge "Add String for state DATA_HANDOVER_IN_PROGRESS" 2022-05-06 06:20:01 +00:00
Treehugger Robot
7c57209294 Merge changes from topic "new_data_flag"
* changes:
  DO NOT MERGE temporarily disabled new data stack
  Inverted the new data stack flag
2022-05-06 05:51:21 +00:00
Jack Yu
cbd1ca5905 DO NOT MERGE temporarily disabled new data stack
Temporarily disabled new data stack until all CTS fixed
on aosp_master.

Fix: 226046162
Test: atest CtsNetTestCases
Change-Id: Ie40ca14ae986192542bc1318bd345d9d31562680
2022-05-05 21:18:38 -07:00
Jack Yu
64b6709e80 Inverted the new data stack flag
Invert the flag so even if this flag does not exist in the
resource, the new data stack is still enabled by default.

Fix: 228813515
Test: Manual && atest FrameworksTelephonyTests
Merged-In: I75737c0ef9bce91385f815133e1878e5abea68ff
Change-Id: I75737c0ef9bce91385f815133e1878e5abea68ff
2022-05-05 21:11:51 -07:00
Jack Yu
f2b55a0e9b Merge "Completely detach old data stack" 2022-05-06 02:52:00 +00:00
Jack Yu
ae26bc400b Completely detach old data stack
Not create DcTracker and TransportManager instances
when new data stack is enabled.

Test: atest FrameworksTelephonyTests and manually tested on
Pixel 4 and Pixel 6.
Bug: 222323544

Merged-In: Ice595f329e2f4e531dc577cd3db7c863ba15d6d6
Change-Id: Ice595f329e2f4e531dc577cd3db7c863ba15d6d6
2022-05-05 17:32:17 -07:00
Devin Moore
d884be6c10 Merge "AudioService: catch RuntimeException for IServiceManager.getService" 2022-05-05 15:53:17 +00:00
Jayachandran C
ad8b399ec8 Merge "Update OWNERs file for telephony xml files" 2022-05-05 08:06:14 +00:00
Chiachang Wang
7b6fa7c457 Merge changes from topic "AppExclusion"
* changes:
  Allow getting/setting app exclusion list for specific vpn profile
  Add to/from disk stable format
2022-05-05 01:58:49 +00:00
Treehugger Robot
87e124332d Merge "Add USE_CUSTOM_VIRTUAL_MACHINE permission to Shell" 2022-05-05 01:24:44 +00:00
Eric Biggers
5454379320 Zygote: relabel to either system_userdir_file or system_data_file
To hide other apps' data directories, zygote mounts tmpfs instances over
various directories such as /data/user, then bind-mounts in the needed
app directories.  Files in tmpfs get the SELinux label "tmpfs" by
default.  After creating them, zygote relabels some of these "tmpfs"
files to their normal labels; however, in every case the desired label
was "u:object_r:system_data_file:s0", so zygote just copied the label of
/data/user_de which happened to have this same label.

With https://r.android.com/2078213, the /data/user_de directory, but not
its subdirectories, will start being labeled as
"u:object_r:system_userdir_file:s0".  This would break the
above-mentioned logic, as it would start assigning system_userdir_file
to files that should be system_data_file.  Therefore, update it to
assign the appropriate type of [system_userdir_file, system_data_file].

Note that alternatively, it seems that we could just always use
system_data_file, or just remove this relabeling code entirely since the
sepolicy contains 'allow domain tmpfs:dir search' anyway.  But as long
as zygote is trying to set the normal labels, it should do it correctly.

Test: Tested together with the sepolicy change
      https://r.android.com/2078213; see there for testing notes.
Bug: 156305599
Change-Id: I325aa873cf216e33924d0508100fcc755f265cf2
2022-05-04 22:35:18 +00:00
Eric Biggers
3d9c19f2fd BrightnessTracker: don't create stuff directly in /data/system_de
/data/system_de is only for per-user data; it *must* only contain
per-user encrypted directories.  Only vold should ever create anything
directly in this directory.  In preparation for removing system_server's
write access to this directory (https://r.android.com/2078213), make
BrightnessTracker store its brightness_events.xml file at
/data/system/brightness_events.xml instead of
/data/system_de/brightness_events.xml, and likewise for
ambient_brightness_stats.xml.

Migration happens lazily, except that the old files aren't ever deleted
since the SELinux policy will no longer allow system_server to do that;
the old files just stop being used.  vold will need to handle the
cleanup instead, or we could just leave the files around.

Test: Flashed new build without wiping userdata.  Log shows "Reading
      ambient_brightness_stats.xml from old location" as expected.
      Rebooted.  Log message no longer appears, as expected.  File
      /data/system/ambient_brightness_stats.xml exists, as expected.
Bug: 156305599
Change-Id: I6e0948ac54ec9183348943234d505e7466042963
2022-05-04 22:35:17 +00:00
Xin Li
3c7a3e397f Merge "Merge SP2A.220505.002" 2022-05-04 20:30:20 +00:00
Jayachandran C
5e0208562a Update OWNERs file for telephony xml files
Bug: 213183041
Test: make
Merged-In: If64d1f34038472dcafd9a94f24879ae9d3056bb1
Change-Id: If64d1f34038472dcafd9a94f24879ae9d3056bb1
2022-05-04 20:03:03 +00:00
Eric Biggers
0c0888da1d Merge "UserDataPreparer: fix volume preparation order" 2022-05-04 18:56:16 +00:00
Miguel Aranda
2dc0d124a7 Merge "Still more libcore benchmarks migrated to Crystal Ball." 2022-05-04 16:55:08 +00:00
Shreerag Jayakrishnan
0bcfa16d6c Merge "Add Activity Recognition to default grants for Home app on Wear." 2022-05-04 14:59:07 +00:00
Miguel Aranda
2427797def Merge "Libcore VarHandle generator script and tests." 2022-05-04 12:31:56 +00:00
Miguel
2c04bb22f4 Still more libcore benchmarks migrated to Crystal Ball.
Test: atest {TestName}
Change-Id: I9e67814d011fc13a9a2cf57f2bf543ba89d9aaa2
2022-05-04 10:16:08 +00:00