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

Commit ad40c61f authored by Elis Elliott's avatar Elis Elliott Committed by Android (Google) Code Review
Browse files

Merge "Add timeout to AccountManager#hasFeatures check in DPMS." into main

parents 73448301 1f83c646
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -18182,7 +18182,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        private static boolean hasAccountFeatures(AccountManager am, Account account,
        private static boolean hasAccountFeatures(AccountManager am, Account account,
                String[] features) {
                String[] features) {
            try {
            try {
                return am.hasFeatures(account, features, null, null).getResult();
                return am.hasFeatures(account, features, null, null)
                        .getResult(30, TimeUnit.SECONDS);
            } catch (Exception e) {
            } catch (Exception e) {
                Slogf.w(LOG_TAG, "Failed to get account feature", e);
                Slogf.w(LOG_TAG, "Failed to get account feature", e);
                return false;
                return false;