Files
frameworks_base/core/tests/coretests
Jayachandran C 8ef41bf34f Cellular data stall recovery based on networkStatus
This CL introduces cellular data stall recovery based on
network validation result. It still re-uses the existing
recovery steps but the triggers are based on networkStatus
from NetworkMonitor when the network is bad. Each recovery
step is spaced by a configurable grace period (default 3 mins)
to avoid back to back recovery.

This feature is controlled by the following settings. If this
feature is enabled then the legacy data stall detection based
on TrafficStats will automatically be disabled.

Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK
1 => Enabled (default)
0 => Disabled

Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS
3 minutes is default value

Bug: 113916551
Test: atest FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DcTrackerTest

Change-Id: I738fc7ed08803de1114f7a3d79bf278449e94ea8
2019-01-18 22:52:16 +00:00
..
2018-09-13 22:25:58 -07:00
2018-02-23 18:17:15 -08:00

* Copyright (C) 2016 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.


INTRODUCTION

The Android platform core tests (APCT) consist of unit tests for core platform
functionality. These differ from CTS in that they are not necessarily testing
public APIs and are not guaranteed to work outside of AOSP builds.


INSTRUCTIONS

To run a test or set of tests, first build the FrameworksCoreTests package:

  make FrameworksCoreTests

Next, install the resulting APK and run tests as you would normal JUnit tests:

  adb install -r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
  adb shell am instrument -w \
    com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

To run a tests within a specific package, add the following argument AFTER -w:

    -e package android.content.pm

To run a specific test or method within a test:

    -e class android.content.pm.PackageParserTest
    -e class android.content.pm.PackageParserTest#testComputeMinSdkVersion

To run tests in debug mode:

    -e debug true

To uninstall the package:

  adb shell pm uninstall -k com.android.frameworks.coretests

For more arguments, see the guide to command=line testing:

  https://developer.android.com/studio/test/command-line.html