Merge branch 'master' into root

Conflicts:
	AndroidManifest.xml
	src/com/limelight/binding/input/evdev/EvdevWatcher.java
This commit is contained in:
Cameron Gutman
2014-09-20 02:54:15 -07:00
7 changed files with 148 additions and 156 deletions
+14 -3
View File
@@ -157,7 +157,7 @@ public class PcView extends Activity {
}
}
private void stopComputerUpdates() {
private void stopComputerUpdates(boolean wait) {
if (managerBinder != null) {
if (!runningPolling) {
return;
@@ -166,6 +166,11 @@ public class PcView extends Activity {
freezeUpdates = true;
managerBinder.stopPolling();
if (wait) {
managerBinder.waitForPollingStopped();
}
runningPolling = false;
}
}
@@ -190,7 +195,7 @@ public class PcView extends Activity {
protected void onPause() {
super.onPause();
stopComputerUpdates();
stopComputerUpdates(false);
}
@Override
@@ -202,7 +207,7 @@ public class PcView extends Activity {
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
stopComputerUpdates();
stopComputerUpdates(false);
// Call superclass
super.onCreateContextMenu(menu, v, menuInfo);
@@ -259,6 +264,9 @@ public class PcView extends Activity {
NvHTTP httpConn;
String message;
try {
// Stop updates and wait while pairing
stopComputerUpdates(true);
InetAddress addr = null;
if (computer.reachability == ComputerDetails.Reachability.LOCAL) {
addr = computer.localIp;
@@ -313,6 +321,9 @@ public class PcView extends Activity {
Toast.makeText(PcView.this, toastMessage, Toast.LENGTH_LONG).show();
}
});
// Start polling again
startComputerUpdates();
}
}).start();
}