Search in sources :

Example 1 with DexAdd

use of lanchon.dexpatcher.annotation.DexAdd in project AmazMod by edotassi.

the class StatusBarNotificationData method from.

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
@DexAdd
public static StatusBarNotificationData from(StatusBarNotification pStatusBarNotification) {
    StatusBarNotificationData statusBarNotificationData = source_from(pStatusBarNotification);
    Context context = CompanionApplication.getContext() == null ? NotificationAccessService.context : CompanionApplication.getContext();
    if (!PreferenceManager.getBoolean(context, Constants.PREFERENCE_DISABLE_NOTIFICATIONS_MOD, false)) {
        statusBarNotificationData.pkg = statusBarNotificationData.pkg + "|" + pStatusBarNotification.getNotification().when;
    }
    return statusBarNotificationData;
}
Also used : Context(android.content.Context) RequiresApi(android.support.annotation.RequiresApi) DexAdd(lanchon.dexpatcher.annotation.DexAdd)

Example 2 with DexAdd

use of lanchon.dexpatcher.annotation.DexAdd in project AmazMod by edotassi.

the class NotificationData method reverse.

@DexAdd
private static String reverse(String s) {
    if (s == null || s.length() < 2)
        return s;
    StringBuilder sb = new StringBuilder();
    for (int i = s.length() - 1; i >= 0; --i) {
        if (Character.isLowSurrogate(s.charAt(i))) {
            --i;
            sb.append(s.charAt(i)).append(s.charAt(i + 1));
        } else {
            sb.append(s.charAt(i));
        }
    }
    return sb.toString();
}
Also used : SuppressLint(android.annotation.SuppressLint) DexAdd(lanchon.dexpatcher.annotation.DexAdd)

Aggregations

DexAdd (lanchon.dexpatcher.annotation.DexAdd)2 SuppressLint (android.annotation.SuppressLint)1 Context (android.content.Context)1 RequiresApi (android.support.annotation.RequiresApi)1