Skip to content

Commit

Permalink
Version 3.22.4
Browse files Browse the repository at this point in the history
- Various fixes.
  • Loading branch information
micwallace committed Mar 30, 2020
1 parent 24b2e70 commit fec92b1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
Binary file modified Repo/reddinator-release.apk
Binary file not shown.
8 changes: 5 additions & 3 deletions reddinator/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="au.com.wallaceit.reddinator"
android:versionCode="67"
android:versionName="3.22.3">
android:versionCode="68"
android:versionName="3.22.4">

<uses-permission android:name="android.permission.INTERNET" />
<!-- Needed by some activity_webview HTML5 video implementations (Bug report received for Android 4.1) -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:name=".Reddinator"
Expand All @@ -18,7 +19,8 @@
android:icon="@drawable/reddinator_logo"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:replace="android:theme">
tools:replace="android:theme"
android:usesCleartextTraffic="true">
<activity
android:name=".activity.MainActivity"
android:configChanges="orientation|screenSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,8 @@ private void throwOAuthError(JSONObject resultjson) throws RedditApiException {
}

private void saveAppToken(){
sharedPrefs.edit().putString("oauthAppToken", oauthAppToken == null ? "" : oauthAppToken.toString()).apply();
String token = oauthAppToken == null ? "" : oauthAppToken.toString();
sharedPrefs.edit().putString("oauthAppToken", token).apply();
}

private void saveUserData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.JobIntentService;
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import org.json.JSONArray;

Expand All @@ -47,7 +49,11 @@ public static void checkMail(Context context, String action){
Intent intent = new Intent(context, MailCheckService.class);
intent.setAction(action);

MailCheckService.enqueueWork(context, MailCheckService.class, JOB_ID, intent);
try {
MailCheckService.enqueueWork(context, MailCheckService.class, JOB_ID, intent);
} catch (Exception e){
Log.e("reddinator", e.getMessage());
}
}

@Override
Expand All @@ -64,6 +70,11 @@ protected void onHandleWork(@NonNull Intent intent) {
}
}

@Override
public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
return START_NOT_STICKY;
}

private static class MailCheckTask extends AsyncTask<String, Void, Boolean> {

Reddinator global;
Expand Down

0 comments on commit fec92b1

Please sign in to comment.