public interface

WindowAreaComponentApi3Requirements

 androidx.window.area.reflectionguard.WindowAreaComponentApi3Requirements

Gradle dependencies

compile group: 'androidx.window', name: 'window', version: '1.4.0-alpha02'

  • groupId: androidx.window
  • artifactId: window
  • version: 1.4.0-alpha02

Artifact androidx.window:window:1.4.0-alpha02 it located at Google repository (https://maven.google.com/)

Overview

This file defines the Vendor API Level 3 Requirements for WindowAreaComponent. This is used in the client library to perform reflection guard to ensure that the OEM extension implementation is complete.

Summary

Methods
public voidaddRearDisplayPresentationStatusListener(Consumer<ExtensionWindowAreaStatus> consumer)

public voidaddRearDisplayStatusListener(Consumer<java.lang.Integer> consumer)

public voidendRearDisplayPresentationSession()

public voidendRearDisplaySession()

public DisplayMetricsgetRearDisplayMetrics()

public ExtensionWindowAreaPresentationgetRearDisplayPresentation()

public voidremoveRearDisplayPresentationStatusListener(Consumer<ExtensionWindowAreaStatus> consumer)

public voidremoveRearDisplayStatusListener(Consumer<java.lang.Integer> consumer)

public voidstartRearDisplayPresentationSession(Activity activity, Consumer<java.lang.Integer> consumer)

public voidstartRearDisplaySession(Activity activity, Consumer<java.lang.Integer> consumer)

Methods

public void addRearDisplayStatusListener(Consumer<java.lang.Integer> consumer)

See also:

public void removeRearDisplayStatusListener(Consumer<java.lang.Integer> consumer)

See also:

public void startRearDisplaySession(Activity activity, Consumer<java.lang.Integer> consumer)

See also:

public void endRearDisplaySession()

See also:

public void addRearDisplayPresentationStatusListener(Consumer<ExtensionWindowAreaStatus> consumer)

See also:

public void removeRearDisplayPresentationStatusListener(Consumer<ExtensionWindowAreaStatus> consumer)

See also:

public void startRearDisplayPresentationSession(Activity activity, Consumer<java.lang.Integer> consumer)

See also:

public void endRearDisplayPresentationSession()

See also:

public ExtensionWindowAreaPresentation getRearDisplayPresentation()

See also:

public DisplayMetrics getRearDisplayMetrics()

See also:

Source

/*
 * Copyright 2023 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.window.area.reflectionguard;

import android.app.Activity;
import android.util.DisplayMetrics;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.window.extensions.area.ExtensionWindowAreaPresentation;
import androidx.window.extensions.area.ExtensionWindowAreaStatus;
import androidx.window.extensions.area.WindowAreaComponent;
import androidx.window.extensions.core.util.function.Consumer;


/**
 * This file defines the Vendor API Level 3 Requirements for WindowAreaComponent. This is used
 * in the client library to perform reflection guard to ensure that the OEM extension implementation
 * is complete.
 *
 * @see WindowAreaComponent
 */
@RestrictTo(RestrictTo.Scope.LIBRARY)
public interface WindowAreaComponentApi3Requirements {

    /** @see WindowAreaComponent#addRearDisplayStatusListener */
    void addRearDisplayStatusListener(@NonNull Consumer<Integer> consumer);

    /** @see WindowAreaComponent#removeRearDisplayStatusListener */
    void removeRearDisplayStatusListener(@NonNull Consumer<Integer> consumer);

    /** @see WindowAreaComponent#startRearDisplaySession */
    void startRearDisplaySession(@NonNull Activity activity,
            @NonNull Consumer<Integer> consumer);

    /** @see WindowAreaComponent#endRearDisplaySession */
    void endRearDisplaySession();

    /** @see WindowAreaComponent#addRearDisplayPresentationStatusListener */
    void addRearDisplayPresentationStatusListener(
            @NonNull Consumer<ExtensionWindowAreaStatus> consumer);

    /** @see WindowAreaComponent#removeRearDisplayPresentationStatusListener */
    void removeRearDisplayPresentationStatusListener(
            @NonNull Consumer<ExtensionWindowAreaStatus> consumer);

    /** @see WindowAreaComponent#startRearDisplayPresentationSession */
    void startRearDisplayPresentationSession(@NonNull Activity activity,
            @NonNull Consumer<Integer> consumer);

    /** @see WindowAreaComponent#endRearDisplayPresentationSession */
    void endRearDisplayPresentationSession();

    /** @see WindowAreaComponent#getRearDisplayPresentation */
    @Nullable
    ExtensionWindowAreaPresentation getRearDisplayPresentation();

    /** @see WindowAreaComponent#getRearDisplayMetrics() */
    @NonNull
    DisplayMetrics getRearDisplayMetrics();
}