Commit Graph

571299 Commits

Author SHA1 Message Date
Chih-hung Hsieh
4e6598eef7 Merge "Remove system-headers, minimize unwanted warnings." 2021-08-03 01:02:45 +00:00
Jooyung Han
a54768b010 Merge "APK signature verification: use FileChannel#size" 2021-08-03 00:18:57 +00:00
Jooyung Han
c65e303681 APK signature verification: use FileChannel#size
RandomAccessFile#length returns 0 for block devices while
FileChannel#size returns the correct size.

APK signature verification utils should work with block-device zip files
when Android is running as a guest OS and APK/APEX files are passed via
block devices.

This is a follow-up of 1257f1505c.

Bug: 193592496
Bug: 192366904
Test: FrameworksServicesTests
Merged-In: I3015fc30574c36c18c0d0c9ae7453d33a1349927
Change-Id: I3015fc30574c36c18c0d0c9ae7453d33a1349927
(cherry picked from commit 310edbe3c7)
2021-08-03 01:26:54 +09:00
Chalard Jean
67f0eebdfa Merge "Fix: ConnectivityManager methods crashing with SecurityException" 2021-07-30 05:28:33 +00:00
Junyu Lai
2963649fe4 Merge changes Ib048c18b,Ie7694a63
* changes:
  Add debug log for tracking NPE of mMobileIfaces
  Fix mMobileIfaces is not protected by lock
2021-07-30 02:13:25 +00:00
Martin Brabham
400c21483c Merge "Add implementation for IRK to parcelable functions." 2021-07-29 20:50:35 +00:00
Martin Brabham
60b797bd5c Add implementation for IRK to parcelable functions.
Bug: 194432570
Test: Manual test app; nRF connect
Tag: #feature
Change-Id: I54ac5e5f105d155a2d2fc826bf1f64cf34573ff9
2021-07-29 09:42:37 -07:00
Yi Kong
6f1a606d73 Merge "Add TRIGGER_SHELL_PROFCOLLECT_UPLOAD permission" 2021-07-29 08:27:33 +00:00
Chalard Jean
249be21013 Fix: ConnectivityManager methods crashing with SecurityException
Starting in R, some methods in ConnectivityManager like
getNetworkCapabilities started passing the package name from
the context stored in CM to check that the package is really
whom it pretends to be. Unfortunately, in some cases, the
context contains package "android" for an app, and since the
app is not the system, the check fails and crashes the app.

It seems the culprit is updateHttpProxy, which is called by
ProcessList when the PROXY_CHANGE_ACTION broadcast is sent.
If this happens to run between the time the process is created
and the activity thread is "bound", then the mInitialApplication
member is not set, and updateHttpProxy uses a system context.
Since ConnectivityManager caches the context forever in a
static, this leads to subsequent legitimate calls crashing.

Setting the proxy can be deffered until such a time that the
app is bound, as it can't run any code before then. The member
is never reset to null, so it's guaranteed to be non-null at
bind time.

An alternative would be to post a runnable on the handler
thread if the member is null to try again later. This
could however run the lambda a considerable number of times
as binding can be delayed, and risks causing an infinite loop
if some invariants are changed in the future.

See also b/73572062 and ag/4056059

Bug: 155549446
Bug: 189360509
Test: ActivityThreadTest FrameworksNetTests NetworkStackTests
Test: Manually set a proxy, observe the broadcast being sent and
      apps not crashing
Change-Id: I956f76be2e0a1a675576511fb394d7ed4354b28a
Merged-In: I956f76be2e0a1a675576511fb394d7ed4354b28a
2021-07-29 13:18:54 +09:00
Keun-young Park
9f6b05e6fb Merge "update broadcast radio owner" 2021-07-28 18:19:28 +00:00
Jakub Pawlowski
b0c01df940 Merge "Prevent create bond for null MAC address" 2021-07-28 17:57:59 +00:00
Etienne Ruffieux
84abea03d6 Prevent create bond for null MAC address
Tag: #feature
Bug: 193702115
Test: atest BluetoothInstrumentationTests
Change-Id: I5684f00cf4a567a899c958b94af22ccf5067b476
2021-07-28 17:57:35 +00:00
Yi Kong
9251bc5127 Add TRIGGER_SHELL_PROFCOLLECT_UPLOAD permission
This will be used to restrict only the system server shall be allowed to
trigger profcollect upload in shell.

Test: manual
Bug: 183487233
Bug: 194155753
Change-Id: I469fe5f9a0559dde8b887591cfe12c72c104f1d4
2021-07-28 21:11:14 +08:00
Treehugger Robot
adcff13790 Merge "profcollectd: Avoid hard-coding Betterbug name" 2021-07-28 12:11:58 +00:00
Keun young Park
80965a848c update broadcast radio owner
Bug: 194818704
Test: NA
Change-Id: Ic3632f3151fbedd296e7c904c1a47880a6ce3cdd
2021-07-27 18:13:39 -07:00
Mingming Cai
1a34337955 Merge "Fix CQI range in CellSignalStrengthNr" 2021-07-27 21:15:02 +00:00
Rahul Sabnis
8070a302cc Merge "Added filegroup mms with packages/apps/Bluetooth visibility" 2021-07-27 20:50:31 +00:00
Chih-Hung Hsieh
69df09d4d0 Remove system-headers, minimize unwanted warnings.
* If necessary, use --header-filter to select warnings
  in owned header files for each module.

Change-Id: I5a2a52a4f78661b60a8375fbcc46bd5bad92ae60
Test: make with WITH_TIDY=1
2021-07-27 11:49:11 -07:00
Meng Wang
4d8663cb84 Merge "Lazily load bitmap of SubscriptionInfo" 2021-07-27 18:30:21 +00:00
Etienne Ruffieux
6c63f985ee Added filegroup mms with packages/apps/Bluetooth visibility
Added all java sources under telephony/common/com/google/
android/mms as filegroup with packages/apps/Bluetooth
visibility in order to remove unsupported usage calls
outside Bluetooth.

Tag: #feature
Bug: 190441152
Test: atest BluetoothInstrumentationTests
Change-Id: I662f5a6e17d753259bf6056dddac7062bb65733e
2021-07-27 09:18:44 +00:00
Mingming Cai
ff513f9856 Fix CQI range in CellSignalStrengthNr
bug: 194634718
Test: make
Change-Id: I784f2930999871b6bb90f4e17a2ba694da35126a
Merged-In: I784f2930999871b6bb90f4e17a2ba694da35126a
(cherry picked from commit 9ee4e9bbe9)
2021-07-26 21:50:56 -07:00
Meng Wang
ba8227eb45 Lazily load bitmap of SubscriptionInfo
Bug: 194251398
Test: manual - see the bug
Change-Id: I0af239e1befeff8d4f00a27bc9679eb0b4849500
Merged-In: I0af239e1befeff8d4f00a27bc9679eb0b4849500
(cherry picked from commit 0e0a12ccf3)
2021-07-26 21:06:33 -07:00
Tianjie Xu
4eaa49eeb6 Merge "Add a system API UpdateEngine to switch the slot back and forth" 2021-07-27 02:03:10 +00:00
Lucas Dupin
103308ad5d Merge "Update boot animation owners" 2021-07-26 22:05:17 +00:00
Tianjie Xu
5c8dce3ada Merge "Add owner file for UpdateEngine" 2021-07-26 21:14:06 +00:00
Lucas Dupin
273227d1ac Update boot animation owners
Test: none
Bug: 190093578
Change-Id: Id83d1ff6bbec63ec94402260a29c3ddcbf0ae414
2021-07-26 18:59:27 +00:00
Suren Baghdasaryan
9af29add1f Merge "ActivityManagerService: report current and max thrashing levels" 2021-07-26 17:47:59 +00:00
Treehugger Robot
eb7dfa2f5f Merge "Mark classes as final that have final destructors" 2021-07-26 16:52:08 +00:00
Junyu Lai
d01d83654b Add debug log for tracking NPE of mMobileIfaces
Test: TH
Bug: 192758557
Change-Id: Ib048c18b1c64627de5a9d2b04d10e084a014ff64
2021-07-26 09:16:59 +00:00
Junyu Lai
14946edca3 Fix mMobileIfaces is not protected by lock
Currently, mMobileIfaces is accessed from multiple threads, and
should be protected from concurrent accessing. However, since the
variable could be accessed frequently, holding the mStatsLock
would make this be blocked by network stats I/O operations.
Thus, protect the variable by making it volatile.

Test: Wifi on/off stress test
Bug: 192758557
Change-Id: Ie7694a63f5203ee7c83830ca13d97219b7949fd7
2021-07-26 09:16:35 +00:00
Tianjie
dcbd9ea138 Add owner file for UpdateEngine
Test: th
Change-Id: I50c775874cb9ad54f049e415b6fb68ec29d7f1c8
2021-07-23 17:15:43 -07:00
Benedict Wong
3923c3acc6 Merge "Shorten safe mode timer in VCN test mode" 2021-07-23 23:25:46 +00:00
Benedict Wong
5985f02af9 Shorten safe mode timer in VCN test mode
This change reduces the time required to test VCN safe mode in CTS, in
order to meet the 30s CTS quality bar

Bug: 193482882
Test: atest --iterations 10 android.net.vcn.cts.VcnManagerTest
Original-Change: googleplex-android-review.git.corp.google.com/15375749
Change-Id: Ibbf7132d45a7a0e5554b74fda6b3e309ee2d9c44
Merged-In: Ibbf7132d45a7a0e5554b74fda6b3e309ee2d9c44
2021-07-23 21:35:10 +00:00
Suren Baghdasaryan
ee9cea7f92 ActivityManagerService: report current and max thrashing levels
Add thrashing and maxThrashing fields in LMK_KILL_OCCURRED report.

Bug: 194433891
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I016d95a9b2ba4b6f4ca814be1456cec59f4834da
Merged-In: I016d95a9b2ba4b6f4ca814be1456cec59f4834da
2021-07-23 12:08:35 -07:00
Liz Kammer
a4ddfbe33b Mark classes as final that have final destructors
Having a final destructor prevents the class from being inherited from,
adding the designation final to the class makes this behavior more
explicit. This is required to re-enable the error for
-Wno-final-dtor-non-final-class.

Test: m
Merged-In: Ia3126d30e19edfd17f7c8da368e9763ca5501e84
Change-Id: Id1d7c607af9cca0109e1f763052894cf179f4af1
2021-07-23 17:21:11 +00:00
Treehugger Robot
dc425aefbc Merge "OWNERS file entry for config_user_types.xml" 2021-07-22 21:06:21 +00:00
Adam Bookatz
f73c7a2c50 OWNERS file entry for config_user_types.xml
Change-Id: Ib1e9721a35be96a84f3b83421ba96f4d7c903c13
Test: N/A
2021-07-22 17:28:45 +00:00
Treehugger Robot
c2a7a9e5f5 Merge "Add OWNERS" 2021-07-22 12:57:47 +00:00
Weng Su
c3485a654c Add OWNERS
- Add OWNERS file to /frameworks/base/packages/SettingsLib/tests/robotests/ folder

- Do not guard tests - everyone is welcomed to contribute to tests.

Change-Id: I0310fc95a5116eed97428d2efb9da1e19d234f84
Test: N/A, just owners update
2021-07-22 10:12:29 +00:00
SongFerng Wang
8c19236f8f Merge changes from topics "ApiReview_DEVICE_NR_CAPABILITY", "getPhoneCapability"
* changes:
  Changing DEVICE_NR_CAPABILITY type and renaming getMaxActiveInternetData
  Add getPhoneCapability function in TelephonyManager
2021-07-22 06:15:05 +00:00
Treehugger Robot
265e8cf670 Merge "Unify the mismatch in the byte order of the address." 2021-07-21 17:31:11 +00:00
Treehugger Robot
00e6e9cd26 Merge "Revert "Add systrace tag for system property"" 2021-07-21 11:43:39 +00:00
Treehugger Robot
ac418218f8 Merge "profcollect: Add verbose logging for ota status updates" 2021-07-21 09:07:02 +00:00
Yi Kong
d316cc49ae profcollect: Add verbose logging for ota status updates
Test: presubmit
Bug: 178561556
Change-Id: I4cd6b9bdb15fec4e115fefbef69c0c1e687d2392
2021-07-21 07:32:58 +00:00
Benedict Wong
d92daec786 Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" 2021-07-21 01:29:25 +00:00
Bowgo Tsai
1241c9b6f2 Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Change-Id: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Merged-In: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Test: build and boot a device
(cherry picked from commit 137d78bb67)
2021-07-21 09:24:29 +08:00
Benedict Wong
8d6f7c7280 Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents
This change sets TRANSPORT_PRIMARY for all NetworkScore objects passed
to ConnectivityService by the VCN. Without this patch, a VCN in safe
mode will never get any NetworkRequests, since the new Policy-based
NetworkRanker always prioritizes a existing satisfier of a network,
regardless of score. However, a higher-priority policy check ensures
that a TRANSPORT_PRIMARY request is used if it exists. This changes the
VCN to utilize that functionality.

Bug: 194122634
Test: atest FrameworksVcnTests
Change-Id: I3a298a6c4c594c6e224f3f05764614802c00e9b0
2021-07-21 00:44:19 +00:00
Jooyung Han
d0798d7117 Merge "ZipUtils: use FileChannel#size" 2021-07-20 23:50:59 +00:00
Tianjie
fdf7b58a43 Add a system API UpdateEngine to switch the slot back and forth
In some cases, the OTA update want to flip the slot to source
without cancelling the entire update. The functionality was
achieved by ResetStatus(). However ResetStatus() will clean up
the update progress and free up space to support virtual A/B.

Details in http://go/no-virtual-ab-switch-off

Test: build
Bug: 187321613
Change-Id: I2abcf8289f5fd573d2b55fa7004ab4dcd175252f
2021-07-20 15:29:37 -07:00
Treehugger Robot
bd268448fa Merge "Enable specification of 5G network info and carrier configs for ONS changes" 2021-07-20 19:45:42 +00:00