mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Remove duplicated context param from Servo constructor
This commit is contained in:
parent
991fdbe5d4
commit
c7d11b9a1e
3 changed files with 4 additions and 8 deletions
|
@ -31,8 +31,7 @@ public class Servo {
|
|||
String url,
|
||||
String logstr,
|
||||
int width, int height,
|
||||
float density, boolean log,
|
||||
Context context) {
|
||||
float density, boolean log) {
|
||||
|
||||
mRunCallback = runCallback;
|
||||
|
||||
|
@ -45,7 +44,7 @@ public class Servo {
|
|||
});
|
||||
|
||||
try {
|
||||
GStreamer.init(context);
|
||||
GStreamer.init((Context) activity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ package com.mozilla.servoview;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.opengl.EGL14;
|
||||
import android.opengl.EGLConfig;
|
||||
|
@ -207,8 +206,7 @@ public class ServoSurface {
|
|||
inUIThread(() -> {
|
||||
final boolean showLogs = true;
|
||||
String uri = mInitialUri == null ? null : mInitialUri;
|
||||
mServo = new Servo(this, surface, mClient, mActivity, mServoArgs, uri, mServoLog,
|
||||
mWidth, mHeight, 1 /* density */, showLogs, (Context) mActivity);
|
||||
mServo = new Servo(this, surface, mClient, mActivity, mServoArgs, uri, mServoLog, mWidth, mHeight, 1, showLogs);
|
||||
});
|
||||
|
||||
Looper.loop();
|
||||
|
|
|
@ -146,8 +146,7 @@ public class ServoView extends GLSurfaceView
|
|||
|
||||
inGLThread(() -> {
|
||||
String uri = mInitialUri == null ? null : mInitialUri.toString();
|
||||
mServo = new Servo(this, this, mClient, mActivity, mServoArgs, uri,
|
||||
mServoLog, width, height, density, showLogs, (Context) mActivity);
|
||||
mServo = new Servo(this, this, mClient, mActivity, mServoArgs, uri, mServoLog, width, height, density, showLogs);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue