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
ff3dad24
Commit
ff3dad24
authored
Sep 01, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent upgrading database before upgrading to v17.0
parent
298d5e19
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
Const.java
app/src/full/java/com/topjohnwu/magisk/Const.java
+1
-0
MagiskDatabaseHelper.java
...a/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java
+8
-5
changelog.md
app/src/full/res/raw/changelog.md
+3
-0
No files found.
app/src/full/java/com/topjohnwu/magisk/Const.java
View file @
ff3dad24
...
@@ -57,6 +57,7 @@ public class Const {
...
@@ -57,6 +57,7 @@ public class Const {
public
static
final
int
REMOVE_LEGACY_LINK
=
1630
;
public
static
final
int
REMOVE_LEGACY_LINK
=
1630
;
public
static
final
int
SEPOL_REFACTOR
=
1640
;
public
static
final
int
SEPOL_REFACTOR
=
1640
;
public
static
final
int
FIX_ENV
=
1650
;
public
static
final
int
FIX_ENV
=
1650
;
public
static
final
int
DBVER_SIX
=
17000
;
}
}
public
static
class
ID
{
public
static
class
ID
{
...
...
app/src/full/java/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java
View file @
ff3dad24
...
@@ -32,6 +32,7 @@ import java.util.List;
...
@@ -32,6 +32,7 @@ import java.util.List;
public
class
MagiskDatabaseHelper
{
public
class
MagiskDatabaseHelper
{
private
static
final
int
DATABASE_VER
=
6
;
private
static
final
int
DATABASE_VER
=
6
;
private
static
final
int
OLD_DATABASE_VER
=
5
;
private
static
final
String
POLICY_TABLE
=
"policies"
;
private
static
final
String
POLICY_TABLE
=
"policies"
;
private
static
final
String
LOG_TABLE
=
"logs"
;
private
static
final
String
LOG_TABLE
=
"logs"
;
private
static
final
String
SETTINGS_TABLE
=
"settings"
;
private
static
final
String
SETTINGS_TABLE
=
"settings"
;
...
@@ -57,13 +58,15 @@ public class MagiskDatabaseHelper {
...
@@ -57,13 +58,15 @@ public class MagiskDatabaseHelper {
pm
=
mm
.
getPackageManager
();
pm
=
mm
.
getPackageManager
();
db
=
openDatabase
(
mm
);
db
=
openDatabase
(
mm
);
db
.
disableWriteAheadLogging
();
db
.
disableWriteAheadLogging
();
int
version
=
db
.
getVersion
();
int
version
=
Data
.
magiskVersionCode
>=
Const
.
MAGISK_VER
.
DBVER_SIX
?
DATABASE_VER
:
OLD_DATABASE_VER
;
if
(
version
<
DATABASE_VER
)
{
int
curVersion
=
db
.
getVersion
();
onUpgrade
(
db
,
version
);
if
(
curVersion
<
version
)
{
}
else
if
(
version
>
DATABASE_VER
)
{
onUpgrade
(
db
,
curVersion
);
}
else
if
(
curVersion
>
DATABASE_VER
)
{
/* Higher than we can possibly support */
onDowngrade
(
db
);
onDowngrade
(
db
);
}
}
db
.
setVersion
(
DATABASE_VER
);
db
.
setVersion
(
version
);
clearOutdated
();
clearOutdated
();
}
}
...
...
app/src/full/res/raw/changelog.md
View file @
ff3dad24
### 5.9.1
-
Prevent upgrading database before upgrading to v17.0
### v5.9.0
### v5.9.0
-
No more on boot notifications
-
No more on boot notifications
-
Support new mechanism for installing to inactive slot for OTAs on A/B devices
-
Support new mechanism for installing to inactive slot for OTAs on A/B devices
...
...
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