Removed TTS from Play Store release

Google doesn't allow this in the Play Store and based on past experiences trying to fight this is a waste of time
master
M66B 4 months ago
parent 4037644919
commit d336f77dd2

@ -14,7 +14,6 @@
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="com.android.vending.BILLING" />
@ -633,11 +632,6 @@
android:name=".ServiceUI"
android:exported="false" />
<service
android:name=".ServiceTTS"
android:exported="false"
android:foregroundServiceType="mediaPlayback" />
<service
android:name=".ServiceExternal"
android:exported="true"

@ -2463,7 +2463,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibSearchText.setVisibility(tools && !outbox && button_search_text && message.content ? View.VISIBLE : View.GONE);
ibSearch.setVisibility(tools && !outbox && button_search && (froms > 0 || tos > 0) ? View.VISIBLE : View.GONE);
ibTranslate.setVisibility(tools && !outbox && button_translate && DeepL.isAvailable(context) && message.content ? View.VISIBLE : View.GONE);
ibTts.setVisibility(tools && !outbox && button_tts && message.content ? View.VISIBLE : View.GONE);
ibTts.setVisibility(tools && !outbox && button_tts && message.content && !Helper.isPlayStoreInstall() ? View.VISIBLE : View.GONE);
ibSummarize.setVisibility(tools && !outbox && button_summarize && AI.isAvailable(context) && message.content ? View.VISIBLE : View.GONE);
ibFullScreen.setVisibility(tools && full && button_full_screen && message.content ? View.VISIBLE : View.GONE);
ibForceLight.setVisibility(tools && (full || experiments) && dark && button_force_light && message.content ? View.VISIBLE : View.GONE);

@ -1318,6 +1318,9 @@ public class EntityRule {
}
private static void speak(Context context, EntityRule rule, EntityMessage message) throws IOException {
if (Helper.isPlayStoreInstall())
throw new IllegalArgumentException("TTS is available in the GitHub version only because Google doesn't allow it in the Play Store :-(");
Log.i("Speaking name=" + rule.name);
if (message.ui_seen)

@ -2253,10 +2253,12 @@ public class FragmentAccount extends FragmentBase {
importance.name = context.getString(R.string.title_set_importance);
folders.add(importance);
EntityFolder tts = new EntityFolder();
tts.id = EntityMessage.SWIPE_ACTION_TTS;
tts.name = context.getString(R.string.title_rule_tts);
folders.add(tts);
if (!Helper.isPlayStoreInstall()) {
EntityFolder tts = new EntityFolder();
tts.id = EntityMessage.SWIPE_ACTION_TTS;
tts.name = context.getString(R.string.title_rule_tts);
folders.add(tts);
}
if (AI.isAvailable(context)) {
EntityFolder summarize = new EntityFolder();

@ -90,6 +90,7 @@ public class FragmentDialogButtons extends FragmentDialogBase {
cbSearch.setChecked(prefs.getBoolean("button_search", false));
cbSearchText.setChecked(prefs.getBoolean("button_search_text", false));
cbTranslate.setChecked(prefs.getBoolean("button_translate", true));
cbTts.setVisibility(Helper.isPlayStoreInstall() ? View.GONE : View.VISIBLE);
cbTts.setChecked(prefs.getBoolean("button_tts", false));
cbSummarize.setChecked(prefs.getBoolean("button_summarize", false));
cbFullScreen.setChecked(prefs.getBoolean("button_full_screen", false));

@ -3064,6 +3064,13 @@ public class FragmentMessages extends FragmentBase
swipes.swipe_right = null;
}
if (Helper.isPlayStoreInstall()) {
if (EntityMessage.SWIPE_ACTION_TTS.equals(swipes.swipe_left))
swipes.swipe_left = null;
if (EntityMessage.SWIPE_ACTION_TTS.equals(swipes.swipe_right))
swipes.swipe_right = null;
}
if (message.accountProtocol != EntityAccount.TYPE_IMAP)
return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);

@ -520,6 +520,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
}
});
cbNotifyActionTts.setVisibility(Helper.isPlayStoreInstall() ? View.GONE : View.VISIBLE);
cbNotifyActionTts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {

@ -1223,10 +1223,12 @@ public class FragmentPop extends FragmentBase {
importance.name = getString(R.string.title_set_importance);
folders.add(importance);
EntityFolder tts = new EntityFolder();
tts.id = EntityMessage.SWIPE_ACTION_TTS;
tts.name = context.getString(R.string.title_rule_tts);
folders.add(tts);
if (!Helper.isPlayStoreInstall()) {
EntityFolder tts = new EntityFolder();
tts.id = EntityMessage.SWIPE_ACTION_TTS;
tts.name = context.getString(R.string.title_rule_tts);
folders.add(tts);
}
if (AI.isAvailable(context)) {
EntityFolder summarize = new EntityFolder();

@ -720,7 +720,8 @@ public class FragmentRule extends FragmentBase {
actions.add(new Action(EntityRule.TYPE_ANSWER, getString(R.string.title_rule_answer), R.drawable.twotone_reply_24));
if (AI.isAvailable(getContext()))
actions.add(new Action(EntityRule.TYPE_SUMMARIZE, getString(R.string.title_rule_summarize), R.drawable.twotone_smart_toy_24));
actions.add(new Action(EntityRule.TYPE_TTS, getString(R.string.title_rule_tts), R.drawable.twotone_record_voice_over_24));
if (!Helper.isPlayStoreInstall())
actions.add(new Action(EntityRule.TYPE_TTS, getString(R.string.title_rule_tts), R.drawable.twotone_record_voice_over_24));
actions.add(new Action(EntityRule.TYPE_SOUND, getString(R.string.title_rule_sound), R.drawable.twotone_play_arrow_24));
actions.add(new Action(EntityRule.TYPE_AUTOMATION, getString(R.string.title_rule_automation), R.drawable.twotone_auto_awesome_24));
actions.add(new Action(EntityRule.TYPE_URL, getString(R.string.title_rule_url), R.drawable.twotone_insert_link_45_24));

@ -1336,7 +1336,7 @@ class NotificationHelper {
wactions.add(actionSnooze.build());
}
if (message.content && notify_tts) {
if (message.content && notify_tts && !Helper.isPlayStoreInstall()) {
Intent tts = new Intent(context, ServiceTTS.class)
.setAction("tts:" + message.id)
.putExtra(ServiceTTS.EXTRA_FLUSH, true)

@ -14,7 +14,6 @@
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="com.android.vending.BILLING" />
@ -635,11 +634,6 @@
android:name=".ServiceUI"
android:exported="false" />
<service
android:name=".ServiceTTS"
android:exported="false"
android:foregroundServiceType="mediaPlayback" />
<service
android:name=".ServiceExternal"
android:exported="true"

Loading…
Cancel
Save