마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

오류 도와주세요. ScreenReceiver [closed]

0 추천
http://ccdev.tistory.com/16 소스 참고했습니다.
 
public class ScreenReceiver extends BroadcastReceiver {

    private KeyguardManager km = null;
    private KeyguardManager.KeyguardLock keyLock = null;
    private TelephonyManager telephonyManager = null;
    private boolean isPhoneIdle = true;

    @Override
    public void onReceive(Context context, Intent intent) {

        if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
            if(km==null)
                km=(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);

            if(keyLock==null)
                keyLock = km.newKeyguardLock(Context.KEYGUARD_SERVICE);

            if (telephonyManager == null){
                telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
                telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE);
            }

            if(isPhoneIdle) {
                disableKeyguard();

                Intent i = new Intent(context, LockScreenActivity.class);
                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                context.startActivity(i);
            }

        }
    }

    public void reenableKeyguard() {
        keyLock.reenableKeyguard();
    }

    public void disableKeyguard() {
        keyLock.disableKeyguard();
    }

    private  PhoneStateListener phoneListener = new PhoneStateListener(){

        @Override

        public void onCallStateChaged(int state, String incomingNumber){
            switch (state){
                case TelephonyManager.CALL_STATE_IDLE:
                    isPhoneIdle = true;
                    break;

                case TelephonyManager.CALL_STATE_RINGING:
                    isPhoneIdle = false;
                    break;

            }

        }
    };
}
오류
Error:(56, 9) error: method does not override or implement a method from a supertype
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.
질문을 종료한 이유: 영어 하나를 빼먹었습니다. 죄송합니다.
익명사용자 님이 2015년 11월 6일 질문
2015년 11월 6일 closed
...