From cc06722f7e01aa298a9d987ba1eafaccaaf06b01 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 3 Jun 2016 11:39:43 +0200 Subject: Prevent NPE --- .../main/java/de/danoeh/antennapod/activity/StorageErrorActivity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/src/main/java/de/danoeh/antennapod/activity/StorageErrorActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/StorageErrorActivity.java index f22507f4c..81d727283 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/StorageErrorActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/StorageErrorActivity.java @@ -189,6 +189,9 @@ public class StorageErrorActivity extends AppCompatActivity { } else { path = getExternalFilesDir(null); } + if(path == null) { + return; + } String message = null; if(!path.exists()) { message = String.format(getString(R.string.folder_does_not_exist_error), dir); -- cgit v1.2.3 From c97fb13361dbd4d7fa270ef91710bd0d7cd9ea3c Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 3 Jun 2016 11:47:04 +0200 Subject: Prevent NPE --- .../java/de/danoeh/antennapod/activity/VideoplayerActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index a4ffebae2..8531a7356 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -112,7 +112,7 @@ public class VideoplayerActivity extends MediaplayerActivity { @Override protected boolean loadMediaInfo() { - if (!super.loadMediaInfo()) { + if (!super.loadMediaInfo() || controller == null) { return false; } Playable media = controller.getMedia(); @@ -152,7 +152,7 @@ public class VideoplayerActivity extends MediaplayerActivity { @Override protected void onAwaitingVideoSurface() { - if (videoSurfaceCreated) { + if (videoSurfaceCreated && controller != null) { Log.d(TAG, "Videosurface already created, setting videosurface now"); Pair videoSize = controller.getVideoSize(); @@ -240,7 +240,7 @@ public class VideoplayerActivity extends MediaplayerActivity { public void surfaceCreated(SurfaceHolder holder) { Log.d(TAG, "Videoview holder created"); videoSurfaceCreated = true; - if (controller.getStatus() == PlayerStatus.PLAYING) { + if (controller != null && controller.getStatus() == PlayerStatus.PLAYING) { if (controller.serviceAvailable()) { controller.setVideoSurface(holder); } else { @@ -254,7 +254,7 @@ public class VideoplayerActivity extends MediaplayerActivity { public void surfaceDestroyed(SurfaceHolder holder) { Log.d(TAG, "Videosurface was destroyed"); videoSurfaceCreated = false; - if (!destroyingDueToReload) { + if (controller != null && !destroyingDueToReload) { controller.notifyVideoSurfaceAbandoned(); } } -- cgit v1.2.3 From eca8fc90b8a0a4cb6d83baa1277df8b391e634bb Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 3 Jun 2016 12:56:30 +0200 Subject: Prevent onServiceConnected ClassCastException --- .../java/de/danoeh/antennapod/service/PlayerWidgetService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java index 323060f81..6d1429df1 100644 --- a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java +++ b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java @@ -196,9 +196,10 @@ public class PlayerWidgetService extends Service { public void onServiceConnected(ComponentName className, IBinder service) { Log.d(TAG, "Connection to service established"); synchronized (psLock) { - playbackService = ((PlaybackService.LocalBinder) service) - .getService(); - startViewUpdaterIfNotRunning(); + if(service instanceof PlaybackService.LocalBinder == false) { + playbackService = ((PlaybackService.LocalBinder) service).getService(); + startViewUpdaterIfNotRunning(); + } } } -- cgit v1.2.3 From 6062ff54b3df13a4c24d09036867e168518aec4d Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 3 Jun 2016 13:03:50 +0200 Subject: 1.6.0.8 --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c1b72602a..df4412d33 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="1060008" + android:versionName="1.6.0.8">