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

Commit 15793e6e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5627676 from aef843f9 to qt-release

Change-Id: I354f4f797e0ba32619c5fd5ca76944dd0fd169da
parents 24aa12bf aef843f9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -857,8 +857,10 @@ public final class CameraManager {
     *
     * @param cameraId a non-{@code null} camera identifier
     * @return {@code true} if cameraId is a hidden physical camera device
     *
     * @hide
     */
    private boolean isHiddenPhysicalCamera(String cameraId) {
    public static boolean isHiddenPhysicalCamera(String cameraId) {
        try {
            ICameraService cameraService = CameraManagerGlobal.get().getCameraService();
            // If no camera service, no support
+10 −4
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.graphics.ImageFormat.Format;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraCharacteristics.Key;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.hardware.camera2.utils.HashCodeHelpers;
@@ -661,6 +662,7 @@ public final class MandatoryStreamCombination {
        private List<Integer> mCapabilities;
        private int mHwLevel, mCameraId;
        private StreamConfigurationMap mStreamConfigMap;
        private boolean mIsHiddenPhysicalCamera;

        private final Size kPreviewSizeBound = new Size(1920, 1088);

@@ -680,6 +682,8 @@ public final class MandatoryStreamCombination {
            mCapabilities = capabilities;
            mStreamConfigMap = sm;
            mHwLevel = hwLevel;
            mIsHiddenPhysicalCamera =
                    CameraManager.isHiddenPhysicalCamera(Integer.toString(mCameraId));
        }

        /**
@@ -893,8 +897,10 @@ public final class MandatoryStreamCombination {
            Size recordingMaxSize = new Size(0, 0);
            Size previewMaxSize = new Size(0, 0);
            Size vgaSize = new Size(640, 480);
            if (isExternalCamera()) {
                recordingMaxSize = getMaxExternalRecordingSize();
            // For external camera, or hidden physical camera, CamcorderProfile may not be
            // available, so get maximum recording size using stream configuration map.
            if (isExternalCamera() || mIsHiddenPhysicalCamera) {
                recordingMaxSize = getMaxCameraRecordingSize();
            } else {
                recordingMaxSize = getMaxRecordingSize();
            }
@@ -1123,12 +1129,12 @@ public final class MandatoryStreamCombination {
        }

        /**
         * Return the maximum supported video size for external cameras using data from
         * Return the maximum supported video size for cameras using data from
         * the stream configuration map.
         *
         * @return Maximum supported video size.
         */
        private @NonNull Size getMaxExternalRecordingSize() {
        private @NonNull Size getMaxCameraRecordingSize() {
            final Size FULLHD = new Size(1920, 1080);

            Size[] videoSizeArr = mStreamConfigMap.getOutputSizes(
+0 −43
Original line number Diff line number Diff line
//
// Copyright (C) 2019 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.
//

java_defaults {
    name: "CaptivePortalLoginDefaults",
    srcs: ["src/**/*.java"],
    sdk_version: "system_current",
    min_sdk_version: "28",
    static_libs: [
        "androidx.legacy_legacy-support-v4",
        "metrics-constants-protos",
        "captiveportal-lib",
    ],
    manifest: "AndroidManifest.xml",
}

android_app {
    name: "CaptivePortalLogin",
    defaults: ["CaptivePortalLoginDefaults"],
    certificate: "networkstack",
}

// Alternative CaptivePortalLogin signed with the platform cert, to use
// with InProcessNetworkStack.
android_app {
    name: "PlatformCaptivePortalLogin",
    defaults: ["CaptivePortalLoginDefaults"],
    certificate: "platform",
    overrides: ["CaptivePortalLogin"],
}
+0 −48
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2014 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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.captiveportallogin"
    android:versionCode="220000000"
    android:versionName="Q-initial">

    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS" />
    <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
    <uses-permission android:name="android.permission.MAINLINE_NETWORK_STACK" />

    <application android:label="@string/app_name"
                 android:icon="@drawable/app_icon"
                 android:usesCleartextTraffic="true"
                 android:supportsRtl="true" >
        <activity
            android:name="com.android.captiveportallogin.CaptivePortalLoginActivity"
            android:label="@string/action_bar_label"
            android:theme="@style/AppTheme"
            android:configChanges="keyboardHidden|orientation|screenSize" >
            <intent-filter>
                <action android:name="android.net.conn.CAPTIVE_PORTAL"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
    </application>
</manifest>
+0 −5
Original line number Diff line number Diff line
set noparent

lorenzo@google.com
baligh@google.com
delphij@google.com
Loading