This repository was archived by the owner on May 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/com/fox2code/mmm/androidacy Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1313import androidx .annotation .Keep ;
1414import androidx .annotation .RequiresApi ;
1515import androidx .appcompat .app .AlertDialog ;
16+ import androidx .core .content .ContextCompat ;
1617import androidx .core .graphics .ColorUtils ;
1718
1819import com .fox2code .mmm .BuildConfig ;
@@ -483,7 +484,6 @@ public int getBackgroundColor() {
483484 /**
484485 * Return current hex string of monet theme
485486 */
486- @ RequiresApi (api = Build .VERSION_CODES .M )
487487 @ JavascriptInterface
488488 public String getMonetColor (String id ) {
489489 int nameResourceID = this .activity .getResources ().getIdentifier ("@android:color/" + id ,
@@ -492,7 +492,7 @@ public String getMonetColor(String id) {
492492 throw new IllegalArgumentException (
493493 "No resource string found with name " + id );
494494 } else {
495- int color = this . activity . getColor (nameResourceID );
495+ int color = ContextCompat . getColor (this . activity , nameResourceID );
496496 int red = Color .red (color );
497497 int blue = Color .blue (color );
498498 int green = Color .green (color );
You can’t perform that action at this time.
0 commit comments