284641 Commits

Author SHA1 Message Date
Arun
b0a9477c8e Reduce hwui CPU time by using glDrawRangeElements
The CPU overhead of glDrawElements in the GPU driver is significant
with client-side vertex data (unique per draw call) as the driver has
to calculate the mininimum and maximum indices from the index buffer
in order to evaluate the range of vertex data required. This can be
avoided by keeping track of the min-max in hwui and passing it with
glDrawRangeElements. This requires OpenGL ES3.0 support (which is
already checked for elsewhere in hwui).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I57bb1ddd239a1032f74f1cd2683bbe0970e84bd9
2017-05-05 15:11:27 +00:00
Treehugger Robot
cba224e833 Merge "Add (disabled) time zone update system server impl" 2017-05-05 14:06:23 +00:00
Nicolas Geoffray
a34610cebc Merge "Handle safe mode in PackageManager." 2017-05-05 08:37:18 +00:00
Adrian Roos
66f685a235 Merge "Update carrier text when phone service state is changed" 2017-05-05 00:50:18 +00:00
Neil Fuller
68f666693a Add (disabled) time zone update system server impl
This commit builds on top of prior API commits. It
adds code to the system server, but in a disabled way.

The system server is responsible for monitoring two
(configured) package names: one for the "updater app"
(provided by the platform) and one for the "data app"
(provided by the OEM). When either package changes
the updater app is triggered via a privileged
intent.

The updater is then required to communicate with the
data app and report back to the system server.

Unit tests are included for the major components.

To run:
make -j30 FrameworksServicesTests
adb install -r -g "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w com.android.frameworks.servicestests \
    "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Bug: 31008728
Merged-In: I8f82cdcc2b574778a7e0d0184270f305b69ee17b
Change-Id: I8f82cdcc2b574778a7e0d0184270f305b69ee17b
2017-05-04 19:46:47 +01:00
Yang Ni
622b140f94 Merge "Destroy Allocation with ScriptIntrinsicLut" 2017-05-04 18:44:29 +00:00
Yang Ni
8b8f75a700 Destroy Allocation with ScriptIntrinsicLut
Bug: 28053584

On destroying the intrinsic, destroy its contained Allocation right away.

Test: CTS on x86_64 emulator
Change-Id: I5ca0da33b620c3291b7cafda31a6cc83eb7461a0
2017-05-04 18:44:17 +00:00
Treehugger Robot
19cd7568c6 Merge "Moved data retry handler from broadcast to message." 2017-05-04 18:04:31 +00:00
Jack Yu
ba740f0035 Moved data retry handler from broadcast to message.
The broadcast handler onReceive implmentations should
only handle minimum works. Made this consistent with
other DcTracker broadcast handler.

Test: Manual tests, Telephony sanity tests, and unit tests
bug: 37413302
Merged-In: I4c65b2f7b8aa5674eb7e131d26e404ec390ed19a
Change-Id: I4c65b2f7b8aa5674eb7e131d26e404ec390ed19a
2017-05-04 09:52:17 -07:00
Treehugger Robot
c301339498 Merge "More time zone update API classes" 2017-05-04 14:41:10 +00:00
Neil Fuller
cfe0c2f1ec Merge "Time zone update API classes" 2017-05-04 13:51:39 +00:00
Neil Fuller
a8889fa7fa More time zone update API classes
This class forms the contract between the updater app
(the app provided by and triggered by the system)
and the data app (the app provided by the OEM to
provide time zone data).

Bug: 31008728
Test: make only, just constants
Change-Id: I687b75954e132884aec962fcf8955f3f38a00b2f
2017-05-04 14:11:09 +01:00
Neil Fuller
bede17c216 Time zone update API classes
Time zone update API classes. Currently hidden but they
will go on to be unhidden in future.

This forms the basis of client and system server code to
support time zone updates.

Tests can be run with:

make -j30 FrameworksCoreTests
adb install out/target/product/angler/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -e package android.app.timezone \
    -w com.android.frameworks.coretests \
    "com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner"

Bug: 31008728
Test: See above.
Merged-In: I668bc8ac0cb78f3d4d9a4b7ad6ac1534b88af833
Change-Id: Icde574f8974152617a1f7ac9fa225bd5011dcce1
2017-05-04 12:32:53 +01:00
Nicolas Geoffray
5669550a83 Merge "Adjust forced dexopt in case of stripped APKs." 2017-05-04 11:25:04 +00:00
Nicolas Geoffray
96d12a93ae Adjust forced dexopt in case of stripped APKs.
We cannot compile from scratch for strip APK. So
if getDexOptNeeded returns NotNeeded, pretend there was
a compiler filter change, in order to pick up the vdex file.

bug: 37558732
Test: "adb shell cmd package compile" of a stripped /system apk
Change-Id: I531010e01e44adfa300872c1739c49dab7292317
2017-05-04 10:02:56 +01:00
Treehugger Robot
36247646e3 Merge "fix KeyEvent can't correctly finish when inputmethod time out happend" 2017-05-04 03:37:37 +00:00
gaoshang
d66a86bf50 fix KeyEvent can't correctly finish when inputmethod time out happend
Symptom: If inputmethod handle an KeyEvent time out ,
Did not finish this event correctly , eventually lead to app ANR
Root Cause: without seq number when obtainMessage MSG_TIMEOUT_INPUT_EVENT
Solution: add seq parameter

Test: Input
Test: InputMethod

Fixes: 37648930
Change-Id: I3a2b964b34aa57267bd777305200a2bfdc66f65c
Merged-In: I3a2b964b34aa57267bd777305200a2bfdc66f65c
Signed-off-by: gaoshang <gaoshang@xiaomi.com>
2017-05-04 02:19:42 +00:00
Treehugger Robot
7485f047ba Merge "Bluetooth: OBEX: Don't close transport when obex is disconnected" 2017-05-03 19:38:56 +00:00
Hemant Gupta
850758fb63 Bluetooth: OBEX: Don't close transport when obex is disconnected
Precondition: PTS 7.0

Usecase:
Execute test case TC_TG_CA_BI_02_C for AVRCP 1.6

Expectation:
Test case should pass

Observation:
Test case fails

Root cause:
Disconnection of OBEX from PTS leads to disconnection of transport
(initiated by DUT) leading to test case failure. Obex server was
unnecessary assuming that transport would be disconnected so was
informing registered users that transport has been disconnected,
which was leading to issues on new obex connect on same transport
channel from remote obex client

Fix:
Remove check to break out of loop after obex disconnection, as that is
already handled in case when read would return -1 in case transport
is closed.

Test: TC_TG_CA_BI_02_C can be passed after the patch.

Bug: 35590000
Change-Id: Ic1682ce77c07cf2e43da09dc95fff2214338f758
2017-05-03 19:37:18 +00:00
Tianjie Xu
2db2f6d265 Merge "Add error/cause code reporting for Non A/B OTA failures" 2017-05-03 17:34:29 +00:00
Nicolas Geoffray
d093b203f5 Handle safe mode in PackageManager.
PackageManager side of the change.

bug:37929796
Test: manual OTA with a safemode app.
Change-Id: I98c8200d4330dc88fec7eb8ffeb27717a22a220b
2017-05-03 13:54:32 +01:00
Tianjie Xu
223edeb272 Add error/cause code reporting for Non A/B OTA failures
Read and report the error_code & cause_code from last_install.

Bug: 36866437
Test: mma & observe the sysui event in logcat -b events
Change-Id: I5357861fc758e14ed3235bfc8cc76d7561ccea58
2017-05-02 23:02:11 -07:00
Adrian Roos
ed112e3c11 Merge "StatusBar: Catch OOM caused by third-party icons" 2017-05-02 21:00:42 +00:00
Tyler Gunn
34e0a257d5 Merge "Change MANAGE_OWN_CALLS permission to be a "normal" permission." 2017-05-02 20:36:38 +00:00
Adrian Roos
edca4f5320 StatusBar: Catch OOM caused by third-party icons
Bug: 31825355
Change-Id: I3e2a8c3da43a572a026ea0bbe1d39234035a4801
Merged-In: I3e2a8c3da43a572a026ea0bbe1d39234035a4801
2017-05-02 11:48:35 -07:00
Yi Kong
e74483074e Merge "SymbolComparator operator() is missing const" 2017-05-02 18:15:04 +00:00
Tyler Gunn
47145a0755 Change MANAGE_OWN_CALLS permission to be a "normal" permission.
Also remove from Phone group since this isn't really related to phone
calls as much as interacting with Telecom APIs.

Test: Manual
Bug: 37722558
Merged-In: Ia972db4bd79a34bc9b9d3896910adc205c286367
Change-Id: Icc4d2170cc7c83f653eeb0438938f7c0c91a0a7c
2017-05-02 10:46:37 -07:00
Treehugger Robot
e6ad7a6704 Merge "Force a light to be set for the first time" 2017-05-02 12:42:14 +00:00
Narayan Kamath
194f8471fd Merge "Track libcore change 03e8c7dca78a95ccf719a7." 2017-05-02 10:06:49 +00:00
Treehugger Robot
3e21b1745c Merge "NsdManager: add test coverage for discoverServices()" 2017-05-02 08:44:29 +00:00
Oleksiy Avramchenko
4f4939fb04 Force a light to be set for the first time
The check in LightImpl::setLightLocked skips HAL call if light
parameters aren't changed. During initialization these parameters
are zeroed, thus it's not possible to turn the light off at the
startup.

As an example this fixes the issue with "stuck" battery light
in the following scenario:
1. Device has secure start-up option set (either pin or pattern).
2. Charger is connected at the startup and battery light shows the
   charging state on pin or pattern prompt.
3. Device is unlocked and charger disconnected after some time,
   e.g. after com.android.server.lights.LightsService restarted.
4. The battery light is not off and stuck in the previous state
   until charger is connected / disconnected again.

Bug: 37662368
Test: manual - follow the above step-by-step
Change-Id: I45470e945fe4d26d37a5641dfff3311968f51ee4
2017-05-02 08:12:01 +00:00
Treehugger Robot
b0e408450c Merge "NsdManager: unit test coverage for servive registration" 2017-05-02 06:27:10 +00:00
Hugo Benichi
93f4591684 NsdManager: add test coverage for discoverServices()
Test: added new tests
Bug: 37013369, 33298084
Change-Id: If6c1113ee1bd4690db90abd5a61c3e229c827aec
2017-05-02 15:26:33 +09:00
Hugo Benichi
8c5eeb0afc NsdManager: unit test coverage for servive registration
This patch adds test coverage for NsdManager#registerService() and
NsdManager#unregisterService(). This test shows a potential defect in
the api: if unregisterService() fails, the associated listener is always
unregistered from NsdManager. If the service initially registered is
still registered, this potentially make it impossible to unregister.

Test: added new unit test
Bug: 37013369, 33298084
Change-Id: Ia089b6d2f2a349907a8b29d9a3acd7f59e177887
2017-05-02 13:31:24 +09:00
Yi Kong
c00af4c533 Merge "Remove no-op std::max call" 2017-05-01 18:29:25 +00:00
Yi Kong
b1d8144ef0 SymbolComparator operator() is missing const
Clean up, no functionality change.

Test: build
Bug: 37752547
Change-Id: I7b6f368c0d0776f956a8b99353df7b23cbbc388d
2017-05-01 10:57:39 -07:00
Yi Kong
06a2d2bf23 Remove no-op std::max call
This was calling std::max on an unsigned integer and 0, which is
essentially no-op. Remove this code.

Test: Build
Bug: 37752547
Change-Id: I74ce45b95960621dff11f574fbe1af60ad147cf0
2017-04-30 23:54:08 -07:00
Erik Kline
169681db26 Merge "Use ConnectivityService's NETWORK_STACK permission for SoftAp operations" 2017-04-29 07:33:35 +00:00
Erik Kline
256be78f7d Use ConnectivityService's NETWORK_STACK permission for SoftAp operations
Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 37647880
Bug: 37750597
Change-Id: I4fb603b7491013bc13b0c08a785eae6cd37337b9
2017-04-29 15:02:42 +09:00
Treehugger Robot
4f8a375958 Merge "Add android.os.VintfRuntimeInfo" 2017-04-29 03:00:08 +00:00
Yifan Hong
1bda67369c Add android.os.VintfRuntimeInfo
This is the Java API for ::android::vintf::RuntimeInfo.
This will be used by CTS for device info report purposes.

Bug: 28656227
Test: cts-tradefed run cts -m CtsEdiHostTestCases --skip-preconditions
Change-Id: Id87c95a17e77d7ec1794a6f850de97edf9ae892d
2017-04-28 17:10:28 -07:00
Andreas Gampe
f62e38583a Merge "Aapt2: Fix png leak" 2017-04-28 22:45:26 +00:00
Hall Liu
99b21ccb34 Merge "eMBMS API update" 2017-04-28 22:17:54 +00:00
Jakub Pawlowski
cf95973276 Merge "Bluetooth: bluetooth.le API fixes" 2017-04-28 21:36:11 +00:00
Jakub Pawlowski
9d4abb5631 Bluetooth: bluetooth.le API fixes
Fix minor spelling problems.
Throw IllegalStateException instead of IllegalArgumentException in
build().

Bug: 37532634
Test: none
Change-Id: I73b6f04aec98f5baffb06a363e2a3f71e8cec3c4
2017-04-28 21:35:53 +00:00
Andreas Gampe
3bf6389120 Aapt2: Fix png leak
do9Patch is leaking two rows of data.

Bug: 37782695
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: Ibd2198919cd9c24f2de9f50b23c87753f2190708
2017-04-28 13:51:39 -07:00
Tomasz Wasilczyk
30a34ec0e2 Merge "Fix equality method implementation in BandConfig class." 2017-04-28 20:09:04 +00:00
Treehugger Robot
fd810d8727 Merge "better defualt behaviour for msim" 2017-04-28 19:44:51 +00:00
Tyler Gunn
78d3f9e1f5 Merge "Add sort order extra for phoneaccount" 2017-04-28 17:58:45 +00:00
Srikanth Chintala
212102b36d Add sort order extra for phoneaccount
Add sort order extra for phoneaccount
which will be used while sorting
phone accounts in Telecomm

Test: Manual
Bug: 34872161
Merged-In: I268d2250cc9bcd1a5e9eb8be99dcb23e2bcceadc
Change-Id: I268d2250cc9bcd1a5e9eb8be99dcb23e2bcceadc
2017-04-28 17:52:08 +00:00