xxx.java: Recompile with -Xlint:deprecation for details

警告而已。有些方法
1 已经过时,有更好的方法可以代替,比如 new java.util.Date().getYear(); => cal.get(Calendar.YEAR);
2 发现过问题,且无法完全修补,所以使用了新的方法。 比如 URLEncoder.encode(String) => URLEncoder.encode(String,String);
建议你还是看一下新的方法。

private void updateShowSeconds() { if (mShowSeconds) { // Wait until we have a display to start trying to show seconds. if (mSecondsHandler == null && getDisplay() != null) { mSecondsHandler = new Handler(); if (getDisplay().getState() == Display.STATE_ON) { mSecondsHandler.postAtTime(mSecondTick, SystemClock.uptimeMillis() / 1000 * 1000 + 1000); } IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_OFF); filter.addAction(Intent.ACTION_SCREEN_ON); mContext.registerReceiver(mScreenReceiver, filter); } } else { if (mSecondsHandler != null) { mContext.unregisterReceiver(mScreenReceiver); mSecondsHandler.removeCallbacks(mSecondTick); mSecondsHandler = null; updateClock(); } } } private final BroadcastReceiver mScreenReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_SCREEN_OFF.equals(action)) { if (mSecondsHandler != null) { mSecondsHandler.removeCallbacks(mSecondTick); } } else if (Intent.ACTION_SCREEN_ON.equals(action)) { if (mSecondsHandler != null) { mSecondsHandler.postAtTime(mSecondTick, SystemClock.uptimeMillis() / 1000 * 1000 + 1000); } } } }; private final Runnable mSecondTick = new Runnable() { @Override public void run() { if (mCalendar != null) { updateClock(); } mSecondsHandler.postAtTime(this, SystemClock.uptimeMillis() / 1000 * 1000 + 1000); } }; } 编译报错,lframeworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/clock.java:115: cannot findlsymbolsymbol method getstate()location: class android.view.Display if (getDisplay().getstate() == Display.STATE_ON) fframeworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/clock.java:115: cannot findlsymbolsymbol : variable STATE_ONlocation: class android.view.Display if (getDisplay().getstate() == Display.STATE_ON) fNote: Some input files use or override a deprecated API.Note: Recompile with -xlint:deprecation for details.Note: Some input files use unchecked or unsafe operations.Note: Recompile with -xlint:unchecked for details.2 errorsmake: *** fout/target/common/obi/Apps/SvstemlT intermediates/classes-full-dehun iarl Frror 4l
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值