react-native-update 10.29.0 → 10.29.1
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/android/proguard.pro
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
# Keep our update module classes
|
|
1
2
|
-keepnames class cn.reactnative.modules.update.DownloadTask { *; }
|
|
2
3
|
-keepnames class cn.reactnative.modules.update.UpdateModuleImpl { *; }
|
|
3
|
-
-keepnames class
|
|
4
|
+
-keepnames class cn.reactnative.modules.update.** { *; }
|
|
5
|
+
|
|
6
|
+
# Keep React Native classes
|
|
7
|
+
-keepnames class com.facebook.react.ReactInstanceManager { *; }
|
|
8
|
+
-keepnames class com.facebook.react.** { *; }
|
|
9
|
+
-keepnames class com.facebook.react.bridge.** { *; }
|
|
10
|
+
-keepnames class com.facebook.react.devsupport.** { *; }
|
|
11
|
+
|
|
12
|
+
# Keep fields used in reflection
|
|
13
|
+
-keepclassmembers class com.facebook.react.ReactInstanceManager {
|
|
14
|
+
private JSBundleLoader mBundleLoader;
|
|
15
|
+
private String mJSBundleFile;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
-keepclassmembers class com.facebook.react.ReactDelegate {
|
|
19
|
+
private ReactHost mReactHost;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
-keepclassmembers class com.facebook.react.ReactHost {
|
|
23
|
+
private boolean mUseDevSupport;
|
|
24
|
+
private ReactHostDelegate mReactHostDelegate;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
# Keep Expo related classes
|
|
28
|
+
-keepnames class expo.modules.ExpoReactHostFactory$ExpoReactHostDelegate { *; }
|
|
29
|
+
|
|
30
|
+
# Keep methods used in reflection
|
|
31
|
+
-keepclassmembers class com.facebook.react.ReactActivity {
|
|
32
|
+
public ReactDelegate getReactDelegate();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
-keepclassmembers class com.facebook.react.ReactHost {
|
|
36
|
+
public void reload(java.lang.String);
|
|
37
|
+
}
|
|
@@ -169,17 +169,19 @@ public class UpdateContext {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
public void markSuccess() {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
172
|
+
if (!BuildConfig.DEBUG) {
|
|
173
|
+
SharedPreferences.Editor editor = sp.edit();
|
|
174
|
+
editor.putBoolean("firstTimeOk", true);
|
|
175
|
+
String lastVersion = sp.getString("lastVersion", null);
|
|
176
|
+
String curVersion = sp.getString("currentVersion", null);
|
|
177
|
+
if (lastVersion != null && !lastVersion.equals(curVersion)) {
|
|
178
|
+
editor.remove("lastVersion");
|
|
179
|
+
editor.remove("hash_" + lastVersion);
|
|
180
|
+
}
|
|
181
|
+
editor.apply();
|
|
181
182
|
|
|
182
|
-
|
|
183
|
+
this.cleanUp();
|
|
184
|
+
}
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
public void clearFirstTime() {
|
|
@@ -147,6 +147,10 @@ public class UpdateModuleImpl {
|
|
|
147
147
|
reactHostField.setAccessible(true);
|
|
148
148
|
Object reactHost = reactHostField.get(reactDelegate);
|
|
149
149
|
|
|
150
|
+
Field devSupport = reactHost.getClass().getDeclaredField("mUseDevSupport");
|
|
151
|
+
devSupport.setAccessible(true);
|
|
152
|
+
devSupport.set(reactHost, false);
|
|
153
|
+
|
|
150
154
|
// Access the mReactHostDelegate field
|
|
151
155
|
Field reactHostDelegateField = reactHost.getClass().getDeclaredField("mReactHostDelegate");
|
|
152
156
|
reactHostDelegateField.setAccessible(true);
|