Commit 356640b1 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

WebLayer: remove IDownloadCallbackClient#createIntent

It's only called for client versions <83, which are no longer supported.
Thus the calling code on the impl side can be removed, and the method
can be removed from the interface and client side.

Bug: 1110811
Change-Id: Ia8396dab7703e74ee0cf52cbdee3b6b7e5efa0df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414515
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808189}
parent dc50263c
...@@ -296,13 +296,7 @@ public final class DownloadImpl extends IDownload.Stub { ...@@ -296,13 +296,7 @@ public final class DownloadImpl extends IDownload.Stub {
private Intent createIntent() { private Intent createIntent() {
// Because the intent is using classes from the implementation's class loader, // Because the intent is using classes from the implementation's class loader,
// we need to use the constructor which doesn't take the app's context. // we need to use the constructor which doesn't take the app's context.
if (WebLayerFactoryImpl.getClientMajorVersion() >= 83) return WebLayerImpl.createIntent(); return WebLayerImpl.createIntent();
try {
return mClient.createIntent();
} catch (RemoteException e) {
throw new APICallException(e);
}
} }
public void downloadStarted() { public void downloadStarted() {
......
...@@ -20,6 +20,6 @@ interface IDownloadCallbackClient { ...@@ -20,6 +20,6 @@ interface IDownloadCallbackClient {
void downloadProgressChanged(IClientDownload download) = 4; void downloadProgressChanged(IClientDownload download) = 4;
void downloadCompleted(IClientDownload download) = 5; void downloadCompleted(IClientDownload download) = 5;
void downloadFailed(IClientDownload download) = 6; void downloadFailed(IClientDownload download) = 6;
// Deprecated, use WebLayerClient.createIntent. // Removed in 87.
Intent createIntent() = 7; // Intent createIntent() = 7;
} }
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
package org.chromium.weblayer; package org.chromium.weblayer;
import android.content.Intent;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.net.Uri; import android.net.Uri;
import android.os.RemoteException; import android.os.RemoteException;
...@@ -423,15 +422,5 @@ public class Profile { ...@@ -423,15 +422,5 @@ public class Profile {
StrictModeWorkaround.apply(); StrictModeWorkaround.apply();
mCallback.onDownloadFailed((Download) download); mCallback.onDownloadFailed((Download) download);
} }
@Override
// Deprecated, implementations past 83 call IWebLayerClient.createIntent instead.
public Intent createIntent() {
StrictModeWorkaround.apply();
// Intent objects need to be created in the client library so they can refer to the
// broadcast receiver that will handle them. The broadcast receiver needs to be in the
// client library because it's referenced in the manifest.
return new Intent(WebLayer.getAppContext(), BroadcastReceiver.class);
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment