diff options
| author | Ian Wen <ianwen@google.com> | 2015-08-07 01:20:46 +0000 |
|---|---|---|
| committer | Ian Wen <ianwen@google.com> | 2015-08-07 01:20:46 +0000 |
| commit | ee8b0611c54393060684c7cb6f8315b6365bb4b1 (patch) | |
| tree | 04629637fe38aedcc52f3a8a32b204c4c2cba19f /customtabs | |
| parent | c08c466b732ff72ceb0df89c4b78362e1948c356 (diff) | |
| download | android_frameworks_support-ee8b0611c54393060684c7cb6f8315b6365bb4b1.tar.gz android_frameworks_support-ee8b0611c54393060684c7cb6f8315b6365bb4b1.tar.bz2 android_frameworks_support-ee8b0611c54393060684c7cb6f8315b6365bb4b1.zip | |
Revert "customtabs: Add "extraCommand" and "extraCallback", for unsupported commands"
This reverts commit c08c466b732ff72ceb0df89c4b78362e1948c356.
Change-Id: I3179a36b7b1da7a96a3e5a0697605d3423ea755d
Diffstat (limited to 'customtabs')
7 files changed, 4 insertions, 56 deletions
diff --git a/customtabs/api/current.txt b/customtabs/api/current.txt index 89d3ba612c..626ba5bc72 100644 --- a/customtabs/api/current.txt +++ b/customtabs/api/current.txt @@ -2,7 +2,6 @@ package android.support.customtabs { public class CustomTabsCallback { ctor public CustomTabsCallback(); - method public void extraCallback(java.lang.String, android.os.Bundle); method public void onNavigationEvent(int, android.os.Bundle); field public static final int NAVIGATION_FINISHED = 2; // 0x2 field public static final int NAVIGATION_STARTED = 1; // 0x1 @@ -10,7 +9,6 @@ package android.support.customtabs { public class CustomTabsClient { method public static boolean bindCustomTabsService(android.content.Context, java.lang.String, android.support.customtabs.CustomTabsServiceConnection); - method public android.os.Bundle extraCommand(java.lang.String, android.os.Bundle); method public android.support.customtabs.CustomTabsSession newSession(android.support.customtabs.CustomTabsCallback); method public boolean warmup(long); } @@ -31,7 +29,6 @@ package android.support.customtabs { public abstract class CustomTabsService extends android.app.Service { ctor public CustomTabsService(); method protected boolean cleanUpSession(android.support.customtabs.CustomTabsSessionToken); - method protected abstract android.os.Bundle extraCommand(java.lang.String, android.os.Bundle); method protected abstract boolean mayLaunchUrl(android.support.customtabs.CustomTabsSessionToken, android.net.Uri, android.os.Bundle, java.util.List<android.os.Bundle>); method protected abstract boolean newSession(android.support.customtabs.CustomTabsSessionToken); method public android.os.IBinder onBind(android.content.Intent); diff --git a/customtabs/src/android/support/customtabs/CustomTabsCallback.java b/customtabs/src/android/support/customtabs/CustomTabsCallback.java index fa1bf8935d..274388b6ba 100644 --- a/customtabs/src/android/support/customtabs/CustomTabsCallback.java +++ b/customtabs/src/android/support/customtabs/CustomTabsCallback.java @@ -39,20 +39,4 @@ public class CustomTabsCallback { * @param extras Reserved for future use. */ public void onNavigationEvent(int navigationEvent, Bundle extras) {} - - /** - * Unsupported callbacks that may be provided by the implementation. - * - * <p> - * <strong>Note:</strong>Clients should <strong>never</strong> rely on this callback to be - * called and/or to have a defined behavior, as it is entirely implementation-defined and not - * supported. - * - * <p> This can be used by implementations to add extra callbacks, for testing or experimental - * purposes. - * - * @param callbackName Name of the extra callback. - * @param args Arguments for the calback - */ - public void extraCallback(String callbackName, Bundle args) {} } diff --git a/customtabs/src/android/support/customtabs/CustomTabsClient.java b/customtabs/src/android/support/customtabs/CustomTabsClient.java index 7cc5c7697a..779b2d76ec 100644 --- a/customtabs/src/android/support/customtabs/CustomTabsClient.java +++ b/customtabs/src/android/support/customtabs/CustomTabsClient.java @@ -91,11 +91,6 @@ public class CustomTabsClient { public void onNavigationEvent(int navigationEvent, Bundle extras) { if (callback != null) callback.onNavigationEvent(navigationEvent, extras); } - - @Override - public void extraCallback(String callbackName, Bundle args) throws RemoteException { - if (callback != null) callback.extraCallback(callbackName, args); - } }; try { @@ -105,12 +100,4 @@ public class CustomTabsClient { } return new CustomTabsSession(mService, wrapper, mServiceComponentName); } - - public Bundle extraCommand(String commandName, Bundle args) { - try { - return mService.extraCommand(commandName, args); - } catch (RemoteException e) { - return null; - } - } } diff --git a/customtabs/src/android/support/customtabs/CustomTabsService.java b/customtabs/src/android/support/customtabs/CustomTabsService.java index 8206eb381d..5f70d88a9d 100644 --- a/customtabs/src/android/support/customtabs/CustomTabsService.java +++ b/customtabs/src/android/support/customtabs/CustomTabsService.java @@ -86,11 +86,6 @@ import java.util.NoSuchElementException; return CustomTabsService.this.mayLaunchUrl( new CustomTabsSessionToken(callback), url, extras, otherLikelyBundles); } - - @Override - public Bundle extraCommand(String commandName, Bundle args) { - return CustomTabsService.this.extraCommand(commandName, args); - } }; @Override @@ -161,20 +156,4 @@ import java.util.NoSuchElementException; */ protected abstract boolean mayLaunchUrl(CustomTabsSessionToken sessionToken, Uri url, Bundle extras, List<Bundle> otherLikelyBundles); - - /** - * Unsupported commands that may be provided by the implementation. - * - * <p> - * <strong>Note:</strong>Clients should <strong>never</strong> rely on this method to have a - * defined behavior, as it is entirely implementation-defined and not supported. - * - * <p> This call can be used by implementations to add extra commands, for testing or - * experimental purposes. - * - * @param commandName Name of the extra command to execute. - * @param args Arguments for the command - * @return The result {@link Bundle}, or null. - */ - protected abstract Bundle extraCommand(String commandName, Bundle args); - } +} diff --git a/customtabs/src/android/support/customtabs/CustomTabsSession.java b/customtabs/src/android/support/customtabs/CustomTabsSession.java index 1d0dab47d7..f7fa56f663 100644 --- a/customtabs/src/android/support/customtabs/CustomTabsSession.java +++ b/customtabs/src/android/support/customtabs/CustomTabsSession.java @@ -19,9 +19,12 @@ package android.support.customtabs; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; +import android.os.Build; import android.os.Bundle; +import android.os.IBinder; import android.os.RemoteException; +import java.lang.reflect.Method; import java.util.List; /** diff --git a/customtabs/src/android/support/customtabs/ICustomTabsCallback.aidl b/customtabs/src/android/support/customtabs/ICustomTabsCallback.aidl index a4678640cf..83a100239d 100644 --- a/customtabs/src/android/support/customtabs/ICustomTabsCallback.aidl +++ b/customtabs/src/android/support/customtabs/ICustomTabsCallback.aidl @@ -24,5 +24,4 @@ import android.os.Bundle; */ oneway interface ICustomTabsCallback { void onNavigationEvent(int navigationEvent, in Bundle extras) = 1; - void extraCallback(String callbackName, in Bundle args) = 2; } diff --git a/customtabs/src/android/support/customtabs/ICustomTabsService.aidl b/customtabs/src/android/support/customtabs/ICustomTabsService.aidl index 2565928880..b7eae55673 100644 --- a/customtabs/src/android/support/customtabs/ICustomTabsService.aidl +++ b/customtabs/src/android/support/customtabs/ICustomTabsService.aidl @@ -31,5 +31,4 @@ interface ICustomTabsService { boolean newSession(in ICustomTabsCallback callback) = 2; boolean mayLaunchUrl(in ICustomTabsCallback callback, in Uri url, in Bundle extras, in List<Bundle> otherLikelyBundles) = 3; - Bundle extraCommand(String commandName, in Bundle args) = 4; } |
