From c28d4f941c36d6cc2cef6c7fccb984e4bf22c885 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Wed, 15 Oct 2014 11:41:12 +0200 Subject: [PATCH] re-add dead-man-switch for 0.9.29 release Bomb the new release for january 2015 - i still do not trust google as i got NO response from them --- .../android/vanilla/LibraryActivity.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/ch/blinkenlights/android/vanilla/LibraryActivity.java b/src/ch/blinkenlights/android/vanilla/LibraryActivity.java index de06b23f..b8ddc886 100644 --- a/src/ch/blinkenlights/android/vanilla/LibraryActivity.java +++ b/src/ch/blinkenlights/android/vanilla/LibraryActivity.java @@ -60,6 +60,12 @@ import android.widget.ListView; import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; + +import android.text.Html; +import android.text.util.Linkify; +import android.text.method.LinkMovementMethod; +import java.util.Calendar; + import com.viewpagerindicator.TabPageIndicator; import java.io.File; import junit.framework.Assert; @@ -157,6 +163,36 @@ public class LibraryActivity */ private LibraryAdapter mCurrentAdapter; + + public void checkForStupidity() { + + Calendar cal = Calendar.getInstance(); + int month = cal.get(Calendar.MONTH); + int year = cal.get(Calendar.YEAR); + + if (month == 0 && year == 2015) { // January 2015 + ((TextView) new AlertDialog.Builder(this) + .setTitle("Info") + .setIcon(android.R.drawable.ic_dialog_info) + .setMessage(Html.fromHtml("Note
Vanilla Music has been removed from the play store due to "+ + "Google going bananas:
Google claims that Vanilla Music may violate intellectual property, but does not tell me how they came to this conclusion."+ + "
(See: here)

"+ + "Unfortunately there is nothing i can do about this - but you can avoid google and keep getting updates on Vanilla Music by switching to F-Droid!"+ + "

" + )) + .setNeutralButton("Ok", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + } + } + ) + .show() + .findViewById(android.R.id.message)) + .setMovementMethod(LinkMovementMethod.getInstance()); + } + } + + @Override public void onCreate(Bundle state) { @@ -164,6 +200,7 @@ public class LibraryActivity if (state == null) { checkForLaunch(getIntent()); + checkForStupidity(); } setContentView(R.layout.library_content);