saulhdev / ZimLX

Open Source and free launcher for Android
Other
151 stars 26 forks source link

ZimLX crashes when moving eelements on the home screen using TalkBack #21

Closed schulle4u closed 5 years ago

schulle4u commented 5 years ago

Describe the bug When trying to move elements on the home screen using the Google TalkBack screen-reader (Android Accessibility suite), ZimLX crashes with the below error message. The error only happens when using TalkBack's internal function for moving elements.

To Reproduce Steps to reproduce the behavior:

  1. Open device settings and start Google TalkBack from the accessibility menu.
  2. Depending on device, Press home key or double-tap the home button.
  3. Select an icon so that a frame is visible around it and TalkBack announces the caption.
  4. Swipe to the top and to the right with one finger to open local TalkBack context menu.
  5. From the menu double-tap actions, and from there double-tap move element.
  6. Swipe right with one finger until the desired cell is reached, then double-tap to move the element.
  7. ZimLX crashes.
Build version: 0.4.4 
Build date: 1980-01-01 00:00:00 
Current date: 2019-03-05 19:36:33 
Device: Motorola Moto G (4) 

Stack trace:  
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Rect org.zimmob.zimlx.dragndrop.DragView.getDragRegion()' on a null object reference
    at org.zimmob.zimlx.DropTarget$DragObject.getVisualCenter(DropTarget.java:151)
    at org.zimmob.zimlx.Workspace.onDragOver(Workspace.java:2700)
    at org.zimmob.zimlx.dragndrop.DragController.checkTouchMove(DragController.java:539)
    at org.zimmob.zimlx.dragndrop.DragController.forceTouchMove(DragController.java:528)
    at org.zimmob.zimlx.Workspace.onPageEndMoving(Workspace.java:1162)
    at org.zimmob.zimlx.PagedView.pageEndMoving(PagedView.java:454)
    at org.zimmob.zimlx.PagedView.computeScrollHelper(PagedView.java:595)
    at org.zimmob.zimlx.PagedView.computeScrollHelper(PagedView.java:569)
    at org.zimmob.zimlx.PagedView.computeScroll(PagedView.java:612)
    at org.zimmob.zimlx.Workspace.computeScroll(Workspace.java:1502)
    at android.view.View.updateDisplayListIfDirty(View.java:16052)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at org.zimmob.zimlx.dragndrop.DragLayer.drawChild(DragLayer.java:1009)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at org.zimmob.zimlx.dragndrop.DragLayer.dispatchDraw(DragLayer.java:979)
    at android.view.View.updateDisplayListIfDirty(View.java:16060)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1367)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at android.view.View.updateDisplayListIfDirty(View.java:16060)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at org.zimmob.zimlx.LauncherRootView.dispatchDraw(LauncherRootView.java:121)
    at android.view.View.updateDisplayListIfDirty(View.java:16060)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at android.view.View.updateDisplayListIfDirty(View.java:16060)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at android.view.View.updateDisplayListIfDirty(View.java:16060)
    at android.view.View.draw(View.java:16849)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3768)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3554)
    at android.view.View.draw(View.java:17086)
    at com.android.internal.policy.DecorView.draw(DecorView.java:751)
    at android.view.View.updateDisplayListIfDirty(View.java:16065)
    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:657)
    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:663)
    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:771)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2808)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2616)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2223)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1258)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6348)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
    at android.view.Choreographer.doCallbacks(Choreographer.java:683)
    at android.view.Choreographer.doFrame(Choreographer.java:619)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6123)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

Expected behavior The element immediately should jump to the desired place, and the work continues without interruption.

Smartphone (please complete the following information):

Additional context Directly moving the element with the finger works, but can be more complex for blind TalkBack users.

saulhdev commented 5 years ago

fixed in v0.5.1