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;
}
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();
}
Aggregations