Auto merge of #24443 - ferjm:gst.debug.android, r=jdm

Allow setting GST_DEBUG on Android through mach

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
This commit is contained in:
bors-servo 2019-10-15 18:26:46 -04:00 committed by GitHub
commit b96b08a3d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 6 deletions

View file

@ -76,7 +76,8 @@ public class MainActivity extends Activity implements Servo.Client {
Intent intent = getIntent();
String args = intent.getStringExtra("servoargs");
String log = intent.getStringExtra("servolog");
mServoView.setServoArgs(args, log);
String gstdebug = intent.getStringExtra("gstdebug");
mServoView.setServoArgs(args, log, gstdebug);
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
mServoView.loadUri(intent.getData());

View file

@ -74,6 +74,7 @@ public class JNIServo {
public boolean enableSubpixelTextAntialiasing = true;
public long VRExternalContext = 0;
public String logStr;
public String gstDebugStr;
public boolean enableLogs = false;
}

View file

@ -45,6 +45,7 @@ public class ServoView extends GLSurfaceView
private boolean mAnimating;
private String mServoArgs;
private String mServoLog;
private String mGstDebug;
private GestureDetector mGestureDetector;
private ScaleGestureDetector mScaleGestureDetector;
@ -90,9 +91,10 @@ public class ServoView extends GLSurfaceView
initGestures(context);
}
public void setServoArgs(String args, String log) {
public void setServoArgs(String args, String log, String gstdebug) {
mServoArgs = args;
mServoLog = log;
mGstDebug = gstdebug;
}
public void reload() {
@ -176,6 +178,7 @@ public class ServoView extends GLSurfaceView
String uri = mInitialUri == null ? null : mInitialUri.toString();
options.url = uri;
options.logStr = mServoLog;
options.gstDebugStr = mGstDebug;
mServo = new Servo(options, this, this, mClient, mActivity);
});
}