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
af7c6f9f
Commit
af7c6f9f
authored
Sep 15, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FlashActivity crash
parent
78534dea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
10 deletions
+7
-10
ViewBinder.java
app/src/full/java/com/topjohnwu/magisk/ViewBinder.java
+1
-0
ProcessRepoZip.java
...full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
+1
-2
InstallMethodDialog.java
.../com/topjohnwu/magisk/components/InstallMethodDialog.java
+3
-4
UninstallDialog.java
...java/com/topjohnwu/magisk/components/UninstallDialog.java
+1
-2
ModulesFragment.java
.../java/com/topjohnwu/magisk/fragments/ModulesFragment.java
+1
-2
No files found.
app/src/full/java/com/topjohnwu/magisk/ViewBinder.java
View file @
af7c6f9f
...
@@ -50,6 +50,7 @@ public class ViewBinder {
...
@@ -50,6 +50,7 @@ public class ViewBinder {
target
.
toolbar
=
target
.
findViewById
(
R
.
id
.
toolbar
);
target
.
toolbar
=
target
.
findViewById
(
R
.
id
.
toolbar
);
target
.
flashLogs
=
target
.
findViewById
(
R
.
id
.
txtLog
);
target
.
flashLogs
=
target
.
findViewById
(
R
.
id
.
txtLog
);
target
.
buttonPanel
=
target
.
findViewById
(
R
.
id
.
button_panel
);
target
.
buttonPanel
=
target
.
findViewById
(
R
.
id
.
button_panel
);
target
.
sv
=
target
.
findViewById
(
R
.
id
.
scrollView
);
target
.
findViewById
(
R
.
id
.
no_thanks
).
setOnClickListener
(
v
->
target
.
finish
());
target
.
findViewById
(
R
.
id
.
no_thanks
).
setOnClickListener
(
v
->
target
.
finish
());
target
.
findViewById
(
R
.
id
.
reboot
).
setOnClickListener
(
v
->
target
.
reboot
());
target
.
findViewById
(
R
.
id
.
reboot
).
setOnClickListener
(
v
->
target
.
reboot
());
target
.
findViewById
(
R
.
id
.
save_logs
).
setOnClickListener
(
v
->
target
.
saveLogs
());
target
.
findViewById
(
R
.
id
.
save_logs
).
setOnClickListener
(
v
->
target
.
saveLogs
());
...
...
app/src/full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
View file @
af7c6f9f
...
@@ -8,7 +8,6 @@ import android.widget.Toast;
...
@@ -8,7 +8,6 @@ import android.widget.Toast;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.FlashActivity
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.components.BaseActivity
;
import
com.topjohnwu.magisk.components.BaseActivity
;
import
com.topjohnwu.magisk.components.SnackbarMaker
;
import
com.topjohnwu.magisk.components.SnackbarMaker
;
...
@@ -141,7 +140,7 @@ public class ProcessRepoZip extends ParallelTask<Void, Object, Boolean> {
...
@@ -141,7 +140,7 @@ public class ProcessRepoZip extends ParallelTask<Void, Object, Boolean> {
if
(
result
)
{
if
(
result
)
{
Uri
uri
=
Uri
.
fromFile
(
mFile
);
Uri
uri
=
Uri
.
fromFile
(
mFile
);
if
(
mInstall
)
{
if
(
mInstall
)
{
Intent
intent
=
new
Intent
(
activity
,
FlashActivity
.
class
);
Intent
intent
=
new
Intent
(
activity
,
a
.
f
.
class
);
intent
.
setData
(
uri
).
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_ZIP
);
intent
.
setData
(
uri
).
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_ZIP
);
activity
.
startActivity
(
intent
);
activity
.
startActivity
(
intent
);
}
else
{
}
else
{
...
...
app/src/full/java/com/topjohnwu/magisk/components/InstallMethodDialog.java
View file @
af7c6f9f
...
@@ -8,7 +8,6 @@ import android.widget.Toast;
...
@@ -8,7 +8,6 @@ import android.widget.Toast;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.FlashActivity
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.receivers.DownloadReceiver
;
import
com.topjohnwu.magisk.receivers.DownloadReceiver
;
import
com.topjohnwu.magisk.utils.Download
;
import
com.topjohnwu.magisk.utils.Download
;
...
@@ -38,7 +37,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
...
@@ -38,7 +37,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
(
requestCode
,
resultCode
,
data
)
->
{
(
requestCode
,
resultCode
,
data
)
->
{
if
(
requestCode
==
Const
.
ID
.
SELECT_BOOT
&&
if
(
requestCode
==
Const
.
ID
.
SELECT_BOOT
&&
resultCode
==
BaseActivity
.
RESULT_OK
&&
data
!=
null
)
{
resultCode
==
BaseActivity
.
RESULT_OK
&&
data
!=
null
)
{
Intent
i
=
new
Intent
(
activity
,
FlashActivity
.
class
)
Intent
i
=
new
Intent
(
activity
,
a
.
f
.
class
)
.
putExtra
(
Const
.
Key
.
FLASH_SET_BOOT
,
data
.
getData
())
.
putExtra
(
Const
.
Key
.
FLASH_SET_BOOT
,
data
.
getData
())
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
PATCH_BOOT
);
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
PATCH_BOOT
);
activity
.
startActivity
(
i
);
activity
.
startActivity
(
i
);
...
@@ -56,7 +55,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
...
@@ -56,7 +55,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
},
Data
.
magiskLink
,
filename
);
},
Data
.
magiskLink
,
filename
);
break
;
break
;
case
2
:
case
2
:
intent
=
new
Intent
(
activity
,
FlashActivity
.
class
)
intent
=
new
Intent
(
activity
,
a
.
f
.
class
)
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_MAGISK
);
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_MAGISK
);
activity
.
startActivity
(
intent
);
activity
.
startActivity
(
intent
);
break
;
break
;
...
@@ -66,7 +65,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
...
@@ -66,7 +65,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
.
setMessage
(
R
.
string
.
install_inactive_slot_msg
)
.
setMessage
(
R
.
string
.
install_inactive_slot_msg
)
.
setCancelable
(
true
)
.
setCancelable
(
true
)
.
setPositiveButton
(
R
.
string
.
yes
,
(
d
,
i
)
->
{
.
setPositiveButton
(
R
.
string
.
yes
,
(
d
,
i
)
->
{
Intent
it
=
new
Intent
(
activity
,
FlashActivity
.
class
)
Intent
it
=
new
Intent
(
activity
,
a
.
f
.
class
)
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_INACTIVE_SLOT
);
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_INACTIVE_SLOT
);
activity
.
startActivity
(
it
);
activity
.
startActivity
(
it
);
})
})
...
...
app/src/full/java/com/topjohnwu/magisk/components/UninstallDialog.java
View file @
af7c6f9f
...
@@ -10,7 +10,6 @@ import android.widget.Toast;
...
@@ -10,7 +10,6 @@ import android.widget.Toast;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.Data
;
import
com.topjohnwu.magisk.FlashActivity
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.receivers.DownloadReceiver
;
import
com.topjohnwu.magisk.receivers.DownloadReceiver
;
...
@@ -45,7 +44,7 @@ public class UninstallDialog extends CustomAlertDialog {
...
@@ -45,7 +44,7 @@ public class UninstallDialog extends CustomAlertDialog {
Download
.
receive
(
activity
,
new
DownloadReceiver
()
{
Download
.
receive
(
activity
,
new
DownloadReceiver
()
{
@Override
@Override
public
void
onDownloadDone
(
Context
context
,
Uri
uri
)
{
public
void
onDownloadDone
(
Context
context
,
Uri
uri
)
{
Intent
intent
=
new
Intent
(
context
,
FlashActivity
.
class
)
Intent
intent
=
new
Intent
(
context
,
a
.
f
.
class
)
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
.
setData
(
uri
)
.
setData
(
uri
)
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
UNINSTALL
);
.
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
UNINSTALL
);
...
...
app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java
View file @
af7c6f9f
...
@@ -13,7 +13,6 @@ import android.view.ViewGroup;
...
@@ -13,7 +13,6 @@ import android.view.ViewGroup;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.FlashActivity
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.ViewBinder
;
import
com.topjohnwu.magisk.ViewBinder
;
import
com.topjohnwu.magisk.adapters.ModulesAdapter
;
import
com.topjohnwu.magisk.adapters.ModulesAdapter
;
...
@@ -91,7 +90,7 @@ public class ModulesFragment extends BaseFragment implements Topic.Subscriber {
...
@@ -91,7 +90,7 @@ public class ModulesFragment extends BaseFragment implements Topic.Subscriber {
public
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
public
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
if
(
requestCode
==
Const
.
ID
.
FETCH_ZIP
&&
resultCode
==
Activity
.
RESULT_OK
&&
data
!=
null
)
{
if
(
requestCode
==
Const
.
ID
.
FETCH_ZIP
&&
resultCode
==
Activity
.
RESULT_OK
&&
data
!=
null
)
{
// Get the URI of the selected file
// Get the URI of the selected file
Intent
intent
=
new
Intent
(
getActivity
(),
FlashActivity
.
class
);
Intent
intent
=
new
Intent
(
getActivity
(),
a
.
f
.
class
);
intent
.
setData
(
data
.
getData
()).
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_ZIP
);
intent
.
setData
(
data
.
getData
()).
putExtra
(
Const
.
Key
.
FLASH_ACTION
,
Const
.
Value
.
FLASH_ZIP
);
startActivity
(
intent
);
startActivity
(
intent
);
}
}
...
...
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