当前位置: 首页>>代码示例>>Java>>正文


Java Utility.getPreferredLocation方法代码示例

本文整理汇总了Java中com.example.android.sunshine.app.Utility.getPreferredLocation方法的典型用法代码示例。如果您正苦于以下问题:Java Utility.getPreferredLocation方法的具体用法?Java Utility.getPreferredLocation怎么用?Java Utility.getPreferredLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.example.android.sunshine.app.Utility的用法示例。


在下文中一共展示了Utility.getPreferredLocation方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onUpdate

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
@Override
protected void onUpdate(int reason) {
    String location = Utility.getPreferredLocation(this);
    Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(
            location, System.currentTimeMillis());
    Cursor cursor = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null,
            null, WeatherContract.WeatherEntry.COLUMN_DATE + " ASC");
    if (cursor.moveToFirst()) {
        int weatherId = cursor.getInt(INDEX_WEATHER_ID);
        String desc = cursor.getString(INDEX_SHORT_DESC);

        String imageUrl = Utility.getImageUrlForWeatherCondition(weatherId);
        // Only publish a new wallpaper if we have a valid image
        if (imageUrl != null) {
            publishArtwork(new Artwork.Builder()
                    .imageUri(Uri.parse(imageUrl))
                    .title(desc)
                    .byline(location)
                    .viewIntent(new Intent(this, MainActivity.class))
                    .build());
        }
    }
    cursor.close();
}
 
开发者ID:changja88,项目名称:Udacity_Sunshine,代码行数:25,代码来源:WeatherMuzeiSource.java

示例2: getWeather

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private ForecastWear getWeather(){
    ForecastWear fw=new ForecastWear();
    String locationSetting = Utility.getPreferredLocation(this);
    Uri weather= WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(locationSetting,System.currentTimeMillis());
    Cursor cursor=getContentResolver().query(weather,FORECAST_COLUMNS,null,null, WeatherContract.WeatherEntry.COLUMN_DATE+" ASC");
    if(cursor!=null){
        if(!cursor.moveToFirst()){
            cursor.close();
        }else{
            fw.max_temp=String.valueOf((int) cursor.getDouble(MAX_TEMP));
            fw.min_temp=String.valueOf((int) cursor.getDouble(MIN_TEMP));
            fw.weather_id =cursor.getInt(WEATHER_ID);
            return fw;
        }
    }

    return null;
}
 
开发者ID:oscarbujinkan,项目名称:Go-Ubiquitous,代码行数:19,代码来源:WearListenerService.java

示例3: onHandleIntent

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(Intent intent) {
    if (intent != null) {

        final String action = intent.getAction();
        if (SunshineSyncAdapter.ACTION_DATA_UPDATED.equals(action)) {
            String location = Utility.getPreferredLocation(this);
            Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(
                    location, System.currentTimeMillis());
            Cursor cursor = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null,
                    null, WeatherContract.WeatherEntry.COLUMN_DATE + " ASC");
            if (cursor.moveToFirst()) {
                int weatherId = cursor.getInt(cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_WEATHER_ID));
                String desc = cursor.getString(cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_SHORT_DESC));
                double high = cursor.getDouble(cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_MAX_TEMP));
                double low = cursor.getDouble(cursor.getColumnIndex(WeatherContract.WeatherEntry.COLUMN_MIN_TEMP));

                handleWatchfaceUpdate(weatherId, desc, high, low);
            }
            cursor.close();

        }
    }
}
 
开发者ID:josemontiel,项目名称:SunshineWatchFace,代码行数:25,代码来源:SunshineWatchfaceService.java

示例4: sendDataToWear

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private void sendDataToWear() {

        Log.d(TAG, "sendDataToWear: ");

        String locationQuery = Utility.getPreferredLocation(this);

        Uri weatherUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(locationQuery, System.currentTimeMillis());

        Cursor cursor = getBaseContext().getContentResolver().query(weatherUri, NOTIFY_WEATHER_PROJECTION, null, null, null);
        DataMap dataMap = new DataMap();

        if (cursor.moveToFirst()) {
            int weatherId = cursor.getInt(INDEX_WEATHER_ID);
            double high = cursor.getDouble(INDEX_MAX_TEMP);
            double low = cursor.getDouble(INDEX_MIN_TEMP);

            high  = Utility.getFormattedTemperature(this, high);
            low = Utility.getFormattedTemperature(this, low);

            Log.d(TAG, "sendDataToWear: high temp: " + high);
            Log.d(TAG, "sendDataToWear: low temp: " + low);

            BigDecimal highBD = new BigDecimal(high);
            highBD = highBD.setScale(2, BigDecimal.ROUND_UP);
            BigDecimal lowBD = new BigDecimal(low);
            lowBD = lowBD.setScale(2, BigDecimal.ROUND_UP);

            dataMap.putLong("time", new Date().getTime());
            dataMap.putInt(Constants.KEY_WEATHER_TEMP_MAX, highBD.intValue());
            dataMap.putInt(Constants.KEY_WEATHER_TEMP_MIN, lowBD.intValue());
            dataMap.putInt(Constants.KEY_WEATHER_ID, weatherId);
            dataMap.putString(Constants.KEY_WEATHER_UNIT, Utility.isMetric(this) ? "C" : "F");
        }

        DataManager.getInstance().syncDataMap(mGoogleApiClient, dataMap, Constants.PATH_WEATHER_DATA, this);

    }
 
开发者ID:mladenbabic,项目名称:Advanced_Android_Development_Wear,代码行数:38,代码来源:WearableWeatherService.java

示例5: notifyWear

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private void notifyWear() {
    String locationQuery = Utility.getPreferredLocation(getContext());
    Uri weatherUri = WeatherContract.WeatherEntry
            .buildWeatherLocationWithDate(locationQuery, System.currentTimeMillis());
    Cursor cursor = getContext().getContentResolver()
            .query(weatherUri, NOTIFY_WEATHER_PROJECTION, null, null, null);
    if (cursor.moveToFirst()) {
        int weatherId = cursor.getInt(INDEX_WEATHER_ID);
        double high = cursor.getDouble(INDEX_MAX_TEMP);
        double low = cursor.getDouble(INDEX_MIN_TEMP);

        Log.d(LOG_TAG, "Sending weather information to android wear");

        PutDataMapRequest dataMap = PutDataMapRequest.create(WEATHER_DATA_PATH);
        dataMap.getDataMap().putDouble(WEATHER_DATA_HIGH, high);
        dataMap.getDataMap().putDouble(WEATHER_DATA_LOW, low);
        dataMap.getDataMap().putLong(WEATHER_DATA_ID, weatherId);
        PutDataRequest request = dataMap.asPutDataRequest();

        Log.d(LOG_TAG, "GoogleApiClient " + MainActivity.mGoogleApiClient.isConnected());

        Wearable.DataApi.putDataItem(MainActivity.mGoogleApiClient, request)
                .setResultCallback(new ResultCallback<DataApi.DataItemResult>() {
                    @Override
                    public void onResult(DataApi.DataItemResult result) {
                        if (!result.getStatus().isSuccess()) {
                            Log.d(LOG_TAG, "Cannot send weather information, status code: "
                                    + result.getStatus().getStatusCode());
                        } else {
                            Log.d(LOG_TAG, "Weather information was sent successfully "
                                    + result.getDataItem().getUri());
                        }
                    }
                });
    }
}
 
开发者ID:DmitryMalkovich,项目名称:go-ubiquitous,代码行数:37,代码来源:SunshineSyncAdapter.java

示例6: updateWatchFace

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private void updateWatchFace(){
    Log.d(LOG_TAG, "Update WatchFace ");
    String locationQuery = Utility.getPreferredLocation(getContext());

    Uri weatherUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(locationQuery, System.currentTimeMillis());

    // we'll query our contentProvider, as always
    Cursor cursor = getContext().getContentResolver().query(weatherUri, NOTIFY_WEATHER_PROJECTION, null, null, null);

    if (cursor.moveToFirst()) {
        int weatherId = cursor.getInt(INDEX_WEATHER_ID);
        double mMaxTemp = cursor.getDouble(INDEX_MAX_TEMP);
        double mMinTemp = cursor.getDouble(INDEX_MIN_TEMP);

        if (mGoogleApiClient != null) {
            mGoogleApiClient.connect();
            String id = UUID.randomUUID().toString();

            Log.d(LOG_TAG, "id = " + id + ",mMaxTemp " + mMaxTemp + ", mMinTemp " + mMinTemp + ", weatherId "+ weatherId);

            PutDataMapRequest putDataMapRequest = PutDataMapRequest.create(KEY_PATH);
            putDataMapRequest.getDataMap().putString(KEY_UUID, id);
            putDataMapRequest.getDataMap().putString(KEY_MAX_TEMP, Utility.formatTemperature(getContext(), mMaxTemp));
            putDataMapRequest.getDataMap().putString(KEY_MIN_TEMP, Utility.formatTemperature(getContext(), mMinTemp));
            putDataMapRequest.getDataMap().putInt(KEY_WEATHER_ID, weatherId);

            PutDataRequest request = putDataMapRequest.asPutDataRequest();
            Wearable.DataApi.putDataItem(mGoogleApiClient, request).setResultCallback(new ResultCallback<DataApi.DataItemResult>() {
                @Override
                public void onResult(DataApi.DataItemResult dataItemResult) {
                    if (!dataItemResult.getStatus().isSuccess()) {
                        Log.d(LOG_TAG, "updateWatchFace failed");
                    }
                }
            });
        }
    }

}
 
开发者ID:jenniferlimtan,项目名称:UdacityProject6,代码行数:40,代码来源:SunshineSyncAdapter.java

示例7: onHandleIntent

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(Intent intent) {
    // Retrieve all of the Today widget ids: these are the widgets we need to update
    AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);
    int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,
            TodayWidgetProvider.class));

    // Get today's data from the ContentProvider
    String location = Utility.getPreferredLocation(this);
    Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(
            location, System.currentTimeMillis());
    Cursor data = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null,
            null, WeatherContract.WeatherEntry.COLUMN_DATE + " ASC");
    if (data == null) {
        return;
    }
    if (!data.moveToFirst()) {
        data.close();
        return;
    }

    // Extract the weather data from the Cursor
    int weatherId = data.getInt(INDEX_WEATHER_ID);
    int weatherArtResourceId = Utility.getArtResourceForWeatherCondition(weatherId);
    String description = data.getString(INDEX_SHORT_DESC);
    double maxTemp = data.getDouble(INDEX_MAX_TEMP);
    double minTemp = data.getDouble(INDEX_MIN_TEMP);
    String formattedMaxTemperature = Utility.formatTemperature(this, maxTemp);
    String formattedMinTemperature = Utility.formatTemperature(this, minTemp);
    data.close();

    // Perform this loop procedure for each Today widget
    for (int appWidgetId : appWidgetIds) {
        // Find the correct layout based on the widget's width
        int widgetWidth = getWidgetWidth(appWidgetManager, appWidgetId);
        int defaultWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_default_width);
        int largeWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_large_width);
        int layoutId;
        if (widgetWidth >= largeWidth) {
            layoutId = R.layout.widget_today_large;
        } else if (widgetWidth >= defaultWidth) {
            layoutId = R.layout.widget_today;
        } else {
            layoutId = R.layout.widget_today_small;
        }
        RemoteViews views = new RemoteViews(getPackageName(), layoutId);

        // Add the data to the RemoteViews
        views.setImageViewResource(R.id.widget_icon, weatherArtResourceId);
        // Content Descriptions for RemoteViews were only added in ICS MR1
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
            setRemoteContentDescription(views, description);
        }
        views.setTextViewText(R.id.widget_description, description);
        views.setTextViewText(R.id.widget_high_temperature, formattedMaxTemperature);
        views.setTextViewText(R.id.widget_low_temperature, formattedMinTemperature);

        // Create an Intent to launch MainActivity
        Intent launchIntent = new Intent(this, MainActivity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);
        views.setOnClickPendingIntent(R.id.widget, pendingIntent);

        // Tell the AppWidgetManager to perform an update on the current app widget
        appWidgetManager.updateAppWidget(appWidgetId, views);
    }
}
 
开发者ID:changja88,项目名称:Udacity_Sunshine,代码行数:67,代码来源:TodayWidgetIntentService.java

示例8: onHandleIntent

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(Intent intent) {

    // Retrieve all of the Today widget ids: these are the widgets we need to update
    AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);
    int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,
            TodayWidgetProvider.class));

    // Get today's data from the ContentProvider
    String location = Utility.getPreferredLocation(this);
    Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(
            location, System.currentTimeMillis());
    Cursor data = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null,
            null, WeatherContract.WeatherEntry.COLUMN_DATE + " ASC");
    if (data == null) {
        return;
    }
    if (!data.moveToFirst()) {
        data.close();
        return;
    }

    // Extract the weather data from the Cursor
    int weatherId = data.getInt(INDEX_WEATHER_ID);
    int weatherArtResourceId = Utility.getArtResourceForWeatherCondition(weatherId);
    String description = data.getString(INDEX_SHORT_DESC);
    double maxTemp = data.getDouble(INDEX_MAX_TEMP);
    double minTemp = data.getDouble(INDEX_MIN_TEMP);
    String formattedMaxTemperature = Utility.formatTemperature(this, maxTemp);
    String formattedMinTemperature = Utility.formatTemperature(this, minTemp);
    data.close();

    // Perform this loop procedure for each Today widget
    for (int appWidgetId : appWidgetIds) {

        // Find the correct layout based on the widget's width
        int widgetWidth = getWidgetWidth(appWidgetManager, appWidgetId);
        int defaultWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_default_width);
       int largeWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_large_width);
        int layoutId;
        if (widgetWidth >= largeWidth) {
                 layoutId = R.layout.widget_today_large;
            } else if (widgetWidth >= defaultWidth) {
                   layoutId = R.layout.widget_today;
           } else {
                 layoutId = R.layout.widget_today_small;
            }
        RemoteViews views = new RemoteViews(getPackageName(), layoutId);
        // Add the data to the RemoteViews
        views.setImageViewResource(R.id.widget_icon, weatherArtResourceId);
        // Content Descriptions for RemoteViews were only added in ICS MR1
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
            setRemoteContentDescription(views, description);
        }
        views.setTextViewText(R.id.widget_description, description);
        views.setTextViewText(R.id.widget_high_temperature, formattedMaxTemperature);
        views.setTextViewText(R.id.widget_low_temperature, formattedMinTemperature);

        // Create an Intent to launch MainActivity
        Intent launchIntent = new Intent(this, MainActivity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);
        views.setOnClickPendingIntent(R.id.widget, pendingIntent);

        // Tell the AppWidgetManager to perform an update on the current app widget
        appWidgetManager.updateAppWidget(appWidgetId, views);
    }
}
 
开发者ID:anoo-radha,项目名称:Sunshine_WeatherApp,代码行数:68,代码来源:TodayWidgetIntentService.java

示例9: notifyWearable

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private void notifyWearable() {
    final Context context = getContext();
    final String preferredLocation = Utility.getPreferredLocation(getContext());

    final Uri uri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(preferredLocation, System.currentTimeMillis());
    Cursor query = context.getContentResolver().query(uri, WEARABLE_WEATHER_PROJECTION, null, null, null);

    if (null == query) {
        return;
    }

    if(!query.moveToFirst()){
        query.close();
        return;
    }

    PutDataMapRequest sendRequest = PutDataMapRequest.create("/SunshineWearListenerService/Data");

    double highTemp = query.getDouble(INDEX_MAX_TEMP);
    double lowTemp = query.getDouble(INDEX_MIN_TEMP);

    int highTempInt = Utility.isMetric(context) ? (int)highTemp : (int)((highTemp * 1.8) + 32);
    int lowTempInt = Utility.isMetric(context) ? (int)lowTemp : (int)((lowTemp * 1.8) + 32);

    sendRequest.getDataMap().putInt("dataHigh", highTempInt);
    sendRequest.getDataMap().putInt("dataLow", lowTempInt);
    sendRequest.getDataMap().putLong("dataTime", System.currentTimeMillis());

    final ByteArrayOutputStream imageBytes = new ByteArrayOutputStream();
    String artUrl = Utility.getArtUrlForWeatherCondition(context, query.getInt(INDEX_WEATHER_ID));

    int artResourceId = Utility.getArtResourceForWeatherCondition(query.getInt(INDEX_WEATHER_ID));
    int size = context.getResources().getDimensionPixelSize(R.dimen.wearable_large_icon_default);

    try {
        Bitmap weatherIcon = Glide.with(context)
                .load(artUrl)
                .asBitmap()
                .error(artResourceId)
                .fitCenter()
                .into(size, size)
                .get();

        weatherIcon.compress(Bitmap.CompressFormat.PNG, 100, imageBytes);
        Asset weatherIconAsset = Asset.createFromBytes(imageBytes.toByteArray());
        sendRequest.getDataMap().putAsset("dataIcon", weatherIconAsset);
    } catch(Exception ex){
        Log.e(LOG_TAG, ex.toString());
    }

    PutDataRequest putDataRequest = sendRequest.asPutDataRequest();

    GoogleApiClient googleApiClient = getGoogleApiClient();
    googleApiClient.connect();

    Wearable.DataApi.putDataItem(googleApiClient, putDataRequest);
}
 
开发者ID:hieple7985,项目名称:nano-go-ubiquitous,代码行数:58,代码来源:SunshineSyncAdapter.java

示例10: getWeatherCursor

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
private Cursor getWeatherCursor(Context context) {
    String locationQuery = Utility.getPreferredLocation(context);
    Uri weatherUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(locationQuery, System.currentTimeMillis());
    return context.getContentResolver().query(weatherUri, NOTIFY_WEATHER_PROJECTION, null, null, null);
}
 
开发者ID:chi6rag,项目名称:SunshineWear,代码行数:6,代码来源:SunshineSyncAdapter.java

示例11: onHandleIntent

import com.example.android.sunshine.app.Utility; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(Intent intent) {
    // Retrieve all of the Today widget ids: these are the widgets we need to update
    AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);
    int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,
            TodayWidgetProvider.class));

    // Get today's data from the ContentProvider
    String location = Utility.getPreferredLocation(this);
    Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithStartDate(
            location, System.currentTimeMillis());
    Cursor data = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null,
            null, WeatherContract.WeatherEntry.COLUMN_DATE + " ASC");
    if (data == null) {
        return;
    }
    if (!data.moveToFirst()) {
        data.close();
        return;
    }

    // Extract the weather data from the Cursor
    int weatherId = data.getInt(INDEX_WEATHER_ID);
    int weatherArtResourceId = Utility.getArtResourceForWeatherCondition(weatherId);
    String description = data.getString(INDEX_SHORT_DESC);
    double maxTemp = data.getDouble(INDEX_MAX_TEMP);
    String formattedMaxTemperature = Utility.formatTemperature(this, maxTemp);
    double minTemp = data.getDouble(INDEX_MIN_TEMP);
    String formattedMinTemperature = Utility.formatTemperature(this, minTemp);
    data.close();

    // Perform this loop procedure for each Today widget
    for (int appWidgetId : appWidgetIds) {
        // Find the correct layout based on the widget's width
        int widgetWidth = getWidgetWidth(appWidgetManager, appWidgetId);
        int defaultWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_default_width);
        int largeWidth = getResources().getDimensionPixelSize(R.dimen.widget_today_large_width);
        int layoutId;
        if (widgetWidth >= largeWidth) {
            layoutId = R.layout.widget_today_large;
        } else if (widgetWidth >= defaultWidth) {
            layoutId = R.layout.widget_today;
        } else {
            layoutId = R.layout.widget_today_small;
        }

        RemoteViews views = new RemoteViews(getPackageName(), layoutId);

        // Add the data to the RemoteViews
        views.setImageViewResource(R.id.widget_icon, weatherArtResourceId);
        // Content Descriptions for RemoteViews were only added in ICS MR1
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
            setRemoteContentDescription(views, description);
        }
        views.setTextViewText(R.id.widget_description, description);
        views.setTextViewText(R.id.widget_high_temperature, formattedMaxTemperature);
        views.setTextViewText(R.id.widget_low_temperature, formattedMinTemperature);

        // Create an Intent to launch MainActivity
        Intent launchIntent = new Intent(this, MainActivity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);
        views.setOnClickPendingIntent(R.id.widget, pendingIntent);

        // Tell the AppWidgetManager to perform an update on the current app widget
        appWidgetManager.updateAppWidget(appWidgetId, views);
    }
}
 
开发者ID:pmatushkin,项目名称:Sunshine.Advanced,代码行数:68,代码来源:TodayWidgetIntentService.java


注:本文中的com.example.android.sunshine.app.Utility.getPreferredLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。