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

Commit 83b66b22 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Validating non-empty authority and accountType

Code was check for null but empty strings are also not allowed.

Test: Manually installed the app causing the bootloop before the fix.
Rebooted the device to force schedule a sync and observed no crash.

Fixes: 19893917
Change-Id: If13aa0ac4cb3358da4b8e2bc62cb277d5248edaa
parent 7f0309dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.pm.RegisteredServicesCache;
import android.content.pm.XmlSerializerAndParser;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.SparseArray;
@@ -63,7 +64,7 @@ public class SyncAdaptersCache extends RegisteredServicesCache<SyncAdapterType>
                    sa.getString(com.android.internal.R.styleable.SyncAdapter_contentAuthority);
            final String accountType =
                    sa.getString(com.android.internal.R.styleable.SyncAdapter_accountType);
            if (authority == null || accountType == null) {
            if (TextUtils.isEmpty(authority) || TextUtils.isEmpty(accountType)) {
                return null;
            }
            final boolean userVisible =