Commit Graph

322951 Commits

Author SHA1 Message Date
Adam Lesinski
fa6058118e AAPT2: Fix processing of quotes in XML
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
2017-09-11 13:05:38 -07:00
Sanket Padawe
a90205492f Merge "Deprecate TelephonyManager APIs which are present in TelecomManager." 2017-09-11 03:31:18 +00:00
Treehugger Robot
e77be9c610 Merge "tests: remove LOCAL_CLANG" 2017-09-10 17:31:20 +00:00
Lennart Wieboldt
9eb1bc05ac tests: remove LOCAL_CLANG
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I9bfe0668eddf51dd56174fefc650a11002d38196
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-09-10 11:54:23 +02:00
Treehugger Robot
30798ad13a Merge changes I93cf24d4,I32e438ef
* changes:
  Convert host tools to Android.bp
  Rename aapt_defaults to aapt2_defaults
2017-09-10 01:29:21 +00:00
Treehugger Robot
5a1e85eb71 Merge "Convert libhidcommand_jni to Android.bp" 2017-09-10 01:18:28 +00:00
Treehugger Robot
d928842ab6 Merge "Convert incident_report and incident-section-gen to Android.bp" 2017-09-09 22:00:33 +00:00
Dan Willemsen
760d57a888 Convert incident_report and incident-section-gen to Android.bp
See build/soong/README.md for more information.

Test: m incident_report incident-section-gen
Test: mmma frameworks/base
Change-Id: If1a930b40196139d29e63f6558bc4a75faca1967
Merged-In: If1a930b40196139d29e63f6558bc4a75faca1967
2017-09-09 19:24:33 +00:00
Dan Willemsen
392d4e7f47 Convert libhidcommand_jni to Android.bp
See build/soong/README.md for more information.

Test: m libhidcommand_jni
Change-Id: Ica144979a2f89e0a9ed8eb4a816024aa318043e6
Merged-In: Ica144979a2f89e0a9ed8eb4a816024aa318043e6
2017-09-09 19:24:21 +00:00
Dan Willemsen
ec462238f6 Merge changes Ia3bcece1,Icd26dc1e
* changes:
  Don't compile libaapt with the build number
  aapt: Always use our libz
2017-09-09 19:21:16 +00:00
Dan Willemsen
d3eac266b0 Convert host tools to Android.bp
See build/soong/README.md for more information.

Test: m libinstrumentation interrupter accessorychat accessorytest bit obbtool pbkdf2gen libsplit-select_tests split-select protoc-gen-javastream validatekeymaps libaapt_tests aapt
Test: mmma frameworks/base
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: I93cf24d4b232353a52d53be8ed85781b8f4a3877
2017-09-09 06:18:48 +00:00
Dan Willemsen
1cb5ab2dc1 Rename aapt_defaults to aapt2_defaults
So that tools/aapt/Android.bp can have aapt_defaults.

Test: m aapt2
Change-Id: I32e438efb3516d73b347e67297aa09bee91520b1
Merged-In: I32e438efb3516d73b347e67297aa09bee91520b1
2017-09-09 06:17:24 +00:00
Dan Willemsen
896f01879b Don't compile libaapt with the build number
Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.

Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.

Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c
2017-09-08 22:58:56 -07:00
Dan Willemsen
85aee73e98 aapt: Always use our libz
Instead of using the system libz (-lz), include our copy as a static
library. This is safer in case the system version isn't compatible.

Also removes references to -ldl -lrt -lpthread, which are now implied.

Test: m -j
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: Icd26dc1e0d011e5b5f158e562640533c5ac34e33
2017-09-08 22:44:19 -07:00
Vinay Kalia
8157ab2a0e Merge "Update ScanSettings documentation for scan modes" 2017-09-08 19:50:36 +00:00
Treehugger Robot
4e1034cc53 Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check" 2017-09-08 19:26:37 +00:00
Elliott Hughes
b8877a981a Merge "support chinese character for ota package's path" 2017-09-08 18:07:01 +00:00
Treehugger Robot
bceee1cbb4 Merge "Avoid race condition during grayscale animation of QS tile" 2017-09-08 14:38:31 +00:00
Sanket Padawe
5aac2e91db Deprecate TelephonyManager APIs which are present in TelecomManager.
Bug: 62346128
Test: Build
Change-Id: I4c3b4652f5d22215572d64b764bcd42bb7295ebe
Merged-in: I4c3b4652f5d22215572d64b764bcd42bb7295ebe
2017-09-08 05:46:13 -07:00
Treehugger Robot
8c3e12a904 Merge "Shorten the log in the netpolicy dump." 2017-09-08 08:33:58 +00:00
Sudheer Shanka
e5397db388 Shorten the log in the netpolicy dump.
Bug: 65439160
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Merged-In: I105326e733f2498e68b0552b45fec1ed0e8e3179

(cherry picked from commit db9aaf0322)

Change-Id: Ia1fa5476db4eee4cf39e438ec6aa456c60332c5c
2017-09-08 16:19:00 +09:00
Hugo Benichi
be1e405cc7 Merge "NetworkStats: more robust subtraction for deltas" 2017-09-08 07:13:37 +00:00
xutianguo
22bbb819f2 CachedBluetoothDevice: Simplify ProfleConnectionState check
Check whether ProfileConnectionState is empty instead of checking
whether it is null.

BUG: N/A

Change-Id: I553e7b8b0c1b3ae967dcc0ecd482b7ff19f3c1f6
Signed-off-by: xutianguo <xutianguo@xiaomi.com>
2017-09-08 05:58:36 +00:00
Hugo Benichi
faf8348ad3 NetworkStats: more robust subtraction for deltas
This patch ensures that subtract() between two NetworkStats object will
return a delta with no negative entries in all cases.

When the stats delta contains some negative values, there are clamped to
0. Some logging is added when this happens.

This is what's expected by NetworkStatsHistory#recordData().

Bug: 64365917
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I16e97e73f600225f80e0ce517e80c07c6f399196
Merged-In: I2ac0bc3914cb65ae8ee27921856d698dc59624b2
Merged-In: I67d5dc4b52b254748ff17fe1e16c2eeb1d03c30d
Merged-In: Ib488fb034f72c92f19916490981342a3ef2eb33b

(cherry picked from commit ad5e2827ea)

Change-Id: Ic86b65a65a2517c871221f8784088ec1de18f534
2017-09-08 13:39:44 +09:00
Treehugger Robot
6c7c55206d Merge "Support NAT keepalives" 2017-09-08 04:13:14 +00:00
Erik Kline
fc105bb6d8 Support NAT keepalives
Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - turned on debugging and walked around watching IpReachabilityMonitor
      force neighbors into NUD_PROBE state without error
    - observed NAT callbacks happening without any reported errors
    - watched:
        adb shell cat /proc/net/nf_conntrack | egrep '192[.]168[.]43[.]' | sort -n -k5
      for correct timeout updates

Bug: 29337859
Bug: 32163131

Merged-In: I82ac60e5ad79ec64a13df6ec56b5b51b223f8dde
Merged-In: I09bc685e821ec5e871576a54c4290edea4c5160b
Merged-In: I4d180369a8f64ee494b016656988252d98a09ba4
Change-Id: Icb23da64cfaa3a19f7bc75fba426a52b0994fb0f
(cherry picked from commit 7a65bc62fb)
2017-09-08 10:54:20 +09:00
Hugo Benichi
9c57accc45 Merge changes Ic92b6d5c,I98b23b22,I0fb40d7b
* changes:
  IP metrics: update link layer mapping
  IP connectivity metrics: fix tests after proto update
  Connectivity metrics: update ipconnectivity.proto
2017-09-08 01:25:30 +00:00
Chen Xu
0ec2348b85 Merge "Fix Crash CarrierDefaultApp due to exception" 2017-09-07 20:59:03 +00:00
Chen Xu
88307143e0 Merge "fix cellular captive portal reevaluation url" 2017-09-07 20:46:50 +00:00
fionaxu
a4434f86a0 fix cellular captive portal reevaluation url
we apply redirection link as the url everywhere for cellular captive portal.
this url should only be used when load the portal page at the first place (when users
click on the notification) and shouldn't be used as the re-evaluation url
as it wont return the expected response code.
instead we should use special URL (generate_204) from connectivity
service which will return 204 if redirection is gone.

Test: manual test with cold and hot TMO SIM
Bug: 62532802
Change-Id: I56bb03a58447c5c46758e692ff357d540ea4cd7b
2017-09-07 18:49:55 +00:00
Hugo Benichi
27a5117f1f IP metrics: update link layer mapping
Properly map transport nan and lowpan to their corresponding link layer
enum. Also do so for interface names

Bug: 34901696
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I44a1cb3b6d21881b64adda7744360e4dfc519b12

(cherry picked from commit f7f7ed013c)

Change-Id: Ic92b6d5c07404ea79f9a8975e8fc6925eaa10ba4
2017-09-07 22:17:29 +09:00
Hugo Benichi
4eccf78000 IP connectivity metrics: fix tests after proto update
Update to ipconnectivity.proto in commit
6d2f506bfd broke the associated unit
tests (Change-Id: I4cf5b95956df721aecd63fddfb026a7266c190b9)

Bug: 34901696
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I57a6bad8a9836b1c45690c4589b416786ce1dfa0

(cherry picked from commit 822c5bf778)

Change-Id: I98b23b2208bbd7d12237fcb000f3cf10c53d9e55
2017-09-07 22:17:18 +09:00
Hugo Benichi
6022f7b657 Connectivity metrics: update ipconnectivity.proto
Bug: 34901696
Bug: 65439160
Test: $runtest frameworks-net
      build, flashed, booted phone, $ adb shell dumpsys connmetrics list

Merged-In: I4cf5b95956df721aecd63fddfb026a7266c190b9

(cherry picked from commit 6d2f506bfd)

Change-Id: I0fb40d7b644786efc839468b2d7e1cfcedd71ad8
2017-09-07 22:17:10 +09:00
Rubin Xu
981228be38 Merge "Always add local subnet routes to the interface's routing table" 2017-09-07 12:12:09 +00:00
Kensuke Matsui
5a58cf92b7 Avoid race condition during grayscale animation of QS tile
DrawableIcon returns the same instance of its Drawable
for both getDrawable() and getInvisibleDrawable().
This could cause a race condition during grayscale animation
of a QS tile which uses the same icon for both ON and OFF state.

Clone the original Drawable and use it for invisible drawable
to solve this.

Fixes: 65437135
Test: manual - put a custom tile at the first position of QS panel
               and tap it

Change-Id: Ie74edd9c5e58118a70b5abd8096cdd1297940ef5
2017-09-07 10:43:00 +00:00
Rubin Xu
1bb5c0818f Always add local subnet routes to the interface's routing table
For some networks such as mobile data connections, its LinkProperties
does not contain routes for the local subnet so no such route is added
to the interface's routing table. This can be problematic especially
if the device is in VPN lockdown mode where there exists high-priority
PROHIBIT routing rule which in turn blocks the network's default gateway
route from being added (next hop address hitting the prohibit rule).

We fix this by patching LinkProperties to always include direct connected routes
when they are received by ConnectivityService. This has the added advantage that
when apps get LinkProperties, they see the directly connected routes as well.

Bug: 63662962
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: Start with device with mobile data, set up ics-OpenVPN in always-on
      lockdown mode. Turn off mobile data then turn it back on, observe
      mobile data connectivity is restored and VPN successfully reconnects.
Change-Id: I35b614eebccfd22c4a5270f40256f9be1e25abfb
2017-09-07 10:50:20 +01:00
Qiongcheng Luo
fd11ce5faf Fix Crash CarrierDefaultApp due to exception
[Issue]
CarrierDefaultApp crashes due to null pointer exception.

[Cause of defect]
To call mUrl.toString() even if mUrl is null and mUrl is already
checked if it is null just before.

[How to fix]
Check the null status of mUrl when call its toString() method.

Bug: 65393337

Change-Id: I4b4b1f125aac7e30ca18be22d7adc358cab83b2f
2017-09-07 15:40:09 +09:00
Treehugger Robot
6c7ef2e8d7 Merge "disable carrier actions on redirection by default" 2017-09-06 23:53:48 +00:00
fionaxu
d9c7e1bd21 disable carrier actions on redirection by default
1. the assumption of "carrier will redirect users to their captive
    portal page when users dont have data plan" might not be true for all
    carriers. We have seem issues like carriers random redirect users when
    they still have balance left.
    2. turn this off by default and turn it on if the carrier is
    behaving correctly and agree with it.

Merged-in: I6bc2d8ba45958eaf09e09e3ea2e57c79e0ac461e
Bug: 65113738
Test: Manual
Change-Id: I60be2de3aa227298e60ea7eb9535bad8967b1fe3
2017-09-06 22:34:13 +00:00
Adam Lesinski
609887a980 Merge "idmap: include idmap version in check for stale file" 2017-09-06 19:44:26 +00:00
Treehugger Robot
3949701c6f Merge "idmap: suppress print for padded resources" 2017-09-06 19:41:01 +00:00
Colin Cross
a11709b185 Merge "Fix intermittent build failures with droiddoc generated sources" 2017-09-06 18:34:47 +00:00
Colin Cross
5781a25fb0 Fix intermittent build failures with droiddoc generated sources
Jack builds fail very rarely with missing droiddoc generated
source files.  This happens because jack builds have an extra
rule that does a quick check of the sources and touches a
jack.check.timestamp file.  The manual dependencies for the
generated sources didn't cover this case.  If the sources are
partially generated when the jack.check.timestamp rule runs,
the rule can see partial sources and fail.  The same problem
might also happen for javac builds after
https://android-review.googlesource.com/c/platform/build/+/404743
separated the source list generation rule out of the
$(full_classes_jar) rule.

Use LOCAL_ADDITIONAL_DEPENDENCIES instead, which covers these
cases and will be updated to cover future changes.

Bug: 65255877
Test: m -j ANDROID_COMPILE_WITH_JACK=true out/target/common/obj/JAVA_LIBRARIES/android.test.runner.stubs_intermediates/jack.check.timestamp
      make sure sources are generated

Change-Id: I4466b3128eb0bba6447c24abf921a6655a3d451f
Merged-In: I4466b3128eb0bba6447c24abf921a6655a3d451f
(cherry picked from commit 85ab406eb2)
2017-09-06 09:52:43 -07:00
Treehugger Robot
fb5369bc3f Merge "Separate GraphicsEnv from libui" 2017-09-06 15:53:00 +00:00
Treehugger Robot
6cfa7f2fee Merge "Fix NPE in StatusBar#onBackPressed()" 2017-09-06 15:10:18 +00:00
Kensuke Matsui
8dd4d35aa3 Fix NPE in StatusBar#onBackPressed()
StatusBar.mKeyguardUserSwitcher is instantiated
only if multi user function is enabled.
But mKeyguardUserSwitcher.hideIfNotSimple() is invoked
without null check in StatusBar#onBackPressed().
This causes NPE on multi user disabled devices.

Fixes: 65391930
Test: manual - tap Back key on lockscreen

Change-Id: I528823fa832ee5096d73dea660997fc276d86c5c
2017-09-06 06:29:11 +00:00
Treehugger Robot
94f1fd0da2 Merge "Bluetooth: Thread-safe binder invocation" 2017-09-06 00:10:55 +00:00
Jack He
16eeac356c Bluetooth: Thread-safe binder invocation
* Binder object may become null between null check and actual invocation
  if using a instance private variable assignable by service connection
  callbacks
* The solution to this problem without locking is to assign existing
  binder variable to a local final variable before the null check
* Any further invocation to a disconnected binder object will result in
  RemoteException that is caught by the try-catch block
* Read and write to volatile variable is always atomic and hence thread-safe
* Removed unnecessary synchronization in BluetoothAdapter constructor
* Private mConnection objects should be final
* Simplfied several return statements where booleans can be returned
  directly
* Removed unnecessary catches for NPE since there won't be any

Bug: 64724692
Test: make, pair and use devices, no functional change
Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
2017-09-06 00:09:47 +00:00
Treehugger Robot
7d2219d170 Merge "Update documentation for startScan" 2017-09-05 23:50:24 +00:00
Jiyong Park
f012107aaa Separate GraphicsEnv from libui
GraphicsEnv class is separated from libui and became a standalone lib
'libgraphicsenv'.

Bug: 38097618
Test: sailfish builds and boots
Change-Id: I7a5c273ba9238c3a6c90e1de80b9e97fc0772188
2017-09-05 16:49:31 -07:00