Commit Graph

6846 Commits

Author SHA1 Message Date
atrost
e44e134776 Pipe disabled compat changes to runtime through zygote.
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
Merged-In: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
2019-12-11 18:44:20 +00:00
Treehugger Robot
e280c89075 Merge "Do not cache enabled tags in Java." 2019-12-10 22:26:16 +00:00
Florian Mayer
dd025de034 Do not cache enabled tags in Java.
As we are elimating the Binder notifications for the sysprop update for
atrace, we no longer have a callback that can be used to read the new
value of the enabled tags.

@CritivalNative calls are very fast (25 ns) so the overhead of always
going to native code to read the tags is negligible.

Test: flash & boot
Test: adb shell su root atrace -t 10 ss
Test: adb shell su root atrace -t 10 wm

Bug: 137366208

This is a cherry-pick of 9fd210224a

Change-Id: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
Merged-In: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
2019-12-10 13:17:23 +00:00
Songchun Fan
c8b066091e Merge "[incremental] parcelable for incfs file descriptors" 2019-12-05 22:02:49 +00:00
Songchun Fan
000b5b5bf6 [incremental] parcelable for incfs file descriptors
This parcelable is used to pass incfs fds from vold to system_server.

Test: builds
Change-Id: I7f0af8798d12815fbae404afabf4a88229a705da
Merged-In: Ifc3a43633356951b239486d66ee80d120bc4ab76
2019-12-04 17:42:57 -08:00
Peter Wang
415143daf5 Merge "[Telephony Mainline] Expose hidden APIs and consts" 2019-12-04 23:39:50 +00:00
Treehugger Robot
2b65793cd6 Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:15:02 +00:00
Peter Wang
98598bfe16 [Telephony Mainline] Expose hidden APIs and consts
Exposing constants that were originally hidden

Test: build
Bug: 140908357
Change-Id: I12b8d338a58c0ffe294137171b8bac7d80a0b776
Merged-In: I12b8d338a58c0ffe294137171b8bac7d80a0b776
2019-12-03 19:12:47 +00:00
Dario Freni
c7a4eec435 Merge changes from topic "aosp-apk-in-apex"
* changes:
  DO NOT MERGE: Fixes NPE when preparing app data during init
  Support privileged apps installed in APEX.
  Support non-privileged APKs in APEX.
  Refactors initial directory scan to be dryer
2019-12-03 11:45:55 +00:00
Steven Moreland
c8d045a384 Merge "Binder: add markVintfStability"
am: 4bdfc3c05c

Change-Id: I232f3db9979d47caaef0d5d75c263c8cfb7119c7
2019-12-02 08:50:57 -08:00
Steven Moreland
4bdfc3c05c Merge "Binder: add markVintfStability" 2019-12-02 16:46:17 +00:00
Mark Chien
4bb02709c5 Merge changes from topic "tether_migrate"
am: e8401aff92

Change-Id: I03e43b7a112f91637941e5193bd21b3e714f5dac
2019-11-30 04:26:07 -08:00
markchien
6b828d2915 [Tether07] Migrate Tethering into module
am: 0df2ebc43d

Change-Id: I1aaa034e91eae2d6e9abcbbd70741a54a18b3ddc
2019-11-30 04:25:57 -08:00
Mark Chien
e8401aff92 Merge changes from topic "tether_migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-30 12:17:47 +00:00
markchien
b741c646c6 [Tether10]Remove UserManagerInternal usage in Tethering
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.

Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -manual test. Add a trigger point to call
       UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
       Settings. Open hotspot -> restrict tethering from new adding trigger
       point -> hotspot is OFF and Tethering settings are not available.

Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
Merged-In: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
2019-11-30 10:06:23 +00:00
markchien
0df2ebc43d [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
Suprabh Shukla
040206bfcc Merge "Adding version code R for development"
am: b578bdbe43

Change-Id: I704d797eb4c3c0f2ffc449cb32681e68fcf7cc16
2019-11-29 09:18:22 -08:00
Treehugger Robot
b578bdbe43 Merge "Adding version code R for development" 2019-11-29 17:10:43 +00:00
Felix
1397337346 Merge "core/Build: ro.system when comparing fingerprint"
am: 82fee58478

Change-Id: I527f1ff7c5e9dda76ec36dbe6fb1d041e6a36437
2019-11-28 18:45:32 -08:00
Treehugger Robot
82fee58478 Merge "core/Build: ro.system when comparing fingerprint" 2019-11-29 02:36:48 +00:00
Suprabh Shukla
6a509cf4a5 Adding version code R for development
Test: Builds

Bug: 129975435
Change-Id: I26ef76266b2f52746ca08a45f5013c580cecd4fb
Merged-In: I26ef76266b2f52746ca08a45f5013c580cecd4fb
(cherry picked from commit 1d081c503c)
2019-11-28 14:29:12 +00:00
Dario Freni
7d038cd0e9 Support non-privileged APKs in APEX.
This change adds initial support for scanning APEX directories looking
for APK, and make them available to the system as normal system APKs.
For now privileged apps and resource overlay are not supported, and the
support will be added in a later CL.

Scanning features are inherited from the partition in which the
preinstalled version of a given APEX module is located.

Supports both flattened and un-flattened APEX configurations.

Bug: 138429615
Test: Compiled a test apex with the Snake app installed in it. Verified
app is correctly scanned and usable. Tried also installing the apex in
/vendor and /product.
Exempt-From-Owner-Approval: Approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9533445
Merged-In: I8fb91317da0296567403b2b62babbb71e4b48938
Change-Id: I8fb91317da0296567403b2b62babbb71e4b48938
2019-11-28 18:28:00 +08:00
Steven Moreland
d587a555de Binder: add markVintfStability
For the AIDL compiler to call. Without this, the Java framework can't
pass callbacks to HALs.

Bug: 139325468
Test: use vibrator callback from Java
Change-Id: I147d3e3da699ce740f6589264b37f43f8557719b
2019-11-27 18:15:33 -08:00
Neil Fuller
01d1dd28f1 Merge "Remove dead code from SystemServer"
am: 05eeef4188

Change-Id: I910fb0ac35c8de8fd500b3df0253c65b6b201fb4
2019-11-25 06:12:57 -08:00
Neil Fuller
05eeef4188 Merge "Remove dead code from SystemServer" 2019-11-25 13:53:15 +00:00
Charles Munger
769cf05c56 Merge "Deprecate FileUtils.closeQuietly"
am: e4b84f3475

Change-Id: Ia2f71d7cd97b32a175d0210a8f567ae75030439e
2019-11-22 16:03:14 -08:00
Treehugger Robot
e4b84f3475 Merge "Deprecate FileUtils.closeQuietly" 2019-11-22 23:52:41 +00:00
Charles Munger
8292d73554 Merge "Deprecate Looper.prepareMainLooper"
am: b1f69203e7

Change-Id: If66e250dcaa558eef033abaed08b72642004aec6
2019-11-22 12:10:59 -08:00
Treehugger Robot
b1f69203e7 Merge "Deprecate Looper.prepareMainLooper" 2019-11-22 19:59:44 +00:00
Ytai Ben-tsvi
e74637df68 Merge changes from topic "hidl-memory-java"
am: 887aa66d0a

Change-Id: If36ca2aad9c3e68e5a5be49e9e1566e44f40511b
2019-11-22 10:10:44 -08:00
Ytai Ben-Tsvi
a736d1c1ee Add HidlMemoryUtil
Convenience utilities for working with HidlMemory.

Change-Id: I85a46d37de7b89fb48c57f69b1552ca59b802c19
Merged-In: I85a46d37de7b89fb48c57f69b1552ca59b802c19
Bug: 143566068
2019-11-21 15:28:09 -08:00
Ytai Ben-Tsvi
a907efc3bc Add parceling support for HIDL memory in Java
This change adds support for reading/writing a HidlMemory
instance into / out of a HwParcel and HwBlob, in a format that
is compatible with the hidl_memory C++ type.
This paves the way to be able to exchange shared memory blocks
between native and Java via HwBinder, which will be exposed
as adding Java support for the HIDL 'memory' type.

Change-Id: I6cbbf852218c8a631f9014e7caa7a97d17e11889
Bug: 143566068
Merged-In: I6cbbf852218c8a631f9014e7caa7a97d17e11889
2019-11-21 15:19:47 -08:00
Neil Fuller
4b03c07cc7 Remove dead code from SystemServer
Remove dead code from SystemServer that obstensively protects devices
from negative (< 1970) system clock times, but does not.

In reality, SystemServer calls SystemClock.setCurrentTimeMillis(), which
calls through to the AlarmManager.setTime() binder call. When the code
runs the system server hasn't started any services yet, so this would
always fail.

AlarmManager has similar protections in place that do work: if the
device is earlier than a "build time", then the device's clock is forced
forward. That provides the protection that the code being removed from
SystemServer was trying to achieve.

Test: Added logging to SystemClock to prove AlarmManager is null /
manual debugging

Change-Id: I87dca1062829bc1a10202804fa7ee31e0a6f03a3
2019-11-21 17:30:03 +00:00
Daniel Colascione
1077797c14 Merge changes from topic "property-handle"
am: 54543bb423

Change-Id: Id1ebdeca53c8705ce3cfab8db2e25cfebaa7f8a3
2019-11-20 20:47:44 -08:00
Daniel Colascione
54543bb423 Merge changes from topic "property-handle"
* changes:
  Add new SystemProperties.Handle interface
  Reimplement android.os.SystemProperties in terms of libc facilities
2019-11-21 04:38:03 +00:00
Charles Munger
080ddd5dfd Merge "Deprecate implicit Handler constructors"
am: 560c3ebe1e

Change-Id: I254f85c07743883c7d350a47750dad0745c47d52
2019-11-19 16:04:15 -08:00
Treehugger Robot
560c3ebe1e Merge "Deprecate implicit Handler constructors" 2019-11-19 23:28:12 +00:00
Daniel Colascione
6e2cff7fa1 Add new SystemProperties.Handle interface
This new interface allows Java code to look up property values without
paying for the name->prop_info mapping and, in the case of looking up
scalars, without doing any allocation.

Bug: 140788621
Test: added tests
Test: atest FrameworksCoreSystemPropertiesTests
Change-Id: I46d12f62499e9e124fe9add588376d724b364d5d
2019-11-19 13:28:56 -08:00
Daniel Colascione
5e8ba5f05a Reimplement android.os.SystemProperties in terms of libc facilities
A subsequent CL will implement a new prop_info based properties API on
top of this CL.

Test: boots
Test: atest FrameworksCoreSystemPropertiesTests
Bug: 140788621
Change-Id: Id8dd02fff7b1c0815a27ab1dfdde1700447a414c
2019-11-19 13:27:53 -08:00
Hall Liu
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00
Hall Liu
1d7a53da98 Merge changes from topic "mainline4"
* changes:
  Add new API for Telecom to send phone state
  Minor style correction to avoid merge conflict
  non-mainline telephony related AIDL refactor/decoupling
2019-11-18 22:31:27 +00:00
Jayachandran C
0a86ee3b3e Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 337df70e17

Change-Id: Iba519e0e11af591d93f9bca5e09aab6191240b39
2019-11-15 19:11:44 -08:00
Chen Xu
8eb62f9485 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
Merged-In: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-11-15 18:02:40 -08:00
Treehugger Robot
337df70e17 Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" 2019-11-16 01:36:08 +00:00
Jayachandran C
16dce22bf5 Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL changes to use getSystemService(TelephonyManager.class)

Bug: 140768340
Test: Build
Change-Id: I1fcf2c17456f126584df359547f64c07c168aa65
2019-11-15 15:46:43 -08:00
Charles Munger
219e986e29 Deprecate FileUtils.closeQuietly
This API encourages swallowing errors, and the code to implement it is trivial if apps still want to do it themselves.
Guava's reasoning on deprecating their version of this API:
https://github.com/google/guava/issues/1118

Test: No behavior changes
Bug: 144042891
Change-Id: Ic4cfb7366c65d49c355479f420d9ba4fc1b3f053
2019-11-15 21:12:39 +00:00
Charles Munger
0ee2b879b6 Deprecate Looper.prepareMainLooper
Applications don't need to call this method.

Bug: 144042891
Test: No behavior changes
Change-Id: I0aab8619cd9afc6b672ae163fba9d17c797c9f26
2019-11-15 11:14:10 -08:00
Charles Munger
80b1c4dcc8 Deprecate implicit Handler constructors
These have been the cause of bugs in the past, such as b/10150258,
because it's not always obvious or guaranteed that a calling thread will
always have a looper, or that it's actually the looper you want.
Specifying the looper explicitly, even if it's just Looper.myLooper(),
makes the code clearer. Since callback APIs generally should have
Executor variants added, it might be nice to also deprecate the
constructors or options that rely on the calling thread's looper, but
since I don't have an inventory of all those I'm starting with this.

Bug: 144042891
Test: No behavior changes
Change-Id: I0e7ba80d6b89a866ea715c790dd602ef728bf5bd
2019-11-15 10:17:54 -08:00
Howard Chen
a0dc5e8e10 Merge "Use the new gsid interface"
am: c68c069db7

Change-Id: I7d8d96c8de5089360302deef783cf617a94a7abc
2019-11-15 04:04:57 -08:00
Howard Chen
c68c069db7 Merge "Use the new gsid interface" 2019-11-15 11:05:16 +00:00