mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 23:03:00 +00:00 
			
		
		
		
	Update CheckForNewAppVersionTask.java
This commit is contained in:
		| @@ -47,6 +47,7 @@ import okhttp3.Response; | |||||||
|  */ |  */ | ||||||
| public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> { | public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> { | ||||||
|  |  | ||||||
|  |     private static final boolean DEBUG = MainActivity.DEBUG; | ||||||
|     private static final Application app = App.getApp(); |     private static final Application app = App.getApp(); | ||||||
|     private static final String GITHUB_APK_SHA1 = "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15"; |     private static final String GITHUB_APK_SHA1 = "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15"; | ||||||
|     private static final String newPipeApiUrl = "https://newpipe.schabi.org/api/data.json"; |     private static final String newPipeApiUrl = "https://newpipe.schabi.org/api/data.json"; | ||||||
| @@ -91,6 +92,7 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> { | |||||||
|             return response.body().string(); |             return response.body().string(); | ||||||
|         } catch (IOException ex) { |         } catch (IOException ex) { | ||||||
|             // connectivity problems, do not alarm user and fail silently |             // connectivity problems, do not alarm user and fail silently | ||||||
|  | 	    if (DEBUG) ex.printStackTrace(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return null; |         return null; | ||||||
| @@ -115,9 +117,8 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> { | |||||||
|                 compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); |                 compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); | ||||||
|  |  | ||||||
|             } catch (JSONException ex) { |             } catch (JSONException ex) { | ||||||
|                 ErrorActivity.reportError(app, ex, null, null, |                 // connectivity problems, do not alarm user and fail silently | ||||||
|                         ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", | 	        if (DEBUG) ex.printStackTrace(); | ||||||
|                         "could not parse app update JSON data", R.string.app_ui_crash)); |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Redirion
					Redirion