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
This commit is contained in:
Andrey Kulikov
2018-11-28 14:28:31 +00:00
parent 24a579db26
commit b37dcbc2ab

View File

@@ -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);
}