Skip to content

Commit

Permalink
Minor fixes to app
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleker committed Jul 30, 2017
1 parent 16358cb commit 4cf8344
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "news.androidtv.tvapprepo"
minSdkVersion 21
targetSdkVersion 25
versionCode 14
versionName "1.1.1-dev"
versionCode 15
versionName "1.1.2"
}
buildTypes {
release {
Expand Down
Expand Up @@ -86,7 +86,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

if (advancedOptions == null) {
advancedOptions = new AdvancedOptions(this);
advancedOptions = new AdvancedOptions(getApplicationContext());
}

loadCustomIconography();
Expand Down
@@ -1,22 +1,14 @@
package news.androidtv.tvapprepo.utils;

import android.app.Activity;
import android.app.Dialog;
import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Handler;
import android.os.Looper;
import android.support.v7.app.AlertDialog;
import android.text.Layout;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.Toast;

import com.android.volley.NetworkResponse;
Expand All @@ -35,8 +27,6 @@
import news.androidtv.tvapprepo.R;
import news.androidtv.tvapprepo.activities.AdvancedShortcutActivity;
import news.androidtv.tvapprepo.download.ApkDownloadHelper;
import news.androidtv.tvapprepo.iconography.IconsTask;
import news.androidtv.tvapprepo.iconography.PackedIcon;
import news.androidtv.tvapprepo.model.AdvancedOptions;

/**
Expand Down
Expand Up @@ -285,9 +285,11 @@ protected Integer doInBackground(String... urls) {
(DownloadManager) mActivity.getSystemService(Context.DOWNLOAD_SERVICE);
manager.enqueue(request);
} catch (Exception e) {
Toast.makeText(mActivity, e.getMessage(), Toast.LENGTH_SHORT).show();
Toast.makeText(mActivity.getApplicationContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
// Tell user about an error and throw with additional debug info.
throw new RuntimeException(e.getMessage() + ": " + downloadedFileName + ", " + urls[0] + ", " + DOWNLOADS_DIRECTORY.toString());
throw new RuntimeException(e.getMessage() + ": " + downloadedFileName + ", " +
urls[0] + ", " + DOWNLOADS_DIRECTORY.toString());
}
Log.i(TAG, "Download request for " + urls[0] + " enqueued");
Log.d(TAG, "Should be saved to " + downloadedFileName);
Expand Down

0 comments on commit 4cf8344

Please sign in to comment.