Monkey-proof Moonlight

This commit is contained in:
Cameron Gutman 2018-06-20 01:26:59 -07:00
parent 36191781ed
commit a519723d44
2 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import com.limelight.utils.ShortcutHelper;
import com.limelight.utils.UiHelper; import com.limelight.utils.UiHelper;
import android.app.Activity; import android.app.Activity;
import android.app.ActivityManager;
import android.app.Service; import android.app.Service;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Intent; import android.content.Intent;
@ -560,6 +561,10 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
return true; return true;
case DELETE_ID: case DELETE_ID:
if (ActivityManager.isUserAMonkey()) {
LimeLog.info("Ignoring delete PC request from monkey");
return true;
}
if (managerBinder == null) { if (managerBinder == null) {
Toast.makeText(PcView.this, getResources().getString(R.string.error_manager_not_running), Toast.LENGTH_LONG).show(); Toast.makeText(PcView.this, getResources().getString(R.string.error_manager_not_running), Toast.LENGTH_LONG).show();
return true; return true;

@ -1 +1 @@
Subproject commit 165a518adbe410a8d10e2f3712ac4b5817413924 Subproject commit defd6fb14f56a02bf7395e30cf3ec7e205033c22