Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
swallow huawei related crash, until a proper fix is available
Browse files Browse the repository at this point in the history
  • Loading branch information
hundeva committed May 28, 2018
1 parent 84bfa28 commit 662b753
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.hdeva.launcher.LeanUtils;

/**
* Utility class to handle wallpaper scrolling along with workspace.
Expand Down Expand Up @@ -64,6 +65,8 @@ private void updateOffset(boolean force) {
setWallpaperOffsetSteps();
} catch (IllegalArgumentException e) {
Log.e(TAG, "Error updating wallpaper offset: " + e);
} catch (SecurityException e) {
LeanUtils.reportNonFatal(new Exception("Error setting wallpaper offset.", e));
}
}
}
Expand Down

2 comments on commit 662b753

@nyancrimew
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed by declaring the following huawei specific permission in your App manifest :)

<!-- The following is NOT a typo, it is actually called wallpaperservcie ¯\_(ツ)_/¯ -->
<uses-permission android:name="com.huawei.wallpaperservcie.permission.SET_WALLPAPER_OFFSET" />

@hundeva
Copy link
Owner Author

@hundeva hundeva commented on 662b753 Jul 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I was playing around trying to see various permissions if any helped, and hadn't notice any typo. Looks like that was the issue, huawei never fails to impress...

Thank you!

Please sign in to comment.