Skip to content

Commit

Permalink
Delay the removal of support of ScriptC from TargetAPI 35 to 36
Browse files Browse the repository at this point in the history
Bug: 206676167
Test: m

Change-Id: I914366f6cef19df5f528bb0a43b51d17b50ca1ae
  • Loading branch information
jyaif committed Feb 26, 2024
1 parent 82b0838 commit a831939
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rs/java/android/renderscript/ScriptC.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public class ScriptC extends Script {
private static final String TAG = "ScriptC";

/**
* In targetSdkVersion 35 and above, Renderscript's ScriptC stops being supported
* In targetSdkVersion 36 and above, Renderscript's ScriptC stops being supported
* and an exception is thrown when the class is instantiated.
* In targetSdkVersion 34 and below, Renderscript's ScriptC still works.
* In targetSdkVersion 35 and below, Renderscript's ScriptC still works.
*/
@ChangeId
@EnabledAfter(targetSdkVersion = 35)
@EnabledAfter(targetSdkVersion = 36)
private static final long RENDERSCRIPT_SCRIPTC_DEPRECATION_CHANGE_ID = 297019750L;

/**
Expand Down Expand Up @@ -113,9 +113,9 @@ private static void throwExceptionIfScriptCUnsupported() {
throw new UnsupportedOperationException(s);
}

// Throw an exception if the target API is 35 or above
// Throw an exception if the target API is 36 or above
String message =
"ScriptC scripts are not supported when targeting an API Level >= 35. Please refer "
"ScriptC scripts are not supported when targeting an API Level >= 36. Please refer "
+ "to https://developer.android.com/guide/topics/renderscript/migration-guide "
+ "for proposed alternatives.";
Slog.w(TAG, message);
Expand Down

0 comments on commit a831939

Please sign in to comment.