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

Commit 5e8f6582 authored by Raphael Kim's avatar Raphael Kim Committed by Automerger Merge Worker
Browse files

Merge changes from topic "cdm-secure-channel-udc-dev" into udc-dev am: f7fd412b

parents fe1777fa f7fd412b
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1194,6 +1194,20 @@ public final class CompanionDeviceManager {
        }
    }

    /**
     * Enable or disable secure transport for testing. Defaults to enabled.
     *
     * @param enabled true to enable. false to disable.
     * @hide
     */
    public void enableSecureTransport(boolean enabled) {
        try {
            mService.enableSecureTransport(enabled);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    private boolean checkFeaturePresent() {
        boolean featurePresent = mService != null;
        if (!featurePresent && DEBUG) {
+2 −0
Original line number Diff line number Diff line
@@ -88,4 +88,6 @@ interface ICompanionDeviceManager {
    void enableSystemDataSync(int associationId, int flags);

    void disableSystemDataSync(int associationId, int flags);

    void enableSecureTransport(boolean enabled);
}
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ public class SystemDataTransportTest extends InstrumentationTestCase {
        mContext = getInstrumentation().getTargetContext();
        mCdm = mContext.getSystemService(CompanionDeviceManager.class);
        mAssociationId = createAssociation();
        mCdm.enableSecureTransport(false);
    }

    @Override
@@ -67,6 +68,7 @@ public class SystemDataTransportTest extends InstrumentationTestCase {
        super.tearDown();

        mCdm.disassociate(mAssociationId);
        mCdm.enableSecureTransport(true);
    }

    public void testPingHandRolled() {
+4 −0
Original line number Diff line number Diff line
@@ -195,6 +195,10 @@ java_library {
        "manifest_services.xml",
    ],

    required: [
        "libukey2_jni_shared",
    ],

    // Uncomment to enable output of certain warnings (deprecated, unchecked)
    //javacflags: ["-Xlint"],
}
+3 −0
Original line number Diff line number Diff line
@@ -24,4 +24,7 @@ java_library_static {
        "app-compat-annotations",
        "services.core",
    ],
    static_libs: [
        "ukey2_jni",
    ],
}
Loading