Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b37dcbc2 authored by Andrey Kulikov's avatar Andrey Kulikov
Browse files

Restrict unsupported API usage to Scene#mEnterAction/mExitAction/setCurrentScene

They were used via reflection in older versions of support transitions.
Starting from 26.0.0 it is not in use and there is no need to allow this usages.
Developers should update to the newer version of support libraries/androidx

Bug: 117521462
Bug: 117521646
Test: none
Change-Id: Ia1d5516a58c0deec68091d719065621fc588591b
parent 24a579db
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Build;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
@@ -38,9 +39,9 @@ public final class Scene {
    private int mLayoutId = -1;
    private ViewGroup mSceneRoot;
    private View mLayout; // alternative to layoutId
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    Runnable mEnterAction;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    Runnable mExitAction;

    /**
@@ -200,7 +201,7 @@ public final class Scene {
     *
     * @param sceneRoot The view on which the current scene is being set
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    static void setCurrentScene(@NonNull View sceneRoot, @Nullable Scene scene) {
        sceneRoot.setTagInternal(com.android.internal.R.id.current_scene, scene);
    }