Revert "AOSP/Messaging - update the Messaging version to target P (28) or higher. Fixed tests in messagingtests. All tests pass/work."
This reverts commit 9752cda535.
Reason for revert: com.android.devicehealthchecks are failing https://sponge.corp.google.com/target?id=3b9a97f0-48bc-410d-94ce-0971c2f75361&target=com.android.devicehealthchecks&searchFor=&show=FAILED&sortBy=STATUS
Change-Id: I82d337b1d859083169ac6057b408f7e920f06609
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
package="com.android.messaging"
|
package="com.android.messaging"
|
||||||
android:installLocation="internalOnly">
|
android:installLocation="internalOnly">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
|
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />
|
||||||
|
|
||||||
<!-- Application holds CPU wakelock while working in background -->
|
<!-- Application holds CPU wakelock while working in background -->
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.android.messaging.test" >
|
package="com.android.messaging.test" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
|
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="19"/>
|
||||||
|
|
||||||
<application android:label="Messaging Tests" >
|
<application android:label="Messaging Tests" >
|
||||||
<uses-library android:name="android.test.runner" />
|
<uses-library android:name="android.test.runner" />
|
||||||
|
|||||||
@@ -30,11 +30,9 @@ import com.android.messaging.FakeFactory;
|
|||||||
import com.android.messaging.datamodel.DatabaseHelper.ParticipantColumns;
|
import com.android.messaging.datamodel.DatabaseHelper.ParticipantColumns;
|
||||||
import com.android.messaging.datamodel.data.ParticipantData;
|
import com.android.messaging.datamodel.data.ParticipantData;
|
||||||
import com.android.messaging.datamodel.data.ParticipantData.ParticipantsQuery;
|
import com.android.messaging.datamodel.data.ParticipantData.ParticipantsQuery;
|
||||||
import com.android.messaging.ui.UIIntents;
|
|
||||||
import com.android.messaging.util.ContactUtil;
|
import com.android.messaging.util.ContactUtil;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.mockito.Mock;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class for testing ParticipantRefresh class for different scenarios.
|
* Utility class for testing ParticipantRefresh class for different scenarios.
|
||||||
@@ -43,8 +41,6 @@ import org.mockito.Mock;
|
|||||||
public class ParticipantRefreshTest extends BugleTestCase {
|
public class ParticipantRefreshTest extends BugleTestCase {
|
||||||
private FakeContext mContext;
|
private FakeContext mContext;
|
||||||
FakeFactory mFakeFactory;
|
FakeFactory mFakeFactory;
|
||||||
@Mock protected UIIntents mMockUIIntents;
|
|
||||||
protected FakeDataModel mFakeDataModel;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
@@ -56,10 +52,9 @@ public class ParticipantRefreshTest extends BugleTestCase {
|
|||||||
provider.attachInfo(mContext, null);
|
provider.attachInfo(mContext, null);
|
||||||
mContext.addContentProvider(MessagingContentProvider.AUTHORITY, provider);
|
mContext.addContentProvider(MessagingContentProvider.AUTHORITY, provider);
|
||||||
|
|
||||||
mFakeDataModel = new FakeDataModel(mContext);
|
final FakeDataModel fakeDataModel = new FakeDataModel(mContext);
|
||||||
mFakeFactory = FakeFactory.registerWithFakeContext(getTestContext(), mContext)
|
mFakeFactory = FakeFactory.registerWithFakeContext(getTestContext(), mContext)
|
||||||
.withDataModel(mFakeDataModel)
|
.withDataModel(fakeDataModel);
|
||||||
.withUIIntents(mMockUIIntents);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,7 +179,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
|
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
|
||||||
verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
|
verifyParticipant("650-123-1233", 1, "Joh", "content://photo/joh");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -211,7 +206,8 @@ public class ParticipantRefreshTest extends BugleTestCase {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
|
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
|
||||||
verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
|
verifyParticipant("650-123-1233", ParticipantData.PARTICIPANT_CONTACT_ID_NOT_FOUND,
|
||||||
|
null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -253,7 +249,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
|
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
|
||||||
verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
|
verifyParticipant("650-123-1233", 2, "Joe", "content://photo/joe");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -274,7 +270,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
|
|||||||
* Verify that refresh take first contact in case current contact_id no longer matches.
|
* Verify that refresh take first contact in case current contact_id no longer matches.
|
||||||
*/
|
*/
|
||||||
public void testFullRefreshResolvedBeforeButNotFoundNow() {
|
public void testFullRefreshResolvedBeforeButNotFoundNow() {
|
||||||
addParticipant("650-123-1233", 1, "Joh", "content://photo/joh");
|
addParticipant("650-123-1233", 3, "Joh", "content://photo/joh");
|
||||||
addPhoneLookup("650-123-1233", new Object[][] {});
|
addPhoneLookup("650-123-1233", new Object[][] {});
|
||||||
|
|
||||||
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
|
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
|
||||||
|
|||||||
@@ -67,10 +67,8 @@ public class GetOrCreateConversationActionTest extends BugleTestCase {
|
|||||||
final long threadId = MmsUtils.getOrCreateThreadId(mContext, recipients);
|
final long threadId = MmsUtils.getOrCreateThreadId(mContext, recipients);
|
||||||
assertEquals(TestDataFactory.SMS_MMS_THREAD_ID_CURSOR_VALUE, threadId);
|
assertEquals(TestDataFactory.SMS_MMS_THREAD_ID_CURSOR_VALUE, threadId);
|
||||||
|
|
||||||
// TestDataFactory creates NUM_TEST_CONVERSATIONS conversations. blank
|
|
||||||
// conversation would be the next conversation.
|
|
||||||
final String blankId = BugleDatabaseOperations.getExistingConversation(db, threadId, false);
|
final String blankId = BugleDatabaseOperations.getExistingConversation(db, threadId, false);
|
||||||
assertEquals(TestDataFactory.NUM_TEST_CONVERSATIONS+1, Integer.parseInt((String)blankId));
|
assertNull("Conversation already exists", blankId);
|
||||||
|
|
||||||
ArrayList<StubActionServiceCallLog> calls = mService.getCalls();
|
ArrayList<StubActionServiceCallLog> calls = mService.getCalls();
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,6 @@ public class ConversationFragmentTest extends FragmentTestCase<ConversationFragm
|
|||||||
Mockito.doReturn(mockDraftMessageData)
|
Mockito.doReturn(mockDraftMessageData)
|
||||||
.when(mockDataModel)
|
.when(mockDataModel)
|
||||||
.createDraftMessageData(Mockito.anyString());
|
.createDraftMessageData(Mockito.anyString());
|
||||||
Mockito.doReturn(mockDraftMessageData)
|
|
||||||
.when(mockDataModel)
|
|
||||||
.createDraftMessageData(null);
|
|
||||||
Mockito.when(mockDataModel.createConversationData(
|
Mockito.when(mockDataModel.createConversationData(
|
||||||
Matchers.any(Activity.class),
|
Matchers.any(Activity.class),
|
||||||
Matchers.any(ConversationDataListener.class),
|
Matchers.any(ConversationDataListener.class),
|
||||||
|
|||||||
Reference in New Issue
Block a user