private VNotificationManager() { mNotificationCompat = NotificationCompat.create(); }
public boolean dealNotification(int id, Notification notification, String packageName) { if(notification == null)return false; return VirtualCore.get().getHostPkg().equals(packageName) || mNotificationCompat.dealNotification(id, notification, packageName); }
private View createView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { if (remoteViews == null) return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId);
NotificationCompat() { loadSystemLayoutRes(); mNotificationFixer = new NotificationFixer(this); }
void fixIconImage(Resources resources, RemoteViews remoteViews, boolean hasIconBitmap, Notification notification) { if (remoteViews == null || notification.icon == 0) return; if (!mNotificationCompat.isSystemLayout(remoteViews)) { return; } try { //noinspection deprecation int id = R_Hide.id.icon.get(); //only fake small icon if (!hasIconBitmap && notification.largeIcon == null) { Drawable drawable = resources.getDrawable(notification.icon); drawable.setLevel(notification.iconLevel); Bitmap bitmap = drawableToBitMap(drawable); remoteViews.setImageViewBitmap(id, bitmap); //emui if(OSUtils.getInstance().isEmui()) { if (notification.largeIcon == null) { notification.largeIcon = bitmap; } } } } catch (Exception e) { e.printStackTrace(); } }
NotificationCompat() { loadSystemLayoutRes(); mNotificationFixer = new NotificationFixer(this); }
void fixIconImage(Resources resources, RemoteViews remoteViews, boolean hasIconBitmap, Notification notification) { if (remoteViews == null || notification.icon == 0) return; if (!mNotificationCompat.isSystemLayout(remoteViews)) { return; } try { //noinspection deprecation int id = R_Hide.id.icon.get(); //only fake small icon if (!hasIconBitmap && notification.largeIcon == null) { Drawable drawable = resources.getDrawable(notification.icon); drawable.setLevel(notification.iconLevel); Bitmap bitmap = drawableToBitMap(drawable); remoteViews.setImageViewBitmap(id, bitmap); //emui if(OSUtils.getInstance().isEmui()) { if (notification.largeIcon == null) { notification.largeIcon = bitmap; } } } } catch (Exception e) { e.printStackTrace(); } }
RemoteViews remoteViews = new RemoteViews(mNotificationCompat.getHostContext().getPackageName(), layoutId); VLog.v(TAG, "remoteViews to view"); View cache = toView(pluginContext, contentView, isBig, systemId); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {
public boolean dealNotification(int id, Notification notification, String packageName) { if (notification == null) return false; return VirtualCore.get().getHostPkg().equals(packageName) || mNotificationCompat.dealNotification(id, notification, packageName); }
NotificationCompat() { loadSystemLayoutRes(); mNotificationFixer = new NotificationFixer(this); }
private VNotificationManager() { mNotificationCompat = NotificationCompat.create(); }
void fixIconImage(Resources resources, RemoteViews remoteViews, boolean hasIconBitmap, Notification notification) { if (remoteViews == null || notification.icon == 0) return; if (!mNotificationCompat.isSystemLayout(remoteViews)) { return; } try { //noinspection deprecation int id = R_Hide.id.icon.get(); //only fake small icon if (!hasIconBitmap && notification.largeIcon == null) { Drawable drawable = resources.getDrawable(notification.icon); drawable.setLevel(notification.iconLevel); Bitmap bitmap = drawableToBitMap(drawable); remoteViews.setImageViewBitmap(id, bitmap); //emui if(OSUtils.getInstance().isEmui()) { if (notification.largeIcon == null) { notification.largeIcon = bitmap; } } } } catch (Exception e) { e.printStackTrace(); } }
private View createView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { if (remoteViews == null) return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId);
public boolean dealNotification(int id, Notification notification, String packageName) { if(notification == null)return false; return VirtualCore.get().getHostPkg().equals(packageName) || mNotificationCompat.dealNotification(id, notification, packageName); }
private VNotificationManager() { mNotificationCompat = NotificationCompat.create(); }
private View createView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { if (remoteViews == null) return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId);
RemoteViews remoteViews = new RemoteViews(mNotificationCompat.getHostContext().getPackageName(), layoutId); VLog.v(TAG, "remoteViews to view"); View cache = toView(pluginContext, contentView, isBig, systemId); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {
RemoteViews remoteViews = new RemoteViews(mNotificationCompat.getHostContext().getPackageName(), layoutId); VLog.v(TAG, "remoteViews to view"); View cache = toView(pluginContext, contentView, isBig, systemId); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {