diff options
author | ripp <ripp@yandex-team.ru> | 2016-02-10 14:10:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-10 22:11:20 +0000 |
commit | 35f59b4376232b4685c2a2e922f00a3bce2fbfde (patch) | |
tree | 9e5619e50dcb605703a102272e93b7e2bbb4dd5e /net/android/network_library.cc | |
parent | 6683838897404ac79756f85f616487e278a4110a (diff) | |
download | chromium_src-35f59b4376232b4685c2a2e922f00a3bce2fbfde.zip chromium_src-35f59b4376232b4685c2a2e922f00a3bce2fbfde.tar.gz chromium_src-35f59b4376232b4685c2a2e922f00a3bce2fbfde.tar.bz2 |
On Android, move Wifi SSID extraction to a Java implementation
On some Android devices, the device will restart right
after the browser is launched. This is due to a kernel bug on
these devices when using the Linux GetWifiSSID implementation,
which causes a kernel panic and device restart.
To avoid this, a Java-based implementation is used for Android
devices, which avoids this. Examples of affected devices include:
HTC One S
Lenovo A820
Asus ZenFone 2
MediaPad 10 FHD
R=bengr@chromium.org,rch@chromium.org
BUG=555067
TEST=Take the problem device, install browser and start it, wait for
10 seconds. Make 10 experiments, cleaning data before each run.
Device should not reboot.
Review URL: https://codereview.chromium.org/1633733005
Cr-Commit-Position: refs/heads/master@{#374743}
Diffstat (limited to 'net/android/network_library.cc')
-rw-r--r-- | net/android/network_library.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/android/network_library.cc b/net/android/network_library.cc index eb2376e..6837ddc 100644 --- a/net/android/network_library.cc +++ b/net/android/network_library.cc @@ -143,6 +143,13 @@ bool GetIsRoaming() { base::android::GetApplicationContext()); } +std::string GetWifiSSID() { + return base::android::ConvertJavaStringToUTF8( + Java_AndroidNetworkLibrary_getWifiSSID( + base::android::AttachCurrentThread(), + base::android::GetApplicationContext())); +} + bool RegisterNetworkLibrary(JNIEnv* env) { return RegisterNativesImpl(env); } |