Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minSdk version to 24 #984

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {

defaultConfig {
applicationId "org.xbmc.kore"
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 32
versionCode 31
versionName = getVersionName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void onCreate() {
// Create the intent to start the remote when the user taps the notification
TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
stackBuilder.addNextIntentWithParentStack(new Intent(this, RemoteActivity.class));
int flags = Utils.isMOrLater() ? PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT : PendingIntent.FLAG_UPDATE_CURRENT;
int flags = PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT;
remoteStartPendingIntent = stackBuilder.getPendingIntent(0, flags);

// Create the notification channel and the default notification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,9 @@ private void updatePreferredLanguage(String localeName) {
}

private Locale getSystemLocale() {
return Utils.isNOrLater() ?
Resources.getSystem().getConfiguration().getLocales().get(0) :
Resources.getSystem().getConfiguration().locale;
return Resources.getSystem().getConfiguration().getLocales().get(0);
}

private Locale getCurrentLocale() {
return Utils.isNOrLater() ?
getResources().getConfiguration().getLocales().get(0) :
getResources().getConfiguration().locale;
return getResources().getConfiguration().getLocales().get(0);
}}
8 changes: 0 additions & 8 deletions app/src/main/java/org/xbmc/kore/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@
public class Utils {
private static final String TAG = LogUtils.makeLogTag(Utils.class);

public static boolean isMOrLater() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
}

public static boolean isNOrLater() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
}

public static boolean isOreoOrLater() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O; }

public static boolean isOreoMR1OrLater() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1; }
Expand Down
Loading