Fix DO check on headless devices

Bug: 289515470
Test: btest a.d.c.PreferentialNetworkServiceTest
Merged-In: Id93322caca55e122339701e4c69b4ded57b8f6cc
Change-Id: Id93322caca55e122339701e4c69b4ded57b8f6cc
This commit is contained in:
Kholoud Mohamed 2024-04-19 09:35:36 +00:00 • committed by Android Build Cherrypicker Worker
commit 7a7d1ac87d

View file

@ -12733,8 +12733,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
if (um.isManagedProfile(profile.getIdentifier())) {
return true;
}
if (mDeps.isAtLeastT() && dpm.getDeviceOwner() != null) return true;
return false;
return mDeps.isAtLeastT() && dpm.getDeviceOwnerComponentOnAnyUser() != null;
}
/**