类com.google.zxing.client.result.WifiParsedResult源码实例Demo

下面列出了怎么用com.google.zxing.client.result.WifiParsedResult的API类实例代码及写法,或者点击链接到github查看源代码。

@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    if (wifiManager == null) {
      Log.w(TAG, "No WifiManager available from device");
      return;
    }
    final Activity activity = getActivity();
    activity.runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(activity.getApplicationContext(), R.string.wifi_changing_network, Toast.LENGTH_SHORT).show();
      }
    });
    new WifiConfigManager(wifiManager).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    if (wifiManager == null) {
      Log.w(TAG, "No WifiManager available from device");
      return;
    }
    final Activity activity = getActivity();
    activity.runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(activity.getApplicationContext(), R.string.wifi_changing_network, Toast.LENGTH_SHORT).show();
      }
    });
    new WifiConfigManager(wifiManager).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
源代码3 项目: weex   文件: WifiResultHandler.java
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    if (wifiManager == null) {
      Log.w(TAG, "No WifiManager available from device");
      return;
    }
    final Activity activity = getActivity();
    activity.runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(activity.getApplicationContext(), R.string.wifi_changing_network, Toast.LENGTH_SHORT).show();
      }
    });
    new WifiConfigManager(wifiManager).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
源代码4 项目: Study_Android_Demo   文件: WifiResultHandler.java
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    if (wifiManager == null) {
      Log.w(TAG, "No WifiManager available from device");
      return;
    }
    final Activity activity = getActivity();
    activity.runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(activity.getApplicationContext(), R.string.wifi_changing_network, Toast.LENGTH_SHORT).show();
      }
    });
    new WifiConfigManager(wifiManager).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View v = inflater.inflate(R.layout.fragment_result_wifi, container, false);
    result = (WifiParsedResult) parsedResult;

    ssid = result.getSsid();
    String encryption = result.getNetworkEncryption();
    pw = result.getPassword();

    TextView resultField = (TextView) v.findViewById(R.id.result_field_wifi);
    TextView resultFieldEncryption = (TextView) v.findViewById(R.id.result_field_wifi_encryption);
    TextView resultFieldPassword = (TextView) v.findViewById(R.id.result_field_wifi_pw);
    resultField.setText("SSID: " + ssid);
    resultFieldEncryption.setText(getString(R.string.encryption) + ": " + encryption);
    resultFieldPassword.setText("PW: " + pw);

    return v;
}
 
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    if (wifiManager == null) {
      Log.w(TAG, "No WifiManager available from device");
      return;
    }
    final Activity activity = getActivity();
    activity.runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(activity.getApplicationContext(), R.string.wifi_changing_network, Toast.LENGTH_SHORT).show();
      }
    });
    new WifiConfigManager(wifiManager).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
源代码13 项目: weex   文件: WifiConfigManager.java
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
源代码14 项目: weex   文件: WifiConfigManager.java
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
源代码15 项目: weex   文件: WifiConfigManager.java
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
源代码16 项目: Study_Android_Demo   文件: WifiConfigManager.java
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
源代码17 项目: Study_Android_Demo   文件: WifiConfigManager.java
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
源代码18 项目: Study_Android_Demo   文件: WifiConfigManager.java
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
源代码19 项目: barcodescanner-lib-aar   文件: WifiConfigManager.java
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
源代码20 项目: barcodescanner-lib-aar   文件: WifiConfigManager.java
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
源代码21 项目: barcodescanner-lib-aar   文件: WifiConfigManager.java
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
源代码22 项目: reacteu-app   文件: WifiConfigManager.java
private static WifiConfiguration changeNetworkCommon(WifiParsedResult wifiResult) {
  WifiConfiguration config = new WifiConfiguration();
  config.allowedAuthAlgorithms.clear();
  config.allowedGroupCiphers.clear();
  config.allowedKeyManagement.clear();
  config.allowedPairwiseCiphers.clear();
  config.allowedProtocols.clear();
  // Android API insists that an ascii SSID must be quoted to be correctly handled.
  config.SSID = quoteNonHex(wifiResult.getSsid());
  config.hiddenSSID = wifiResult.isHidden();
  return config;
}
 
源代码23 项目: reacteu-app   文件: WifiConfigManager.java
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
  config.wepTxKeyIndex = 0;
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
  updateNetwork(wifiManager, config);
}
 
源代码24 项目: reacteu-app   文件: WifiConfigManager.java
private static void changeNetworkWPA(WifiManager wifiManager, WifiParsedResult wifiResult) {
  WifiConfiguration config = changeNetworkCommon(wifiResult);
  // Hex passwords that are 64 bits long are not to be quoted.
  config.preSharedKey = quoteNonHex(wifiResult.getPassword(), 64);
  config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
  config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); // For WPA
  config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // For WPA2
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
  config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
  config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
  config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
  updateNetwork(wifiManager, config);
}
 
源代码25 项目: reacteu-app   文件: WifiResultHandler.java
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    Toast.makeText(getActivity(), fakeR.getId("string", "wifi_changing_network"), Toast.LENGTH_LONG).show();
    taskExec.execute(new WifiConfigManager(wifiManager), wifiResult);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
源代码26 项目: reacteu-app   文件: WifiResultHandler.java
@Override
public CharSequence getDisplayContents() {
  WifiParsedResult wifiResult = (WifiParsedResult) getResult();
  StringBuilder contents = new StringBuilder(50);
  String wifiLabel = parent.getString(fakeR.getId("string", "wifi_ssid_label"));
  ParsedResult.maybeAppend(wifiLabel + '\n' + wifiResult.getSsid(), contents);
  String typeLabel = parent.getString(fakeR.getId("string", "wifi_type_label"));
  ParsedResult.maybeAppend(typeLabel + '\n' + wifiResult.getNetworkEncryption(), contents);
  return contents.toString();
}
 
源代码27 项目: android-apps   文件: WifiResultHandler.java
@Override
public void handleButtonPress(int index) {
  // Get the underlying wifi config
  WifiParsedResult wifiResult = (WifiParsedResult) getResult();
  if (index == 0) {
    String ssid = wifiResult.getSsid();
    String password = wifiResult.getPassword();
    String networkType = wifiResult.getNetworkEncryption();
    WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
    Toast.makeText(getActivity(), R.string.wifi_changing_network, Toast.LENGTH_LONG).show();
    WifiConfigManager.configure(wifiManager, ssid, password, networkType);
    parent.restartPreviewAfterDelay(0L);
  }
}
 
源代码28 项目: android-apps   文件: WifiResultHandler.java
@Override
public CharSequence getDisplayContents() {
  WifiParsedResult wifiResult = (WifiParsedResult) getResult();
  StringBuilder contents = new StringBuilder(50);
  String wifiLabel = parent.getString(R.string.wifi_ssid_label);
  ParsedResult.maybeAppend(wifiLabel + '\n' + wifiResult.getSsid(), contents);
  String typeLabel = parent.getString(R.string.wifi_type_label);
  ParsedResult.maybeAppend(typeLabel + '\n' + wifiResult.getNetworkEncryption(), contents);
  return contents.toString();
}
 
源代码29 项目: barterli_android   文件: WifiResultHandler.java
@Override
public CharSequence getDisplayContents() {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    StringBuilder contents = new StringBuilder(50);
    String wifiLabel = parent.getString(R.string.wifi_ssid_label);
    ParsedResult.maybeAppend(wifiLabel + '\n' + wifiResult.getSsid(), contents);
    String typeLabel = parent.getString(R.string.wifi_type_label);
    ParsedResult.maybeAppend(typeLabel + '\n' + wifiResult.getNetworkEncryption(), contents);
    return contents.toString();
}
 
@Override
public CharSequence getDisplayContents() {
    WifiParsedResult wifiResult = (WifiParsedResult) getResult();
    StringBuilder contents = new StringBuilder(50);
    String wifiLabel = parent.getString(R.string.wifi_ssid_label);
    ParsedResult.maybeAppend(wifiLabel + '\n' + wifiResult.getSsid(), contents);
    String typeLabel = parent.getString(R.string.wifi_type_label);
    ParsedResult.maybeAppend(typeLabel + '\n' + wifiResult.getNetworkEncryption(), contents);
    return contents.toString();
}
 
 类所在包
 同包方法