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)
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
* 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
GraphicsEnv class is separated from libui and became a standalone lib
'libgraphicsenv'.
Bug: 38097618
Test: sailfish builds and boots
Change-Id: I7a5c273ba9238c3a6c90e1de80b9e97fc0772188
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
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
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
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
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
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
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)
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