android4.1.2版本GPS模块的添加

1.模块编译的添加修改device/sprd/sp8830ec/system.prop 中ro.device.support.gps=1

2.Settings模块中packages/apps/Settings/src/com/android/settings/LocationSettings.java文件中修改打开GPS功能

    public class LocationSettings extends SettingsPreferenceFragment
         mLocationAccess.setOnPreferenceChangeListener(this);


     if(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS)) {
             root.removePreference(mGps);
             root.removePreference(mAssistedGps);
             root.removePreference((PreferenceScreen) root.findPreference(KEY_AGPS_CONFIG));
         }
3.Settings模块packages/apps/Settings/res/layout/widget.xml对应的widget中添加对应的控件。

               android:layout_width="1dip"
         android:layout_height="match_parent"
         android:background="@drawable/appwidget_settings_divider_holo"
         android:contentDescription="@null"
         />
 
              android:background="@drawable/appwidget_button_center"
         android:clickable="true"
         android:focusable="true"
         android:orientation="vertical">
                      android:contentDescription="@null"
             />
    
4.device/sprd/sp8830ec/base.mk
+        frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location
          frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml \


-       device/sprd/common/tools/e2fsprogs/e2fsck:root/sbin/e2fsck
+        device/sprd/partner/brcm/gps/glgps:/system/bin/glgps \
+        device/sprd/partner/brcm/gps/gpsconfig_shark.xml:/system/etc/gpsconfig.xml \
+        device/sprd/partner/brcm/gps/gps.default.so:/system/lib/hw/gps.default.so \
+        device/sprd/common/tools/e2fsprogs/e2fsck:root/sbin/e2fsck


5./frameworks/base/data/etc/platform.xml

+

6.frameworks/native/data/etc/android.hardware.location.gps.xml

 
    
    
   
 

7.frameworks/native/data/etc/handheld_core_hardware_8830ec.xml


    
    
+   
   
    

8.device/sprd/sp8830ec/prod_sp8830eccmccspecAplus_UUI.mk
 添加模块gpstest

9.添加package/app/gpstest源码修改Android.mk去掉依赖的jar。
10.settings模块添加入口到
                android:key="gps_test"
                android:title="@string/gps_test">
                                android:targetPackage="com.android.gpstest"
                    android:targetClass="com.android.gpstest.GpsTestActivity" />
        



你可能感兴趣的:(android4.1.2版本GPS模块的添加)