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

Commit 686bb2d3 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Add tests for verifying network availability on activity start.

Bug: 27803922
Test: runtest -c com.android.server.net.ConnOnActivityStartTest frameworks-services
Change-Id: I771e1fd9edbe14f1ff7a7a84c3896af6dd6f20a0
parent 438be2af
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
    ShortcutManagerTestUtils \
    truth-prebuilt

LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl

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

LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_PACKAGE_NAME := FrameworksServicesTests
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@
    <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
    <uses-permission android:name="android.permission.DELETE_PACKAGES" />

    <application>
        <uses-library android:name="android.test.runner" />
+23 −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.

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := \
        com/android/servicestests/aidl/INetworkStateObserver.aidl
LOCAL_MODULE := servicestests-aidl
include $(BUILD_STATIC_JAVA_LIBRARY)
 No newline at end of file
+27 −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;

oneway interface INetworkStateObserver {
    /**
     * {@param resultData} will be in the format
     * NetinfoState|NetinfoDetailedState|RealConnectionCheck|RealConnectionCheckDetails|Netinfo.
     * For detailed info, see
     * servicestests/test-apps/ConnTestApp/.../ConnTestActivity#checkNetworkStatus
     */
    void onNetworkStateChecked(String resultData);
}
 No newline at end of file
+8.96 KiB

File added.

No diff preview for this file type.

Loading