1
0
mirror of https://github.com/etesync/android synced 2025-05-29 20:28:48 +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:
Ricki Hirner 2016-03-24 20:51:09 +01:00
parent 758711acb2
commit 100b78a6a4
9 changed files with 52 additions and 52 deletions

View File

@ -17,8 +17,8 @@ android {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionCode 88 versionCode 89
versionName "1.0-beta1" versionName "1.0-rc1"
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L" buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
} }

View File

@ -93,6 +93,8 @@ public class AccountSettings {
.setContentTitle(context.getString(R.string.settings_version_update)) .setContentTitle(context.getString(R.string.settings_version_update))
.setContentText(context.getString(R.string.settings_version_update_settings_updated)) .setContentText(context.getString(R.string.settings_version_update_settings_updated))
.setSubText(context.getString(R.string.settings_version_update_install_hint)) .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) .setCategory(NotificationCompat.CATEGORY_SYSTEM)
.setPriority(NotificationCompat.PRIORITY_HIGH) .setPriority(NotificationCompat.PRIORITY_HIGH)
.setLocalOnly(true) .setLocalOnly(true)

View File

@ -112,7 +112,7 @@ public class ServiceDB {
Collections.ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + Collections.ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
Collections.SERVICE_ID + " INTEGER NOT NULL REFERENCES " + Services._TABLE +" ON DELETE CASCADE," + Collections.SERVICE_ID + " INTEGER NOT NULL REFERENCES " + Services._TABLE +" ON DELETE CASCADE," +
Collections.URL + " TEXT NOT NULL," + 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.DISPLAY_NAME + " TEXT NULL," +
Collections.DESCRIPTION + " TEXT NULL," + Collections.DESCRIPTION + " TEXT NULL," +
Collections.COLOR + " INTEGER 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); @Cleanup Cursor cursorTables = db.query("sqlite_master", new String[] { "name" }, "type='table'", null, null, null, null);
while (cursorTables.moveToNext()) { while (cursorTables.moveToNext()) {
String table = cursorTables.getString(0); 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); @Cleanup Cursor cursor = db.query(table, null, null, null, null, null, null);
// print columns // print columns
int cols = cursor.getColumnCount(); int cols = cursor.getColumnCount();
sb.append("\t\t| "); sb.append("\t| ");
for (int i = 0; i < cols; i++) { for (int i = 0; i < cols; i++) {
sb.append(" "); sb.append(" ");
sb.append(cursor.getColumnName(i)); sb.append(cursor.getColumnName(i));
@ -152,7 +152,7 @@ public class ServiceDB {
// print rows // print rows
while (cursor.moveToNext()) { while (cursor.moveToNext()) {
sb.append("\t\t| "); sb.append("\t| ");
for (int i = 0; i < cols; i++) { for (int i = 0; i < cols; i++) {
sb.append(" "); sb.append(" ");
try { try {
@ -171,6 +171,7 @@ public class ServiceDB {
} }
sb.append("\n"); sb.append("\n");
} }
sb.append("----------\n");
} }
db.endTransaction(); db.endTransaction();
} }

View File

@ -73,12 +73,13 @@ public class CreateCollectionFragment extends DialogFragment implements LoaderMa
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = new ProgressDialog.Builder(getContext()) ProgressDialog progress = new ProgressDialog(getContext());
.setTitle(R.string.create_collection_creating) progress.setTitle(R.string.create_collection_creating);
.setMessage(R.string.please_wait) progress.setMessage(getString(R.string.please_wait));
.create(); progress.setIndeterminate(true);
progress.setCanceledOnTouchOutside(false);
setCancelable(false); setCancelable(false);
return dialog; return progress;
} }

View File

@ -34,6 +34,7 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.TextView; import android.widget.TextView;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.text.WordUtils; import org.apache.commons.lang3.text.WordUtils;
import java.io.File; import java.io.File;
@ -168,28 +169,27 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
// begin with most specific information // begin with most specific information
if (phase != -1) if (phase != -1)
report.append("SYNCHRONIZATION INFO\nSynchronization phase: " + phase + "\n"); report.append("SYNCHRONIZATION INFO\nSynchronization phase: ").append(phase).append("\n");
if (account != null) if (account != null)
report.append("Account name: " + account.name + "\n"); report.append("Account name: ").append(account.name).append("\n");
if (authority != null) if (authority != null)
report.append("Authority: " + authority + "\n"); report.append("Authority: ").append(authority).append("\n");
if (exception instanceof HttpException) { if (exception instanceof HttpException) {
HttpException http = (HttpException)exception; HttpException http = (HttpException)exception;
if (http.request != null) 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) 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) { if (exception != null)
report.append("\nSTACK TRACE:\n"); report .append("\nEXCEPTION:\n")
report.append(Log.getStackTraceString(exception)); .append(ExceptionUtils.getMessage(exception)).append("\n")
report.append("\n"); .append(ExceptionUtils.getStackTrace(exception));
}
if (logs != null) if (logs != null)
report.append("\nLOGS:\n" + logs + "\n"); report.append("\nLOGS:\n").append(logs).append("\n");
try { try {
PackageManager pm = getContext().getPackageManager(); PackageManager pm = getContext().getPackageManager();
@ -199,30 +199,26 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
boolean workaroundInstalled = false; boolean workaroundInstalled = false;
try { try {
workaroundInstalled = pm.getPackageInfo("at.bitfire.davdroid.jbworkaround", 0) != null; workaroundInstalled = pm.getPackageInfo("at.bitfire.davdroid.jbworkaround", 0) != null;
} catch(PackageManager.NameNotFoundException e) {} } catch(PackageManager.NameNotFoundException ignored) {}
report.append( report.append("\nSOFTWARE INFORMATION\n" +
"\nSOFTWARE INFORMATION\n" + "DAVdroid version: ").append(BuildConfig.VERSION_NAME).append(" (").append(BuildConfig.VERSION_CODE).append(") ").append(new Date(BuildConfig.buildTime)).append("\n")
"DAVdroid version: " + BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ") " + new Date(BuildConfig.buildTime) + "\n" + .append("Installed from: ").append(installedFrom).append("\n")
"Installed from: " + installedFrom + "\n" + .append("JB Workaround installed: ").append(workaroundInstalled ? "yes" : "no").append("\n\n");
"JB Workaround installed: " + (workaroundInstalled ? "yes" : "no") + "\n\n"
);
} catch(Exception ex) { } catch(Exception ex) {
App.log.log(Level.SEVERE, "Couldn't get software information", ex); App.log.log(Level.SEVERE, "Couldn't get software information", ex);
} }
report.append( report.append(
"CONFIGURATION\n" + "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()); AccountManager accountManager = AccountManager.get(getContext());
for (Account acct : accountManager.getAccountsByType(Constants.ACCOUNT_TYPE)) { for (Account acct : accountManager.getAccountsByType(Constants.ACCOUNT_TYPE)) {
AccountSettings settings = new AccountSettings(getContext(), acct); AccountSettings settings = new AccountSettings(getContext(), acct);
report.append( report.append(
"Account: " + acct.name + "\n" + "Account: ").append(acct.name).append("\n" +
" Address book sync. interval: " + syncStatus(settings, ContactsContract.AUTHORITY) + "\n" + " Address book sync. interval: ").append(syncStatus(settings, ContactsContract.AUTHORITY)).append("\n" +
" Calendar sync. interval: " + syncStatus(settings, CalendarContract.AUTHORITY) + "\n" + " Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
" OpenTasks sync. interval: " + syncStatus(settings, "org.dmfs.tasks") + "\n" " OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n");
);
} }
report.append("\n"); report.append("\n");
@ -234,8 +230,8 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
try { try {
report.append( report.append(
"SYSTEM INFORMATION\n" + "SYSTEM INFORMATION\n" +
"Android version: " + Build.VERSION.RELEASE + " (" + Build.DISPLAY + ")\n" + "Android version: ").append(Build.VERSION.RELEASE).append(" (").append(Build.DISPLAY).append(")\n" +
"Device: " + WordUtils.capitalize(Build.MANUFACTURER) + " " + Build.MODEL + " (" + Build.DEVICE + ")\n\n" "Device: ").append(WordUtils.capitalize(Build.MANUFACTURER)).append(" ").append(Build.MODEL).append(" (").append(Build.DEVICE).append(")\n\n"
); );
} catch (Exception ex) { } catch (Exception ex) {
App.log.log(Level.SEVERE, "Couldn't get system details", ex); App.log.log(Level.SEVERE, "Couldn't get system details", ex);

View File

@ -53,12 +53,13 @@ public class DeleteCollectionFragment extends DialogFragment implements LoaderMa
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = new ProgressDialog.Builder(getContext()) ProgressDialog progress = new ProgressDialog(getContext());
.setTitle(R.string.delete_collection_deleting_collection) progress.setTitle(R.string.delete_collection_deleting_collection);
.setMessage(R.string.please_wait) progress.setMessage(getString(R.string.please_wait));
.create(); progress.setIndeterminate(true);
progress.setCanceledOnTouchOutside(false);
setCancelable(false); setCancelable(false);
return dialog; return progress;
} }

View File

@ -55,7 +55,7 @@ public class StartupDialogFragment extends DialogFragment {
@Cleanup ServiceDB.OpenHelper dbHelper = new ServiceDB.OpenHelper(context); @Cleanup ServiceDB.OpenHelper dbHelper = new ServiceDB.OpenHelper(context);
Settings settings = new Settings(dbHelper.getReadableDatabase()); 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)); dialogs.add(StartupDialogFragment.instantiate(Mode.DEVELOPMENT_VERSION));
else { else {
// store-specific information // store-specific information

View File

@ -39,14 +39,13 @@ public class DetectConfigurationFragment extends DialogFragment implements Loade
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
ProgressDialog dialog = new ProgressDialog(getActivity()); ProgressDialog progress = new ProgressDialog(getActivity());
dialog.setCanceledOnTouchOutside(false); progress.setTitle(R.string.login_configuration_detection);
progress.setMessage(getString(R.string.login_querying_server));
progress.setIndeterminate(true);
progress.setCanceledOnTouchOutside(false);
setCancelable(false); setCancelable(false);
return progress;
dialog.setTitle(R.string.login_configuration_detection);
dialog.setIndeterminate(true);
dialog.setMessage(getString(R.string.login_querying_server));
return dialog;
} }
@Override @Override

View File

@ -23,7 +23,7 @@
<string name="startup_opentasks_not_installed_install">OpenTasks installieren</string> <string name="startup_opentasks_not_installed_install">OpenTasks installieren</string>
<!--AboutActivity--> <!--AboutActivity-->
<string name="about_license_terms">Lizenzbedingungen</string> <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--> <!--global settings-->
<string name="logging_davdroid_file_logging">DAVdroid Datei-Protokollierung</string> <string name="logging_davdroid_file_logging">DAVdroid Datei-Protokollierung</string>
<string name="logging_to_external_storage">Protokollierung auf externen Speicher: %s</string> <string name="logging_to_external_storage">Protokollierung auf externen Speicher: %s</string>