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
c78896a3
Commit
c78896a3
authored
Jul 04, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of error logs
parent
316ec98e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
21 deletions
+9
-21
UpdateRepos.java
src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
+2
-5
Repo.java
src/full/java/com/topjohnwu/magisk/container/Repo.java
+1
-1
Logger.java
src/full/java/com/topjohnwu/magisk/utils/Logger.java
+6
-15
No files found.
src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
View file @
c78896a3
...
@@ -118,11 +118,8 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
...
@@ -118,11 +118,8 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
mm
.
repoDB
.
addRepo
(
repo
);
mm
.
repoDB
.
addRepo
(
repo
);
publishProgress
();
publishProgress
();
}
}
if
(!
id
.
equals
(
repo
.
getId
()))
{
Logger
.
error
(
"Repo ["
+
name
+
"] rid=["
+
id
+
"] id=["
+
repo
.
getId
()
+
"] mismatch"
);
}
}
catch
(
Repo
.
IllegalRepoException
e
)
{
}
catch
(
Repo
.
IllegalRepoException
e
)
{
Logger
.
error
(
e
.
getMessage
());
Logger
.
debug
(
e
.
getMessage
());
mm
.
repoDB
.
removeRepo
(
id
);
mm
.
repoDB
.
removeRepo
(
id
);
}
}
});
});
...
@@ -205,7 +202,7 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
...
@@ -205,7 +202,7 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
repo
.
update
();
repo
.
update
();
mm
.
repoDB
.
addRepo
(
repo
);
mm
.
repoDB
.
addRepo
(
repo
);
}
catch
(
Repo
.
IllegalRepoException
e
)
{
}
catch
(
Repo
.
IllegalRepoException
e
)
{
Logger
.
error
(
e
.
getMessage
());
Logger
.
debug
(
e
.
getMessage
());
mm
.
repoDB
.
removeRepo
(
repo
);
mm
.
repoDB
.
removeRepo
(
repo
);
}
}
});
});
...
...
src/full/java/com/topjohnwu/magisk/container/Repo.java
View file @
c78896a3
...
@@ -44,7 +44,7 @@ public class Repo extends BaseModule {
...
@@ -44,7 +44,7 @@ public class Repo extends BaseModule {
throw
new
IllegalRepoException
(
"Repo ["
+
repoName
+
"] does not contain versionCode"
);
throw
new
IllegalRepoException
(
"Repo ["
+
repoName
+
"] does not contain versionCode"
);
}
}
if
(
getMinMagiskVersion
()
<
Const
.
MIN_MODULE_VER
())
{
if
(
getMinMagiskVersion
()
<
Const
.
MIN_MODULE_VER
())
{
Logger
.
error
(
"Repo ["
+
repoName
+
"] is outdated"
);
Logger
.
debug
(
"Repo ["
+
repoName
+
"] is outdated"
);
}
}
}
}
...
...
src/full/java/com/topjohnwu/magisk/utils/Logger.java
View file @
c78896a3
...
@@ -2,18 +2,19 @@ package com.topjohnwu.magisk.utils;
...
@@ -2,18 +2,19 @@ package com.topjohnwu.magisk.utils;
import
android.util.Log
;
import
android.util.Log
;
import
com.topjohnwu.magisk.BuildConfig
;
import
java.util.Locale
;
import
java.util.Locale
;
public
class
Logger
{
public
class
Logger
{
private
static
final
boolean
SHELL_LOGGING
=
false
;
public
static
void
debug
(
String
line
)
{
public
static
void
debug
(
String
line
)
{
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
Const
.
DEBUG_TAG
,
"DEBUG: "
+
line
);
Log
.
d
(
Const
.
DEBUG_TAG
,
"DEBUG: "
+
line
);
}
}
public
static
void
debug
(
String
fmt
,
Object
...
args
)
{
public
static
void
debug
(
String
fmt
,
Object
...
args
)
{
debug
(
String
.
format
(
Locale
.
US
,
fmt
,
args
));
debug
(
Utils
.
fmt
(
fmt
,
args
));
}
}
public
static
void
error
(
String
line
)
{
public
static
void
error
(
String
line
)
{
...
@@ -21,16 +22,6 @@ public class Logger {
...
@@ -21,16 +22,6 @@ public class Logger {
}
}
public
static
void
error
(
String
fmt
,
Object
...
args
)
{
public
static
void
error
(
String
fmt
,
Object
...
args
)
{
error
(
String
.
format
(
Locale
.
US
,
fmt
,
args
));
error
(
Utils
.
fmt
(
fmt
,
args
));
}
public
static
void
shell
(
boolean
in
,
String
line
)
{
if
(
SHELL_LOGGING
)
{
Log
.
d
(
Const
.
DEBUG_TAG
,
(
in
?
"SHELLIN : "
:
"SHELLOUT: "
)
+
line
);
}
}
public
static
void
shell
(
boolean
in
,
String
fmt
,
Object
...
args
)
{
shell
(
in
,
String
.
format
(
Locale
.
US
,
fmt
,
args
));
}
}
}
}
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