Skip to content

Commit

Permalink
revert android to api 30 (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielEliraz committed Feb 16, 2022
1 parent d4ec8a8 commit 89ca7e5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1 +1 @@
* @yogevbd
* @DanielEliraz
4 changes: 1 addition & 3 deletions lib/android/app/build.gradle
@@ -1,14 +1,12 @@
import groovy.json.JsonSlurper

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

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

def DEFAULT_COMPILE_SDK_VERSION = 31
def DEFAULT_COMPILE_SDK_VERSION = 30
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_KOTLIN_VERSION = "1.3.61"
def DEFAULT_KOTLIN_STDLIB_VERSION = "kotlin-stdlib-jdk8"
Expand Down
Expand Up @@ -63,7 +63,7 @@ public void onActivityCreated(Activity activity, Bundle savedInstanceState) {

Intent intent = activity.getIntent();
if (NotificationIntentAdapter.canHandleIntent(intent)) {
Bundle notificationData = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S ?
Bundle notificationData = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R ?
NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent) : intent.getExtras();
final IPushNotification pushNotification = PushNotification.get(mApplication.getApplicationContext(), notificationData);
if (pushNotification != null) {
Expand Down
Expand Up @@ -14,7 +14,7 @@ public class NotificationIntentAdapter {

@SuppressLint("UnspecifiedImmutableFlag")
public static PendingIntent createPendingNotificationIntent(Context appContext, PushNotificationProps notification) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
Intent mainActivityIntent = appContext.getPackageManager().getLaunchIntentForPackage(appContext.getPackageName());
mainActivityIntent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(appContext);
Expand Down
Expand Up @@ -214,7 +214,7 @@ private void notifyOpenedToJS() {
}

protected void launchOrResumeApp() {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S) {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.R) {
final Intent intent = mAppLaunchHelper.getLaunchIntent(mContext);
mContext.startActivity(intent);
}
Expand Down

0 comments on commit 89ca7e5

Please sign in to comment.