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
5a8888d2
Commit
5a8888d2
authored
Jun 22, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some account preferences default values set in preferences.xml
parent
aed3ee23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
AccountManager.java
.../java/com/xabber/android/data/account/AccountManager.java
+7
-4
preferences.xml
app/src/main/res/values/preferences.xml
+4
-0
No files found.
app/src/main/java/com/xabber/android/data/account/AccountManager.java
View file @
5a8888d2
...
...
@@ -398,17 +398,20 @@ public class AccountManager implements OnLoadListener, OnWipeListener {
}
boolean
useCustomHost
=
false
;
boolean
useCustomHost
=
application
.
getResources
().
getBoolean
(
R
.
bool
.
account_use_custom_host_default
);
if
(
accountType
.
getProtocol
()
==
AccountProtocol
.
gtalk
)
{
useCustomHost
=
true
;
}
boolean
useCompression
=
application
.
getResources
().
getBoolean
(
R
.
bool
.
account_use_compression_default
);
ArchiveMode
archiveMode
=
ArchiveMode
.
valueOf
(
application
.
getString
(
R
.
string
.
account_archive_mode_default_value
));
accountItem
=
addAccount
(
accountType
.
getProtocol
(),
useCustomHost
,
host
,
port
,
serverName
,
userName
,
storePassword
,
password
,
resource
,
getNextColorIndex
(),
0
,
StatusMode
.
available
,
SettingsManager
.
statusText
(),
true
,
true
,
tlsRequired
?
TLSMode
.
required
:
TLSMode
.
enabled
,
false
,
useOrbot
?
ProxyType
.
orbot
:
ProxyType
.
none
,
"localhost"
,
8080
,
""
,
""
,
syncable
,
null
,
null
,
ArchiveMode
.
availabl
e
,
registerNewAccount
);
useCompression
,
useOrbot
?
ProxyType
.
orbot
:
ProxyType
.
none
,
"localhost"
,
8080
,
""
,
""
,
syncable
,
null
,
null
,
archiveMod
e
,
registerNewAccount
);
if
(
accountItem
==
null
)
{
throw
new
NetworkException
(
R
.
string
.
ACCOUNT_REGISTER_FAILED
);
}
...
...
app/src/main/res/values/preferences.xml
View file @
5a8888d2
...
...
@@ -373,6 +373,7 @@
<string
name=
"account_username_key"
>
account_username
</string>
<string
name=
"account_store_password_key"
>
account_store_password
</string>
<string
name=
"account_password_key"
>
account_password
</string>
<bool
name=
"account_use_custom_host_default"
>
true
</bool>
<string
name=
"account_host_key"
>
account_host
</string>
<string
name=
"account_port_key"
>
account_port
</string>
<string
name=
"account_server_key"
>
account_server
</string>
...
...
@@ -381,6 +382,7 @@
<string
name=
"account_sasl_key"
>
account_sasl
</string>
<string
name=
"account_tls_mode_key"
>
account_tls_mode
</string>
<string
name=
"account_compression_key"
>
account_compression
</string>
<bool
name=
"account_use_compression_default"
>
true
</bool>
<string
name=
"account_proxy_type_key"
>
account_proxy_type
</string>
<string
name=
"account_proxy_host_key"
>
account_proxy_host
</string>
<string
name=
"account_proxy_port_key"
>
account_proxy_port
</string>
...
...
@@ -431,6 +433,8 @@
<item>
@string/account_archive_mode_dont_store
</item>
</string-array>
<string
name=
"account_archive_mode_default_value"
>
local
</string>
<!-- preference_security -->
<string
name=
"security_check_certificate_key"
>
security_check_certificate
</string>
<bool
name=
"security_check_certificate_default"
>
false
</bool>
...
...
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