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

Commit be84edb9 authored by Eran Messeri's avatar Eran Messeri
Browse files

API Review: Private DNS host can be null

Mark getGlobalPrivateDnsHost as @Nullable since it can return null
(in the case of a host not set).

Bug: 126699845
Test: That it builds
Change-Id: I4680a8fa59815f62a74c14c149124d4cda567cca
parent c7f498fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6641,7 +6641,7 @@ package android.app.admin {
    method @NonNull public java.util.List<java.lang.String> getDelegatedScopes(@Nullable android.content.ComponentName, @NonNull String);
    method public CharSequence getDeviceOwnerLockScreenInfo();
    method public CharSequence getEndUserSessionMessage(@NonNull android.content.ComponentName);
    method public String getGlobalPrivateDnsHost(@NonNull android.content.ComponentName);
    method @Nullable public String getGlobalPrivateDnsHost(@NonNull android.content.ComponentName);
    method public int getGlobalPrivateDnsMode(@NonNull android.content.ComponentName);
    method @NonNull public java.util.List<byte[]> getInstalledCaCerts(@Nullable android.content.ComponentName);
    method @Nullable public java.util.List<java.lang.String> getKeepUninstalledPackages(@Nullable android.content.ComponentName);
+2 −2
Original line number Diff line number Diff line
@@ -10628,10 +10628,10 @@ public class DevicePolicyManager {
     * Returns the system-wide Private DNS host.
     *
     * @param admin which {@link DeviceAdminReceiver} this request is associated with.
     * @return The hostname used for Private DNS queries.
     * @return The hostname used for Private DNS queries, null if none is set.
     * @throws SecurityException if the caller is not the device owner.
     */
    public String getGlobalPrivateDnsHost(@NonNull ComponentName admin) {
    public @Nullable String getGlobalPrivateDnsHost(@NonNull ComponentName admin) {
        throwIfParentInstance("setGlobalPrivateDns");
        if (mService == null) {
            return null;