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
27e0d164
Commit
27e0d164
authored
Aug 01, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show proper time of repo updates
parent
9ac71ff8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
UpdateRepos.java
...rc/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
+8
-1
Repo.java
app/src/full/java/com/topjohnwu/magisk/container/Repo.java
+1
-3
No files found.
app/src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
View file @
27e0d164
...
...
@@ -31,6 +31,7 @@ import java.util.List;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.TimeZone
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -40,9 +41,15 @@ public class UpdateRepos {
private
static
final
int
CHECK_ETAG
=
0
;
private
static
final
int
LOAD_NEXT
=
1
;
private
static
final
int
LOAD_PREV
=
2
;
private
static
final
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
,
Locale
.
US
);
private
static
final
int
CPU_COUNT
=
Runtime
.
getRuntime
().
availableProcessors
();
private
static
final
int
CORE_POOL_SIZE
=
Math
.
max
(
2
,
CPU_COUNT
-
1
);
private
static
final
DateFormat
dateFormat
;
static
{
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
,
Locale
.
US
);
dateFormat
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
}
private
MagiskManager
mm
;
private
List
<
String
>
etags
,
newEtags
;
...
...
app/src/full/java/com/topjohnwu/magisk/container/Repo.java
View file @
27e0d164
...
...
@@ -4,7 +4,6 @@ import android.content.ContentValues;
import
android.database.Cursor
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.utils.LocaleManager
;
import
com.topjohnwu.magisk.utils.Logger
;
import
com.topjohnwu.magisk.utils.Utils
;
import
com.topjohnwu.magisk.utils.WebService
;
...
...
@@ -76,8 +75,7 @@ public class Repo extends BaseModule {
}
public
String
getLastUpdateString
()
{
return
DateFormat
.
getDateTimeInstance
(
DateFormat
.
MEDIUM
,
DateFormat
.
MEDIUM
,
LocaleManager
.
locale
).
format
(
mLastUpdate
);
return
DateFormat
.
getDateTimeInstance
(
DateFormat
.
MEDIUM
,
DateFormat
.
MEDIUM
).
format
(
mLastUpdate
);
}
public
Date
getLastUpdate
()
{
...
...
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