CTS sensor error-shows sensors [xxxx] expected: but was:

Source: Internet
Author: User

A problem occurred while running cts. The record is as follows:

Error declaration:
JUnit. framework. assertionfailederror: packagemanager # hassystemfeature (Android. hardware. sensor. compass) returns false but sensormanager # getsensorlist (2) shows sensors [xxxx 3-axis magnetic field sensor] expected: <false> but was: <true>
At Android. App. CTS. systemfeaturestest. assertfeatureforsensor (systemfeaturestest. Java: 300)

Solution:
Add file: Android. Hardware. sensor. Compass. xml

<? XML version = "1.0" encoding = "UTF-8"?>
<! -- Copyright (c) 2009 the android open source project

Licensed under the Apache license, version 2.0 (the "License ");
You may not use this file before t in compliance with the license.
You may obtain a copy of the license

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.
-->

<! -- Feature for devices with an ambient light sensor. -->
<Permissions>
<Feature name = "android. Hardware. sensor. Compass"/>
</Permissions>

Then, run CTS and find that the Fail can pass.

Have fun!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.