Commit 86ddc893 by Kim Jinsung

THETAカメラ非接続しても再接続される問題対応し、

今回対応しないため、コメント処理(後で利用するため)
parent 56e23e9a
......@@ -253,8 +253,45 @@ public class ThetaHelper {
wifiManager.disableNetwork(wifi_inf.getNetworkId());
wifiManager.disconnect();
}
//通常Wi-Fi再接続処理
// boolean disconnect = true;
// for (WifiConfiguration configuration : wifiManager.getConfiguredNetworks()) {
// if (wifi_inf.getNetworkId() == configuration.networkId) {
// String packageName = mContext.getPackageName();
// int result = configuration.toString().indexOf(packageName);
// if (result != -1) {
// disconnect = false;
// break;
// }
// }
// }
// if (disconnect) {
// //一番近くにあるの通常Wi-Fiに接続
// List<ScanResult> results = wifiManager.getScanResults();
// int level = 0;
// int networkId = -1;
// for (WifiConfiguration configuration : wifiManager.getConfiguredNetworks()) {
// int index = configuration.SSID.indexOf(ABookValues.THETA_MODEL_NAME_THETA);
// if (index != -1) {
// continue;
// }
// for (ScanResult scanResult : results) {
// if (configuration.SSID.indexOf(scanResult.SSID) != -1) {
// if (level == 0 || WifiManager.compareSignalLevel(level, scanResult.level) < 0) {
// level = scanResult.level;
// networkId = configuration.networkId;
// }
// break;
// }
// }
// }
// if (networkId != -1) {
// wifiManager.enableNetwork(networkId, true);
// }
// }
}
/**
* ConnectivityManagerを利用してアプリ(プロセス)全体のネットワークを設定します。
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment