Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-android
Commits
62812518
Commit
62812518
authored
May 21, 2021
by
Adrien Béraud
Browse files
account edition: cleanup, check for null
Change-Id: Id095715acc91b4140fe0e5e9ec81b5b3c75eca59
parent
47480ee3
Changes
1
Hide whitespace changes
Inline
Side-by-side
ring-android/app/src/main/java/cx/ring/account/AccountEditionFragment.java
View file @
62812518
...
...
@@ -165,7 +165,7 @@ public class AccountEditionFragment extends BaseSupportFragment<AccountEditionPr
}
@Override
public
void
onCreateOptionsMenu
(
Menu
menu
,
MenuInflater
inflater
)
{
public
void
onCreateOptionsMenu
(
Menu
menu
,
@NonNull
MenuInflater
inflater
)
{
menu
.
clear
();
}
...
...
@@ -182,7 +182,10 @@ public class AccountEditionFragment extends BaseSupportFragment<AccountEditionPr
}
public
boolean
onBackPressed
()
{
if
(
mBinding
==
null
)
return
false
;
mIsVisible
=
false
;
if
(
getActivity
()
instanceof
HomeActivity
)
((
HomeActivity
)
getActivity
()).
setToolbarOutlineState
(
true
);
if
(
mBinding
.
fragmentContainer
.
getVisibility
()
!=
View
.
VISIBLE
)
{
...
...
@@ -213,14 +216,15 @@ public class AccountEditionFragment extends BaseSupportFragment<AccountEditionPr
}
private
void
setBackListenerEnabled
(
boolean
enable
)
{
if
(
getActivity
()
instanceof
HomeActivity
)
((
HomeActivity
)
getActivity
()).
setAccountFragmentOnBackPressedListener
(
enable
?
this
:
null
);
Activity
activity
=
getActivity
();
if
(
activity
instanceof
HomeActivity
)
((
HomeActivity
)
activity
).
setAccountFragmentOnBackPressedListener
(
enable
?
this
:
null
);
}
private
static
class
PreferencesPagerAdapter
extends
FragmentStatePagerAdapter
{
private
Context
mContext
;
private
String
accountId
;
private
boolean
isJamiAccount
;
private
final
Context
mContext
;
private
final
String
accountId
;
private
final
boolean
isJamiAccount
;
PreferencesPagerAdapter
(
FragmentManager
fm
,
Context
mContext
,
String
accountId
,
boolean
isJamiAccount
)
{
super
(
fm
);
...
...
Write
Preview
Supports
Markdown
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