mirror of
https://github.com/etesync/android
synced 2024-11-13 03:09:10 +00:00
Version bump to 0.8.0-beta3
* don't offer to install Tasks from InstallAppsFragment, show instructions instead * fix crash when displaying "todo lists" heading in "selection collections" fragment (fixes #512, fixes #513) * use Android SDK build tools v22.0.1
This commit is contained in:
parent
af011a65db
commit
f3e83922f7
@ -9,7 +9,7 @@
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="at.bitfire.davdroid"
|
||||
android:versionCode="64" android:versionName="0.8.0-beta1"
|
||||
android:versionCode="66" android:versionName="0.8.0-beta3"
|
||||
android:installLocation="internalOnly">
|
||||
|
||||
<uses-sdk
|
||||
|
@ -11,7 +11,7 @@ import net.fortuna.ical4j.model.property.ProdId;
|
||||
|
||||
public class Constants {
|
||||
public static final String
|
||||
APP_VERSION = "0.8.0-beta1",
|
||||
APP_VERSION = "0.8.0-beta3",
|
||||
ACCOUNT_TYPE = "bitfire.at.davdroid",
|
||||
WEB_URL_HELP = "https://davdroid.bitfire.at/configuration?pk_campaign=davdroid-app",
|
||||
WEB_URL_VIEW_LOGS = "https://github.com/bitfireAT/davdroid/wiki/How-to-view-the-logs";
|
||||
|
@ -516,10 +516,6 @@ public class LocalCalendar extends LocalCollection<Event> {
|
||||
protected Builder buildEntry(Builder builder, Resource resource, boolean update) {
|
||||
final Event event = (Event)resource;
|
||||
|
||||
if (!update)
|
||||
builder .withValue(Events.ACCOUNT_TYPE, account.type)
|
||||
.withValue(Events.ACCOUNT_NAME, account.name);
|
||||
|
||||
builder .withValue(Events.CALENDAR_ID, id)
|
||||
.withValue(Events.ALL_DAY, event.isAllDay() ? 1 : 0)
|
||||
.withValue(Events.DTSTART, event.getDtStartInMillis())
|
||||
|
@ -19,6 +19,8 @@ import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@ -28,19 +30,23 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import at.bitfire.davdroid.Constants;
|
||||
import at.bitfire.davdroid.R;
|
||||
import at.bitfire.davdroid.resource.LocalTaskList;
|
||||
|
||||
public class InstallAppsFragment extends Fragment implements Runnable {
|
||||
public class InstallAppsFragment extends Fragment {
|
||||
private static final String TAG = "davdroid.setup";
|
||||
|
||||
final protected Handler timerHandler = new Handler();
|
||||
|
||||
// https://code.google.com/p/android/issues/detail?id=25906
|
||||
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.setup_install_apps, container, false);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
TextView tvInfo = (TextView)v.findViewById(R.id.setup_install_tasks_app);
|
||||
tvInfo.setText(Html.fromHtml(getString(R.string.setup_install_tasks_app_html)));
|
||||
tvInfo.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@ -49,23 +55,11 @@ public class InstallAppsFragment extends Fragment implements Runnable {
|
||||
inflater.inflate(R.menu.only_skip, menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
timerHandler.postDelayed(this, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
timerHandler.removeCallbacks(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.skip:
|
||||
skip(true);
|
||||
skip();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
@ -73,20 +67,9 @@ public class InstallAppsFragment extends Fragment implements Runnable {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (LocalTaskList.isAvailable(getActivity()))
|
||||
skip(false);
|
||||
else
|
||||
timerHandler.postDelayed(this, 1000);
|
||||
}
|
||||
|
||||
protected void skip(boolean addToBackStack) {
|
||||
protected void skip() {
|
||||
FragmentManager fm = getFragmentManager();
|
||||
|
||||
if (!addToBackStack)
|
||||
fm.popBackStack();
|
||||
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(R.id.right_pane, new SelectCollectionsFragment())
|
||||
.addToBackStack(null)
|
||||
|
@ -56,11 +56,11 @@ public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter
|
||||
this.context = context;
|
||||
|
||||
this.serverInfo = serverInfo;
|
||||
nAddressBooks = serverInfo.getAddressBooks() == null ? 0 : serverInfo.getAddressBooks().size();
|
||||
nAddressBooks = serverInfo.getAddressBooks().size();
|
||||
nAddressBookHeadings = nAddressBooks == 0 ? 0 : 1;
|
||||
nCalendars = serverInfo.getCalendars() == null ? 0 : serverInfo.getCalendars().size();
|
||||
nCalendars = serverInfo.getCalendars().size();
|
||||
nCalendarHeadings = nCalendars == 0 ? 0 : 1;
|
||||
nTaskLists = serverInfo.getTodoLists() == null ? 0 : serverInfo.getTodoLists().size();
|
||||
nTaskLists = serverInfo.getTodoLists().size();
|
||||
nTaskListHeadings = nTaskLists == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter
|
||||
return serverInfo.getCalendars().get(position - (nAddressBookHeadings + nAddressBooks + nCalendarHeadings));
|
||||
|
||||
else if (position >= (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings) &&
|
||||
(position < (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + + nTaskListHeadings + nTaskLists)))
|
||||
(position < (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings + nTaskLists)))
|
||||
return serverInfo.getTodoLists().get(position - (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings));
|
||||
|
||||
return null;
|
||||
|
@ -30,16 +30,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/setup_install_tasks_app_info"
|
||||
android:id="@+id/setup_install_tasks_app"
|
||||
android:text="@string/setup_install_tasks_app_html"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_install_tasks_app"
|
||||
android:onClick="installTasksApp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@ -149,8 +149,16 @@
|
||||
<string name="setup_add_account">Konto hinzufügen</string>
|
||||
<string name="setup_querying_server">Daten werden vom Server abgefragt. Bitte warten…</string>
|
||||
<string name="setup_install_apps_info">Android bietet im Gegensatz zu Kontakten und Terminen keine integrierte Lösung für Aufgaben.</string>
|
||||
<string name="setup_install_tasks_app_info">DAVdroid kann mit der "Aufgaben"-App von Marten Gajda synchronisieren. Sie können diese App installieren, um Aufgaben zu synchronisieren, oder auf Aufgaben verzichten und die Installation überspringen.</string>
|
||||
<string name="setup_install_tasks_app">Aufgaben-App installieren</string>
|
||||
<string name="setup_install_tasks_app_html"><![CDATA[
|
||||
<p>DAVdroid kann Aufgaben mit der <a href="market://details?id=org.dmfs.tasks">Aufgaben-App</a> von Marten Gajda synchronisieren.</p>
|
||||
<p>Wegen eines <a href="https://code.google.com/p/android/issues/detail?id=25906">Android-Fehlers</a> <b>muss die Aufgaben-App
|
||||
vor DAVdroid installiert werden</b> (ansonsten bekommt DAVdroid nicht die Berechtigungen, um auf die Aufgaben zuzugreifen).</p>
|
||||
<p>Wenn Sie Aufgaben synchronisiert haben wollen:</p>
|
||||
<p>1. Installieren Sie bitte zuerst die Aufgaben-App.<br/>
|
||||
2. Installieren Sie DAVdroid neu (um die Zugriffsberechtigung zu erlangen).<br/>
|
||||
3. Richten Sie Ihr DAVdroid-Konto neu ein.</p>
|
||||
<p>Andernfalls können Sie diesen Schritt überspringen.</p>
|
||||
]]></string>
|
||||
<string name="setup_what_to_sync">Welche Ordner sollen synchronisiert werden?</string>
|
||||
<string name="setup_address_books">Adressbücher</string>
|
||||
<string name="setup_calendars">Kalender</string>
|
||||
|
@ -163,8 +163,16 @@
|
||||
<string name="setup_add_account">Add account</string>
|
||||
<string name="setup_querying_server">Querying server. Please wait…</string>
|
||||
<string name="setup_install_apps_info">Plain Android doesn\'t support to-do lists (in contrast to contacts and calendars).</string>
|
||||
<string name="setup_install_tasks_app_info">DAVdroid is able to synchronize tasks with the "Tasks" app (by Marten Gajda). You may install this app if you want tasks to be synchronized or skip the installation.</string>
|
||||
<string name="setup_install_tasks_app">Install Tasks app</string>
|
||||
<string name="setup_install_tasks_app_html"><![CDATA[
|
||||
<p>DAVdroid is able to synchronize tasks with the <a href="market://details?id=org.dmfs.tasks">Tasks app</a> (by Marten Gajda).</p>
|
||||
<p>Because of an <a href="https://code.google.com/p/android/issues/detail?id=25906">Android bug</a>, the <b>Tasks app must be installed
|
||||
before installing DAVdroid</b> (otherwise, DAVdroid can\'t get the permission to access the tasks provider).</p>
|
||||
<p>If you want tasks to be synchronized:</p>
|
||||
<p>1. Install the Tasks app.<br/>
|
||||
2. Re-install DAVdroid (to gain tasks access permission).<br/>
|
||||
3. Add your DAVdroid account again.</p>
|
||||
<p>Otherwise, you may skip this step.</p>
|
||||
]]></string>
|
||||
<string name="setup_what_to_sync">Which collections shall be synchronized?</string>
|
||||
<string name="setup_address_books">Address books</string>
|
||||
<string name="setup_calendars">Calendars</string>
|
||||
|
@ -53,7 +53,7 @@ android {
|
||||
|
||||
// SDK versions and compileOptions adapted to DAVdroid needs
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion '21.1.2'
|
||||
buildToolsVersion '22.0.1'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
|
Loading…
Reference in New Issue
Block a user