现在那个set date 就是今天的日期2014/08/29 怎么改成2014/01/01 等连上wifi或3g时自动更新到今天的日期2014/08/29?
解决方案 »
- [Kernel FileSystem] Porting Android UMS 问题求教
- 如何将时间"2011-11-17 12:30:00"转为"2011-11-17"
- MediaPlayer问题。。。
- Andoid GPS 如何进入省电模式 M
- PopupWindow点击外部区域消失
- 关于Viewpager页卡下某一个布局中的listview的数据添加问题
- 如何删除Expandlistview中的子元素,子元素中有一个删除按钮!!!!!
- Android studio如何编辑xml文件?
- 帮帮忙
- 有大神知道Android 约束布局constraint在阿语下adapter的第一条不会反转的原因不
- android开发之 银行卡号图像识别
- android socket 即时通讯 发送图片
static final long SNAPSHOT_INTERVAL = 60 * 60 * 1000; // 1hr // The earliest supported time. We pick one day into 1970, to
// give any timezone code room without going into negative time.
// private static final long EARLIEST_SUPPORTED_TIME = 86400 * 1000;
private static final long EARLIEST_SUPPORTED_TIME = 1388548800000l; //kzc /**
* Called to initialize native system services.
*/
private static native void nativeInit(); public static void main(String[] args) { /*
* In case the runtime switched since last boot (such as when
* the old runtime was removed in an OTA), set the system
* property so that it is in sync. We can't do this in
* libnativehelper's JniInvocation::Init code where we already
* had to fallback to a different runtime because it is
* running as root and we need to be the system user to set
* the property. http://b/11463182
*/
SystemProperties.set("persist.sys.dalvik.vm.lib",
VMRuntime.getRuntime().vmLibrary()); if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
// If a device's clock is before 1970 (before 0), a lot of
// APIs crash dealing with negative numbers, notably
// java.io.File#setLastModified, so instead we fake it and
// hope that time from cell towers or NTP fixes it
// shortly.
// Slog.w(TAG, "System clock is before 1970; setting to 1970.");
Slog.w(TAG, "System clock is before 20140101; setting to 20140101."); //kzc
SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME);
}