Bug 1509146 - Remove default implementations in GeckoView interfaces r=nalexander

JaCoCo chokes on default implementations in interfaces, so remove those
for now.

Differential Revision: https://phabricator.services.mozilla.com/D12607

--HG--
extra : moz-landing-system : lando
This commit is contained in:
James Willcox 2018-11-23 19:42:26 +00:00
parent 37fc08499b
commit 20a661d1da
8 changed files with 34 additions and 10 deletions

View File

@ -914,6 +914,10 @@ public abstract class GeckoApp extends GeckoActivity
// Won't happen, as we don't use e10s in Fennec
}
@Override
public void onFirstComposite(final GeckoSession session) {
}
protected void setFullScreen(final boolean fullscreen) {
ThreadUtils.postToUiThread(new Runnable() {
@Override

View File

@ -723,6 +723,10 @@ public class CustomTabsActivity extends AppCompatActivity
// Won't happen, as we don't use e10s in Fennec
}
@Override
public void onFirstComposite(final GeckoSession session) {
}
@Override // ActionModePresenter
public void startActionMode(final ActionMode.Callback callback) {
endActionMode();

View File

@ -373,6 +373,10 @@ public class WebAppActivity extends AppCompatActivity
// Won't happen, as we don't use e10s in Fennec
}
@Override
public void onFirstComposite(final GeckoSession session) {
}
@Override // GeckoSession.ContentDelegate
public void onFullScreen(GeckoSession session, boolean fullScreen) {
updateFullScreenContent(fullScreen);

View File

@ -105,6 +105,10 @@ public class TestRunnerActivity extends Activity {
sRuntime.shutdown();
}
}
@Override
public void onFirstComposite(final GeckoSession session) {
}
};
private GeckoSession createSession() {

View File

@ -46,6 +46,9 @@ class Callbacks private constructor() {
override fun onCrash(session: GeckoSession) {
}
override fun onFirstComposite(session: GeckoSession) {
}
}
interface NavigationDelegate : GeckoSession.NavigationDelegate {

View File

@ -2600,7 +2600,7 @@ public class GeckoSession implements Parcelable {
* a start or a restart of the compositor.
* @param session The GeckoSession that had a first paint event.
*/
default void onFirstComposite(GeckoSession session) {}
void onFirstComposite(GeckoSession session);
}
public interface SelectionActionDelegate {

View File

@ -264,7 +264,7 @@ public class MediaElement {
* @param mediaState The playback state of the media.
* One of the {@link #MEDIA_STATE_PLAY MEDIA_STATE_*} flags.
*/
default void onPlaybackStateChange(MediaElement mediaElement, @MediaStateFlags int mediaState) {}
void onPlaybackStateChange(MediaElement mediaElement, @MediaStateFlags int mediaState);
/**
* The readiness state of the media has changed.
@ -273,7 +273,7 @@ public class MediaElement {
* @param readyState The readiness state of the media.
* One of the {@link #MEDIA_READY_STATE_HAVE_NOTHING MEDIA_READY_STATE_*} flags.
*/
default void onReadyStateChange(MediaElement mediaElement, @ReadyStateFlags int readyState) {}
void onReadyStateChange(MediaElement mediaElement, @ReadyStateFlags int readyState);
/**
* The media metadata has loaded or changed.
@ -281,7 +281,7 @@ public class MediaElement {
* @param mediaElement A reference to the MediaElement that dispatched the event.
* @param metaData The MetaData values of the media.
*/
default void onMetadataChange(MediaElement mediaElement, Metadata metaData) {}
void onMetadataChange(MediaElement mediaElement, Metadata metaData);
/**
* Indicates that a loading operation is in progress for the media.
@ -289,7 +289,7 @@ public class MediaElement {
* @param mediaElement A reference to the MediaElement that dispatched the event.
* @param progressInfo Information about the load progress and buffered ranges.
*/
default void onLoadProgress(MediaElement mediaElement, LoadProgressInfo progressInfo) {}
void onLoadProgress(MediaElement mediaElement, LoadProgressInfo progressInfo);
/**
* The media audio volume has changed.
@ -298,7 +298,7 @@ public class MediaElement {
* @param volume The volume of the media.
* @param muted True if the media is muted.
*/
default void onVolumeChange(MediaElement mediaElement, double volume, boolean muted) {}
void onVolumeChange(MediaElement mediaElement, double volume, boolean muted);
/**
* The current playback time has changed. This event is usually dispatched every 250ms.
@ -306,7 +306,7 @@ public class MediaElement {
* @param mediaElement A reference to the MediaElement that dispatched the event.
* @param time The current playback time in seconds.
*/
default void onTimeChange(MediaElement mediaElement, double time) {}
void onTimeChange(MediaElement mediaElement, double time);
/**
* The media playback speed has changed.
@ -314,7 +314,7 @@ public class MediaElement {
* @param mediaElement A reference to the MediaElement that dispatched the event.
* @param rate The current playback rate. A value of 1.0 indicates normal speed.
*/
default void onPlaybackRateChange(MediaElement mediaElement, double rate) {}
void onPlaybackRateChange(MediaElement mediaElement, double rate);
/**
* A media element has entered or exited fullscreen mode.
@ -322,7 +322,7 @@ public class MediaElement {
* @param mediaElement A reference to the MediaElement that dispatched the event.
* @param fullscreen True if the media has entered full screen mode.
*/
default void onFullscreenChange(MediaElement mediaElement, boolean fullscreen) {}
void onFullscreenChange(MediaElement mediaElement, boolean fullscreen);
/**
* An error has occurred.
@ -331,7 +331,7 @@ public class MediaElement {
* @param errorCode The error code.
* One of the {@link #MEDIA_ERROR_NETWORK_NO_SOURCE MEDIA_ERROR_*} flags.
*/
default void onError(MediaElement mediaElement, @MediaErrorFlags int errorCode) {}
void onError(MediaElement mediaElement, @MediaErrorFlags int errorCode);
}
/* package */ long getVideoId() {

View File

@ -501,6 +501,11 @@ public class GeckoViewActivity extends AppCompatActivity {
session.open(sGeckoRuntime);
session.loadUri(DEFAULT_URL);
}
@Override
public void onFirstComposite(final GeckoSession session) {
Log.d(LOGTAG, "onFirstComposite");
}
}
private class ExampleProgressDelegate implements GeckoSession.ProgressDelegate {