Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
3d0cb6cc
Commit
3d0cb6cc
authored
1 year ago
by
Dan Willemsen
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Set static timestamps in protologtool output" into main
parents
40673c57
d0473319
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
+10
-2
10 additions, 2 deletions
...rotologtool/src/com/android/protolog/tool/ProtoLogTool.kt
with
10 additions
and
2 deletions
tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
+
10
−
2
View file @
3d0cb6cc
...
...
@@ -25,6 +25,7 @@ import java.io.File
import
java.io.FileInputStream
import
java.io.FileOutputStream
import
java.io.OutputStream
import
java.time.LocalDateTime
import
java.util.concurrent.ExecutorService
import
java.util.concurrent.Executors
import
java.util.jar.JarOutputStream
...
...
@@ -42,6 +43,13 @@ object ProtoLogTool {
return
source
.
contains
(
protoLogSimpleClassName
)
}
private
fun
zipEntry
(
path
:
String
):
ZipEntry
{
val
entry
=
ZipEntry
(
path
)
// Use a constant time to improve the cachability of build actions.
entry
.
timeLocal
=
LocalDateTime
.
of
(
2008
,
1
,
1
,
0
,
0
,
0
)
return
entry
}
private
fun
processClasses
(
command
:
CommandOptions
)
{
val
groups
=
injector
.
readLogGroups
(
command
.
protoLogGroupsJarArg
,
...
...
@@ -77,7 +85,7 @@ object ProtoLogTool {
}
}.
map
{
future
->
val
(
path
,
outSrc
)
=
future
.
get
()
outJar
.
putNextEntry
(
Z
ipEntry
(
path
))
outJar
.
putNextEntry
(
z
ipEntry
(
path
))
outJar
.
write
(
outSrc
.
toByteArray
())
outJar
.
closeEntry
()
}
...
...
@@ -90,7 +98,7 @@ object ProtoLogTool {
val
cachePackage
=
cacheSplit
.
dropLast
(
1
).
joinToString
(
"."
)
val
cachePath
=
"gen/${cacheSplit.joinToString("
/
")}.java"
outJar
.
putNextEntry
(
Z
ipEntry
(
cachePath
))
outJar
.
putNextEntry
(
z
ipEntry
(
cachePath
))
outJar
.
write
(
generateLogGroupCache
(
cachePackage
,
cacheName
,
groups
,
command
.
protoLogImplClassNameArg
,
command
.
protoLogGroupsClassNameArg
).
toByteArray
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment