Not add app name as message prefix on China MIUI #109

Closed
Kofua wants to merge 1 commits from <deleted>:master into master
Kofua commented 4 years ago
There is no content yet.
Kofua commented 4 years ago
Poster

add the code is here:

class ToastInjector {
    ToastInjector() {
    }

    static CharSequence addAppName(Context context, CharSequence charSequence) {
        String str;
        try {
            if (Build.IS_INTERNATIONAL_BUILD || (context.getApplicationInfo().flags & 1) != 0) {
                return charSequence;
            }
            if (context.getApplicationInfo().labelRes != 0) {
                str = context.getResources().getString(r0) + ":";
            } else {
                str = "";
            }
            return str + charSequence.toString();
        } catch (Exception e) {
            e.printStackTrace();
        } catch (Throwable th) {
        }
        return charSequence;
    }

    static boolean interceptBackgroundToast(Toast toast, Context context) {
        return true;
    }
}
add the code is here: ``` class ToastInjector { ToastInjector() { } static CharSequence addAppName(Context context, CharSequence charSequence) { String str; try { if (Build.IS_INTERNATIONAL_BUILD || (context.getApplicationInfo().flags & 1) != 0) { return charSequence; } if (context.getApplicationInfo().labelRes != 0) { str = context.getResources().getString(r0) + ":"; } else { str = ""; } return str + charSequence.toString(); } catch (Exception e) { e.printStackTrace(); } catch (Throwable th) { } return charSequence; } static boolean interceptBackgroundToast(Toast toast, Context context) { return true; } } ```
Mikanoshi closed this pull request 4 years ago
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Mikanoshi/CustoMIUIzer#109
Loading…
There is no content yet.