YGPS/src/com/mediatek/ygps/YgpsActivity.java
private void resetParamForRestart(Bundle extras) {
        Log.v("@M_" + TAG, "Enter resetParamForRestart function");
        /* Below code come from HANDLE_REMOVE_UPDATE
         * Avoid HANDLE_REMOVE_UPDATE->onLocationChanged(previous)
         */
        mRestarting = true;
        mLocationManager.removeUpdates(mLocListener);
        mHandler.sendEmptyMessage(HANDLE_REMOVE_UPDATE);  // stop

        Message msg = mHandler
                .obtainMessage(YgpsActivity.HANDLE_DELETE_DATA);
        msg.setData(extras);
        mHandler.sendMessageDelayed(msg, HANDLE_MSG_DELAY_300); // restart

        mHandler.sendEmptyMessageDelayed(HANDLE_REQUEST_UPDATE, HANDLE_MSG_DELAY_300 * 2); // start

        mHandler.sendEmptyMessageDelayed(HANDLE_ENABLE_BUTTON, HANDLE_MSG_DELAY_300 * 3);
    }
/**
     * only for hot/warm/cold/full/restart button.
     * order is stop->restart->start
     * the button should be enabled after the 3 steps is finished
     */
only for hot/warm/cold/full/restart button.
order is stop->restart->start
the button should be enabled after the 3 steps is finished
only for hot / warm / cold / full / restart button . order is stop - > restart - > start the button should be enabled after the 3 steps is finished
private void resetParamForRestart(Bundle extras) {
        Log.v("@M_" + TAG, "Enter resetParamForRestart function");
        /* Below code come from HANDLE_REMOVE_UPDATE
         * Avoid HANDLE_REMOVE_UPDATE->onLocationChanged(previous)
         */
        mRestarting = true;
        mLocationManager.removeUpdates(mLocListener);
        mHandler.sendEmptyMessage(HANDLE_REMOVE_UPDATE);  
        Message msg = mHandler
                .obtainMessage(YgpsActivity.HANDLE_DELETE_DATA);
        msg.setData(extras);
        mHandler.sendMessageDelayed(msg, HANDLE_MSG_DELAY_300); 
        mHandler.sendEmptyMessageDelayed(HANDLE_REQUEST_UPDATE, HANDLE_MSG_DELAY_300 * 2); 
        mHandler.sendEmptyMessageDelayed(HANDLE_ENABLE_BUTTON, HANDLE_MSG_DELAY_300 * 3);
    }
private void resetParamForRestart ( Bundle extras ) { Log . v ( "@M_" + TAG , "Enter resetParamForRestart function" ) ; /* Below code come from HANDLE_REMOVE_UPDATE
         * Avoid HANDLE_REMOVE_UPDATE->onLocationChanged(previous)
         */ mRestarting = true ; mLocationManager . removeUpdates ( mLocListener ) ; mHandler . sendEmptyMessage ( HANDLE_REMOVE_UPDATE ) ; Message msg = mHandler . obtainMessage ( YgpsActivity . HANDLE_DELETE_DATA ) ; msg . setData ( extras ) ; mHandler . sendMessageDelayed ( msg , HANDLE_MSG_DELAY_300 ) ; mHandler . sendEmptyMessageDelayed ( HANDLE_REQUEST_UPDATE , HANDLE_MSG_DELAY_300 * 2 ) ; mHandler . sendEmptyMessageDelayed ( HANDLE_ENABLE_BUTTON , HANDLE_MSG_DELAY_300 * 3 ) ; }
only for hot/warm/cold/full/restart button.
only for hot / warm / cold / full / restart button .
// stop // restart // start