expo-location 14.2.1 → 14.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 14.2.2 — 2022-05-05
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fixed Android 12+ runtime crash caused by `PendingIntent` misconfiguration. ([#17333](https://github.com/expo/expo/pull/17333) by [@kudo](https://github.com/kudo))
18
+
13
19
  ## 14.2.1 — 2022-04-20
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '14.2.1'
6
+ version = '14.2.2'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -74,7 +74,7 @@ android {
74
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
75
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
76
76
  versionCode 29
77
- versionName "14.2.1"
77
+ versionName "14.2.2"
78
78
  }
79
79
  lintOptions {
80
80
  abortOnError false
@@ -11,6 +11,7 @@ import android.content.Context;
11
11
  import android.content.Intent;
12
12
  import android.graphics.Color;
13
13
  import android.os.Binder;
14
+ import android.os.Build;
14
15
  import android.os.Bundle;
15
16
  import android.os.IBinder;
16
17
  import androidx.annotation.Nullable;
@@ -103,7 +104,9 @@ public class LocationTaskService extends Service {
103
104
 
104
105
  if (intent != null) {
105
106
  intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
106
- PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
107
+ // We're defaulting to the behaviour prior API 31 (mutable) even though Android recommends immutability
108
+ int mutableFlag = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ? PendingIntent.FLAG_MUTABLE : 0;
109
+ PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT | mutableFlag);
107
110
  builder.setContentIntent(contentIntent);
108
111
  }
109
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-location",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "description": "Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.",
5
5
  "main": "build/Location.js",
6
6
  "types": "build/Location.d.ts",
@@ -47,5 +47,5 @@
47
47
  "peerDependencies": {
48
48
  "expo": "*"
49
49
  },
50
- "gitHead": "2b35d9008fef42cb53473331c37693ca12e9bf12"
50
+ "gitHead": "b9d655c1bed682ad8919e071dd923968773f05b5"
51
51
  }