本文整理汇总了Java中android.content.Intent.ACTION_TIMEZONE_CHANGED属性的典型用法代码示例。如果您正苦于以下问题:Java Intent.ACTION_TIMEZONE_CHANGED属性的具体用法?Java Intent.ACTION_TIMEZONE_CHANGED怎么用?Java Intent.ACTION_TIMEZONE_CHANGED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.content.Intent
的用法示例。
在下文中一共展示了Intent.ACTION_TIMEZONE_CHANGED属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onReceive
@Override
public void onReceive(Context context, Intent intent) {
byte adjustReason;
switch (intent.getAction()) {
case Intent.ACTION_TIME_CHANGED:
adjustReason = TimeProfile.ADJUST_MANUAL;
break;
case Intent.ACTION_TIMEZONE_CHANGED:
adjustReason = TimeProfile.ADJUST_TIMEZONE;
break;
default:
case Intent.ACTION_TIME_TICK:
adjustReason = TimeProfile.ADJUST_NONE;
break;
}
long now = System.currentTimeMillis();
notifyRegisteredDevices(now, adjustReason);
updateLocalUi(now);
}
示例2: registerReceiver
private void registerReceiver() {
if (mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED);
MyWatchFace.this.registerReceiver(mTimeZoneReceiver, filter);
}
示例3: registerReceiver
/**
* Register a receiver for handling timezone changes
*/
private void registerReceiver() {
if (mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED);
IOClassicWatchFaceService.this.registerReceiver(mTimeZoneReceiver, filter);
}
示例4: registerReceiver
private void registerReceiver() {
if (mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED);
PacktWatchFace.this.registerReceiver(mTimeZoneReceiver, filter);
}
示例5: registerReceiver
private void registerReceiver() {
if (mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED);
DigitalWatchFaceService.this.registerReceiver(mTimeZoneReceiver, filter);
}