mirror of
https://github.com/etesync/android
synced 2025-01-14 09:40:58 +00:00
Remove gplay flavour to keep DAVdroid-OSE repo clean
* Remove gplay flavour to keep DAVdroid-OSE repo clean * update Android gradle plugin to 2.1.2
This commit is contained in:
parent
b49bdda7e8
commit
f6cb92dd6d
@ -24,10 +24,7 @@ android {
|
|||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
standard {
|
standard {
|
||||||
versionName "1.2"
|
versionName "1.2-ose"
|
||||||
}
|
|
||||||
gplay {
|
|
||||||
versionName "1.2-gplay"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright © 2013 – 2016 Ricki Hirner (bitfire web engineering).
|
|
||||||
~ All rights reserved. This program and the accompanying materials
|
|
||||||
~ are made available under the terms of the GNU Public License v3.0
|
|
||||||
~ which accompanies this distribution, and is available at
|
|
||||||
~ http://www.gnu.org/licenses/gpl.html
|
|
||||||
-->
|
|
||||||
|
|
||||||
<menu xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_about"
|
|
||||||
android:icon="@drawable/ic_info_dark"
|
|
||||||
android:title="@string/navigation_drawer_about"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_app_settings"
|
|
||||||
android:icon="@drawable/ic_settings_dark"
|
|
||||||
android:title="@string/navigation_drawer_settings"/>
|
|
||||||
|
|
||||||
<item android:title="@string/navigation_drawer_news_updates">
|
|
||||||
<menu>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_twitter"
|
|
||||||
android:icon="@drawable/twitter"
|
|
||||||
android:title="\@davdroidapp"
|
|
||||||
tools:ignore="HardcodedText"/>
|
|
||||||
</menu>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item android:title="@string/navigation_drawer_external_links">
|
|
||||||
<menu>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_website"
|
|
||||||
android:icon="@drawable/ic_home_dark"
|
|
||||||
android:title="@string/navigation_drawer_website"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_faq"
|
|
||||||
android:icon="@drawable/ic_help_dark"
|
|
||||||
android:title="@string/navigation_drawer_faq"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_forums"
|
|
||||||
android:icon="@drawable/ic_forum_dark"
|
|
||||||
android:title="@string/navigation_drawer_forums"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_donate"
|
|
||||||
android:icon="@drawable/ic_attach_money_dark"
|
|
||||||
android:title="(entry disabled)"
|
|
||||||
android:visible="false"
|
|
||||||
tools:ignore="HardcodedText"/>
|
|
||||||
</menu>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</menu>
|
|
@ -96,8 +96,7 @@ public class AccountsActivity extends AppCompatActivity implements NavigationVie
|
|||||||
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("forums/").build()));
|
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("forums/").build()));
|
||||||
break;
|
break;
|
||||||
case R.id.nav_donate:
|
case R.id.nav_donate:
|
||||||
if (BuildConfig.FLAVOR != App.FLAVOR_GOOGLE_PLAY)
|
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("donate/").build()));
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("donate/").build()));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,6 @@ public class AppSettingsActivity extends AppCompatActivity {
|
|||||||
private void resetHints() {
|
private void resetHints() {
|
||||||
@Cleanup ServiceDB.OpenHelper dbHelper = new ServiceDB.OpenHelper(getContext());
|
@Cleanup ServiceDB.OpenHelper dbHelper = new ServiceDB.OpenHelper(getContext());
|
||||||
Settings settings = new Settings(dbHelper.getWritableDatabase());
|
Settings settings = new Settings(dbHelper.getWritableDatabase());
|
||||||
settings.remove(StartupDialogFragment.HINT_GOOGLE_PLAY_ACCOUNTS_REMOVED);
|
|
||||||
settings.remove(StartupDialogFragment.HINT_OPENTASKS_NOT_INSTALLED);
|
settings.remove(StartupDialogFragment.HINT_OPENTASKS_NOT_INSTALLED);
|
||||||
Snackbar.make(getView(), R.string.app_settings_reset_hints_success, Snackbar.LENGTH_LONG).show();
|
Snackbar.make(getView(), R.string.app_settings_reset_hints_success, Snackbar.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ import lombok.Cleanup;
|
|||||||
|
|
||||||
public class StartupDialogFragment extends DialogFragment {
|
public class StartupDialogFragment extends DialogFragment {
|
||||||
public static final String
|
public static final String
|
||||||
HINT_GOOGLE_PLAY_ACCOUNTS_REMOVED = "hint_GooglePlayAccountsRemoved",
|
|
||||||
HINT_OPENTASKS_NOT_INSTALLED = "hint_OpenTasksNotInstalled";
|
HINT_OPENTASKS_NOT_INSTALLED = "hint_OpenTasksNotInstalled";
|
||||||
|
|
||||||
private static final String ARGS_MODE = "mode";
|
private static final String ARGS_MODE = "mode";
|
||||||
@ -45,7 +44,6 @@ public class StartupDialogFragment extends DialogFragment {
|
|||||||
enum Mode {
|
enum Mode {
|
||||||
DEVELOPMENT_VERSION,
|
DEVELOPMENT_VERSION,
|
||||||
FDROID_DONATE,
|
FDROID_DONATE,
|
||||||
GOOGLE_PLAY_ACCOUNTS_REMOVED,
|
|
||||||
OPENTASKS_NOT_INSTALLED
|
OPENTASKS_NOT_INSTALLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,20 +55,8 @@ public class StartupDialogFragment extends DialogFragment {
|
|||||||
|
|
||||||
if (BuildConfig.VERSION_NAME.contains("-alpha") || BuildConfig.VERSION_NAME.contains("-beta") || BuildConfig.VERSION_NAME.contains("-rc"))
|
if (BuildConfig.VERSION_NAME.contains("-alpha") || BuildConfig.VERSION_NAME.contains("-beta") || BuildConfig.VERSION_NAME.contains("-rc"))
|
||||||
dialogs.add(StartupDialogFragment.instantiate(Mode.DEVELOPMENT_VERSION));
|
dialogs.add(StartupDialogFragment.instantiate(Mode.DEVELOPMENT_VERSION));
|
||||||
else {
|
else
|
||||||
// store-specific information
|
dialogs.add(StartupDialogFragment.instantiate(Mode.FDROID_DONATE));
|
||||||
if (BuildConfig.FLAVOR == App.FLAVOR_GOOGLE_PLAY) {
|
|
||||||
// Play store
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP && // only on Android <5
|
|
||||||
settings.getBoolean(HINT_GOOGLE_PLAY_ACCOUNTS_REMOVED, true)) // and only when "Don't show again" hasn't been clicked yet
|
|
||||||
dialogs.add(StartupDialogFragment.instantiate(Mode.GOOGLE_PLAY_ACCOUNTS_REMOVED));
|
|
||||||
} else {
|
|
||||||
// other stores
|
|
||||||
final String installedFrom = installedFrom(context);
|
|
||||||
if (installedFrom == null || installedFrom.startsWith("org.fdroid"))
|
|
||||||
dialogs.add(StartupDialogFragment.instantiate(Mode.FDROID_DONATE));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// OpenTasks information
|
// OpenTasks information
|
||||||
if (!LocalTaskList.tasksProviderAvailable(context) &&
|
if (!LocalTaskList.tasksProviderAvailable(context) &&
|
||||||
@ -117,54 +103,19 @@ public class StartupDialogFragment extends DialogFragment {
|
|||||||
.create();
|
.create();
|
||||||
|
|
||||||
case FDROID_DONATE:
|
case FDROID_DONATE:
|
||||||
if (BuildConfig.FLAVOR != App.FLAVOR_GOOGLE_PLAY)
|
|
||||||
return new AlertDialog.Builder(getActivity())
|
|
||||||
.setIcon(R.drawable.ic_launcher)
|
|
||||||
.setTitle(R.string.startup_donate)
|
|
||||||
.setMessage(R.string.startup_donate_message)
|
|
||||||
.setPositiveButton(R.string.startup_donate_now, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("donate/").build()));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.startup_donate_later, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.create();
|
|
||||||
else
|
|
||||||
throw new IllegalArgumentException();
|
|
||||||
|
|
||||||
case GOOGLE_PLAY_ACCOUNTS_REMOVED:
|
|
||||||
Drawable icon = null;
|
|
||||||
try {
|
|
||||||
icon = getContext().getPackageManager().getApplicationIcon("com.android.vending").getCurrent();
|
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
|
||||||
App.log.log(Level.WARNING, "Can't load Play Store icon", e);
|
|
||||||
}
|
|
||||||
return new AlertDialog.Builder(getActivity())
|
return new AlertDialog.Builder(getActivity())
|
||||||
.setIcon(icon)
|
.setIcon(R.drawable.ic_launcher)
|
||||||
.setTitle(R.string.startup_google_play_accounts_removed)
|
.setTitle(R.string.startup_donate)
|
||||||
.setMessage(R.string.startup_google_play_accounts_removed_message)
|
.setMessage(R.string.startup_donate_message)
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.startup_donate_now, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("donate/").build()));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNeutralButton(R.string.startup_google_play_accounts_removed_more_info, new DialogInterface.OnClickListener() {
|
.setNegativeButton(R.string.startup_donate_later, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("faq/").build());
|
|
||||||
getContext().startActivity(intent);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.startup_dont_show_again, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Settings settings = new Settings(dbHelper.getWritableDatabase());
|
|
||||||
settings.putBoolean(HINT_GOOGLE_PLAY_ACCOUNTS_REMOVED, false);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.create();
|
.create();
|
||||||
|
@ -12,7 +12,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
classpath 'com.android.tools.build:gradle:2.1.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user