summaryrefslogtreecommitdiffstats
path: root/core/res/res/raw/color_fade_frag.frag
diff options
context:
space:
mode:
authorFil Bergamo <fil.bergamo@riseup.net>2017-08-04 22:44:51 +0000
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-12-25 17:07:37 +0100
commit3192d861cbbefd6a8ddbe6210fd3fd81155e3d25 (patch)
tree4a5e7db7658faf93f5985e5cba6144ce803db263 /core/res/res/raw/color_fade_frag.frag
parentf06232e40881e7bf50c3e6dbe9e69f369eea95e4 (diff)
downloadframeworks_base-replicant-6.0.tar.gz
frameworks_base-replicant-6.0.tar.bz2
frameworks_base-replicant-6.0.zip
When a WiFi connection is established using an external dongle via the RepWifi app, although it's perfectly working, the framework still presents the WiFi connection as disabled or disconnected to the user-space apps. This misleads apps that rely on this mechanism, so that they prevent the user from doing network-related tasks. This patch solves the issue by modifying getActiveNetworkInfo() method in ConnectivityService.java, adding a basic mechanism to check if the WiFi interface is connected. java.net.NetworkInterface.getByName() is used to look for either "wlan0" (RepWifi) or "rndis0"(Tethering). If any one of the two interfaces is present, getInetAddresses() is called on it, to see if it has any IP address. If the interface has an IP address in the "local" range (e.g. 192.168.x.x), then it is considered to be connected. So an instance of android.net.NetworkInfo is created, and its state is set as "Connected". Finally, that instance gets returned to the caller. The result should be so that user-space apps are now able to "see" the internet connection made via RepWifi or via reverse tethering. Signed-off-by: Fil Bergamo <fil.bergamo@riseup.net> Reviewed-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'core/res/res/raw/color_fade_frag.frag')
0 files changed, 0 insertions, 0 deletions