Skip to content
Commit 686d8289 authored by Chiachang Wang's avatar Chiachang Wang
Browse files

Remove the hidden NetworkRequest usage

Constructor of JobStatus may update the network request in the
JobInfo parameter. NetworkRequest is moving into the incoming
connectivity module. The hidden methods and members usage will
not allowed anymore, so it requires to rebuild the network
request for any update in the network request. Expose a new
Builder constructor as a helper method to construct from an
existing JobInfo instance which will helpful for such cases
that need to clone the JobInfo and update only specific items.

Also, JobStatus which is inside the platform could not refer
to the hidden members or methods of classes in the connectivity
mainline module. Callers who want to construct a network
request should use the formal NetworkRequest.Builder. Update
the usage accordingly to resolve the hidden usage.

Bug: 172183305
Test: atest JobInfoTest
Test: atest com.android.server.job.controllers.JobStatusTest
Change-Id: Ifb74d44e29e13f0e3b995be638c5bfe435a09106
Merged-In: Ifb74d44e29e13f0e3b995be638c5bfe435a09106
parent a2bc287e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment