@@ -24,7 +24,7 @@ public class UpdateModuleImpl {
2424
2525 public static final String NAME = "Pushy" ;
2626
27- public static void downloadFullUpdate (UpdateContext updateContext , ReadableMap options , Promise promise ) {
27+ public static void downloadFullUpdate (UpdateContext updateContext , final ReadableMap options , final Promise promise ) {
2828 String url = options .getString ("updateUrl" );
2929 String hash = options .getString ("hash" );
3030 updateContext .downloadFullUpdate (url , hash , new UpdateContext .DownloadFileListener () {
@@ -40,7 +40,7 @@ public void onDownloadFailed(Throwable error) {
4040 });
4141 }
4242
43- public static void downloadAndInstallApk (UpdateContext updateContext , ReadableMap options , Promise promise ) {
43+ public static void downloadAndInstallApk (UpdateContext updateContext , final ReadableMap options , final Promise promise ) {
4444 String url = options .getString ("url" );
4545 String hash = options .getString ("hash" );
4646 String target = options .getString ("target" );
@@ -63,7 +63,7 @@ public static void installApk(String url) {
6363 UpdateModule .installApk (toInstall );
6464 }
6565
66- public static void downloadPatchFromPackage (UpdateContext updateContext , ReadableMap options , Promise promise ) {
66+ public static void downloadPatchFromPackage (UpdateContext updateContext , final ReadableMap options , final Promise promise ) {
6767 String url = options .getString ("updateUrl" );
6868 String hash = options .getString ("hash" );
6969 updateContext .downloadPatchFromApk (url , hash , new UpdateContext .DownloadFileListener () {
@@ -79,7 +79,7 @@ public void onDownloadFailed(Throwable error) {
7979 });
8080 }
8181
82- public static void downloadPatchFromPpk (UpdateContext updateContext , ReadableMap options , Promise promise ) {
82+ public static void downloadPatchFromPpk (UpdateContext updateContext , final ReadableMap options , final Promise promise ) {
8383 try {
8484 String url = options .getString ("updateUrl" );
8585 String hash = options .getString ("hash" );
@@ -102,7 +102,7 @@ public void onDownloadFailed(Throwable error) {
102102 }
103103 }
104104
105- public static void reloadUpdate (UpdateContext updateContext , ReactApplicationContext mContext , ReadableMap options , Promise promise ) {
105+ public static void reloadUpdate (UpdateContext updateContext , ReactApplicationContext mContext , final ReadableMap options , final Promise promise ) {
106106 final String hash = options .getString ("hash" );
107107 UiThreadUtil .runOnUiThread (new Runnable () {
108108 @ Override
@@ -176,7 +176,7 @@ public void run() {
176176 });
177177 }
178178
179- public static void restartApp (final ReactApplicationContext mContext , Promise promise ) {
179+ public static void restartApp (final ReactApplicationContext mContext , final Promise promise ) {
180180 UiThreadUtil .runOnUiThread (new Runnable () {
181181 @ Override
182182 public void run () {
@@ -206,7 +206,7 @@ public void run() {
206206 });
207207 }
208208
209- public static void setNeedUpdate (UpdateContext updateContext , ReadableMap options , Promise promise ) {
209+ public static void setNeedUpdate (UpdateContext updateContext , final ReadableMap options , final Promise promise ) {
210210 final String hash = options .getString ("hash" );
211211 UiThreadUtil .runOnUiThread (new Runnable () {
212212 @ Override
@@ -222,7 +222,7 @@ public void run() {
222222 });
223223 }
224224
225- public static void markSuccess (UpdateContext updateContext , Promise promise ) {
225+ public static void markSuccess (UpdateContext updateContext , final Promise promise ) {
226226 UiThreadUtil .runOnUiThread (new Runnable () {
227227 @ Override
228228 public void run () {
@@ -232,7 +232,7 @@ public void run() {
232232 });
233233 }
234234
235- public static void setUuid (UpdateContext updateContext , String uuid , Promise promise ) {
235+ public static void setUuid (UpdateContext updateContext , final String uuid , final Promise promise ) {
236236 UiThreadUtil .runOnUiThread (new Runnable () {
237237 @ Override
238238 public void run () {
@@ -253,7 +253,7 @@ public static boolean check(String json) {
253253 }
254254
255255
256- public static void setLocalHashInfo (UpdateContext updateContext , final String hash , final String info , Promise promise ) {
256+ public static void setLocalHashInfo (UpdateContext updateContext , final String hash , final String info , final Promise promise ) {
257257 UiThreadUtil .runOnUiThread (new Runnable () {
258258 @ Override
259259 public void run () {
@@ -268,7 +268,7 @@ public void run() {
268268 });
269269 }
270270
271- public static void getLocalHashInfo (UpdateContext updateContext , final String hash , Promise promise ) {
271+ public static void getLocalHashInfo (UpdateContext updateContext , final String hash , final Promise promise ) {
272272 String value = updateContext .getKv ("hash_" + hash );
273273 if (check (value )) {
274274 promise .resolve (value );
0 commit comments