From: jabarros Date: Wed, 15 Oct 2014 10:20:49 +0000 (+0200) Subject: Merge branch 'idn_hosts' of https://github.com/ogasser/android into idn_hosts X-Git-Tag: oc-android-1.7.0_signed~128^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/2910b006735fc7848bd7f357458332a542871bb8?ds=inline;hp=-c Merge branch 'idn_hosts' of https://github.com/ogasser/android into idn_hosts Conflicts: src/com/owncloud/android/authentication/AuthenticatorActivity.java --- 2910b006735fc7848bd7f357458332a542871bb8 diff --combined src/com/owncloud/android/authentication/AuthenticatorActivity.java index d88b8dc2,9569a532..ee38c4b5 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@@ -71,7 -71,6 +71,7 @@@ import com.owncloud.android.lib.common. import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode; +import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import com.owncloud.android.lib.resources.users.GetRemoteUserNameOperation; @@@ -85,6 -84,8 +85,7 @@@ import com.owncloud.android.ui.dialog.I import com.owncloud.android.ui.dialog.SamlWebViewDialog; import com.owncloud.android.ui.dialog.SslUntrustedCertDialog; import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener; + import com.owncloud.android.utils.DisplayUtils; -import com.owncloud.android.utils.Log_OC; /** * This Activity is used to add an ownCloud account to the App @@@ -351,7 -352,8 +352,8 @@@ SsoWebViewClientListener, OnSslUntruste /// step 2 - set properties of UI elements (text, visibility, enabled...) mHostUrlInput = (EditText) findViewById(R.id.hostUrlInput); - mHostUrlInput.setText(mServerInfo.mBaseUrl); + // Convert IDN to Unicode + mHostUrlInput.setText(DisplayUtils.convertIdn(mServerInfo.mBaseUrl, false)); if (mAction != ACTION_CREATE) { /// lock things that should not change mHostUrlInput.setEnabled(false); @@@ -727,6 -729,8 +729,8 @@@ showRefreshButton(false); if (uri.length() != 0) { + // Handle internationalized domain names + uri = DisplayUtils.convertIdn(uri, true); mServerStatusText = R.string.auth_testing_connection; mServerStatusIcon = R.drawable.progress_small; showServerStatus(); diff --combined src/com/owncloud/android/ui/activity/Preferences.java index 9ac6e27b,e436dbbc..47ef32cc --- a/src/com/owncloud/android/ui/activity/Preferences.java +++ b/src/com/owncloud/android/ui/activity/Preferences.java @@@ -51,9 -51,9 +51,9 @@@ import com.owncloud.android.R import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.authentication.AuthenticatorActivity; import com.owncloud.android.db.DbHandler; +import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.ui.LongClickableCheckBoxPreference; import com.owncloud.android.utils.DisplayUtils; -import com.owncloud.android.utils.Log_OC; /** @@@ -68,6 -68,8 +68,6 @@@ public class Preferences extends Sherlo private DbHandler mDbHandler; private CheckBoxPreference pCode; - //private CheckBoxPreference pLogging; - //private Preference pLoggingHistory; private Preference pAboutApp; private PreferenceCategory mAccountsPrefCategory = null; @@@ -101,7 -103,7 +101,7 @@@ if (obj != null && obj instanceof LongClickableCheckBoxPreference) { mShowContextMenu = true; - mAccountName = obj.toString(); + mAccountName = ((LongClickableCheckBoxPreference) obj).getKey(); Preferences.this.openContextMenu(listView); @@@ -252,6 -254,44 +252,6 @@@ Log_OC.e(TAG, "Error while showing about dialog", e); } } - - /* DISABLED FOR RELEASE UNTIL FIXED - pLogging = (CheckBoxPreference) findPreference("log_to_file"); - if (pLogging != null) { - pLogging.setOnPreferenceChangeListener(new OnPreferenceChangeListener() { - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - - String logpath = Environment.getExternalStorageDirectory()+File.separator+"owncloud"+File.separator+"log"; - - if(!pLogging.isChecked()) { - Log_OC.d("Debug", "start logging"); - Log_OC.v("PATH", logpath); - Log_OC.startLogging(logpath); - } - else { - Log_OC.d("Debug", "stop logging"); - Log_OC.stopLogging(); - } - return true; - } - }); - } - - pLoggingHistory = (Preference) findPreference("log_history"); - if (pLoggingHistory != null) { - pLoggingHistory.setOnPreferenceClickListener(new OnPreferenceClickListener() { - - @Override - public boolean onPreferenceClick(Preference preference) { - Intent intent = new Intent(getApplicationContext(),LogHistoryActivity.class); - startActivity(intent); - return true; - } - }); - } - */ - } @Override @@@ -387,7 -427,8 +387,8 @@@ for (Account a : accounts) { LongClickableCheckBoxPreference accountPreference = new LongClickableCheckBoxPreference(this); accountPreference.setKey(a.name); - accountPreference.setTitle(a.name); + // Handle internationalized domain names + accountPreference.setTitle(DisplayUtils.convertIdn(a.name, false)); mAccountsPrefCategory.addPreference(accountPreference); // Check the current account that is being used