Loading src/com/android/contacts/model/account/AccountWithDataSet.java +7 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.ContentProviderOperation; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.provider.BaseColumns; Loading Loading @@ -87,11 +88,12 @@ public class AccountWithDataSet implements Parcelable { } public static AccountWithDataSet getLocalAccount(Context context) { return new AccountWithDataSet( return android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.R ? getNullAccount() : new AccountWithDataSet( RawContacts.getLocalAccountName(context), RawContacts.getLocalAccountType(context), null ); null); } public Account getAccountOrNull() { Loading Loading @@ -261,4 +263,3 @@ public class AccountWithDataSet implements Parcelable { return ret; } } Loading
src/com/android/contacts/model/account/AccountWithDataSet.java +7 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.ContentProviderOperation; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.provider.BaseColumns; Loading Loading @@ -87,11 +88,12 @@ public class AccountWithDataSet implements Parcelable { } public static AccountWithDataSet getLocalAccount(Context context) { return new AccountWithDataSet( return android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.R ? getNullAccount() : new AccountWithDataSet( RawContacts.getLocalAccountName(context), RawContacts.getLocalAccountType(context), null ); null); } public Account getAccountOrNull() { Loading Loading @@ -261,4 +263,3 @@ public class AccountWithDataSet implements Parcelable { return ret; } }