374644 Commits

Author SHA1 Message Date
Mathew Inwood
b558baa4cc Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 13:32:04 +00:00
Treehugger Robot
d08509363c Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 12:32:09 +00:00
Mathew Inwood
9cf99fd91f Add @UnsupportedAppUsage annotations
For packages:
  android.text.util
  android.text.style
  android.text.method
  android.text.format
  android.text

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I5be178ad05f2ff98bcf31e24cd4eb33961887c38
Merged-In: I9afbd4ca8826c37cb70db43252e39b9a674e5ae0
2018-08-15 12:49:00 +01:00
Mathew Inwood
9feefd2f5f Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 11:37:37 +00:00
Mathew Inwood
06f2e6b7c8 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 11:36:01 +00:00
Treehugger Robot
fd07385fea Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 10:11:01 +00:00
Mathew Inwood
72982a5404 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 10:10:35 +00:00
Neil Fuller
6f358b1947 Track rename of org.kxml to com.android.org.kxml
Update preloaded-classes to track libcore class renames.

The class renames may have caused a regression in some
performance metrics, though overall boot time was unaffected.
This is probably because the first user is now paying the cost
of the class initialization and that happens to be in the affected
metrics. There's no reason not to update the preloaded-classes.

Metrics affected:
SystemServerTiming_StartUsageService_avg
SystemServerTiming_StartJobScheduler_avg
SystemServerTiming_StartJobScheduler_avg

Test: build only
Bug: 111055375
Bug: 112595254
Change-Id: If1697918046ec7f186c095eaf68864d075989b9c
2018-08-15 10:40:47 +01:00
Mathew Inwood
1c77a11db2 Add @UnsupportedAppUsage annotations
For packages:
  android.content.res
  android.content.pm.split
  android.content.pm.permission
  android.content.pm.dex
  android.content.pm
  android.content.om
  android.content

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie932bb108f8e21aad8576e444d43e7a553a4d128
Merged-In: Ia79256a3d04e16dd78331a61af0dcddc5fc1599b
2018-08-15 09:59:43 +01:00
Treehugger Robot
3683071fe2 Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 07:36:26 +00:00
Luke Huang
3b9ae0ae48 Merge "Clatd-related commands porting" 2018-08-15 03:38:50 +00:00
Gerry Fan
7955aec0ea Merge "Add Nullable to MediaHTTPService's mCookies." 2018-08-15 00:13:59 +00:00
Josh Gao
5fc8bbe114 Fix double close in NativeLibraryHelper.openApkFd.
Prior to this patch, we were taking the file descriptor owned by a
ParcelFileDescriptor, and passing it into ZipFileRO::openFd, which
expects to take ownership of the file descriptor, closing it upon
destruction. This leads to a double-close when the ParcelFileDescriptor
tries to close itself. Switch to passing a duped copy of the file
descriptor to ZipFileRO::openFd.

Test: `pm install foo.apk` with fdsan
Change-Id: Ida4ca4a37b82875dc4eef1f37bf2322c422fe038
(cherry-picked from commit b066087d65b720a5c9ac48f64a856284566df82f)
2018-08-14 16:45:46 -07:00
gfan
73371d7503 Add Nullable to MediaHTTPService's mCookies.
Bug: 29321867
Test: manually tested with ndk sample native-audio
Change-Id: Ic30fe7c28db0111ee5bcb91b037b7c4536dcfd06
2018-08-14 15:10:49 -07:00
Nan Zhang
c28a0ac77c Remove api-stubs-docs targets.
Since api-stubs-docs will be replaced by Metalava.

Test: m -j checkbuild
Bug: b/70351683 b/78245848
Change-Id: I3d2091afb0b5d93250573076d4dc95b47c634f2d
Merged-In: I3d2091afb0b5d93250573076d4dc95b47c634f2d
2018-08-14 13:46:01 -07:00
Treehugger Robot
c5797b0745 Merge "Use seInfo to label secondary dex files" 2018-08-14 20:43:00 +00:00
Treehugger Robot
0f7d0f4e94 Merge "Convert com.android.media.remotedisplay.stubs-gen docs" 2018-08-14 20:07:33 +00:00
Xiangyu/Malcolm Chen
03fcb263ab Merge "Remove old SubscriptionInfo constructors." 2018-08-14 18:58:25 +00:00
Treehugger Robot
9b9728710f Merge "MemoryIntArray: don't double close." 2018-08-14 18:51:40 +00:00
Nick Kralevich
005f959c5b Use seInfo to label secondary dex files
There are, confusingly, two seInfo strings used to determine how
processes and files are labeled. "seInfo" was the original string, and
https://android.googlesource.com/platform/frameworks/base/+/be0b8896d1bc%5E%21/#F3
added "seInfoUser" to support instant apps (with a TODO to merge the two
fields).

"seInfoUser" is only intended to label instant app processes, not files.
So, when we need to label files, we should be using "seInfo", not
"seInfoUser". Otherwise, files will get labeled incorrectly.

Steps to reproduce:

  1) Revert system/sepolicy commit cdc6649acc43d3a38753e22790f372290c1189c1
  2) Rebuild and factory reset the device ("fastboot -w flashall")
  3) Wait for the device to boot.
  4) "adb root"
  5) "adb shell"
  6) "cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms"
  7) Examine the files in /data/user_de/0/com.google.android.gms using
     "ls -laZR /data/user_de/0/com.google.android.gms"

Expected:

  All files in /data/user_de/0/com.google.android.gms should have the
  SELinux label "privapp_data_file"

Actual:

  Secondary dex files produced by installd have the incorrect label
  "app_data_file"

Bug: 112357170
Test: Verified labels of files in /data/user_de/0/com.google.android.gms
      are correct

Change-Id: If028dcb4742731acab2855d4eec8f314964bb09a
2018-08-14 11:22:50 -07:00
Steven Moreland
54ea922d1a Simplify IWeaver mocking code.
Implementations of HIDL interfaces are intended to extend
from the Stub class, not the core interface class.

Test: m FrameworksServicesTests
Test: frameworks/base/services/tests/runtests.py -e package "com.android.server.locksettings"
OK (454 tests)

Bug: 112334405

Change-Id: Ib060560fd74f0092544096210f52e1f7fcba6c06
2018-08-14 18:10:43 +00:00
Mathew Inwood
bbce947092 Add @UnsupportedAppUsage annotations
For packages:
  org.apache.http.params
  org.apache.http.conn.ssl
  org.apache.http.conn.scheme
  org.apache.http.conn

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ia97cd8d932845e1f4c5454764efff206777d2e02
Merged-In: I4f19d319716b92da095b2b1d08f7c225f7ec027c
2018-08-14 19:04:16 +01:00
Steven Moreland
5afc5894ad Merge "Clarify NativeHandle.java dup documentation." 2018-08-14 17:47:58 +00:00
Mathew Inwood
b407568c55 Add @UnsupportedAppUsage annotations
For packages:
  android.util.proto
  android.util.jar
  android.util.apk
  android.util

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I18848448a81132399f6878812acf5031ed8cec9f
Merged-In: Ia0f48c244b0fbe33d40d797702a82303648196ed
2018-08-14 17:32:44 +01:00
Steven Moreland
1e1d8d2485 Merge "Implementing support for HIDL native handles in Java" 2018-08-14 15:39:33 +00:00
Mathew Inwood
fa3a7466e1 Add @UnsupportedAppUsage annotations
For packages:
  android.net.wimax
  android.net.wifi.p2p.nsd
  android.net.wifi.p2p
  android.net.wifi.hotspot2.pps
  android.net.wifi.hotspot2.omadm
  android.net.wifi.hotspot2
  android.net.wifi.aware
  android.net.wifi
  android.net.util
  android.net.sip
  android.net.rtp
  android.net.nsd
  android.net.metrics
  android.net.lowpan
  android.net.http
  android.net.captiveportal
  android.net

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
2018-08-14 14:44:29 +01:00
Mathew Inwood
4fb17d17ca Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I5d15d50344d7178617418846917f693cfabf006b
Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
2018-08-14 14:25:44 +01:00
Remi NGUYEN VAN
a8e9090cf6 Fix testRegisterUsageCallback failure in setUp
LocalServices.addService in NetworkStatsService is currently failing
with IllegalStateException "Overriding service registration". Setting up
LocalServices in the test to avoid this issue might be possible, but
moving the registration to the only non-test caller of that constructor
as done here solves the issue and avoids side-effects from a constructor.

Test: atest FrameworksNetTests does not choke on this test
Bug: b/78487385
Bug: b/80082746
Change-Id: I5dba98fc79aec0800c8b71e6c7e23d1cfbcae852
Merged-In: I884a7a8bd7db3fcd220b785ba9914ac8c77720f0
(Clean cherry-pick of go/ag/4061255)
2018-08-14 18:14:09 +09:00
Josh Gao
89dfbfa269 MemoryIntArray: don't double close.
Oops, in the process of trying to track down a double close, I
introduced one...

This was caught by fdsan immediately when running the tests, but a
tombstone wasn't generated, due to a race with ActivityManager killing
crash_dump before it finished generating a tombstone. (b/112564871)

Bug: http://b/112405224
Test: atest MemoryIntArrayTest (looking at logcat this time...)
Change-Id: Iac154b92a945ce9ac8d0721e7bf200e73e6fb484
2018-08-14 09:13:39 +00:00
Treehugger Robot
1f077d9045 Merge "Modernize codebase by replacing NULL with nullptr" 2018-08-14 08:14:51 +00:00
Malcolm Chen
fdcf6469f1 Remove old SubscriptionInfo constructors.
Bug: 92796390
Test: build
Change-Id: Id5ce174b43934e690f6c1682e502b3b7e344a865
Merged-In: Id5ce174b43934e690f6c1682e502b3b7e344a865
2018-08-13 16:33:18 -07:00
Steven Moreland
12a2c0ae3f Clarify NativeHandle.java dup documentation.
close must also be called.

Bug: 35098567
Test: N/A
Change-Id: I4d03effc82d7f6de7ca785ae4d12868ccc4ceddd
2018-08-13 14:31:20 -07:00
Nirav Atre
9850dd9751 Implementing support for HIDL native handles in Java
This change implements the equivalent of the C++ native_handle_t type in
Java. Similar to the C++ type, the NativeHandle class wraps an arraylist
of FileDescriptor objects, along with a raw data stream (integer array).

Bug: 35098567
Test: Ran m, hidl_test (C++ and Java). Functionality tests are included
in a separate CL.

Change-Id: Ic53f9a49ae17ce5708577a586230126ab0e222c7
2018-08-13 14:31:17 -07:00
Treehugger Robot
bf66847240 Merge "NetworkAgent: Send primitive integer in explicitlySelected" 2018-08-13 17:09:51 +00:00
Neil Fuller
0bde7874cc Merge "Update current.txt to fix inconsistencies" 2018-08-13 15:39:17 +00:00
Treehugger Robot
c12090200d Merge "Add libcore/ojluni/annotations as a source for metalava." 2018-08-13 12:22:29 +00:00
Gopal Krishna Shukla
e5c8379d81 Reuse DeathRecipient object for StatusBarManagerService
With each SystemUI crash don't create new DeathRecipient
Object during registration of Status Bar

BUG: 111051603
Test: manual -Device booted up and running
Change-Id: Ie9219400c87722cd9e9fc13f106a052d692400ea
2018-08-13 14:43:50 +05:30
Narayan Kamath
e6d7a51aa1 Merge "Parcel: Handle NULL return from Parcel::readInPlace." 2018-08-13 09:03:43 +00:00
Luke Huang
ff9159b1df Merge "Strict-related commands porting" 2018-08-13 05:39:02 +00:00
Wesley.CW Wang
d560e8f50c Separated emergency option final UI
- Refine faster emergency icon.
 - Add ic_faster_emergency.xml to framework/core/res/drawable.
 - Remove faster_emergency_icon.xml from SystemUI/res/drawable.
 - Change emergency_icon.xml color to colorError.
 - Emergency option(India case) will follow separated option design if
 separated option feature is enabled.

Test: Manually,
use "adb shell settings put global faster_emergency_phone_call_enabled 1" to show separated emergency option(default case),
use "adb shell settings put global emergency_affordance_needed 1" to show India emergency option(India case),
India emergency option will be separated button if feature is enabled,
otherwise it will be default design.
Change wallpaper to enable light/dark theme & check separated emergency option color.
(light theme color : D93025    dark theme color : E25142)

Bug: 110658988
Change-Id: I2a3c5ce053aab05381806eedf108cec54af808b1
Merged-In: Id13bcb5b5242ded92b309667c5e2beb8694b9977
2018-08-13 12:08:04 +08:00
Wesley.CW Wang
db357c7bd1 Fix Power menu background vanish
- Separated button & origin button use same HardwareBgDrawable caused
power menu background vanish when keyboard showing.
 - Let separated button use mSeparatedViewBackground & origin button use
 mListBackground to fix this bug.
 - Rename View mChild to mList.

Test: Manually, long press power key to launch power menu when keyboard
showing, power menu background should display normally.
Bug: 111101759

Change-Id: I7122ff52fd14021ac01b1ab9d64e7dde71fa7ab1
Merged-In: Ic08cabc63daebc4001c8eda751857d11cb0e6352
2018-08-13 12:06:17 +08:00
Wesley.CW Wang
00e2fcf978 Add separated emergency option on power menu
- Add a separated button on power menu to launch emergency dialer.
 - Change HardwareUiLayout.java FrameLayout to LinearLayout, let it can
display separated button.
 - Add a flag to recognize separated button should show/hide, if
EmergencyAffordance(India) enabled, separated button will hide,
otherwise power menu will display separated button & power
menu last item won't get white background.

Test: Manually, use "adb shell settings put global faster_emergency_phone_call_enabled 1" to show/hide separated emergency option, press emergency option will go to emergency dialer.
Change-Id: I1140fa412b655c16f3052cbabd118df278fd7f23
Merged-In: I8e6bb72ce7b8cecdb6bd01150b53f61f1515dbb1
Bug: 80376488
2018-08-13 12:02:13 +08:00
Wesley.CW Wang
74b9579088 Add emergency dialer option on power menu
Add a button on power menu to launch emergency dialer.
Add FASTER_EMERGENCY_PHONE_CALL_ENABLED to SettingsBackupTest blacklist.

Test: Manually
Bug: 80376488
Change-Id: If359662a4d60dbe0ded89c3afe35db91dca4c445
Merged-In: I9c920e31433c0ac23165f917d8dd2befaaa4938d
2018-08-13 11:58:23 +08:00
Nan Zhang
d4562064b6 Convert com.android.media.remotedisplay.stubs-gen docs
Checked AOSP master, and found that this module haven't been migrated
yet after pi-dev codebase been merged back to AOSP.

Test: m -j RemoteDisplayProviderTest is successful and does not show any
link-type check warning.
Bug: b/70351683

Change-Id: I227fe8c0a19582cf3f095a8e773ca0bdd81b0a0a
2018-08-12 12:55:56 -07:00
Nathan Harold
d3395b08c2 Merge "Merge CellInfo TYPE Enums" 2018-08-10 23:56:54 +00:00
Treehugger Robot
dccbfca194 Merge "MemoryIntArray: track the owned file descriptor in a PFD." 2018-08-10 19:42:51 +00:00
Youming Ye
2052fba20a Merge "Fix permission check for TelephonyManager#isTtyModeSupported." 2018-08-10 18:21:25 +00:00
Narayan Kamath
d423f670b5 Parcel: Handle NULL return from Parcel::readInPlace.
This can happen because Parcel checks that there are enough
bytes to consume taking padding into account, whereas the JNI
wrapper only considers the unpadded length of the array.

Test: atest ParcelTest
Bug: 35384981

Change-Id: I76c01ec50391144985f56dcae016d46487f74591
2018-08-10 18:52:07 +01:00
Mathew Inwood
f86bea9b42 Add @UnsupportedAppUsage annotations
For packages:
  android.database.sqlite
  android.database

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I0da613d00611e89e49bf73c9ffe35700818efc6b
Merged-In: I2bcc7f0eee31a1775dd7a5dd0f291d0d37bc1292
2018-08-10 16:10:20 +01:00
Roshan Pius
eaf8dee367 NetworkAgent: Send primitive integer in explicitlySelected
|Boolean| object is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer instead to
represent the boolean value.

Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: Iac69fd302e1f1338ed0da1446105ffc5855451cc
2018-08-10 07:44:33 -07:00