Another NPE fix when ruffy isn't available.
This commit is contained in:
parent
e5a68608a0
commit
2c8c25c082
1 changed files with 3 additions and 0 deletions
|
@ -180,6 +180,9 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isConnected() {
|
public boolean isConnected() {
|
||||||
|
if (ruffyService == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return ruffyService.isConnected() && System.currentTimeMillis() - menuLastUpdated < 5000;
|
return ruffyService.isConnected() && System.currentTimeMillis() - menuLastUpdated < 5000;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|
Loading…
Reference in a new issue