[CTS] testSensorFeatures...(fail)

724 views
Skip to first unread message

Atul Raut

unread,
Oct 4, 2011, 4:39:19 AM10/4/11
to android-...@googlegroups.com, c...@android.com

Hi,

I have device which wont support  
accelerometer When Package Manager trying to read hasSystemFeature its returning true.
I dont understand how ? I have 
platform/frameworks/base/data/etc/android.hardware.sensor.accelerometer.xml
but am not copying to system/etc/permission folder on device.
If I do $adb shell $cd system/etc/permision it wont shows 
android.hardware.sensor.accelerometer.xml

cts_host > start --plan CTS -t android.app.cts.SystemFeaturesTest#testSensorFeaturescts_host > 
start test android.app.cts.SystemFeaturesTest#testSensorFeatures
==============================================================
Test package: android.app
android.app.cts.SystemFeaturesTest#testSensorFeatures...(fail)
junit.framework.AssertionFailedError: PackageManager#hasSystemFeature(android.hardware.sensor.accelerometer) returns true but SensorManager#getSensorList(1) shows sensors [] expected:<true> but was:<false> at android.app.cts.SystemFeaturesTest.assertFeatureForSensor(SystemFeaturesTest.java:295)

Why such behavior is there ? any pointer will help ?

Thanks,
----------------------------------------------------------------------------------------------------------------------------------
Atul Raut

http://rautatul.weebly.com/

Tiago Maluta

unread,
Oct 4, 2011, 8:25:54 AM10/4/11
to android-...@googlegroups.com
did you edit platform/frameworks/base/data/etc/handheld_core_hardware.xml
and removed the following line?

<feature name="android.hardware.sensor.accelerometer" />

--tm

> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Leonardo Kim

unread,
Oct 4, 2011, 10:50:45 AM10/4/11
to android-...@googlegroups.com
Hi, Atul.

I know /system/etc/handheld_core_hardware.xml file has the hardware
components that all handheld devices must include. Did you check this
file?

Regards,
Leonardo YongUk KIM

Atul Raut

unread,
Oct 5, 2011, 12:01:14 AM10/5/11
to android-...@googlegroups.com, tiago....@gmail.com
Hi TM,

Yes I do have permission added in handheld_core_hardware.xml

did you edit platform/frameworks/base/data/etc/handheld_core_hardware.xml
and removed the following line?

   <feature name="android.hardware.sensor.accelerometer" />

 
Thanks,
----------------------------------------------------------------------------------------------------------------------------------

Atul Raut

unread,
Oct 5, 2011, 12:02:32 AM10/5/11
to android-...@googlegroups.com, dali...@gmail.com
Hi Kim, 

I do added permissions in  /system/etc/handheld_core_hardware.xml

 
Thanks,
----------------------------------------------------------------------------------------------------------------------------------
Atul Raut

http://rautatul.weebly.com/



Mushahid Gillani

unread,
Jul 18, 2020, 6:18:42 PM7/18/20
to android-platform
Hi,
    
    If someone can't find the file at  platform/frameworks/base/data/etc/  use this path frameworks/native/data/etc/
    
    Thanks

   Regards,
   Mushahid
Reply all
Reply to author
Forward
0 new messages