Commit Graph

67 Commits

Author SHA1 Message Date
Anton Hansson
5cb369b6fc Revert^2 "Convert filegroup to library" am: 4e8ccccbec am: 84ed6576e9 am: 476557fd43 am: d14ac41736 am: 2fc4ae33ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110234

Change-Id: I01d19f096de3cde634c83fe420d45fc07665c965
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 11:32:49 +00:00
Anton Hansson
476557fd43 Revert^2 "Convert filegroup to library" am: 4e8ccccbec am: 84ed6576e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110234

Change-Id: I0250df1c943c4596bc2ce5403730ce6fd4398745
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 09:41:46 +00:00
Anton Hansson
4e8ccccbec Revert^2 "Convert filegroup to library"
5fca5ff385

Change-Id: I1a020fffc6345a131453b27d6f8bc2cf0acb942b
2022-05-30 16:41:42 +00:00
Jinfeng Du
ef6d3565b7 Merge "Revert "Convert filegroup to library"" am: 0801f8008b am: 53d695ed20 am: c2f6a875bd am: 955068b7b4 am: ca83ab9b1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110247

Change-Id: I3bba6c3de3f81ed500c181d1e699adebd03b0380
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 16:36:35 +00:00
Jinfeng Du
c2f6a875bd Merge "Revert "Convert filegroup to library"" am: 0801f8008b am: 53d695ed20
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110247

Change-Id: I2cfff0eccca0a9e3860297b32c1a54c2f83f7340
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 15:36:12 +00:00
Jinfeng Du
5fca5ff385 Revert "Convert filegroup to library"
Revert "Add dependency on modules-utils-local-log"

Revert submission 2108043-locallog

Reason for revert: b/234350536
Reverted Changes:
I2e873458d:Replace source dependency with library
I95d270e5e:Convert filegroup to library
I17c77d972:Add dependency on modules-utils-local-log
I2e873458d:Replace source dependency with library

Change-Id: I551b1e6e0498599fb48d368e079958257065fdb4
2022-05-30 14:49:04 +00:00
Anton Hansson
c468abc094 Merge "Convert filegroup to library" am: dffbaaed39 am: 332131017f am: 8edb229d23 am: b78f190b15 am: 9a6fe5f8e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2108043

Change-Id: I46b47b7ed2ba1901e1be44acd325b29ae1ccbfd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 14:12:27 +00:00
Anton Hansson
8edb229d23 Merge "Convert filegroup to library" am: dffbaaed39 am: 332131017f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2108043

Change-Id: I1e1bcaab980715949ee3f76de16f408608e124ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 12:41:10 +00:00
Anton Hansson
e4fcdec29f Convert filegroup to library
This filegroup makes more sense as a standalone modules-utils library,
and can be migrated to the modules-utils repository. Remove the
unnecessary dependency from services.net-module-wifi.

Test: m
Change-Id: I95d270e5e885fc40bd21af693058ace9818f1e3e
2022-05-27 15:15:11 +00:00
TreeHugger Robot
f2f323cc3f Merge "Update BrightnessSynchronizer Logic" into tm-dev am: 5b0c795a65 am: ff52fa4dab am: 7cd84b1ec2 am: c306898ff9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18334422

Change-Id: I1b64bd570540477a6b5dbce02e0e6190dc273c70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 10:15:02 +00:00
Santos Cordon
7f4fe4c4d6 Update BrightnessSynchronizer Logic
There was an error where if two auto-brightness changes came in quick
succession, the first could be treated as a user-initiated brightness
change.

1. First float change comes in: Xf
2. We write the brightness to the int-setting: Xi
3. Second float change comes in: Yf
4. Notification of the Xi change comes back to us and because X is
   different from Y, we treat it as a user-change.

The result of this is that auto-brightness learned from these erroneous
"user inputs" and both the short and long term model get affected
negatively for the user.  Often manifesting in brightness learning to
be too low.

The quick succession changes can happen in various situations, but
were most prominent on startup before and after a valid lux is read.

The fix is the revamp the data synchronization algorithm we use in
BrightnessSynchronizer to have updates + confirmation callback be
treated as an atomic operation before executing any other updates
that come in.  In the example above, that means we run (1) (2) and (4)
before handling the new update found in (3).

Fixes: 227483176
Test: Manually verify through debug logging.
Test: atest BrightnessSynchronizerTest
Change-Id: I93856fd74e50bcda04e88a7b7e736e02faa76c8e
2022-05-19 00:13:50 +00:00
Joanne Chung
ade911b9c7 [DO NOT MERGE] Remove selection toolbar code from build time
The feature punts to QPR so disable or remove code from the build
time.

Bug: 222185402
Test: build pass and can boot to home
Test: make sure the toolbar using local implementation

Change-Id: Idad82c3c46ddce0731a26f4599de01eecb0e52c3
2022-05-05 18:09:42 +08:00
Corina
cbc4d681e7 Move UiEventLogger interface to modules-utils.
This is so the soures can be accessed both fom framework and modules.
The implementation needs the local StatsLog, so cannot be reused.

Test: m
Test: atest SystemUITests
Test: make statsd_testdrive $ANDROID_HOST_OUT/bin/statsd_testdrive 90
Bug: 218862369
Change-Id: I27ebffa6817575f1377beb80f4092287d9b12c49
Merged-In: I27ebffa6817575f1377beb80f4092287d9b12c49
2022-03-16 18:41:11 +00:00
Corina
6116503243 Move UiEventLogger interface to modules-utils.
This is so the soures can be accessed both fom framework and modules.
The implementation needs the local StatsLog, so cannot be reused.

Test: m
Test: atest SystemUITests
Test: make statsd_testdrive $ANDROID_HOST_OUT/bin/statsd_testdrive 90
Bug: 218862369
Change-Id: I27ebffa6817575f1377beb80f4092287d9b12c49
2022-03-16 18:32:49 +00:00
Junyu Lai
0580abcc9a Create framework-connectivity shared filegroup
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. However,
some of the hidden classes in the platform are still needed, and
cannot be moved because of other callers.

Thus, create a shared srcs filegroup to allow these classes
build with the module to solve the dependencies.

Test: TH
Bug: 204830222
  (cherry-picked from ag/16656704)
Change-Id: I3813bc2177b2f0b4237056f64c57c63fa29c3081
Merged-In: I3813bc2177b2f0b4237056f64c57c63fa29c3081
2022-02-08 19:12:41 +08:00
Lorenzo Colitti
b5e914a343 Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
Merged-In: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-07 06:03:11 +00:00
TreeHugger Robot
d44f10236a Merge changes from topic "no-dhcpresults"
* changes:
  [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
  Delete DhcpResults from frameworks/base.
2022-02-07 05:53:10 +00:00
Presubmit Automerger Backend
d316c590ab [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16781268

Change-Id: I7c98eeef9b2a92dbce1014ce51eaca19d19e40d8
2022-02-03 15:52:01 +00:00
Lorenzo Colitti
a2ea37e61e Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-04 00:51:11 +09:00
Junyu Lai
9fd93192c5 Create framework-connectivity shared filegroup
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. However,
some of the hidden classes in the platform are still needed, and
cannot be moved because of other callers.

Thus, create a shared srcs filegroup to allow these classes
build with the module to solve the dependencies.

Test: TH
Bug: 204830222
Change-Id: I3813bc2177b2f0b4237056f64c57c63fa29c3081
2022-02-04 00:48:25 +09:00
Hui Yu
a714924707 Add WakeLock.setStateListener() API.
WakeLock uses this API to add listener of type WakelockStateListener,
whenever framework enable/disable this wake lock, the onStateChanged()
callback on this listener is called.

This API can be called before or afte acquiring the wakelock. It can be
called multiple times to change to another listener.

Add test cases testNotifyWakeLockCallback() and
testNotifyWakeLockCallbackChange() in PowerManagerServiceTest.java.

Bug: 213925462
Test: atest cts/tests/tests/os/src/android/os/cts/PowerManager_WakeLockTest.java.
Change-Id: Ic59303c59e53eb974e2765e3036002ac97ce8aa5
2022-01-28 11:58:55 -08:00
Lalit Maganti
d145d12784 Merge "base: add support for routing traces to reporters" am: 3a24d6bffb am: 26a716c74e am: a70c08c6f5 am: 8df5573e81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918624

Change-Id: I3831fc11a7c105177256fe4f3e0fad53f03da319
2022-01-28 13:21:32 +00:00
Lalit Maganti
4b7d9b148b base: add support for routing traces to reporters
Change-Id: I4ff55e9c211bfedada85234ee86f7484acf633ee
2022-01-27 20:48:38 +00:00
Billy Lau
cfa26cb21e Merge "Add BinaryTransparencyService as new SystemService." 2022-01-27 15:36:49 +00:00
Billy Lau
d1fb08be0a Add BinaryTransparencyService as new SystemService.
Bug: 197684182

Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device

Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]

Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.

Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
2022-01-24 15:58:05 -08:00
Wenhao Wang
256519a529 Add logcat service to track logd access
The LogcatManagerService monitors all privileged (in AID_LOG group)
access to logd. Only Root and System Server can read the logd data
without tracking. Whenever the logd recieve privileged read data request,
the request is forwarded to the LogcatManagerService.

The LogcatManagerService can approve or decline the request via
binder RPC on logd service. The binder call is enforced by sepolicy.
That means only LogcatManagerService can use the logd binder service.
And only logd can use the logcat binder service.

The next step will add user consent requirement for the logd access.

Bug: 197901557
Test: Reboot the device, then run "adb logcat" multiple times
both during the booting and after the booting. The control flow goes
correctly as we expected.
Ignore-AOSP-First: pending fix for logcat privacy issue

Change-Id: I5e225b65357e7bfacd5c6c9cb4fab5f309803193
2022-01-19 16:49:49 -08:00
Austin Borger
c23a5068cb activity_manager_procstate_aidl: Create library for filegroup.
This is required by cameraservice_test_host. Other filegroups in this
.bp file have associated libraries, but none exists for
activity_manager_procstate_aidl.

Bug: 207411352
Test: Built libactivity_manager_procstate_aidl-cpp.
Change-Id: I24cd93271c83e825166f212e033ec5dbb05d8681
2021-12-22 19:23:20 +00:00
Tej Singh
9622192b37 Create cpp aidl_interface for libstatsbootstrap
Create aidl_interface for files needed for libstatsbootstrap.

Bug: 206644307
Test: manually verified atoms could be logged
Change-Id: Ic970e99b588c9e1494a390f6c18e7925e199d5a4
2021-12-13 19:12:12 -08:00
William Escande
4f3506aaec Migrate telephony to use modules-utils
StateMachine stand-alone library will replace all specific filegroup
created for module.
It will be then moved into modules-utils
precondition is not used in telephony

Bug: 198418216
Tag: #refactor
Test: Build
Change-Id: I82f45294d7f073d15f988f8ffce979096b6e51d0
2021-11-11 18:51:42 +01:00
Treehugger Robot
09b947cd02 Merge "Migrate Connectivity modules to use modules-utils" 2021-10-20 13:43:58 +00:00
wescande
fde3d9aee5 Migrate Connectivity modules to use modules-utils
StateMachine stand-alone library will replace all specific filegroup
created for module.
It will be then moved into modules-utils

Bug: 198418216
Tag: #refactor
Test: Build
Merged-In: I07260fec2c8ec4bee9ddc1ce6004622976182109
Change-Id: I07260fec2c8ec4bee9ddc1ce6004622976182109
2021-10-01 15:07:25 +00:00
wescande
b94bc99ab1 Migrate Connectivity modules to use modules-utils
StateMachine stand-alone library will replace all specific filegroup
created for module.
It will be then moved into modules-utils

Bug: 198418216
Tag: #refactor
Test: Build
Change-Id: I07260fec2c8ec4bee9ddc1ce6004622976182109
2021-09-30 12:58:42 +02:00
William Escande
5c1d0fe88e create library for mainline module
This library is a temporary work to link all mainline module using
statemachine.
Once this is done, we will be able to move the library to
frameworks/libs/modules-utils

also fix some typo in state* files

Cherry picked from aosp/1818896

Bug: 198418216
Tag: #refactor
Test: None
Merged-In: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
Change-Id: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
2021-09-23 16:31:48 +00:00
wescande
1aff432fda Migrate Cellbroadcast modules to use modules-utils
StateMachine stand-alone library will replace all specific filegroup
created for module.
It will be then moved into modules-utils
Preconditions and handlerExecutor are arlready moved in modules-utils

Bug: 198418216
Tag: #refactor
Test: Build
Change-Id: Ia72c92d6be150edfee3743878d988f21a585e808
2021-09-23 15:04:54 +02:00
William Escande
b52b48c9d1 Wifi use state machine from modules-utils
Bug: 198418216
Tag: #refactor
Test: atest FrameworkWifiApiTests
Change-Id: I2087b15cf34b76dabeb14d51d041533f55e1b5ba
2021-09-20 23:19:09 +02:00
Treehugger Robot
26531301a0 Merge "create library for mainline module" am: c59870928e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: I048c27593314c00706f29db19b6d20ed4b899ae2
2021-09-07 14:00:18 +00:00
William Escande
a6fb9459cc create library for mainline module
This library is a temporary work to link all mainline module using
statemachine.
Once this is done, we will be able to move the library to
frameworks/libs/modules-utils

also fix some typo in state* files

Bug: 198418216
Tag: #refactor
Test: None
Change-Id: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
2021-09-06 15:28:09 +00:00
Treehugger Robot
c978bf0e0a Merge "AdbService sends callback on adb debugging enabled / disabled." am: 6efa908b95 am: 870e9c266b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1775965

Change-Id: I54a60b127532a7a8ea4f20c597789362ac2eb47f
2021-08-10 04:26:31 +00:00
Yifan Hong
08fdaa25cb AdbService sends callback on adb debugging enabled / disabled.
Test: pass
Bug: 190867939
Change-Id: Ieebe78e01bec948a1475d1c74a84b95e275fa48e
2021-08-03 14:17:10 -07:00
TreeHugger Robot
2194851f5c Merge changes from topic "native_hint" into sc-dev am: ea52c87596
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: I8dde7d37c30d756108b007dd0cf09de057f4b913
2021-07-22 21:33:26 +00:00
Bo Liu
4426772eab Implement native PerformanceHint API
Test: atest PerformanceHintNativeTestCases
Bug: 194204196
Change-Id: Ie26e25e9ecf87046df92346dff54174934a8c73e
2021-07-22 11:31:49 -04:00
Jiyong Park
da0ffb8e4f Merge "Implement permission check for virtualizationservice" am: 1ce000ff84 am: 01dfd737f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1763365

Change-Id: I81519001e9e2dae4eef2b38327858281e44d1886
2021-07-13 16:09:29 +00:00
Jiyong Park
a8cc7f17bf Implement permission check for virtualizationservice
For the service to be able to check permission, the AIDL interface is
exported to the virt APEX where virtualizationservice is in.

In addition, the VM permissions are granted to shell so that developers
can use the 'vm' tool on the shell.

Bug: 168588769
Test: /apex/com.android.virt/bin/vm run-app --log /dev/null
/data/local/tmp/virt/MicrodroidDemoApp.apk
/data/local/tmp/virt/MicrodroidDemoApp.apk.idsig assets/vm_config.json

Change-Id: I00db58ba9cef3b83f43db68ef86f062b59a0e6e1
2021-07-13 08:25:28 +09:00
Nikita Ioffe
a1e88d5ca2 Merge "Revert "Add ota_dexopt_aidl_interface"" am: 8a415895de am: 8ca7968c98
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1757571

Change-Id: Ie2162b33f51353bab4e03baf5289de5e3baa74f1
2021-07-07 14:08:44 +00:00
Nikita Ioffe
4252db915f Revert "Add ota_dexopt_aidl_interface"
Revert "Move otadexopt-related logic to otapreopt_chroot binary"

Revert "Allow otapreopt_chroot to call otadexopt binder service"

Revert submission 1750144-otapreopt_chroot_speed_up

Reason for revert: Breaks postinstall step on some devices
Reverted Changes:
I56dec13c8:Add ota_dexopt_aidl_interface
Ib32cbbbf8:Allow otapreopt_chroot to call otadexopt binder se...
I02e80a8e6:Move otadexopt-related logic to otapreopt_chroot b...

Bug: 190817237
Change-Id: I86845838bf16268e7b1c87bb3faa7238e7b3426d
2021-07-06 17:06:33 +00:00
Nikita Ioffe
9ebd5b0def Merge "Add ota_dexopt_aidl_interface" am: 847d8f7914 am: e6d87db981
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1751350

Change-Id: I3e105ae7becd3f1c03ac5bb5fd3dced94522f4a5
2021-07-02 14:52:41 +00:00
Nikita Ioffe
29b9f85224 Add ota_dexopt_aidl_interface
It is used by otapreopt_chroot to contact dexopt service.

Test: m
Bug: 190817237
Change-Id: I56dec13c8ec109fc47289f317e0e4844c4c1579c
2021-06-30 15:13:56 +01:00
Alexander Dorokhine
c0bf81a526 Link framework-appsearch against the module_current SDK.
This requires removal of all hidden APIs from the framework code.

Preconditions are jarjar'd into the jar.
Other APIs are replaced with system-visible equivalents.

Bug: 181787682
Bug: 146218515
Test: Presubmit
Change-Id: I6649bed3260ac08a0f66abd7a8ec545c401761fe
2021-05-12 11:34:51 -07:00
Baligh Uddin
3b92756733 Remove annotations that have been relocated
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.

Bug: 183133670
Test: TH
Merged-In: I024252070bd806d50d54377190fdc5cd5b4445e1
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-05-01 18:56:12 +00:00
Chris Wailes
c6360dabab Remove annotations that have been relocated
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.

Bug: 183133670
Test: m
Merged-In: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-04-30 13:36:40 +00:00