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

Commit 734b0b71 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Fix and enable ConnOnActivityStartTest.

- Set parole duration to 0 so that it won't affect app standby test.
- Use a bound service to send commands to test app instead of broadcasts.
- Remove code to install/delete test app as it will be done as part of tests
  initialization.

Bug: 38432755
Test: forrest --extra_args='--class com.android.server.net.ConnOnActivityStartTest' \
      test FrameworksServicesTests
Change-Id: Ic6cd574a60c4449195f2c8cd4e04b9cb47f225c8
Merged-In: Ic6cd574a60c4449195f2c8cd4e04b9cb47f225c8
parent 06668b5f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \

LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl

LOCAL_SRC_FILES += aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl
LOCAL_SRC_FILES += aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl \
    aidl/com/android/servicestests/aidl/ICmdReceiverService.aidl

LOCAL_JAVA_LIBRARIES := android.test.mock legacy-android-test

@@ -61,3 +62,5 @@ LOCAL_DX_FLAGS := --multi-dex
LOCAL_STATIC_JAVA_LIBRARIES += ub-uiautomator

include $(BUILD_PACKAGE)

include $(call all-makefiles-under, $(LOCAL_PATH))
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
<configuration description="Runs Frameworks Services Tests.">
    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="FrameworksServicesTests.apk" />
        <option name="test-file-name" value="ConnTestApp.apk" />
    </target_preparer>

    <option name="test-suite-tag" value="apct" />
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := \
        com/android/servicestests/aidl/INetworkStateObserver.aidl
        com/android/servicestests/aidl/INetworkStateObserver.aidl \
        com/android/servicestests/aidl/ICmdReceiverService.aidl
LOCAL_MODULE := servicestests-aidl
include $(BUILD_STATIC_JAVA_LIBRARY)
 No newline at end of file
+21 −0
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.
 */

package com.android.servicestests.aidl;

interface ICmdReceiverService {
    void finishActivity();
}
 No newline at end of file
−8.07 KiB

File deleted.

Loading