Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions android-stub/src/main/java/com/android/libcore/Flags.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.android.libcore;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class Flags {
private Flags() {}

public static boolean networkSecurityPolicyReasonCtEnabledApi() {
throw new RuntimeException("Stub!");
}

public static boolean networkSecurityPolicyEchApi() {
throw new RuntimeException("Stub!");
}
}
57 changes: 57 additions & 0 deletions android-stub/src/main/java/libcore/net/NetworkSecurityPolicy.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package libcore.net;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class NetworkSecurityPolicy {
public static final int CERTIFICATE_TRANSPARENCY_REASON_APP_OPT_IN = 1;
public static final int CERTIFICATE_TRANSPARENCY_REASON_DOMAIN_OPT_IN = 2;
public static final int CERTIFICATE_TRANSPARENCY_REASON_SDK_TARGET_DEFAULT_ENABLED = 3;

public static final int DOMAIN_ENCRYPTION_MODE_DISABLED = 1;
public static final int DOMAIN_ENCRYPTION_MODE_OPPORTUNISTIC = 2;
public static final int DOMAIN_ENCRYPTION_MODE_ENABLED = 3;
public static final int DOMAIN_ENCRYPTION_MODE_REQUIRED = 4;

public static NetworkSecurityPolicy getInstance() {
throw new RuntimeException("Stub!");
}

public boolean isCleartextTrafficPermitted() {
throw new RuntimeException("Stub!");
}

public boolean isCleartextTrafficPermitted(String hostname) {
throw new RuntimeException("Stub!");
}

public boolean isCertificateTransparencyVerificationRequired(String hostname) {
throw new RuntimeException("Stub!");
}

public int getCertificateTransparencyVerificationReason(String hostname) {
throw new RuntimeException("Stub!");
}

public int getDomainEncryptionMode(String hostname) {
throw new RuntimeException("Stub!");
}

public void handleTrustStorageUpdate() {
throw new RuntimeException("Stub!");
}
}
26 changes: 26 additions & 0 deletions android-stub/src/main/java/org/conscrypt/net/flags/Flags.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.conscrypt.net.flags;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class Flags {
private Flags() {}

public static boolean encryptedClientHelloPlatform() {
throw new RuntimeException("Stub!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import org.junit.Before;
import org.junit.Test;

import java.security.cert.Certificate;

import javax.net.ssl.SSLSession;

public abstract class AbstractSessionContextTest<T extends AbstractSessionContext> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.conscrypt;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
Expand Down
Loading
Loading