332750 Commits

Author SHA1 Message Date
Adam Lesinski
a15992086c Merge "idmap: include idmap version in check for stale file"
am: 609887a980

Change-Id: I4779cd92041fe33a95c0034c539c48989ca8e6df
2017-09-06 20:36:28 +00:00
Mårten Kongstad
4f4218a3be Merge "idmap: suppress print for padded resources"
am: 3949701c6f

Change-Id: I5d92bdc11172159ea8ad95614e2b4d4535a48e45
2017-09-06 20:04:35 +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
044ddc2352 Merge "Fix intermittent build failures with droiddoc generated sources"
am: a11709b185

Change-Id: I7c6c2dc0fcb50387df07760e913f8f6841bc02bc
2017-09-06 18:47:58 +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 85ab406eb2abd2e98fa9a67384223592692c08a9)
2017-09-06 09:52:43 -07:00
Jiyong Park
576305e29c Merge "Separate GraphicsEnv from libui"
am: fb5369bc3f

Change-Id: I7d1fbc70ef0b4273390ce15ae0b36553ef08220d
2017-09-06 16:03:32 +00:00
Treehugger Robot
fb5369bc3f Merge "Separate GraphicsEnv from libui" 2017-09-06 15:53:00 +00:00
Kensuke Matsui
10379e1f17 Merge "Fix NPE in StatusBar#onBackPressed()"
am: 6cfa7f2fee

Change-Id: Ic29857e67231ff109535adf18882b869d7ce6af1
2017-09-06 15:17:05 +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
Jack He
a672ffa42f Merge "Bluetooth: Thread-safe binder invocation"
am: 94f1fd0da2

Change-Id: I8f9c76996f02c70b8d2ea21d4eb567eaa9da246a
2017-09-06 00:30:09 +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
Vinay Kalia
04d061e891 Merge "Update documentation for startScan"
am: 7d2219d170

Change-Id: I5ea7a5a9b0a69168a1715986e4850276299af78a
2017-09-06 00:08:24 +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
Yifan Hong
56d8c8297d Merge "Fix ownership of objects returned by VintfObject::Get*"
am: 2cdd1ce600

Change-Id: I770ff369d16000d7f1eed8a4472e57cbc9b1b99c
2017-09-05 21:53:40 +00:00
Yifan Hong
2cdd1ce600 Merge "Fix ownership of objects returned by VintfObject::Get*" 2017-09-05 21:45:13 +00:00
Vinay Kalia
875d27e45e Update documentation for startScan
With change c4a1e1, unfiltered BLE scans are stopped on screen off
and resumed when screen is turned back on. This is done to save power.
This change updates the documentation accordingly.

BUG: 62264269
Test: Documentation update.
Change-Id: I2d8e9f9f122f978c4d4f59d4139cb51cd4e4a123
2017-09-05 11:52:35 -07:00
Hugo Benichi
07f66ed517 Merge "ConnectivityService: improve wakelock logging"
am: d8f298365a

Change-Id: I85f8b34008416c920f85e1e5d923dd324dd89e5e
2017-09-05 14:01:20 +00:00
Treehugger Robot
d8f298365a Merge "ConnectivityService: improve wakelock logging" 2017-09-05 13:46:53 +00:00
Hugo Benichi
c3318aa3dd ConnectivityService: improve wakelock logging
This patch adds the following wakelock related counters to connectivity
service dumps included in bug reports:
 - total number of wakelok acquisitions and releases
 - total cumulative wakelock duration
 - longest time the lock was held

Bug: 65085354
Test: runtest frameworks-net, also manually dumped connectivity service
      and check new logging

Merged-In: I8f67750c2eea73abf3d44f7f6df484427a8ea3f9
Merged-In: I93c0eb7c8add966378647400e11e33765d952345
Merged-In: Iabe99993001e069b8a8077533bca1fa7fb2f59ba

(cherry picked from commit 26bcfa19d01758c86a8f43a5b39673cd5866d2f3)

Change-Id: I4d6bb43110916b440819813b478523546ac5570e
2017-09-05 21:34:03 +09:00
Hugo Benichi
a1af47b6ad Merge "Nat464Xlat: correct racefree teardown"
am: e6793f2795

Change-Id: I8612db5e5050690db8cf41dd04944b4c22da340c
2017-09-05 12:30:08 +00:00
Hugo Benichi
e6793f2795 Merge "Nat464Xlat: correct racefree teardown" 2017-09-05 12:12:02 +00:00
Lorenzo Colitti
6c05f1a03d Merge "Switch tethering stats from the unix socket to binder."
am: cbe8f09817

Change-Id: If1c8db9447cd066c9800b68c8255ee248125b536
2017-09-05 09:26:26 +00:00
Treehugger Robot
cbe8f09817 Merge "Switch tethering stats from the unix socket to binder." 2017-09-05 09:17:46 +00:00
Hugo Benichi
ef502887ec Nat464Xlat: correct racefree teardown
This patch relays the NetworkBaseObserver notifications about nat
464xlat stacked interfaces onto the ConnectivityService handler.

This allows to process interface up and down notifications in the
same thread context and eliminates several races:

  - NPE risk due to race between fixupLinkProperties called on
    ConnectivityService thread and interfaceRemoved called on
    NetworkManagementService thread.
  - stale LinkProperties pointer reads in both NetworkBaseObserver
    callbacks not called on ConnectivityService handler.
  - removes the race between stop() and interfaceRemoved().
  - removes superfluous LinkProperties notifications when stop() is
    called before the stacked interface goes up.

The teardown procedure logic common to stop() and interfaceRemoved() is
put into enterStoppedState() and enterIdleState().

This allows to distinguish and correctly handle the following teardown
scenarios:
 - an IPv4 appears -> ConnectivityService calls Nat464Xlat#stop()
                   -> Nat464Xlat calls stopClatd
                   -> clatd stops
                   -> if the stacked interface was up, it is removed
                   -> Nat464Xlat#interfaceRemoved() is triggered and
                      a LinkProperties update is sent.

 - network disconnects -> ConnectivityService calls Nat464Xlat#stop()
                       -> Nat464Xlat calls stopClatd
                       -> clatd stops
                       -> if the stacked interface was up, it is removed
                       -> Nat464Xlat#interfaceRemoved() is triggered and
                          a LinkProperties update is sent.

 - clatd crashes or exit -> Nat464Xlat#interfaceRemoved() is triggered
                         -> Nat464Xlat unregisters itself as a network
                            observer
                         -> ConnectivityService is updated about the
                            stacked interface missing, and restarts
                            Nat464Xlat if needed.

Note that the first two scenarios have two cases: stop() can be called
before the notification for the stacked interface going up (STARTED), or
after (RUNNING). In the first case, Nat464Xlat must unregister
immediately as a network observer to avoid leaks.

This patch also:
  - removes/simplifies comments related to the threading model which
    are no obsolete.
  - extract clatd management logic from ConnectivityService into
    NetworkAgentInfo
  - add new unit tests where there was none before.

Bug: 62918393
Bug: 62997041
Bug: 64571917
Bug: 65225023
Test: runtest frameworks-net
Change-Id: I27221a8a60fd9760b567ed322cc79228df877e56
2017-09-05 15:33:55 +09:00
Lorenzo Colitti
563dc45581 Switch tethering stats from the unix socket to binder.
Bug: 32163131
Bug: 64995262
Test: builds
Change-Id: I673d76a8b0981302b5f6a14e97999cd7676d83ed
2017-09-05 10:52:47 +09:00
Erik Kline
6a718fc858 Merge "Refactor interface IP code into InterfaceController"
am: 9465abf8af

Change-Id: I2e5245a4c765eaf6ab81b06b3b7081743951c259
2017-09-05 01:33:06 +00:00
Treehugger Robot
9465abf8af Merge "Refactor interface IP code into InterfaceController" 2017-09-05 01:14:17 +00:00
Hugo Benichi
80e0daa870 Merge "Network Service Discovery test: properly release resources"
am: c9d24d203d

Change-Id: If34b3770a5c0fef65d124201e0ca1374cc6b1eca
2017-09-04 12:14:11 +00:00
Hugo Benichi
c9d24d203d Merge "Network Service Discovery test: properly release resources" 2017-09-04 11:50:58 +00:00
Mårten Kongstad
42ebcb80b5 idmap: include idmap version in check for stale file
Teach is_idmap_stale_fd to include the idmap version in the list of
criteria used to determine if an idmap file is already up to date.

Change-Id: I3e4e2aa502fe76a034c3977bdb055a1df7e665be
2017-09-04 13:16:16 +02:00
Mårten Kongstad
ea2a1b9b27 idmap: suppress print for padded resources
Bug: 31052947
Test: manual
Change-Id: I13723bf8b1cdeecfd71750123eb1f949f96b7c3e
2017-09-04 13:16:16 +02:00
Hugo Benichi
72a20c3959 Merge "Fix some broken tests in frameworks-net with native dependencies"
am: 1fd2eb6276

Change-Id: I628ee4ac71a762c02f9fe0440db08125693efd3c
2017-09-04 05:13:43 +00:00
Treehugger Robot
1fd2eb6276 Merge "Fix some broken tests in frameworks-net with native dependencies" 2017-09-04 04:58:16 +00:00
Hugo Benichi
8887059b00 Merge "DO NOT MERGE: Fix ApfTest"
am: 05f0bfe33e  -s ours

Change-Id: If9eb248254cafc6ec4ce10fb5a402282b7e3512c
2017-09-04 03:57:37 +00:00
Treehugger Robot
05f0bfe33e Merge "DO NOT MERGE: Fix ApfTest" 2017-09-04 03:39:59 +00:00
Erik Kline
3204e5fc63 Merge "Record even more stats even more often"
am: 72a708d623

Change-Id: I6a662cce3cf5394d392f7ff816f5eb6a71131484
2017-09-04 02:25:48 +00:00
Treehugger Robot
72a708d623 Merge "Record even more stats even more often" 2017-09-04 02:11:47 +00:00
Hugo Benichi
cd9b716153 Fix some broken tests in frameworks-net with native dependencies
Exempt-From-Owner-Approval: Android.mk uses per-file permission to let
the build team modify it without dependeing on us. However because this
rule overrides the directory default owners, Android core networking is
not owner anymore. This exemption is necessary to let Android core
networking team fix their build file.

Test: All tests in runtest frameworks-net pass.
Merged-In: Ie0b8baa38ca39e92fbd698ebcead86dac0a67708

(cherry picked from commit 99e8ab6e46eec5dbd1b059b3732672d537b3cf34)

Change-Id: I4471a5cd7f20852645f3d94684cc5aeef3324162
2017-09-04 11:03:55 +09:00
Hugo Benichi
10c913331e DO NOT MERGE: Fix ApfTest
libutils is now depending on libvndksupport. So any client that
statically links to libutils needs to link against libvndksupport as
well.

Bug: 32561414
Test: ApfTest works
Merged-In: Id99792baa1c0a7a61c4056f83f33d25e0bea143e

(cherry picked from commit 9a2041ee836be925e93dd820f11686aa378dd92d)

Change-Id: I8808e668230ff7076403ff29cf48c12cbc36f78a
2017-09-04 11:03:47 +09:00
Erik Kline
aabdaa9710 Record even more stats even more often
Like kale, one can never have enough stats.  =)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Merged-In: I5d40eae488cab685be6a44849181c0286fe28fdb
Merged-In: I759e97f9a72d15a84036c3a56451b872143539c6
Change-Id: Ieb47c3beed50f21c2c858fe57438afd48cfdc662
(cherry picked from commit 1199a352fcb938a8dc7a34a2853c4fde7f5656f1)
2017-09-04 09:37:12 +09:00
Erik Kline
d3c0b5ed6f Refactor interface IP code into InterfaceController
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
      (except for UidRange and APF tests that are missing libvndk)
    - regular WiFi STA mode attach works for IPv4-only, dualstack,
      and IPv6-only networks
    - tethering works with dualstack upstream and downstream
Bug: 62476366

Change-Id: Id807b3091b0b2935b01aeb3644245034312b4183
2017-09-03 21:57:08 +09:00
Hugo Benichi
e062ae07f9 Network Service Discovery test: properly release resources
Bug: 32561414
Bug: 62918393
Bug: 62044295
Test: runtest frameworks-net
Change-Id: If23993b5e391947ecbdc01677f0a643144794b2b
2017-09-02 14:54:29 +09:00
Brad Ebinger
7b01ee5cda Merge "Adds ERROR state to ImsConfig"
am: 6391598412

Change-Id: I612aae570b12b1106f515d32bd8caa3843a3953e
2017-09-01 21:37:49 +00:00
Brad Ebinger
434ccc8700 Merge "Remove PIN/PUK keyguard when SIM is removed/ready"
am: 43f9f0290c

Change-Id: I9e28e3975331a7af11747065761632a0566deb56
2017-09-01 21:31:19 +00:00
Hansong Zhang
3f49d1dcef Merge "Fixed default values for Bluetooth energy calculations"
am: 7c45962abd

Change-Id: I44390a58e2328a4bee47d6454492c76184f7098d
2017-09-01 21:15:27 +00:00