MohammadAG / NFCLockscreenoffEnabler

An Xposed Mod to ensure NFC remains enabled when the phone screen is off, or if you're at the lockscreen
Other
18 stars 16 forks source link

Doesn't work (Errors in ADB Logcat) #20

Open Azelphur opened 9 years ago

Azelphur commented 9 years ago

When turning screen on/off or when scanning an NFC tag I get these errors in adb logcat:

I/PowerManagerService(  786): Waking up from sleep (uid 1000)...
V/KeyguardServiceDelegate(  786): onScreenTurnedOn(showListener = com.android.internal.policy.impl.PhoneWindowManager$2@2930f77d)
I/DisplayPowerController(  786): Blocking screen on until initial contents have been drawn.
V/KeyguardServiceDelegate(  786): **** SHOWN CALLED ****
D/audio_hw_primary(  188): adev_set_parameters: enter: screen_state=on
E/WifiStateMachine(  786): cancelDelayedScan -> 82
E/Xposed  ( 1239): java.lang.NoSuchMethodError: com.android.nfc.NfcService#checkScreenState()#bestmatch
E/Xposed  ( 1239):  at de.robv.android.xposed.XposedHelpers.findMethodBestMatch(XposedHelpers.java:235)
E/Xposed  ( 1239):  at de.robv.android.xposed.XposedHelpers.findMethodBestMatch(XposedHelpers.java:286)
E/Xposed  ( 1239):  at de.robv.android.xposed.XposedHelpers.callMethod(XposedHelpers.java:949)
E/Xposed  ( 1239):  at pk.qwerty12.nfclockscreenoffenabler.NFCLockScreenOffEnabler$6.beforeHookedMethod(NFCLockScreenOffEnabler.java:397)
E/Xposed  ( 1239):  at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:664)
E/Xposed  ( 1239):  at com.android.nfc.NfcService.applyRouting(Unknown Source)
E/Xposed  ( 1239):  at com.android.nfc.NfcService$ApplyRoutingTask.doInBackground(NfcService.java:1955)
E/Xposed  ( 1239):  at com.android.nfc.NfcService$ApplyRoutingTask.doInBackground(NfcService.java:1942)
E/Xposed  ( 1239):  at android.os.AsyncTask$2.call(AsyncTask.java:292)
E/Xposed  ( 1239):  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/Xposed  ( 1239):  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
E/Xposed  ( 1239):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Xposed  ( 1239):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Xposed  ( 1239):  at java.lang.Thread.run(Thread.java:818)
D/BrcmNfcJni( 1239): RoutingManager::nfaEeCallback: NFA_EE_SET_TECH_CFG_EVT; status=0x0
E/native  (  786): do suspend false
D/BrcmNfcJni( 1239): RoutingManager::nfaEeCallback: NFA_EE_SET_PROTO_CFG_EVT; status=0x0
D/BrcmNfcJni( 1239): RoutingManager::commitRouting
D/ScreenOnOffReceiver( 1956): Received intent: Intent { act=android.intent.action.SCREEN_ON flg=0x50000010 }.
D/BrcmNfcJni( 1239): RoutingManager::nfaEeCallback: NFA_EE_UPDATED_EVT
I/DisplayPowerController(  786): Unblocked screen on after 110 ms
E/ANDR-PERF-LOCK( 2545): Failed to reset optimization for resource: 4 level: 0
W/System.err( 1239): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
W/System.err( 1239):    at pk.qwerty12.nfclockscreenoffenabler.NFCLockScreenOffEnabler$6.afterHookedMethod(NFCLockScreenOffEnabler.java:429)
W/System.err( 1239):    at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:698)
W/System.err( 1239):    at com.android.nfc.NfcService.applyRouting(Unknown Source)
W/System.err( 1239):    at com.android.nfc.NfcService$ApplyRoutingTask.doInBackground(NfcService.java:1955)
W/System.err( 1239):    at com.android.nfc.NfcService$ApplyRoutingTask.doInBackground(NfcService.java:1942)
W/System.err( 1239):    at android.os.AsyncTask$2.call(AsyncTask.java:292)
W/System.err( 1239):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err( 1239):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
W/System.err( 1239):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err( 1239):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err( 1239):    at java.lang.Thread.run(Thread.java:818)
I/DisplayManagerService(  786): Display device changed: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 1080 x 1920, 60.0 fps, supportedRefreshRates [60.0], density 480, 442.451 x 443.345 dpi, appVsyncOff 7500000, presDeadline 12666667, touch INTERNAL, rotation 0, type BUILT_IN, state ON, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
V/ActivityManager(  786): Display changed displayId=0
D/SurfaceFlinger(  174): Set power mode=2, type=0 flinger=0xb6482000
D/qdhwcomposer(  174): hwc_blank: Unblanking display: 0
D/qdhwcomposer(  174): hwc_blank: Done unblanking display: 0
D/SurfaceControl(  786): Excessive delay in setPowerMode(): 240ms
E/WifiStateMachine(  786): WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.00 rxSuccessRate=0.00 targetRoamBSSID=78:24:af:90:e9:b0 RSSI=-44
D/WifiService(  786): acquireWifiLockLocked: WifiLock{NlpWifiLock type=2 binder=android.os.BinderProxy@2d670091}
E/WifiStateMachine(  786): WifiStateMachine CMD_START_SCAN source 10009 txSuccessRate=0.00 rxSuccessRate=0.00 targetRoamBSSID=78:24:af:90:e9:b0 RSSI=-44
D/WifiService(  786): releaseWifiLockLocked: WifiLock{NlpWifiLock type=2 binder=android.os.BinderProxy@2d670091}
I/GCoreUlr( 1956): Successfully inserted location
I/GCoreUlr( 1956): Not calling LocationReporter, hasMoved: true, elapsed millis: 435324, request: Moving(600000)

This is what I assume is causing NFC tags to not work when the screen is off/locked.

Nothing is printed in adb logcat when attempting to scan a tag while the screen is off/locked