mirror of
https://github.com/etesync/android
synced 2024-12-23 15:18:14 +00:00
Version bump to 1.0-rc1
* fix migration bug (doesn't set read-only flag) * unify progress dialogs * improve debug info report styling
This commit is contained in:
parent
758711acb2
commit
100b78a6a4
@ -17,8 +17,8 @@ android {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 22
|
||||
|
||||
versionCode 88
|
||||
versionName "1.0-beta1"
|
||||
versionCode 89
|
||||
versionName "1.0-rc1"
|
||||
|
||||
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ public class AccountSettings {
|
||||
.setContentTitle(context.getString(R.string.settings_version_update))
|
||||
.setContentText(context.getString(R.string.settings_version_update_settings_updated))
|
||||
.setSubText(context.getString(R.string.settings_version_update_install_hint))
|
||||
.setStyle(new NotificationCompat.BigTextStyle()
|
||||
.bigText(context.getString(R.string.settings_version_update_settings_updated)))
|
||||
.setCategory(NotificationCompat.CATEGORY_SYSTEM)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
.setLocalOnly(true)
|
||||
|
@ -112,7 +112,7 @@ public class ServiceDB {
|
||||
Collections.ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
|
||||
Collections.SERVICE_ID + " INTEGER NOT NULL REFERENCES " + Services._TABLE +" ON DELETE CASCADE," +
|
||||
Collections.URL + " TEXT NOT NULL," +
|
||||
Collections.READ_ONLY + " INTEGER NOT NULL," +
|
||||
Collections.READ_ONLY + " INTEGER DEFAULT 0 NOT NULL," +
|
||||
Collections.DISPLAY_NAME + " TEXT NULL," +
|
||||
Collections.DESCRIPTION + " TEXT NULL," +
|
||||
Collections.COLOR + " INTEGER NULL," +
|
||||
@ -137,12 +137,12 @@ public class ServiceDB {
|
||||
@Cleanup Cursor cursorTables = db.query("sqlite_master", new String[] { "name" }, "type='table'", null, null, null, null);
|
||||
while (cursorTables.moveToNext()) {
|
||||
String table = cursorTables.getString(0);
|
||||
sb.append("\t").append(table).append("\n");
|
||||
sb.append(table).append("\n");
|
||||
@Cleanup Cursor cursor = db.query(table, null, null, null, null, null, null);
|
||||
|
||||
// print columns
|
||||
int cols = cursor.getColumnCount();
|
||||
sb.append("\t\t| ");
|
||||
sb.append("\t| ");
|
||||
for (int i = 0; i < cols; i++) {
|
||||
sb.append(" ");
|
||||
sb.append(cursor.getColumnName(i));
|
||||
@ -152,7 +152,7 @@ public class ServiceDB {
|
||||
|
||||
// print rows
|
||||
while (cursor.moveToNext()) {
|
||||
sb.append("\t\t| ");
|
||||
sb.append("\t| ");
|
||||
for (int i = 0; i < cols; i++) {
|
||||
sb.append(" ");
|
||||
try {
|
||||
@ -171,6 +171,7 @@ public class ServiceDB {
|
||||
}
|
||||
sb.append("\n");
|
||||
}
|
||||
sb.append("----------\n");
|
||||
}
|
||||
db.endTransaction();
|
||||
}
|
||||
|
@ -73,12 +73,13 @@ public class CreateCollectionFragment extends DialogFragment implements LoaderMa
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
Dialog dialog = new ProgressDialog.Builder(getContext())
|
||||
.setTitle(R.string.create_collection_creating)
|
||||
.setMessage(R.string.please_wait)
|
||||
.create();
|
||||
ProgressDialog progress = new ProgressDialog(getContext());
|
||||
progress.setTitle(R.string.create_collection_creating);
|
||||
progress.setMessage(getString(R.string.please_wait));
|
||||
progress.setIndeterminate(true);
|
||||
progress.setCanceledOnTouchOutside(false);
|
||||
setCancelable(false);
|
||||
return dialog;
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,6 +34,7 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import java.io.File;
|
||||
@ -168,28 +169,27 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
// begin with most specific information
|
||||
|
||||
if (phase != -1)
|
||||
report.append("SYNCHRONIZATION INFO\nSynchronization phase: " + phase + "\n");
|
||||
report.append("SYNCHRONIZATION INFO\nSynchronization phase: ").append(phase).append("\n");
|
||||
if (account != null)
|
||||
report.append("Account name: " + account.name + "\n");
|
||||
report.append("Account name: ").append(account.name).append("\n");
|
||||
if (authority != null)
|
||||
report.append("Authority: " + authority + "\n");
|
||||
report.append("Authority: ").append(authority).append("\n");
|
||||
|
||||
if (exception instanceof HttpException) {
|
||||
HttpException http = (HttpException)exception;
|
||||
if (http.request != null)
|
||||
report.append("\nHTTP REQUEST:\n" + http.request + "\n\n");
|
||||
report.append("\nHTTP REQUEST:\n").append(http.request).append("\n\n");
|
||||
if (http.response != null)
|
||||
report.append("HTTP RESPONSE:\n" + http.response + "\n");
|
||||
report.append("HTTP RESPONSE:\n").append(http.response).append("\n");
|
||||
}
|
||||
|
||||
if (exception != null) {
|
||||
report.append("\nSTACK TRACE:\n");
|
||||
report.append(Log.getStackTraceString(exception));
|
||||
report.append("\n");
|
||||
}
|
||||
if (exception != null)
|
||||
report .append("\nEXCEPTION:\n")
|
||||
.append(ExceptionUtils.getMessage(exception)).append("\n")
|
||||
.append(ExceptionUtils.getStackTrace(exception));
|
||||
|
||||
if (logs != null)
|
||||
report.append("\nLOGS:\n" + logs + "\n");
|
||||
report.append("\nLOGS:\n").append(logs).append("\n");
|
||||
|
||||
try {
|
||||
PackageManager pm = getContext().getPackageManager();
|
||||
@ -199,30 +199,26 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
boolean workaroundInstalled = false;
|
||||
try {
|
||||
workaroundInstalled = pm.getPackageInfo("at.bitfire.davdroid.jbworkaround", 0) != null;
|
||||
} catch(PackageManager.NameNotFoundException e) {}
|
||||
report.append(
|
||||
"\nSOFTWARE INFORMATION\n" +
|
||||
"DAVdroid version: " + BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ") " + new Date(BuildConfig.buildTime) + "\n" +
|
||||
"Installed from: " + installedFrom + "\n" +
|
||||
"JB Workaround installed: " + (workaroundInstalled ? "yes" : "no") + "\n\n"
|
||||
);
|
||||
} catch(PackageManager.NameNotFoundException ignored) {}
|
||||
report.append("\nSOFTWARE INFORMATION\n" +
|
||||
"DAVdroid version: ").append(BuildConfig.VERSION_NAME).append(" (").append(BuildConfig.VERSION_CODE).append(") ").append(new Date(BuildConfig.buildTime)).append("\n")
|
||||
.append("Installed from: ").append(installedFrom).append("\n")
|
||||
.append("JB Workaround installed: ").append(workaroundInstalled ? "yes" : "no").append("\n\n");
|
||||
} catch(Exception ex) {
|
||||
App.log.log(Level.SEVERE, "Couldn't get software information", ex);
|
||||
}
|
||||
|
||||
report.append(
|
||||
"CONFIGURATION\n" +
|
||||
"System-wide synchronization: " + (ContentResolver.getMasterSyncAutomatically() ? "automatically" : "manually") + "\n"
|
||||
);
|
||||
"System-wide synchronization: ").append(ContentResolver.getMasterSyncAutomatically() ? "automatically" : "manually").append("\n");
|
||||
AccountManager accountManager = AccountManager.get(getContext());
|
||||
for (Account acct : accountManager.getAccountsByType(Constants.ACCOUNT_TYPE)) {
|
||||
AccountSettings settings = new AccountSettings(getContext(), acct);
|
||||
report.append(
|
||||
"Account: " + acct.name + "\n" +
|
||||
" Address book sync. interval: " + syncStatus(settings, ContactsContract.AUTHORITY) + "\n" +
|
||||
" Calendar sync. interval: " + syncStatus(settings, CalendarContract.AUTHORITY) + "\n" +
|
||||
" OpenTasks sync. interval: " + syncStatus(settings, "org.dmfs.tasks") + "\n"
|
||||
);
|
||||
"Account: ").append(acct.name).append("\n" +
|
||||
" Address book sync. interval: ").append(syncStatus(settings, ContactsContract.AUTHORITY)).append("\n" +
|
||||
" Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
|
||||
" OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n");
|
||||
}
|
||||
report.append("\n");
|
||||
|
||||
@ -234,8 +230,8 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
try {
|
||||
report.append(
|
||||
"SYSTEM INFORMATION\n" +
|
||||
"Android version: " + Build.VERSION.RELEASE + " (" + Build.DISPLAY + ")\n" +
|
||||
"Device: " + WordUtils.capitalize(Build.MANUFACTURER) + " " + Build.MODEL + " (" + Build.DEVICE + ")\n\n"
|
||||
"Android version: ").append(Build.VERSION.RELEASE).append(" (").append(Build.DISPLAY).append(")\n" +
|
||||
"Device: ").append(WordUtils.capitalize(Build.MANUFACTURER)).append(" ").append(Build.MODEL).append(" (").append(Build.DEVICE).append(")\n\n"
|
||||
);
|
||||
} catch (Exception ex) {
|
||||
App.log.log(Level.SEVERE, "Couldn't get system details", ex);
|
||||
|
@ -53,12 +53,13 @@ public class DeleteCollectionFragment extends DialogFragment implements LoaderMa
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
Dialog dialog = new ProgressDialog.Builder(getContext())
|
||||
.setTitle(R.string.delete_collection_deleting_collection)
|
||||
.setMessage(R.string.please_wait)
|
||||
.create();
|
||||
ProgressDialog progress = new ProgressDialog(getContext());
|
||||
progress.setTitle(R.string.delete_collection_deleting_collection);
|
||||
progress.setMessage(getString(R.string.please_wait));
|
||||
progress.setIndeterminate(true);
|
||||
progress.setCanceledOnTouchOutside(false);
|
||||
setCancelable(false);
|
||||
return dialog;
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class StartupDialogFragment extends DialogFragment {
|
||||
@Cleanup ServiceDB.OpenHelper dbHelper = new ServiceDB.OpenHelper(context);
|
||||
Settings settings = new Settings(dbHelper.getReadableDatabase());
|
||||
|
||||
if (BuildConfig.VERSION_NAME.contains("-alpha") || BuildConfig.VERSION_NAME.contains("-beta"))
|
||||
if (BuildConfig.VERSION_NAME.contains("-alpha") || BuildConfig.VERSION_NAME.contains("-beta") || BuildConfig.VERSION_NAME.contains("-rc"))
|
||||
dialogs.add(StartupDialogFragment.instantiate(Mode.DEVELOPMENT_VERSION));
|
||||
else {
|
||||
// store-specific information
|
||||
|
@ -39,14 +39,13 @@ public class DetectConfigurationFragment extends DialogFragment implements Loade
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
ProgressDialog dialog = new ProgressDialog(getActivity());
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
ProgressDialog progress = new ProgressDialog(getActivity());
|
||||
progress.setTitle(R.string.login_configuration_detection);
|
||||
progress.setMessage(getString(R.string.login_querying_server));
|
||||
progress.setIndeterminate(true);
|
||||
progress.setCanceledOnTouchOutside(false);
|
||||
setCancelable(false);
|
||||
|
||||
dialog.setTitle(R.string.login_configuration_detection);
|
||||
dialog.setIndeterminate(true);
|
||||
dialog.setMessage(getString(R.string.login_querying_server));
|
||||
return dialog;
|
||||
return progress;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,7 +23,7 @@
|
||||
<string name="startup_opentasks_not_installed_install">OpenTasks installieren</string>
|
||||
<!--AboutActivity-->
|
||||
<string name="about_license_terms">Lizenzbedingungen</string>
|
||||
<string name="about_license_info_no_warranty">Dieses Programm OHNE JEDE GEWÄHRLEISTUNG bereitgestellt. Es ist freie Software; Sie können es also unter bestimmten Bedingungen weiterverbreiten.</string>
|
||||
<string name="about_license_info_no_warranty">Dieses Programm wird OHNE JEDE GEWÄHRLEISTUNG bereitgestellt. Es ist freie Software – Sie können es also unter bestimmten Bedingungen weiterverbreiten.</string>
|
||||
<!--global settings-->
|
||||
<string name="logging_davdroid_file_logging">DAVdroid Datei-Protokollierung</string>
|
||||
<string name="logging_to_external_storage">Protokollierung auf externen Speicher: %s</string>
|
||||
|
Loading…
Reference in New Issue
Block a user