• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3.4
2#
3#   Copyright 2016 - Google
4#
5#   Licensed under the Apache License, Version 2.0 (the "License");
6#   you may not use this file except in compliance with the License.
7#   You may obtain a copy of the License at
8#
9#       http://www.apache.org/licenses/LICENSE-2.0
10#
11#   Unless required by applicable law or agreed to in writing, software
12#   distributed under the License is distributed on an "AS IS" BASIS,
13#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#   See the License for the specific language governing permissions and
15#   limitations under the License.
16"""
17    Test Script for RCS.
18"""
19from time import sleep
20
21from acts.test_decorators import test_tracker_info
22from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
23
24
25class TelLiveRcsTest(TelephonyBaseTest):
26    def setup_class(self):
27        super().setup_class()
28
29    def setup_test(self):
30        TelephonyBaseTest.setup_test(self)
31
32    def teardown_class(self):
33        TelephonyBaseTest.teardown_class(self)
34
35    def test_verify_provisioning(self):
36        ad = self.android_devices[0]
37        ad.log.info("Start RCS provisioning")
38        ad.droid.startRCSProvisioning("UP_1.0", "6.0", "Goog", "RCSAndrd-1.0")
39        sleep(20)
40        isRcsVolteSingleRegistrationCapable = ad.droid.isRcsVolteSingleRegistrationCapable()
41        configXml = ad.droid.getRCSConfigXml()
42        ad.log.info("isRcsVolteSingleRegistrationCapable: %r", isRcsVolteSingleRegistrationCapable)
43        ad.log.info("RCS Config XML: %s", configXml)
44        result = configXml.find("<parm name=\"rcsVolteSingleRegistration\" value=\"1\"/>")
45        return result != -1
46
47    def test_is_single_reg_capable(self, ad):
48        """ Test single registration provisioning.
49
50        """
51
52        return ad.droid.isRcsVolteSingleRegistrationCapable()
53
54    def test_unregister(self):
55        ad = self.android_devices[0]
56        return ad.droid.unregister()
57
58