diff options
author | lado <herrlado@gmail.com> | 2016-01-20 14:50:26 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2016-01-20 14:50:26 +0100 |
commit | f793ab2a27b4b74d954fdbbc557e95afe39023f2 (patch) | |
tree | 2c6e2c3ef7190403ba9cd4bdcba801103cfbdb4e /vdrmanager | |
parent | 53b8a653d0c32e3fc73dad0fc543efb0cc722e22 (diff) | |
download | vdr-manager-f793ab2a27b4b74d954fdbbc557e95afe39023f2.tar.gz vdr-manager-f793ab2a27b4b74d954fdbbc557e95afe39023f2.tar.bz2 |
fixed crashed from play store
Diffstat (limited to 'vdrmanager')
3 files changed, 22 insertions, 19 deletions
diff --git a/vdrmanager/app/src/main/AndroidManifest.xml b/vdrmanager/app/src/main/AndroidManifest.xml index 11ee937..f7b79e2 100644 --- a/vdrmanager/app/src/main/AndroidManifest.xml +++ b/vdrmanager/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.bjusystems.vdrmanager" - android:versionCode="12290" - android:versionName="12.29" > + android:versionCode="12300" + android:versionName="12.30" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> diff --git a/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/About.java b/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/About.java index 4d6290c..34ae472 100644 --- a/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/About.java +++ b/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/About.java @@ -8,11 +8,12 @@ import android.text.SpannableString; import android.text.util.Linkify; public class About { - - static AlertDialog about = null; - + public static void show(Activity activity){ - if(about == null){ + if(activity.isFinishing()){ + return; + } + String vi = ""; PackageInfo pi = Utils.getPackageInfo(activity); if(pi != null){ @@ -21,15 +22,13 @@ public class About { //View view = activity.getLayoutInflater().inflate(R.layout.about, null); final SpannableString s = new SpannableString(activity.getString(R.string.about_text,vi)); Linkify.addLinks(s, Linkify.ALL); - about = new AlertDialog.Builder(activity) + new AlertDialog.Builder(activity) .setTitle(R.string.about_title) .setMessage(s) .setPositiveButton(android.R.string.ok, null) .setCancelable(false) - .create(); - } - if(!activity.isFinishing()){ - about.show(); + .create() + .show(); } } -} + diff --git a/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java index a41be92..1086c40 100644 --- a/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java +++ b/vdrmanager/app/src/main/java/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java @@ -547,6 +547,14 @@ public class EpgDetailsActivity extends ActionBarActivity implements final Event cEvent = epgs.get(pager.getCurrentItem()); + if(v.getId() == R.id.epg_event_livetv) { + if (cEvent instanceof Recording) { + Utils.streamRecording(this, (Recording) cEvent); + } else { + Utils.stream(this, String.valueOf(cEvent.getChannelNumber())); + } + return; + } if (cEvent instanceof Timerable == false) { return; @@ -556,13 +564,6 @@ public class EpgDetailsActivity extends ActionBarActivity implements switch (v.getId()) { - case R.id.epg_event_livetv: - if (cEvent instanceof Recording) { - Utils.streamRecording(this, (Recording) cEvent); - } else { - Utils.stream(this, String.valueOf(cEvent.getChannelNumber())); - } - break; case R.id.epg_event_create_timer: final ArrayAdapter<Wrapper> ada = new ArrayAdapter<Wrapper>(this, android.R.layout.simple_dropdown_item_1line); @@ -792,6 +793,9 @@ public class EpgDetailsActivity extends ActionBarActivity implements public void onPageSelected(int position) { Event cEvent = epgs.get(position); + if(cEvent == null){ + return; + } String cn = cEvent.getChannelName(); // View view = pager.getChildAt(arg0); // state = (ImageView) view.findViewById(R.id.epg_timer_state); |