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

Commit f7b94b09 authored by Joe Onorato's avatar Joe Onorato Committed by Android (Google) Code Review
Browse files

Merge changes from topic "b_123955906" into qt-dev

* changes:
  Fix crash in incident report confirmation
  Moving this test next to the rest of the PermissionController test cases.
parents 1ba1e740 1f281279
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ public class ConfirmationActivity extends Activity implements OnClickListener, O
        final Formatting formatting = new Formatting(this);

        final Uri uri = getIntent().getData();
        Log.d(TAG, "uri=" + uri);
        if (uri == null) {
            Log.w(TAG, "No uri in intent: " + getIntent());
            finish();
@@ -213,6 +214,12 @@ public class ConfirmationActivity extends Activity implements OnClickListener, O
        try {
            final IncidentManager incidentManager = getSystemService(IncidentManager.class);
            final IncidentManager.IncidentReport report = incidentManager.getIncidentReport(uri);
            if (report == null) {
                // There is no incident report, so no images to show, so return empty list.
                // Other errors below are invalid images, which we reject, because they're there
                // but we can't let  the user confirm it.
                return new ArrayList();
            }

            final InputStream stream = report.getInputStream();
            if (stream != null) {

test/Android.mk

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))

test/instrumentation/Android.mk

deleted100644 → 0
+0 −42
Original line number Diff line number Diff line
# Copyright (C) 2017 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.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := PermissionControllerTest
LOCAL_CERTIFICATE := platform

LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
LOCAL_PROGUARD_ENABLED := disabled

LOCAL_STATIC_JAVA_LIBRARIES := \
	androidx.annotation_annotation \
	androidx.test.runner \
	androidx.test.rules \
	androidx.test.uiautomator_uiautomator \
    androidx.legacy_legacy-support-v4 \
    platform-test-annotations

LOCAL_SDK_VERSION := test_current

LOCAL_COMPATIBILITY_SUITE := general-tests
LOCAL_INSTRUMENTATION_FOR := PermissionController

include $(BUILD_PACKAGE)
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.permissioncontrollertest" >
    <application>
        <uses-library android:name="android.test.runner" />
    </application>

    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
            android:targetPackage="com.android.permissioncontroller" />
</manifest>
+0 −30
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.
-->
<!-- This test config file is auto-generated. -->
<configuration description="Runs GooglePermissionControllerTest.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-instrumentation" />
    <option name="test-suite-tag" value="gts" />
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="GooglePermissionControllerTest.apk" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.permissioncontrollertest" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
    </test>
</configuration>
Loading