Revert "Honor badger"

This reverts commit f049fb0cad.
pull/213/head
M66B 2 years ago
parent 3cb9ebb7c8
commit 02f710fc0f

@ -445,9 +445,6 @@ The following permissions are needed to show the count of unread messages as a b
* *com.huawei.android.launcher.permission.CHANGE_BADGE*
* *com.huawei.android.launcher.permission.READ_SETTINGS*
* *com.huawei.android.launcher.permission.WRITE_SETTINGS*
* *com.hihonor.android.launcher.permission.CHANGE_BADGE*
* *com.hihonor.android.launcher.permission.READ_SETTINGS*
* *com.hihonor.android.launcher.permission.WRITE_SETTINGS*
* *android.permission.READ_APP_BADGE*
* *com.oppo.launcher.permission.READ_SETTINGS*
* *com.oppo.launcher.permission.WRITE_SETTINGS*

@ -55,11 +55,6 @@
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<!--for hihonor-->
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.hihonor.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.hihonor.android.launcher.permission.WRITE_SETTINGS" />
<!-- for ZUK -->
<uses-permission android:name="android.permission.READ_APP_BADGE" />

@ -57,11 +57,6 @@
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<!--for hihonor-->
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.hihonor.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.hihonor.android.launcher.permission.WRITE_SETTINGS" />
<!-- for ZUK -->
<uses-permission android:name="android.permission.READ_APP_BADGE" />

@ -57,11 +57,6 @@
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<!--for hihonor-->
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.hihonor.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.hihonor.android.launcher.permission.WRITE_SETTINGS" />
<!-- for ZUK -->
<uses-permission android:name="android.permission.READ_APP_BADGE" />

@ -55,11 +55,6 @@
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<!--for hihonor-->
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.hihonor.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.hihonor.android.launcher.permission.WRITE_SETTINGS" />
<!-- for ZUK -->
<uses-permission android:name="android.permission.READ_APP_BADGE" />

@ -21,7 +21,6 @@ import me.leolin.shortcutbadger.impl.AsusHomeBadger;
import me.leolin.shortcutbadger.impl.DefaultBadger;
import me.leolin.shortcutbadger.impl.EverythingMeHomeBadger;
import me.leolin.shortcutbadger.impl.HuaweiHomeBadger;
import me.leolin.shortcutbadger.impl.HonorHomeBadger;
import me.leolin.shortcutbadger.impl.NewHtcHomeBadger;
import me.leolin.shortcutbadger.impl.NovaHomeBadger;
import me.leolin.shortcutbadger.impl.OPPOHomeBader;
@ -55,7 +54,6 @@ public final class ShortcutBadger {
BADGERS.add(SonyHomeBadger.class);
BADGERS.add(AsusHomeBadger.class);
BADGERS.add(HuaweiHomeBadger.class);
BADGERS.add(HonorHomeBadger.class);
BADGERS.add(OPPOHomeBader.class);
BADGERS.add(SamsungHomeBadger.class);
BADGERS.add(ZukHomeBadger.class);

@ -1,34 +0,0 @@
package me.leolin.shortcutbadger.impl;
import android.content.ComponentName;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import java.util.Arrays;
import java.util.List;
import me.leolin.shortcutbadger.Badger;
import me.leolin.shortcutbadger.ShortcutBadgeException;
/**
* @author Jason Ling
*/
public class HonorHomeBadger implements Badger {
@Override
public void executeBadge(Context context, ComponentName componentName, int badgeCount) throws ShortcutBadgeException {
Bundle localBundle = new Bundle();
localBundle.putString("package", context.getPackageName());
localBundle.putString("class", componentName.getClassName());
localBundle.putInt("badgenumber", badgeCount);
context.getContentResolver().call(Uri.parse("content://com.hihonor.android.launcher.settings/badge/"), "change_badge", null, localBundle);
}
@Override
public List<String> getSupportLaunchers() {
return Arrays.asList(
"com.hihonor.android.launcher"
);
}
}

@ -55,11 +55,6 @@
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<!--for hihonor-->
<uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.hihonor.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.hihonor.android.launcher.permission.WRITE_SETTINGS" />
<!-- for ZUK -->
<uses-permission android:name="android.permission.READ_APP_BADGE" />

Loading…
Cancel
Save