aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-03-29 11:41:22 -0700
committerAdnan Begovic <adnan@cyngn.com>2016-03-31 17:58:11 -0700
commiteafcdbd2298caba7ae7c6c4d10f0e2e445245216 (patch)
treeca277f2574d03bf53d471d711f626b1587b36357 /tests
parent4195a1cf89d8c7bea024b6922bc2145ee05015f3 (diff)
downloadvendor_cmsdk-eafcdbd2298caba7ae7c6c4d10f0e2e445245216.zip
vendor_cmsdk-eafcdbd2298caba7ae7c6c4d10f0e2e445245216.tar.gz
vendor_cmsdk-eafcdbd2298caba7ae7c6c4d10f0e2e445245216.tar.bz2
cmsdk: Create Concierge parcel handler concept.
Simply, Concierge handles your parcels and makes sure they get marshalled and unmarshalled correctly when cross IPC boundaries even when there is a version mismatch between the client sdk level and the framework implementation. On incoming parcel (to be unmarshalled): ParcelInfo incomingParcelInfo = Concierge.receiveParcel(incomingParcel); int parcelableVersion = incomingParcelInfo.getParcelVersion(); // Do unmarshalling steps here iterating over every plausible version // Complete the process incomingParcelInfo.complete(); On outgoing parcel (to be marshalled): ParcelInfo outgoingParcelInfo = Concierge.prepareParcel(incomingParcel); // Do marshalling steps here iterating over every plausible version // Complete the process outgoingParcelInfo.complete(); Change-Id: I0096851e08ce25908e19e39e6bc4af344e85725e
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/cyanogenmod/tests/versioning/unit/BuildTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/org/cyanogenmod/tests/versioning/unit/BuildTest.java b/tests/src/org/cyanogenmod/tests/versioning/unit/BuildTest.java
index 3e0be19..1922e95 100644
--- a/tests/src/org/cyanogenmod/tests/versioning/unit/BuildTest.java
+++ b/tests/src/org/cyanogenmod/tests/versioning/unit/BuildTest.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import cyanogenmod.os.Build;
import android.test.AndroidTestCase;
+import cyanogenmod.os.Concierge;
/**
* Created by adnan on 7/14/15.
@@ -38,20 +39,20 @@ public class BuildTest extends AndroidTestCase {
@SmallTest
public void testSdkApiLevelCurrent() {
- assertEquals(Build.PARCELABLE_VERSION, Build.CM_VERSION.SDK_INT);
+ assertEquals(Concierge.PARCELABLE_VERSION, Build.CM_VERSION.SDK_INT);
}
@SmallTest
public void testSdkApiLevelCanMatch() {
String apiName = Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT);
assertNotNull(apiName);
- assertEquals(Build.getNameForSDKInt(Build.PARCELABLE_VERSION), apiName);
+ assertEquals(Build.getNameForSDKInt(Concierge.PARCELABLE_VERSION), apiName);
}
@SmallTest
public void testSdkApiLevelSkippedIfGreaterThanAllowed() {
int i = 0;
- if (Build.CM_VERSION.SDK_INT > Build.PARCELABLE_VERSION + 1) {
+ if (Build.CM_VERSION.SDK_INT > Concierge.PARCELABLE_VERSION + 1) {
i++;
}
assertEquals(0, i);