2011. 1. 28. 12:14
\frameworks\base\services\java\com\android\server\SystemServer.java
init2() 
public static final void init2() {
        Slog.i(TAG, "Entered the Android system server!");
        Thread thr = new ServerThread();
        thr.setName("android.server.ServerThread");
        thr.start();
 }

ServerThread 에는 powermanager, usbobserver, notificationmanager 외에 모든 서비스를 생성하네요.특히 GPS와 관련된  LocationManagerService 을 생성 합니다.
try {
                location = new LocationManagerService(context);
                ServiceManager.addService(Context.LOCATION_SERVICE, location);
            } catch (Throwable e) {
                Slog.e(TAG, "Failure starting Location Manager", e);
   }

LocationManagerService.java
이곳에서는 Cell-ID/WIFI 를 사용할수있는 coogle 패키지 명을 받아 오네요.
/frameworks/base/core/res/res/values/config.xml   이쪽에서 패키지 값을 가져옵니다.

예전에  froyo 버전에서는 @null 값으로 되어있었네요.  이 부분을 다음과 같이 바꿔주시면 됩니다.

<string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string>

<String name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>

    public LocationManagerService(Context context) {
        super();
        mContext = context;
        Resources resources = context.getResources();
        mNetworkLocationProviderPackageName = resources.getString(
                com.android.internal.R.string.config_networkLocationProvider);
        mGeocodeProviderPackageName = resources.getString(
                com.android.internal.R.string.config_geocodeProvider);
        mPackageMonitor.register(context, true);

        if (LOCAL_LOGV) {
            Slog.v(TAG, "Constructed LocationManager Service");
        }
    }



SMS 분석 때문에 ... 잠시 정리를 미룰께요...



'2019년 이전 정리 > GPS' 카테고리의 다른 글

GPS 아이콘 BroadcastReceiver  (0) 2012.08.27
GPS 아이콘을 변경 예제  (0) 2012.08.27
GPS Architecture 정리중....  (0) 2011.01.27
XTRA ?  (0) 2011.01.27
Android Location Providers – gps, network, passive  (0) 2011.01.27
Posted by hoonihoon