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
adfffe61
Commit
adfffe61
authored
Aug 30, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better back pressing logic
parent
64601baa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
MainActivity.java
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
+7
-9
No files found.
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
View file @
adfffe61
...
...
@@ -34,7 +34,7 @@ public class MainActivity extends BaseActivity
private
final
Handler
mDrawerHandler
=
new
Handler
();
private
int
mDrawerItem
;
private
boolean
fromShortcut
=
tru
e
;
private
static
boolean
fromShortcut
=
fals
e
;
@BindView
(
R
.
id
.
drawer_layout
)
DrawerLayout
drawer
;
@BindView
(
R
.
id
.
toolbar
)
public
Toolbar
toolbar
;
...
...
@@ -50,12 +50,7 @@ public class MainActivity extends BaseActivity
@Override
protected
void
onCreate
(
final
Bundle
savedInstanceState
)
{
if
(!
mm
.
hasInit
)
{
Intent
intent
=
new
Intent
(
this
,
SplashActivity
.
class
);
String
section
=
getIntent
().
getStringExtra
(
Const
.
Key
.
OPEN_SECTION
);
if
(
section
!=
null
)
{
intent
.
putExtra
(
Const
.
Key
.
OPEN_SECTION
,
section
);
}
startActivity
(
intent
);
startActivity
(
new
Intent
(
this
,
SplashActivity
.
class
));
finish
();
}
...
...
@@ -83,8 +78,11 @@ public class MainActivity extends BaseActivity
drawer
.
addDrawerListener
(
toggle
);
toggle
.
syncState
();
if
(
savedInstanceState
==
null
)
navigate
(
getIntent
().
getStringExtra
(
Const
.
Key
.
OPEN_SECTION
));
if
(
savedInstanceState
==
null
)
{
String
section
=
getIntent
().
getStringExtra
(
Const
.
Key
.
OPEN_SECTION
);
fromShortcut
=
section
!=
null
;
navigate
(
section
);
}
navigationView
.
setNavigationItemSelectedListener
(
this
);
}
...
...
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