* @author viki@google.com (Vikram Aggarwal)
*/
public final class WifiResultHandler extends ResultHandler {
- final Activity parent;
+
+ private final Activity parent;
public WifiResultHandler(Activity activity, ParsedResult result) {
super(activity, result);
@Override
public void handleButtonPress(int index) {
// Get the underlying wifi config
- final WifiParsedResult wifiResult = (WifiParsedResult) getResult();
+ WifiParsedResult wifiResult = (WifiParsedResult) getResult();
if (index == 0) {
wifiConnect(wifiResult);
}
// Display the name of the network and the network type to the user.
@Override
public CharSequence getDisplayContents() {
- final WifiParsedResult wifiResult = (WifiParsedResult) getResult();
+ WifiParsedResult wifiResult = (WifiParsedResult) getResult();
StringBuffer contents = new StringBuffer();
- final String wifiLabel = parent.getString(R.string.wifi_ssid_label);
- ParsedResult.maybeAppend(wifiLabel + "\n" + wifiResult.getSsid(), contents);
- final String typeLabel = parent.getString(R.string.wifi_type_label);
- ParsedResult.maybeAppend(typeLabel + "\n" + wifiResult.getNetworkEncryption(), contents);
+ 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();
}