blob: 6c02b8ffbe40d5caa121a2ac6de4e2c3ab5f9b3c [file] [log] [blame]
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package androidx.browser.trusted;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* A callback class for browser to get messages from client app. The callbacks should be called via
* {@link TrustedWebActivityCallbackRemote} on client app.
*/
public abstract class TrustedWebActivityCallback {
/**
* Free-form callback 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 callback
*/
public abstract void onExtraCallback(@NonNull String callbackName, @Nullable Bundle args);
}