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

Commit 9482bd12 authored by Arthur Wang's avatar Arthur Wang Committed by Android (Google) Code Review
Browse files

Merge "Convert handler creation on the main thread." into ub-contactsdialer-g-dev

parents e1dcafeb 9589ef63
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
# Needed for tests
-keep class com.android.contacts.common.compat.CompatUtils { *; }
-keep class com.android.contacts.common.Collapser { *; }
-keep class com.android.contacts.common.ContactPhotoManager { *; }
-keep class com.android.contacts.common.ContactsUtils { *; }
-keep class com.android.contacts.common.database.NoNullCursorAsyncQueryHandler { *; }
-keep class com.android.contacts.common.format.FormatUtils { *; }
@@ -64,6 +65,7 @@
-keep class com.android.contacts.common.model.ValuesDelta { *; }
-keep class com.android.contacts.common.MoreContactUtils { *; }
-keep class com.android.contacts.common.preference.ContactsPreferences { *; }
-keep class com.android.contacts.common.test.mocks.MockContactPhotoManager { *; }
-keep class com.android.contacts.common.testing.InjectedServices { *; }
-keep class com.android.contacts.common.util.BitmapUtil { *; }
-keep class com.android.contacts.common.util.ContactDisplayUtils { *; }
+7 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.contacts.common.preference;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;

@@ -59,8 +60,13 @@ public class ContactsPreferencesTest extends InstrumentationTestCase {
        Mockito.when(mSharedPreferences.contains(ContactsPreferences.DISPLAY_ORDER_KEY))
                .thenReturn(true);

        InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() {
            @Override
            public void run() {
                mContactsPreferences = new ContactsPreferences(mContext);
            }
        });
    }

    public void testGetSortOrderDefault() {
        Mockito.when(mResources.getBoolean(Mockito.anyInt())).thenReturn(