Commit Graph

14119 Commits

Author SHA1 Message Date
Chiachang Wang
dcb4051101 Merge "[IT4.2] Update argument type of interfaceClassDataActivityChanged" 2020-12-28 01:05:28 +00:00
Serik Beketayev
4abaecefc2 [Mainline] Migrate ProxyInfo
Bug: 173455434
Test: atest FrameworksNetTests
Change-Id: I924aed710b62a0c91b888a9e04ac2c90cdfd88d0
2020-12-23 22:15:51 -08:00
Chiachang Wang
4dd4e08c4e [IT4.2] Update argument type of interfaceClassDataActivityChanged
The argument type of interfaceClassDataActivityChanged takes a
string for the network type. It requires both the receivers and
NMS to do type transformation. The transformation is a redundant
work. Update it to take integer directly and rename to
understandable naming.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ibe9fa7a1b71af2dab916b5d615742e77e4174c39
2020-12-23 17:34:08 +08:00
Chiachang Wang
baef452e38 Merge "[IT04] Add uid as parameter of interfaceClassDataActivityChanged" 2020-12-23 05:20:33 +00:00
Remi NGUYEN VAN
3ed4fd3a89 Merge "Split NetworkUtils and NetworkUtilsInternal" 2020-12-23 01:19:27 +00:00
Treehugger Robot
7765329813 Merge "Add owner to codegen annotations" 2020-12-22 22:16:51 +00:00
Chiachang Wang
9c133bc4e9 [IT04] Add uid as parameter of interfaceClassDataActivityChanged
Add uid into interfaceClassDataActivityChanged in
INetworkManagementEventObserver. This helps the listeners to use
BaseNetworkObserver to listen for target evnets instead of using
whole INetdUnsolicitedEventListener with no-op in other event
that listeners do not care about.

Bug: 170598012
Test: m ; atest FrameworksNetTests
Change-Id: I2a42a522c2ff9b1e0be88261a8574bb7f5292fa6
2020-12-22 08:39:22 +08:00
Michael Sun
5886ede607 KernelWakelockReader: provide class level lock when updates staleStats
As the wakelock version number is defined as static to provide
consistent versioning across objects, class level static lock should be
implemented to prevent racing conditions.

To trigger the racing condition, update statsd's stats pulling logic
locally to repeatably requesting wakelock stats then wakeup the phone
to trigger BatteryStats update routine. The racing condition is 100%
reproducible under the setup. The patch has been verified with the
setup, and the racing is no longer seen. See more reproduce details in
the linked bug.

Bug: 173539101
Test: manual
Change-Id: I386afa2f2ecd8678e71ece978da4a9950b21ca4d
2020-12-21 18:09:04 +00:00
Victor Chang
37c6b6deeb Make a copy of libcore.util.ArraysUtils in framework
It helps remove it from the @CorePlatformApi

Bug: 154796679
Test: ArrayUtilsTest
Merged-In: I0c8f194a74a16b2cc46f9eea4571d5fb674fbc28
Change-Id: I0c8f194a74a16b2cc46f9eea4571d5fb674fbc28
2020-12-17 00:07:23 +00:00
Eugene Susla
224f3360ad Add owner to codegen annotations
Test: presubmit
Change-Id: Ie0de32e4f8321fe846e5f4aade7a087c1216a28c
2020-12-15 11:07:02 -08:00
Nicolas Geoffray
3a76c4c9aa Merge "Make Class.getPackageName public." 2020-12-15 16:55:44 +00:00
Alison Cichowlas
eff7324d9c Merge "Add SystemUI to OWNERS for Sharesheet." 2020-12-15 15:08:10 +00:00
Alison Cichowlas
e432f6c014 Add SystemUI to OWNERS for Sharesheet.
Change-Id: I2ecbab59516ae0cb53d47fa819c26336f76d9483
2020-12-14 21:46:41 +00:00
Charles Chen
2c86c2cf8a Add more OWNERS coverages(2/n)
Test: manual
Bug: 174932174
Change-Id: Id6a4c60734f24a3d8fdec27b11baead550296441
2020-12-14 15:00:22 +08:00
Adrian Roos
bb4c35d0d2 Add missing IMF OWNERS
Test: n/a
Change-Id: Ib1ec672f872a3b1faf65c3583e300f473bac8f0c
2020-12-11 17:02:19 +01:00
Jeff Sharkey
e2cc3f8bec Additional per-file OWNERS for shared directories.
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.

Also add more detailed examples to OWNERS.md.

Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b
2020-12-10 08:37:23 -07:00
Dmitri Plotnikov
d8a9268460 Merge "Add per-file OWNERS for BatteryStats" am: cac4499628
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520758

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5d258d326af6662a7e8d1dcaa1bbbeffdc19da94
2020-12-09 03:06:09 +00:00
Dmitri Plotnikov
c5afcc503b Add per-file OWNERS for BatteryStats
Test: N/A

Change-Id: Ie9eef7eed7f097113074c3c5f3f7a7084a55f97b
2020-12-08 16:38:23 -08:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c2793cf12b Merge changes from topic "dec5"
* changes:
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
2020-12-08 15:39:59 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Nicolas Geoffray
17069e403b Make Class.getPackageName public.
Test: m
Change-Id: I358db3d7e95c0ae700f9a7b2820e5324de2258d8
2020-12-08 14:29:02 +00:00
Fiona Campbell
a333c1fb5e Merge "Persist screen brightness setting through upgrade" am: 2a747f002f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517740

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75a7feb9ec86baf2a588c1187ec2632be64beaf0
2020-12-08 10:10:58 +00:00
Fiona Campbell
2a747f002f Merge "Persist screen brightness setting through upgrade" 2020-12-08 10:07:29 +00:00
Remi NGUYEN VAN
684a7409e6 Split NetworkUtils and NetworkUtilsInternal
NetworkUtils is planned to move to a dedicated JAR for connectivity
classes, while NetworkUtilsInternal would stay in the
frameworks-minus-apex JAR, in the com.android.internal.net package.

Bug: 171540887
Test: m, boots, wifi working
      atest FrameworksNetTests
Change-Id: I3d38d72ad23a4bf84af823c7baeb6fed25c0665f
2020-12-07 19:41:49 +09:00
Treehugger Robot
9aafb7ca56 Merge "Add more logging for wakelock stats inquiries" am: e98c214507
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518102

Change-Id: I02a2586654f3ec241491d5471a2c1f94123e5f36
2020-12-05 00:27:26 +00:00
Michael Sun
757b01b94b Add more logging for wakelock stats inquiries
Add additional logging after receiving wakelock statistics from
SystemSuspend via AIDL.

Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: manually verified new log presented
Bug: 173539101
Change-Id: Ia64ca7edaa4c7925348e1c31d5681943cfbe4f33
2020-12-04 20:25:28 +00:00
Fiona Campbell
2e8e9d39fe Persist screen brightness setting through upgrade
The screen brightness float setting initially did not exist when
upgrading the device software. This change ensures the float and int
values are synchronised on the system start-up.

Bug: 174508435
Test: manual - set autobrightness off, upgrade from Q to R, and check
brightness value in settings.

Change-Id: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
Merged-In: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
(cherry picked from commit 96f43f21b3a3021762c2d213d8958590127cae36)
2020-12-04 15:42:29 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Treehugger Robot
a421f8ff53 Merge "Make ChangeReporter.{Status,Source} proper enums" 2020-11-26 13:37:45 +00:00
Treehugger Robot
27310f0340 Merge "Clarify why it's safe to add java.library.path to the classloader namespace." 2020-11-26 00:40:01 +00:00
Andrei Onea
10fb2bcd15 Make ChangeReporter.{Status,Source} proper enums
They mistakenly were tagged as flags, which is not applicable for either
of them.

Test: m
Bug: 174237593
Change-Id: I982ddc53839f13255ea68c9852fd20c3fe5a8433
2020-11-25 17:30:23 +00:00
Martin Stjernholm
6e258a9c8b Clarify why it's safe to add java.library.path to the classloader
namespace.

Test: N/A - comment change only
Change-Id: I9ae485afc4b6b827c09bb7d65c3987eefd433492
2020-11-20 18:52:14 +00:00
Chiachang Wang
1b414d61b4 Merge changes from topic "move_BSCH"
* changes:
  Remove BasicShellCommandHandler from frameworks/base
  Move BasicShellCommandHandler to frameworks/lib/modules-utils
2020-11-20 07:29:56 +00:00
Chiachang Wang
d5726c1916 Move BasicShellCommandHandler to frameworks/lib/modules-utils
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.

Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
Merged-In: Ida30c877116090616d4bf3f87fdad835446dac84
2020-11-19 03:16:03 +00:00
Treehugger Robot
62b028daca Merge "Fixed Handler Leak on RecyclerView" 2020-11-17 20:17:44 +00:00
Treehugger Robot
aeb15e8592 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ...
* changes:
  Keystore 2.0 SPI: Install legacy Keystore provider as AndroidKeyStoreLegacy
  Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
  Keystore 2.0 SPI: Evolve the generator SPI.
  Keystore 2.0 SPI: Evolve Factory SPI
  Keystore 2.0 SPI: AndroidKeyStoreProvider loads keys from Keystore 2.0
  Keystore 2.0 SPI: Evolve the Crypto SPI.
  Keystore 2.0 SPI: KeyParameter utilities.
  Keystore 2.0 SPI: Update the chunked streamer.
  Keystore 2.0 SPI: KeyStoreCryptoOperationUtils
  Keystore 2.0 SPI: KeyStoreKeys adopt Keystore 2.0
  Keystore 2.0: Shim around the basic functionality of Keystore 2.0
  Keystore 2.0 SPI: Duplicate Keystore SPI to android.security.keystore2 package
2020-11-16 22:51:03 +00:00
Janis Danisevskis
6180e85e36 Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
This patch makes Zygote install the Keystore 2.0 SPI as
"AndroidKeyStore" and the old Keystore SPI as "AndroidKeyStoreLegacy"
if the platform property ro.android.security.keystore2.enable is
set to true. This allows us to boot Android with vital components, such
as LockSettingsService, still using the legacy Keystore, while we run
CTS tests against the new implementation, migrate other system
components, and perform migration tests.

This CL will be superseded by a CL that makes Zygote install the
Keystore 2.0 SPI exclusively when the migration of all dependent
components is complete.

Bug: 171305684
Test: None
Change-Id: I9e32578285167c4d63f4f536a07fe98473a883e0
2020-11-13 19:55:41 -08:00
Inseob Kim
56ab231a8f Remove obsolete property ro.kernel.android.tracing
Bug: 173179120
Test: build
Change-Id: If46e65dac70ab4f1835048dbbcc8b571ce598224
2020-11-13 19:39:02 +09:00
Jiwon Kim
9db33d9c1c Fixed Handler Leak on RecyclerView
A MotionEvent object is not recycled in case of error at onTouchEvent function.

@Override
public boolean onTouchEvent(MotionEvent e) {
...
final MotionEvent vtev = MotionEvent.obtain(e);
...
    case MotionEvent.ACTION_MOVE: {
        final int index = e.findPointerIndex(mScrollPointerId);
        if (index < 0) {
            Log.e(TAG, "Error processing scroll; pointer index for id "
                    + mScrollPointerId + " not found. Did any MotionEvents get skipped?");
            return false;
        }
...
}

Test: Manual

Signed-off-by: Jiwon Kim <jiwon88.kim@samsung.com>
Change-Id: I8390a5d8c78b306a6c81dce9d41ceffe93bfdeb7
2020-11-11 18:21:11 +09:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
Michael Sun
d523796ec5 Update to use new android.system.suspend.control AIDL interface
The suspend_control_aidl_interface is updated, renamed, and splitted
into android.system.suspend.control and
android.system.suspend.control.internal. Update to use the correct
interfaces.

Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Bug: 171598743
Change-Id: I32aa339b27f3d9680a61b7338b1bdb531a1a43f7
2020-11-06 03:44:01 +00:00
Mathew Inwood
5d123b6775 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
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Chalard Jean
1f832406ca Manage VPN legacy state separately from NetworkInfo
This is mainly a cleanup, but is also necessary for the
network selection project.

This is for network selection ultimately because NetworkSelection
needs NetworkAgents to use the newer API introduced in R rather
than the legacy internal API. Using that API forbids communicating
to ConnectivityService through NetworkInfo, and does not support
the FAILED state because there is no usage in connectivity.
In VPN, FAILED is used only to communicate a state to Settings
and it does this through IConnectivityManager.getLegacyVpnInfo,
which already is using an int to communicate this information.

Splitting the legacy state from NetworkInfo not only is simpler
ultimately because it's the format in which it's consumed, but
also will allow removing NetworkInfo completely.

Test: FrameworksNetTests NetworkStackTests
Bug: 167544279
Change-Id: I8b95e020919e38a5166892221096db6271985574
2020-10-29 11:43:20 +09:00
Hall Liu
c5d02da0f6 Merge "Update PhoneStateListener#onOutgoingEmergencySms" 2020-10-23 19:15:22 +00:00
Treehugger Robot
2a4ac569b0 Merge "Add a mutability flag to the PendingIntent" 2020-10-23 09:49:27 +00:00
Hall Liu
adfc80c4d5 Update PhoneStateListener#onOutgoingEmergencySms
Update the callback for emergency SMS to follow the same pattern as for
emergency calls for API consistency.

Fixes: 168269065
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest
Change-Id: If27771aef1858ea92dd620b56368d1a6a4f61ab3
Merged-In: If27771aef1858ea92dd620b56368d1a6a4f61ab3
2020-10-22 11:34:28 -07:00
Hall Liu
77b5c5a31b Merge changes from topic "move-emergency-phone-update"
* changes:
  Update docs for onEmergencyNumberListChanged
  Call onOutgoingEmergencyCall only once.
  Expose onEmergencyNumberListChanged, semantics change
2020-10-22 17:13:52 +00:00
Steven Moreland
4ff4b2ee17 Merge "Remove declaration of hidl manager -> base dep" 2020-10-21 23:14:11 +00:00
Hall Liu
e182543791 Expose onEmergencyNumberListChanged, semantics change
Expose the onEmergencyNumberListChanged method, which seems to have been
left hidden inadvertently when introduced.

Add a new version of onOutgoingEmergencyCall that supplies a
subscription ID and deprecate the old one. Along with this, send
emergency call events from any subscription to all listeners regardless
of which subscription the listener specified.

Test: atest CtsTelecomTestCases:OutgoingCallTest
Bug: 162647577
bug: 165660452
Change-Id: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
Merged-In: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
2020-10-21 16:07:04 -07:00