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
df215393
Commit
df215393
authored
Sep 06, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some versioning fixes
parent
2592cb60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
DownloadBusybox.java
...ain/java/com/topjohnwu/magisk/asyncs/DownloadBusybox.java
+2
-2
RepoDatabaseHelper.java
...ava/com/topjohnwu/magisk/database/RepoDatabaseHelper.java
+5
-1
Utils.java
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/asyncs/DownloadBusybox.java
View file @
df215393
...
@@ -15,8 +15,8 @@ import java.io.InputStream;
...
@@ -15,8 +15,8 @@ import java.io.InputStream;
public
class
DownloadBusybox
extends
ParallelTask
<
Void
,
Void
,
Void
>
{
public
class
DownloadBusybox
extends
ParallelTask
<
Void
,
Void
,
Void
>
{
private
static
final
String
BUSYBOX_ARM
=
"https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.
1
/busybox-arm"
;
private
static
final
String
BUSYBOX_ARM
=
"https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.
2
/busybox-arm"
;
private
static
final
String
BUSYBOX_X86
=
"https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.
1
/busybox-x86"
;
private
static
final
String
BUSYBOX_X86
=
"https://github.com/topjohnwu/ndk-busybox/releases/download/1.27.
2
/busybox-x86"
;
private
File
busybox
;
private
File
busybox
;
...
...
app/src/main/java/com/topjohnwu/magisk/database/RepoDatabaseHelper.java
View file @
df215393
...
@@ -5,8 +5,10 @@ import android.database.Cursor;
...
@@ -5,8 +5,10 @@ import android.database.Cursor;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteOpenHelper
;
import
android.database.sqlite.SQLiteOpenHelper
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.module.Repo
;
import
com.topjohnwu.magisk.module.Repo
;
import
com.topjohnwu.magisk.utils.Logger
;
import
com.topjohnwu.magisk.utils.Logger
;
import
com.topjohnwu.magisk.utils.Utils
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -18,10 +20,12 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
...
@@ -18,10 +20,12 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
private
static
final
int
MIN_TEMPLATE_VER
=
3
;
private
static
final
int
MIN_TEMPLATE_VER
=
3
;
private
SQLiteDatabase
mDb
;
private
SQLiteDatabase
mDb
;
private
MagiskManager
mm
;
public
RepoDatabaseHelper
(
Context
context
)
{
public
RepoDatabaseHelper
(
Context
context
)
{
super
(
context
,
"repo.db"
,
null
,
DATABASE_VER
);
super
(
context
,
"repo.db"
,
null
,
DATABASE_VER
);
mDb
=
getWritableDatabase
();
mDb
=
getWritableDatabase
();
mm
=
Utils
.
getMagiskManager
(
context
);
}
}
@Override
@Override
...
@@ -70,7 +74,7 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
...
@@ -70,7 +74,7 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
}
}
public
Cursor
getRepoCursor
()
{
public
Cursor
getRepoCursor
()
{
return
mDb
.
query
(
TABLE_NAME
,
null
,
"template>=?
"
,
new
String
[]
{
String
.
valueOf
(
MIN_TEMPLATE_VER
)
},
null
,
null
,
"name COLLATE NOCASE"
);
return
mDb
.
query
(
TABLE_NAME
,
null
,
"template>=?
AND template<=?"
,
new
String
[]
{
String
.
valueOf
(
MIN_TEMPLATE_VER
),
String
.
valueOf
(
mm
.
magiskVersionCode
)
},
null
,
null
,
"name COLLATE NOCASE"
);
}
}
public
List
<
String
>
getRepoIDList
()
{
public
List
<
String
>
getRepoIDList
()
{
...
...
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
View file @
df215393
...
@@ -350,7 +350,7 @@ public class Utils {
...
@@ -350,7 +350,7 @@ public class Utils {
DownloadReceiver
receiver
=
null
;
DownloadReceiver
receiver
=
null
;
switch
(
idx
)
{
switch
(
idx
)
{
case
1
:
case
1
:
if
(
mm
.
remoteMagiskVersionCode
<
1
37
0
)
{
if
(
mm
.
remoteMagiskVersionCode
<
1
40
0
)
{
mm
.
toast
(
R
.
string
.
no_boot_file_patch_support
,
Toast
.
LENGTH_LONG
);
mm
.
toast
(
R
.
string
.
no_boot_file_patch_support
,
Toast
.
LENGTH_LONG
);
return
;
return
;
}
}
...
...
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