Merge branch 'master' of /home/rara/git/AndroidStudioProjects/tueroeffner with conflicts.
This commit is contained in:
parent
da310a7e67
commit
4fc40bf02b
2 changed files with 19 additions and 19 deletions
|
@ -83,8 +83,8 @@
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-21.0.2" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="support-v4-21.0.2" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-21.0.2" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-annotations-21.0.2" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.2" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-21.0.2" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -21,24 +21,24 @@ public class DerivBroadcastReceiver extends BroadcastReceiver {
|
||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
|
if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
|
||||||
NetworkInfo nwInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
|
NetworkInfo nwInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
|
||||||
if (nwInfo.getExtraInfo().equals(MainActivity.networkSSID) && nwInfo.isConnected()) {
|
if (nwInfo.getExtraInfo() != null && nwInfo.getExtraInfo().equals(MainActivity.networkSSID) && nwInfo.isConnected()) {
|
||||||
View rootView = ((Activity)context).getWindow().getDecorView().findViewById(android.R.id.content);
|
View rootView = ((Activity)context).getWindow().getDecorView().findViewById(android.R.id.content);
|
||||||
Button button = (Button) rootView.findViewById(R.id.button_buzzer);
|
Button button = (Button) rootView.findViewById(R.id.button2);
|
||||||
button.setEnabled(true);
|
button.setEnabled(true);
|
||||||
button = (Button) rootView.findViewById(R.id.button_door_unlock);
|
button = (Button) rootView.findViewById(R.id.button3);
|
||||||
button.setEnabled(true);
|
button.setEnabled(true);
|
||||||
button = (Button) rootView.findViewById(R.id.button_door_open);
|
button = (Button) rootView.findViewById(R.id.button);
|
||||||
button.setEnabled(true);
|
button.setEnabled(true);
|
||||||
Toast.makeText(context, context.getString(R.string.wlan_connected), Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, context.getString(R.string.wlan_connected), Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
View rootView = ((Activity)context).getWindow().getDecorView().findViewById(android.R.id.content);
|
View rootView = ((Activity)context).getWindow().getDecorView().findViewById(android.R.id.content);
|
||||||
Button button = (Button) rootView.findViewById(R.id.button_buzzer);
|
Button button = (Button) rootView.findViewById(R.id.button2);
|
||||||
button.setEnabled(false);
|
button.setEnabled(false);
|
||||||
button = (Button) rootView.findViewById(R.id.button_door_unlock);
|
button = (Button) rootView.findViewById(R.id.button3);
|
||||||
button.setEnabled(false);
|
button.setEnabled(false);
|
||||||
button = (Button) rootView.findViewById(R.id.button_door_open);
|
button = (Button) rootView.findViewById(R.id.button);
|
||||||
button.setEnabled(false);
|
button.setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue