Skip to content

Commit 89ca7e5

Browse files
authored
revert android to api 30 (wix#823)
1 parent d4ec8a8 commit 89ca7e5

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @yogevbd
1+
* @DanielEliraz

lib/android/app/build.gradle

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import groovy.json.JsonSlurper
22

33
apply plugin: 'com.android.library'
4-
apply plugin: 'kotlin-android'
5-
apply plugin: 'kotlin-android-extensions'
64

75
def safeExtGet(prop, fallback) {
86
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
97
}
108

11-
def DEFAULT_COMPILE_SDK_VERSION = 31
9+
def DEFAULT_COMPILE_SDK_VERSION = 30
1210
def DEFAULT_MIN_SDK_VERSION = 21
1311
def DEFAULT_KOTLIN_VERSION = "1.3.61"
1412
def DEFAULT_KOTLIN_STDLIB_VERSION = "kotlin-stdlib-jdk8"

lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
6363

6464
Intent intent = activity.getIntent();
6565
if (NotificationIntentAdapter.canHandleIntent(intent)) {
66-
Bundle notificationData = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S ?
66+
Bundle notificationData = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R ?
6767
NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent) : intent.getExtras();
6868
final IPushNotification pushNotification = PushNotification.get(mApplication.getApplicationContext(), notificationData);
6969
if (pushNotification != null) {

lib/android/app/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class NotificationIntentAdapter {
1414

1515
@SuppressLint("UnspecifiedImmutableFlag")
1616
public static PendingIntent createPendingNotificationIntent(Context appContext, PushNotificationProps notification) {
17-
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
17+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
1818
Intent mainActivityIntent = appContext.getPackageManager().getLaunchIntentForPackage(appContext.getPackageName());
1919
mainActivityIntent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
2020
TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(appContext);

lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private void notifyOpenedToJS() {
214214
}
215215

216216
protected void launchOrResumeApp() {
217-
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S) {
217+
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.R) {
218218
final Intent intent = mAppLaunchHelper.getLaunchIntent(mContext);
219219
mContext.startActivity(intent);
220220
}

0 commit comments

Comments
 (0)