Add network support for revocation list with publication time display#52
Draft
Add network support for revocation list with publication time display#52
Conversation
Co-authored-by: vvb2060 <26996262+vvb2060@users.noreply.github.com>
Co-authored-by: vvb2060 <26996262+vvb2060@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] 支持从网络拉取最新吊销列表,并且在UI显示当前使用的吊销列表发布时间
Add network support for revocation list with publication time display
Sep 30, 2025
vvb2060
requested changes
Sep 30, 2025
Owner
vvb2060
left a comment
There was a problem hiding this comment.
use Last-Modified header for revocation list timestamp
Owner
|
@copilot use Last-Modified header for revocation list timestamp |
Co-authored-by: vvb2060 <26996262+vvb2060@users.noreply.github.com>
Author
|
private static final IPackageManager PACKAGE_MANAGER = IPackageManager.Stub.asInterface( public static void grantRuntimePermission(String packageName, String permissionName, int userId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements support for fetching the latest certificate revocation list from the network and displays its publication time in the UI, addressing the feature request in issue #[issue_number].
问题描述 (Problem Statement): 支持从网络拉取最新吊销列表,并且在UI显示当前使用的吊销列表发布时间
Changes
Network Fetching
The revocation list is now fetched from
https://android.googleapis.com/attestation/statuswith automatic fallback to the bundled localstatus.jsonfile if the network request fails. The implementation includes:AppApplication.onCreate()to avoid main thread blockingTimestamp Parsing & Display
The implementation extracts the publication time from the HTTP
Last-Modifiedheader when fetching the revocation list from the network. This provides a standard, server-controlled timestamp indicating when the revocation list was last updated.The publication time appears in the certificate chain section with localized labels:
If no timestamp is available (e.g., when using the local file or if the header is missing), the UI displays "(empty)".
Technical Details
Last-Modified Header Extraction
Thread Safety
The implementation uses a double-checked locking pattern to ensure thread-safe initialization:
Background initialization in
AppApplicationensures the revocation list is loaded before users need it, preventing any UI thread blocking.Backward Compatibility
Last-ModifiedHTTP headerstatus.jsonfileError Handling
Network failures are handled gracefully:
Files Changed
INTERNETpermissionTotal: 6 files changed, 95 insertions(+), 12 deletions(-)
Testing
Manual testing is required on an Android device to verify:
Benefits
Last-Modifiedheader for reliable timestamp informationOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.