Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Magisk
Commits
26218504
Commit
26218504
authored
Jan 30, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unbinder
parent
da9d00be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
SafetyNet.java
.../full/java/com/topjohnwu/magisk/components/SafetyNet.java
+3
-1
UpdateCardHolder.java
...ava/com/topjohnwu/magisk/components/UpdateCardHolder.java
+3
-1
MagiskFragment.java
...l/java/com/topjohnwu/magisk/fragments/MagiskFragment.java
+8
-0
No files found.
app/src/full/java/com/topjohnwu/magisk/components/SafetyNet.java
View file @
26218504
...
@@ -24,6 +24,7 @@ import androidx.cardview.widget.CardView;
...
@@ -24,6 +24,7 @@ import androidx.cardview.widget.CardView;
import
butterknife.BindColor
;
import
butterknife.BindColor
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
butterknife.Unbinder
;
import
dalvik.system.DexClassLoader
;
import
dalvik.system.DexClassLoader
;
public
class
SafetyNet
implements
ISafetyNetHelper
.
Callback
{
public
class
SafetyNet
implements
ISafetyNetHelper
.
Callback
{
...
@@ -44,10 +45,11 @@ public class SafetyNet implements ISafetyNetHelper.Callback {
...
@@ -44,10 +45,11 @@ public class SafetyNet implements ISafetyNetHelper.Callback {
@BindColor
(
R
.
color
.
red500
)
int
colorBad
;
@BindColor
(
R
.
color
.
red500
)
int
colorBad
;
@BindColor
(
R
.
color
.
green500
)
int
colorOK
;
@BindColor
(
R
.
color
.
green500
)
int
colorOK
;
public
Unbinder
unbinder
;
private
ExpandableViewHolder
expandable
;
private
ExpandableViewHolder
expandable
;
public
SafetyNet
(
View
v
)
{
public
SafetyNet
(
View
v
)
{
new
SafetyNet_ViewBinding
(
this
,
v
);
unbinder
=
new
SafetyNet_ViewBinding
(
this
,
v
);
expandable
=
new
ExpandableViewHolder
(
expandLayout
);
expandable
=
new
ExpandableViewHolder
(
expandLayout
);
Context
context
=
v
.
getContext
();
Context
context
=
v
.
getContext
();
safetyNetCard
.
setVisibility
(
hasGms
(
context
)
&&
Networking
.
checkNetworkStatus
(
context
)
?
safetyNetCard
.
setVisibility
(
hasGms
(
context
)
&&
Networking
.
checkNetworkStatus
(
context
)
?
...
...
app/src/full/java/com/topjohnwu/magisk/components/UpdateCardHolder.java
View file @
26218504
...
@@ -11,6 +11,7 @@ import android.widget.TextView;
...
@@ -11,6 +11,7 @@ import android.widget.TextView;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.R
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.Unbinder
;
public
class
UpdateCardHolder
{
public
class
UpdateCardHolder
{
...
@@ -23,10 +24,11 @@ public class UpdateCardHolder {
...
@@ -23,10 +24,11 @@ public class UpdateCardHolder {
@BindView
(
R
.
id
.
install
)
public
Button
install
;
@BindView
(
R
.
id
.
install
)
public
Button
install
;
public
View
itemView
;
public
View
itemView
;
public
Unbinder
unbinder
;
public
UpdateCardHolder
(
LayoutInflater
inflater
,
ViewGroup
root
)
{
public
UpdateCardHolder
(
LayoutInflater
inflater
,
ViewGroup
root
)
{
itemView
=
inflater
.
inflate
(
R
.
layout
.
update_card
,
root
,
false
);
itemView
=
inflater
.
inflate
(
R
.
layout
.
update_card
,
root
,
false
);
new
UpdateCardHolder_ViewBinding
(
this
,
itemView
);
unbinder
=
new
UpdateCardHolder_ViewBinding
(
this
,
itemView
);
}
}
public
void
setValid
(
boolean
valid
)
{
public
void
setValid
(
boolean
valid
)
{
...
...
app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java
View file @
26218504
...
@@ -126,6 +126,14 @@ public class MagiskFragment extends BaseFragment
...
@@ -126,6 +126,14 @@ public class MagiskFragment extends BaseFragment
return
v
;
return
v
;
}
}
@Override
public
void
onDestroyView
()
{
super
.
onDestroyView
();
safetyNet
.
unbinder
.
unbind
();
magisk
.
unbinder
.
unbind
();
manager
.
unbinder
.
unbind
();
}
@Override
@Override
public
void
onRefresh
()
{
public
void
onRefresh
()
{
mSwipeRefreshLayout
.
setRefreshing
(
false
);
mSwipeRefreshLayout
.
setRefreshing
(
false
);
...
...
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