Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5184cab authored by Kweku Adams's avatar Kweku Adams
Browse files

Update JobParameters documentation.

Explicitly call out a situation in which the app could specify a network
constraint but get a null value in JobParameters.getNetwork().
Also add link to JobInfo.Builder.setRequiredNetwork().

Bug: 19536175
Test: N/A
Change-Id: I556e53188c60e61a96f76733c3de0ee541b83503
parent 4cfdb5cc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.net.Network;
import android.net.NetworkRequest;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
@@ -242,8 +243,9 @@ public class JobParameters implements Parcelable {
     *
     * @return the network that should be used to perform any network requests
     *         for this job, or {@code null} if this job didn't set any required
     *         network type.
     *         network type or if the job executed when there was no available network to use.
     * @see JobInfo.Builder#setRequiredNetworkType(int)
     * @see JobInfo.Builder#setRequiredNetwork(NetworkRequest)
     */
    public @Nullable Network getNetwork() {
        return network;