Skip to content

Commit

Permalink
Merge branch 'release-13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Apr 17, 2014
2 parents e8c73cd + a7c0e40 commit b8d21f0
Show file tree
Hide file tree
Showing 39 changed files with 69 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Changelog

All dates are in the European Central timezone.

Version 13.1 *(2014-04-17)*
-----------------------------

* Extensions API: now all users can add up to two extensions. To add more subscribe or buy the X Pass!

Version 13.0.1 *(2014-04-17)*
-----------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.battlelancer.seriesguide.R;
import com.battlelancer.seriesguide.api.SeriesGuideExtension;
import com.battlelancer.seriesguide.extensions.ExtensionManager;
import com.battlelancer.seriesguide.extensions.ExtensionsConfigurationFragment;
import com.battlelancer.seriesguide.util.Utils;
import de.greenrobot.event.EventBus;

Expand Down Expand Up @@ -84,6 +85,14 @@ public View getView(final int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mLayoutInflater.inflate(LAYOUT_ADD, parent, false);
}
// warn non-supporters that they only can add a few extensions
boolean isAtLimit =
getCount() - 1 == ExtensionsConfigurationFragment.EXTENSION_LIMIT_FREE
&& !Utils.hasAccessToX(getContext());
convertView.findViewById(R.id.textViewItemExtensionAddLabel)
.setVisibility(isAtLimit ? View.GONE : View.VISIBLE);
convertView.findViewById(R.id.textViewItemExtensionAddLimit)
.setVisibility(isAtLimit ? View.VISIBLE : View.GONE);
return convertView;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
public class ExtensionsConfigurationFragment extends SherlockFragment
implements AdapterView.OnItemClickListener {

public static final int EXTENSION_LIMIT_FREE = 2;

private static final String TAG = "Extension Configuration";
private static final String PLAY_STORE_EXTENSIONS_SEARCH
= "https://play.google.com/store/search?q=SeriesGuide%20Extension&c=apps";
Expand Down Expand Up @@ -260,7 +262,9 @@ public void onLoaderReset(Loader<List<ExtensionManager.Extension>> loader) {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (position == mAdapter.getCount() - 1) {
if (!Utils.hasAccessToX(getActivity())) {
// non-supporters only can add a few extensions
if (mAdapter.getCount() - 1 == EXTENSION_LIMIT_FREE
&& !Utils.hasAccessToX(getActivity())) {
Utils.advertiseSubscription(getActivity());
return;
}
Expand All @@ -270,10 +274,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
}

public void onEventMainThread(ExtensionsAdapter.ExtensionDisableRequestEvent event) {
if (!Utils.hasAccessToX(getActivity())) {
Utils.advertiseSubscription(getActivity());
return;
}
mEnabledExtensions.remove(event.position);
getLoaderManager().restartLoader(ExtensionsConfigurationActivity.LOADER_ACTIONS_ID, null,
mExtensionsLoaderCallbacks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.battlelancer.seriesguide.service;

import android.support.v4.app.TaskStackBuilder;
import android.text.TextUtils;
import com.battlelancer.seriesguide.provider.SeriesGuideContract.Episodes;
import com.battlelancer.seriesguide.provider.SeriesGuideContract.Shows;
import com.battlelancer.seriesguide.provider.SeriesGuideDatabase.Tables;
Expand Down Expand Up @@ -422,11 +423,11 @@ private void onNotify(final Cursor upcomingEpisodes, List<Integer> notifyPositio
.getString(NotificationQuery.OVERVIEW);

final SpannableStringBuilder bigText = new SpannableStringBuilder();
bigText.append(episodeTitle);
bigText.append(TextUtils.isEmpty(episodeTitle) ? "" : episodeTitle);
bigText.setSpan(new ForegroundColorSpan(Color.WHITE), 0, bigText.length(),
0);
bigText.append("\n");
bigText.append(episodeSummary);
bigText.append(TextUtils.isEmpty(episodeSummary) ? "" : episodeSummary);

nb.setStyle(new NotificationCompat.BigTextStyle().bigText(bigText)
.setSummaryText(contentText));
Expand Down Expand Up @@ -456,7 +457,8 @@ private void onNotify(final Cursor upcomingEpisodes, List<Integer> notifyPositio
final SpannableStringBuilder lineText = new SpannableStringBuilder();

// show title
lineText.append(upcomingEpisodes.getString(NotificationQuery.SHOW_TITLE));
String showTitle = upcomingEpisodes.getString(NotificationQuery.SHOW_TITLE);
lineText.append(TextUtils.isEmpty(showTitle) ? "" : showTitle);
lineText.setSpan(new ForegroundColorSpan(Color.WHITE), 0, lineText.length(), 0);

lineText.append(" ");
Expand Down
9 changes: 9 additions & 0 deletions SeriesGuide/src/main/res/layout/item_extension_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@
android:text="@string/action_extensions_add"
android:textAppearance="@style/TextAppearance.Medium" />

<TextView
android:id="@+id/textViewItemExtensionAddLimit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/action_extensions_limit"
android:textAppearance="@style/TextAppearance.Small.Highlight.Blue"
android:visibility="gone" />

</FrameLayout>
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">الإضافات</string>
<string name="action_extensions_configure">تخصيص الإضافات</string>
<string name="action_extensions_add">إضافة ملحق</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">المزيد من الإضافات</string>
<string name="action_extension_settings">الإعدادات</string>
<string name="action_extension_remove">إزالة</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Настройки</string>
<string name="action_extension_remove">Премахване</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Rozšíření</string>
<string name="action_extensions_configure">Přispůsobení rozšířeních</string>
<string name="action_extensions_add">Přidat rozšíření</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Získat další rozšíření</string>
<string name="action_extension_settings">Nastavení</string>
<string name="action_extension_remove">Odstranit</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Indstillinger</string>
<string name="action_extension_remove">Fjern</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Erweiterungen</string>
<string name="action_extensions_configure">Erweiterungen anpassen</string>
<string name="action_extensions_add">Erweiterung hinzufügen</string>
<string name="action_extensions_limit">Erwerben Sie X um mehr Erweiterungen hinzuzufügen</string>
<string name="action_extensions_search">Mehr Erweiterungen</string>
<string name="action_extension_settings">Einstellungen</string>
<string name="action_extension_remove">Löschen</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Ρυθμίσεις</string>
<string name="action_extension_remove">Αφαίρεση</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Configuración</string>
<string name="action_extension_remove">Eliminar</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">تنظیمات</string>
<string name="action_extension_remove">Remove</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Laajennukset</string>
<string name="action_extensions_configure">Muokkaa laajennuksia</string>
<string name="action_extensions_add">Lisää laajennus</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Hanki lisää laajennuksia</string>
<string name="action_extension_settings">Asetukset</string>
<string name="action_extension_remove">Poista</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Personnaliser les extensions</string>
<string name="action_extensions_add">Ajouter une extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Obtenir plus d\'extensions</string>
<string name="action_extension_settings">Paramètres</string>
<string name="action_extension_remove">Supprimer</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-hr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Postavke</string>
<string name="action_extension_remove">Izbriši</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Beállítások</string>
<string name="action_extension_remove">Törlés</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Impostazioni</string>
<string name="action_extension_remove">Rimuovere</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">תוספים</string>
<string name="action_extensions_configure">התאמת תוספים</string>
<string name="action_extensions_add">הוספת תוסף</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">חפש תוספים נוספים</string>
<string name="action_extension_settings">הגדרות</string>
<string name="action_extension_remove">הסר</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">설정</string>
<string name="action_extension_remove">삭제</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-lt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Nustatymai</string>
<string name="action_extension_remove">Pašalinti</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-lv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Iestatījumi</string>
<string name="action_extension_remove">Remove</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Innstillinger</string>
<string name="action_extension_remove">Fjern</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensies</string>
<string name="action_extensions_configure">Extensies aanpassen</string>
<string name="action_extensions_add">Extensie toevoegen</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Vind meer extensies</string>
<string name="action_extension_settings">Instellingen</string>
<string name="action_extension_remove">Verwijderen</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Rozszerzenia</string>
<string name="action_extensions_configure">Dostosuj rozszerzenia</string>
<string name="action_extensions_add">Dodaj rozszerzenia</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Pobierz więcej rozszerzeń</string>
<string name="action_extension_settings">Ustawienia</string>
<string name="action_extension_remove">Usuń</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Configurações</string>
<string name="action_extension_remove">Remover</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-pt-rPT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensões</string>
<string name="action_extensions_configure">Personalizar extensões</string>
<string name="action_extensions_add">Adicionar extensão</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Obter mais extensões</string>
<string name="action_extension_settings">Definições</string>
<string name="action_extension_remove">Remover</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Setări</string>
<string name="action_extension_remove">Eliminați</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Настройки</string>
<string name="action_extension_remove">Удалить</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-sk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Nastavenia</string>
<string name="action_extension_remove">Odstrániť</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-sl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Nastavitve</string>
<string name="action_extension_remove">odstrani</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-sr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Подешавања</string>
<string name="action_extension_remove">Уклони</string>
Expand Down
1 change: 1 addition & 0 deletions SeriesGuide/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
<string name="extensions">Extensions</string>
<string name="action_extensions_configure">Customize extensions</string>
<string name="action_extensions_add">Add extension</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Get more extensions</string>
<string name="action_extension_settings">Inställningar</string>
<string name="action_extension_remove">Ta bort</string>
Expand Down
3 changes: 2 additions & 1 deletion SeriesGuide/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<string name="arttask_incomplete">Bazı posterler yüklenemedi, daha sonra tekrar deneyin.</string>
<string name="arttask_start">Posterler yükleniyor…</string>
<string name="show_on_network">kanal %s</string>
<string name="season_watchcount">izlenilmemiş bölüm</string>
<string name="season_watchcount">izlenmeyen bölümler</string>
<string name="season_allwatched">Tüm bölümler izlendi</string>
<string name="season_onenotwatched">bölüm izlenmedi</string>
<string name="season_unaired">yayınlanmadı</string>
Expand Down Expand Up @@ -364,6 +364,7 @@
<string name="extensions">Eklentiler</string>
<string name="action_extensions_configure">Eklentileri özelleştir</string>
<string name="action_extensions_add">Eklenti ekle</string>
<string name="action_extensions_limit">Get X to add more extensions</string>
<string name="action_extensions_search">Daha fazla eklenti edin</string>
<string name="action_extension_settings">Ayarlar</string>
<string name="action_extension_remove">Kaldır</string>
Expand Down
Loading

0 comments on commit b8d21f0

Please sign in to comment.