saulhdev / ZimLX

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

Shortcut movement #60

Open cs-nero opened 5 years ago

cs-nero commented 5 years ago

Describe the bug Three problems: When I create a shortcut of a website with my browser, the shortcut is only visible after restart. Also, the shortcut is created on a new created page. Also, I can not move the shortcut without crashing the launcher.

To Reproduce Steps to reproduce the behavior:

  1. Go in your browser
  2. Click on 'Add to home/launcher' or something else
  3. Restart Zim Launcher
  4. Press and hold the shortcut to move.

Error Log Build version: 0.6.2b Current date: 2019-07-12 21:05:16 Device: Xiaomi Redmi 5 Plus

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.ComponentName.getPackageName()' on a null object reference at com.android.launcher3.popup.SystemShortcut$Widgets.getOnClickListener(SystemShortcut.java:65) at com.android.launcher3.popup.SystemShortcut$Widgets.getOnClickListener(SystemShortcut.java:54) at com.android.launcher3.popup.PopupDataProvider.getEnabledSystemShortcutsForItem(PopupDataProvider.java:236) at com.android.launcher3.popup.PopupContainerWithArrow.showForIcon(PopupContainerWithArrow.java:189) at com.android.launcher3.Workspace.beginDragShared(Workspace.java:1629) at com.android.launcher3.Workspace.beginDragShared(Workspace.java:1573) at com.android.launcher3.Workspace.startDrag(Workspace.java:1562) at com.android.launcher3.touch.ItemLongClickListener.beginDrag(ItemLongClickListener.java:73) at com.android.launcher3.touch.ItemLongClickListener.onWorkspaceItemLongClick(ItemLongClickListener.java:54) at com.android.launcher3.touch.ItemLongClickListener.lambda$n_ku6Bnp7SQn-CFIT2R46R_RyW8(ItemLongClickListener.java) at com.android.launcher3.touch.-$$Lambda$ItemLongClickListener$n_ku6Bnp7SQn-CFIT2R46R_RyW8.onLongClick(lambda) at android.view.View.performLongClickInternal(View.java:5724) at android.view.View.performLongClick(View.java:5682) at android.widget.TextView.performLongClick(TextView.java:9431) at com.android.launcher3.CheckLongPressHelper$CheckForLongPress.run(CheckLongPressHelper.java:81) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6363) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

Smartphone

Additional context Add any other context about the problem here.

saulhdev commented 4 years ago

problem #2 is not an issue. all the new shortcuts created automatically by the browser or new apps installed are moved to screen/page 2.

problem #3 already fixed.

I'm still working on the #1.

jmzama commented 4 years ago

Similar problem, but in my case the launcher crashes when trying to move a shortcut to one of my contacts I have placed on the home screen. Of course, I cannot delete it.

saulhdev commented 4 years ago

the shortcut is only visible after restart.

Still working on it.

Also, the shortcut is created on a new created page. Also, I can not move the shortcut without crashing the launcher.

Already fixed Zim Launcher-aosp-zim-debug.zip