Commit Graph

1027 Commits

Author SHA1 Message Date
Treehugger Robot
a879fd8b02 Merge "Quiet SNaN inputs in Half.toFloat()" 2019-01-18 23:18:15 +00:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
xueliang.zhong
ea652eac63 Quiet SNaN inputs in Half.toFloat()
This CL fixes Half.toFloat() in handling SNaN inputs,
to make sure the Java implementation has same semantics
as the hardware implementations (Arm and Intel).

1. Armv8.2 implementation (FCVT):
  // tested as ART intrinsic on Pixel3
  __ Fmov(h31, w1);  // input: w1 register
  __ Fcvt(s0, h31);  // output: s0 register

2. X86 implementation (VCVTPH2PS):
  // clang -mf16c test.c
  float x86_toFloat(short h) {
    __v8hi v = {h, 0, 0, 0, 0, 0, 0, 0};
    __v4sf r = __builtin_ia32_vcvtph2ps(v);
    return r[0];
  }

3. Java implementation (software):
  android.util.Half.toFloat(short);

Test: Exhaustive testing of 0x0..0xFFFF input bits on above three
      implementations and compare output values.

Change-Id: Iff137858379bf43e59cde94c9d19c2054a3d4f93
2018-12-17 10:25:25 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Neil Fuller
b8383a10b9 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Change-Id: Ic807977a85276b888362295d1d305effe33076fc
2018-11-27 14:44:59 +00:00
Neil Fuller
69ffbd67c2 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Exempt-From-Owner-Approval: Trivial import change
Merged-In: Ie90c219799cbf9601a22a2d972c09e3d94fc0c43
Change-Id: Ie90c219799cbf9601a22a2d972c09e3d94fc0c43
(cherry picked from commit 164394db8e)
2018-11-22 09:57:12 +00:00
Neil Fuller
4492ec573a Merge "API for retrieving time zone IDs by country" 2018-11-21 15:18:27 +00:00
Neil Fuller
6caa954ead API for retrieving time zone IDs by country
New method has been requested by Setup Wizard.

Test: CTS: run cts-dev -m CtsUtilTestCases -t android.util.cts.TimeUtilsTest
Bug: 116544863
Merged-In: I31a9e3d07d5c3fbc8ba1d9c9b398cb2661aa71f9
Change-Id: I31a9e3d07d5c3fbc8ba1d9c9b398cb2661aa71f9
(cherry picked from commit f9bb2d8f02)
2018-11-20 10:59:18 +00:00
yuanjiahsu
2c69b0b487 Modify feature flag of Personal Safety
1.Remove feature flag and let Emergency Dialer Shortcut feature always
enabled.
2.Add feature flag for Safety Hub (the bug ID to clean up this feature flag is b/118848485).

Test: Manually
Bug: 117128459
Bug: 118809382
Change-Id: I0a3819629bc579d93c682451abdf271d0b36bf59
2018-11-19 13:12:28 +00:00
Stanley Tng
799232a4a9 Change the feature flag for Hearing Aid behavior
Previously, this feature flag for Hearing Aid Profile is to disable the
profile on supported phone . This CL will reverse the logic and is
to enable the Hearing Aid profile on unsupported phone. This is to allow
testing of this profile on unsupported phone.

Test: Manual tests on different types of phones
Bug: 116861680
Change-Id: Ic8db4445a58942c5f75598dce0503f6670ff9c7b
Merged-In: Ic8db4445a58942c5f75598dce0503f6670ff9c7b
(cherry picked from commit afa1f9c5c5)
2018-11-01 09:17:01 -07:00
Stanley Tng
cbfcbd168b Add Feature Flag for Hearing Aid Profile
Using the Settings App-Developer Options-Feature Flag, allow the user to
enable or disable the Hearing Aid Profile.

Bug: 116317072
Bug: 116044083
Test: Manual testing using Settings App
Change-Id: I58a9d339941e235242c443c85b6f4194b5a296c9
Merged-In: I58a9d339941e235242c443c85b6f4194b5a296c9
(cherry picked from commit fe8c8337ed)
2018-10-13 16:16:33 -07:00
yuanjiahsu
88363e9b2f Add feature flag in Settings.
User can enable/disable faster emergency phone call feature by switching
this flag from Settings, and the old flag switched by adb command was
replaced by this feature flag.

Test: Manually
Bug: 113539598
Change-Id: Ie38f4657bfd76d8386ce2a075f4ec5d0038f5c3d
2018-09-11 15:04:51 +08:00
st.ji
d41b9ac699 Add DENSITY_600
Add 600dpi as a supported screen density

Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass

Change-Id: Iac673eae2d82c27d96e279c076454af2f5933208
Signed-off-by: st.ji <st.ji@samsung.com>
2018-08-20 02:23:42 +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
Josh Gao
c81f53f7f1 MemoryIntArray: track the owned file descriptor in a PFD.
AUPT is triggering an fdsan diagnostic when creating a temporary
ParcelFileDescriptor to write to a Parcel. This code seems correct at
first glance, so under the assumption that some other code is closing
the file descriptor out from under us, keep our owned file descriptor
around as a ParcelFileDescriptor to catch the perpetrator in the act.

Bug: http://b/112405224
Test: atest MemoryIntArrayTest
      (testAshmemSizeMatchesMemoryIntArraySize failed/crashed before, fails now)
Change-Id: Ie8ff7562c78ecde4cf1757d572ecb733213cc975
2018-08-09 16:32:42 -07:00
Mathew Inwood
5d44cf6f72 Merge "Code formatting change for upcoming annotations."
am: 5d669f79f2

Change-Id: Iffd38fbc5ee5cd01d5900afbfee331e005b860c6
2018-08-01 16:05:35 -07:00
Mathew Inwood
c092f2317b Code formatting change for upcoming annotations.
Putting /** @hide */ on the same line results in the automated annotation
addition putting the annotation the previous line, which then results in
the @hide javadoc annotation being ignored (since it's now no longer
strictly before the method declaration).

Bug: 110868826
Test: m
Change-Id: I1b5c290a17ead46effd2f2ff3f4b33884efbc116
2018-08-01 13:52:03 +01:00
Laura Davis
e27c3511d8 Docs: fixed typo and made minor edits
Test: make ds-docs

Bug: 111734031
Bug: 111734470
Change-Id: Ic120368fef0c0673ce954cdf0927a4705b3edcd2
2018-07-30 14:56:32 -07:00
Paul Duffin
6565aae0e9 Merge "Remove dependency on InflaterInputStream.closed field."
am: 555fc87b99

Change-Id: I66687ef9b82fb2071e6fc04726d099bc1b5fab65
2018-07-24 02:27:35 -07:00
Paul Duffin
96a1368158 Remove dependency on InflaterInputStream.closed field.
In upstream OpenJDK the InflaterInputStream.closed field is private.
During integration of OpenJDK into Android it was changed to be
protected so that it could be used by StrictJarFile, and in the process
was accidentally made part of the public API. This change removes the
StrictJarFile dependency on that field.

Bug: 111061052
Test: checkbuild, flash and run FrameworkCoreTests
Change-Id: I8aee1c444cf27e7078b848c65e0433c831ab06a0
2018-07-23 15:55:33 +01:00
Tobias Thierer
597eb7f87e Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME."
am: 2dc5a42743

Change-Id: I5a61fe6e4b9507a754f8977225bc4dbbee88a4ff
2018-07-20 10:11:27 -07:00
Treehugger Robot
2dc5a42743 Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." 2018-07-20 15:50:59 +00:00
Tobias Thierer
8a0845e517 Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME.
Introduce a constant StrictJarManifest.ATTRIBUTE_NAME_NAME so that
callers (StrictJarManifest{,Reader}) don't need to rely on
Attributes.Name.NAME which was added via an Android patch.

Bug: 35910877
Test: Treehugger

Change-Id: I292fbefc6c5561609dcd8281d1e2a931a1ffa5b2
2018-07-13 17:29:35 +01:00
Neil Fuller
7add22db60 Merge "Move XML object factory logic to libcore"
am: 8176fb99e1

Change-Id: Ib0940ecb89eaf11841bbd66cdaf1c5379466496c
2018-07-12 11:26:03 -07:00
Neil Fuller
f4634736ca Move XML object factory logic to libcore
It makes sense to hide the details of the parser implementation
(and other similar objects) in libcore so it could be changed.

This change removes the "ExpatPerformanceTest" which appears not to have
been maintained and was comparing KxmlParser with itself. It is assumed
that android.util.Xml used to return the expat parser.

Test: build
Bug: 111055375
Merged-In: Ibad247323ba90cd949aecb2bd92f2f73306a4327
Change-Id: Ibad247323ba90cd949aecb2bd92f2f73306a4327
2018-07-11 14:02:00 +01:00
Neil Fuller
3147288c3b resolve merge conflicts of 7980b19bc8 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ica0d3578c6e3fcd17b350f63b4acd471774ac014
2018-07-06 16:32:44 +01:00
Treehugger Robot
7980b19bc8 Merge "Track changes in libcore to remove a constructor" 2018-07-06 13:58:29 +00:00
Neil Fuller
baae7fa357 Track changes in libcore to remove a constructor
Track changes in libcore to remove a constructor + lint
import order changes. Instead of the constructor a utility
method is introduced.

Test: Build / boot
Bug: 111055375
Merged-In: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
2018-07-04 09:11:08 +01:00
Neil Fuller
04c66489bc Merge "Make Half class use public APIs"
am: 7e957e57b7

Change-Id: I7f41f07ed5d35a0c538c90b49b4500ba9952f74d
2018-07-03 13:08:26 -07:00
Neil Fuller
f9d88dfac1 Make Half class use public APIs
Half has a dependency on an internal sun.misc.FloatingDecimal
that can be replaced by an equivalent call on java.lang.Float
(which calls through to FloatingDecimal).

Any performance hit is worth it for a smaller API surface.

Bug: 111055375
Test: Build
Change-Id: Iecdf3aa9414922a77edbdc439b0c2b88033b3af8
2018-07-02 12:04:39 +01:00
Neil Fuller
325ecf7df4 Merge "Add more behavior to TimeDetectorService"
am: b1fc5a4c7e

Change-Id: Ibbda2d253bf807cc480a4218aa1d898d6737ec7b
2018-06-26 05:14:31 -07:00
Neil Fuller
4980bbcd30 Add more behavior to TimeDetectorService
The client code now "suggests" time updates
to the time detection service. The current implementation
of the time detection service will validate and set the
device system clock as needed. In future it will ignore
these suggestions if better information is available.

Responsibility for sending the
TelephonyIntents.ACTION_NETWORK_SET_TIME intent has
been moved to the time detection service until it can be
removed or replaced.

The telephony code is still responsible for basic rate
limiting but the majority of the decision logic has been
moved to the service.

There is an associated change in telephony code to switch to
using the server.

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: I4f7a10ac06b2d32da22689e1ddf309e0a2795f30
2018-06-25 19:34:05 +01:00
Neil Fuller
494665870f Merge "Add TimestampedValue.toString()"
am: bfa58946f7

Change-Id: I38760ef47ba04f20882a467857e7c57c088d4391
2018-06-14 02:40:17 -07:00
Neil Fuller
ca97b34330 Add TimestampedValue.toString()
To make debug logging useful.

Bug: 78217059
Test: Build
Change-Id: I710b56d189afeb26ac50f55d9286d04219779ee7
2018-06-13 15:29:05 +01:00
Neil Fuller
415585f2a5 Merge "Simple pass-through TimeDetectorService"
am: cb749e2e50

Change-Id: Ic2e3d3c3f9181ef4054f599baf4ac086ec21d8bd
2018-06-12 11:17:51 -07:00
Neil Fuller
4773b9dadc Simple pass-through TimeDetectorService
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.

This cherry-pick contains a small change: to use
SystemClock.elapsedRealtime() instead of the newer
SystemClock.elapsedRealtimeClock() with Clock.millis().

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
(cherry picked from commit 24836bfb15)
2018-06-12 15:33:35 +01:00
Lucas Dupin
94eca2cbd4 Enable systemui_theme feature flag
Turning flag on even though translations are not ready in order to
expose feature and make sure it was properly tested before release

Change-Id: I10f515b1bdcae45d1ed6d6d293afe1853f44dc02
Bug: 63903361
Fixes: 75498812
Test: manual
2018-05-24 20:07:44 -07:00
Lucas Dupin
06daff0660 SystemUI theme feature flag
Hide SystemUI theme under feature flag, this way we can enable it when
we're sure that all new strings were localized and the feature is ready
for prime time.

Bug: 63903361
Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemUiThemePreferenceControllerTest
Change-Id: I1093d414d951b71cab7cff10187c63bdd80eeee2
2018-05-23 12:52:37 -07:00
Kurt Marcinkiewicz
7a4ff6447d Allow specifying a network for SNTP time sync
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
(cherry-pick of pi-dev Ic9fc169cf75457810d4992121d85d7642e350b90)
Merged-In: I339c77063c72a9d76a5c4cb17052e20fb6e045a6
Merged-In: I8dfd1cad99c63efdc14c174c19f094a61cdfc44f

Change-Id: I44df66688292b144ec7dfcdd9ae5d82489f82774
2018-05-16 16:43:43 +09:00
Suprabh Shukla
1938e34e42 Mitigating cache corruption in ArrayMap
Before calling freeArrays, storing the array reference into a temporary
pointer so that the main pointer doesn't end up corrupting the static
pool of arrays on concurrent access. An earlier change missed a rare
case when removeAt was called for the last element in the map.

Test: atest android.util.ArrayMapTest
atest android.util.cts.ArrayMapTest

Bug: 78898947
Change-Id: I454c5b1600eb0a6c690e746df10f6a0ebcd8aa1d
2018-05-14 14:51:01 -07:00
android-build-team Robot
291b944d89 Merge "Adding batterystats history to proto dump." into pi-dev 2018-05-08 14:58:09 +00:00
Kweku Adams
71a9531806 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'

Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
2018-05-07 17:53:57 -07:00
yro
be6d7f90e8 Re-enable the logging of APP_BREADCRUMB_REPORTED atom
Bug: 78613419
Test: manual, cts, unit tests
Change-Id: I279158c8031eda3ee648053ae6a0d13fde7f1176
2018-05-06 22:25:05 -07:00
Victor Hsieh
4cf738204f Avoid using 0 for fs-verity extension ID
Also:
 * Adjust size and order of some fields
 * Fix Merkle tree size calculation bug

Test: Verify fs-verity works with kernel patch
Bug: 67380979
Change-Id: I58f14cfe9630c1ff62ed64dbf333bb1c9bfe0fb1
2018-05-02 16:40:34 +00:00
Victor Hsieh
8d1553b9b1 Verify best signature algorithms of all signers
The previous implementation does not verify signature algorithms of all
signers.  It's possible that the attacker can take an old apk (with
digest and signature of old algorithm) and add their own signer block
with new/P digest and signature.  In this case, the old implementation
only verifies the attacker's signature, thus the attacker can change apk
content easily.

The solution here is to verify digests of all best signature algorithms
by all signers.

It is expected to increase verification time, if the apk does have
multiple signers with different type of digests.

Test: apks still install
Bug: 78359754
Change-Id: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
Merged-In: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
(cherry picked from commit 2f2ced93e3)
2018-04-23 19:22:28 +00:00
Caxton Chan
116e05cbba Merge "Enable feature flag for audio output switcher." into pi-dev 2018-04-16 19:24:31 +00:00
Michael Wright
585ff988bb Convert the BrightnessController to a log scale control.
Currently, the BrightnessController's UI is a linear scale control on
top of a linear backlight control, but humans perceive brightness on a
roughly logarithmic scale. By moving to a non-linear control, we both
give users more fine-grained control over the brightness of the display
as well as a UI that works more intuitively.

Test: manual
Bug: 73810208
Change-Id: I67090ad7c4ced0420314458473c9124cb9c61906
2018-04-16 14:47:33 +01:00
ryanywlin
651d0335c1 Enable feature flag for audio output switcher.
Bug: 74130772
Test: Build
Change-Id: I04d0276681488c73c62b1f9ab6114c948bb50482
2018-04-12 02:13:51 +00:00
Jeff Sharkey
0a5570d49d APIs to disable data usage notifications.
Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis.  (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active.  Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
2018-04-11 22:07:40 +00:00
Jeff Sharkey
0fc6d03b62 API council requested tweaks to SubscriptionPlan.
Return new shiny Range<> object instead of Pair<>.  Tell developers
what permission to check on refresh broadcast.  Describe what
exceptions might be thrown, and that an empty list is okay.

Allow creation of plans with richer Period object, instead of forcing
them into rigid week or day options.

Protect SubscriptionPlan broadcast.

Test: atest android.util.RecurrenceRuleTest
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Bug: 74945820
Change-Id: I7e555798e0cfaa214ca93d9df627c6443fc5d986
2018-04-04 16:06:27 -06:00