Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
16524928
Commit
16524928
authored
Jul 10, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bostrt-master' into develop
parents
b2621156
72de553d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
AccountEditorFragment.java
.../xabber/android/ui/preferences/AccountEditorFragment.java
+23
-1
account_editor.xml
app/src/main/res/values/account_editor.xml
+4
-1
account_editor_oauth.xml
app/src/main/res/xml/account_editor_oauth.xml
+6
-0
account_editor_xmpp.xml
app/src/main/res/xml/account_editor_xmpp.xml
+9
-0
No files found.
app/src/main/java/com/xabber/android/ui/preferences/AccountEditorFragment.java
View file @
16524928
...
...
@@ -61,7 +61,13 @@ public class AccountEditorFragment extends BaseSettingsFragment
if
(
getString
(
R
.
string
.
account_port_key
).
equals
(
key
))
{
try
{
Integer
.
parseInt
((
String
)
newValue
);
int
newPort
=
Integer
.
parseInt
((
String
)
newValue
);
// TODO: Not IPv6 Compatible
if
(
newPort
<
0
||
newPort
>
0xFFFF
)
{
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
account_invalid_port_range
),
Toast
.
LENGTH_LONG
).
show
();
return
false
;
}
}
catch
(
NumberFormatException
e
)
{
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
account_invalid_port
),
Toast
.
LENGTH_LONG
).
show
();
...
...
@@ -69,6 +75,22 @@ public class AccountEditorFragment extends BaseSettingsFragment
}
}
if
(
getString
(
R
.
string
.
account_proxy_port_key
).
equals
(
key
))
{
try
{
int
newPort
=
Integer
.
parseInt
((
String
)
newValue
);
// TODO: Not IPv6 Compatible
if
(
newPort
<
0
||
newPort
>
0xFFFF
)
{
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
account_proxy_invalid_port_range
),
Toast
.
LENGTH_LONG
).
show
();
return
false
;
}
}
catch
(
NumberFormatException
e
)
{
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
account_proxy_invalid_port
),
Toast
.
LENGTH_LONG
).
show
();
return
false
;
}
}
if
(
getString
(
R
.
string
.
account_tls_mode_key
).
equals
(
key
)
||
getString
(
R
.
string
.
account_archive_mode_key
).
equals
(
key
)
||
getString
(
R
.
string
.
account_proxy_type_key
).
equals
(
key
)
...
...
app/src/main/res/values/account_editor.xml
View file @
16524928
...
...
@@ -28,11 +28,14 @@
<string
name=
"account_custom_summary"
>
Use custom host settings instead of SRV record
</string>
<string
name=
"account_enabled_summary"
>
Check to enable account
</string>
<string
name=
"account_invalid_port"
>
Port must be a number (default: 5222)
</string>
<string
name=
"account_invalid_priority"
>
Priority value must be a number between -128 and 128 (default: 10)
</string>
<string
name=
"account_invalid_port_range"
>
Port must be between 1 and 65535 (default: 5222)
</string>
<string
name=
"account_invalid_priority"
>
Priority value must be a number between -128 and 128 (default: 0)
</string>
<string
name=
"account_oauth"
>
Authorization
</string>
<string
name=
"account_oauth_invalidated"
>
Not authorized
</string>
<string
name=
"account_oauth_summary"
>
OAuth settings
</string>
<string
name=
"account_proxy_host"
>
Proxy host
</string>
<string
name=
"account_proxy_invalid_port_range"
>
Proxy port must be between 1 and 65535 (default: 8080)
</string>
<string
name=
"account_proxy_invalid_port"
>
Proxy port must be a number (default: 8080)
</string>
<string
name=
"account_proxy_password"
>
Proxy password
</string>
<string
name=
"account_proxy_port"
>
Proxy port
</string>
<string
name=
"account_proxy_type"
>
Proxy type
</string>
...
...
app/src/main/res/xml/account_editor_oauth.xml
View file @
16524928
...
...
@@ -38,6 +38,9 @@
android:key=
"@string/account_priority_key"
android:title=
"@string/account_priority"
android:singleLine=
"true"
android:numeric=
"signed"
android:inputType=
"numberSigned|phone"
android:digits=
"1234567890-"
/>
<ListPreference
android:title=
"@string/account_proxy_type"
...
...
@@ -54,6 +57,9 @@
android:key=
"@string/account_proxy_port_key"
android:title=
"@string/account_proxy_port"
android:singleLine=
"true"
android:numeric=
"integer"
android:inputType=
"number|phone"
android:digits=
"1234567890"
/>
<EditTextPreference
android:key=
"@string/account_proxy_user_key"
...
...
app/src/main/res/xml/account_editor_xmpp.xml
View file @
16524928
...
...
@@ -67,6 +67,9 @@
android:title=
"@string/account_port"
android:singleLine=
"true"
android:dependency=
"@string/account_custom_key"
android:numeric=
"integer"
android:inputType=
"number|phone"
android:digits=
"1234567890"
/>
<EditTextPreference
android:key=
"@string/account_resource_key"
...
...
@@ -77,6 +80,9 @@
android:key=
"@string/account_priority_key"
android:title=
"@string/account_priority"
android:singleLine=
"true"
android:numeric=
"signed"
android:inputType=
"numberSigned|phone"
android:digits=
"1234567890-"
/>
<CheckBoxPreference
android:title=
"@string/account_sasl"
...
...
@@ -109,6 +115,9 @@
android:key=
"@string/account_proxy_port_key"
android:title=
"@string/account_proxy_port"
android:singleLine=
"true"
android:numeric=
"integer"
android:inputType=
"number|phone"
android:digits=
"1234567890"
/>
<EditTextPreference
android:key=
"@string/account_proxy_user_key"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment