// Path: project/app/src/main/java/com/achep/acdisplay/graphics/IconFactory.java
// public class IconFactory {
// 
//     private static final String TAG = "IconFactory";
// 
//     public interface IconAsyncListener {
//         void onGenerated(@NonNull Bitmap bitmap);
//     }
// 
//     @NonNull
//     public static AsyncTask<Void, Void, Bitmap> generateAsync(final @NonNull Context context,
//                                                               final @NonNull OpenNotification notification,
//                                                               final @NonNull IconAsyncListener listener) {
//         return (AsyncTask<Void, Void, Bitmap>) AsyncTaskCompat.executeParallel(
//                 new AsyncTask<Void, Void, Bitmap>() {
// 
//                     @Override
//                     protected Bitmap doInBackground(Void... params) {
//                         final long start = SystemClock.elapsedRealtime();
// 
//                         Bitmap output = generate(context, notification);
// 
//                         if (DEBUG) {
//                             long delta = SystemClock.elapsedRealtime() - start;
//                             Log.d(TAG, "Notification icon created in " + delta + " millis:"
//                                     + " width=" + output.getWidth()
//                                     + " height=" + output.getHeight());
//                         }
// 
//                         return output;
//                     }
// 
//                     @Override
//                     protected void onPostExecute(Bitmap bitmap) {
//                         super.onPostExecute(bitmap);
//                         listener.onGenerated(bitmap);
//                     }
// 
//                 });
//     }
// 
//     public static Bitmap generate(final @NonNull Context context,
//                                   final @NonNull OpenNotification notification) {
//         Resources res = context.getResources();
// 
//         int iconRes = notification.getNotification().icon;
//         Drawable drawable = NotificationUtils.getDrawable(context, notification, iconRes);
// 
//         final int size = res.getDimensionPixelSize(R.dimen.notification_icon_size);
//         return drawable == null ? createEmptyIcon(res, size) : createIcon(drawable, size);
//     }
// 
//     // TODO: Automatically scale the icon.
//     @NonNull
//     private static Bitmap createIcon(@NonNull Drawable drawable, int size) {
//         Bitmap icon = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_4444);
//         Canvas canvas = new Canvas(icon);
// 
//         drawable = drawable.mutate();
//         drawable.setBounds(0, 0, size, size);
//         drawable.draw(canvas);
// 
//         return icon;
//     }
// 
//     @NonNull
//     private static Bitmap createEmptyIcon(@NonNull Resources res, int size) {
//         Paint paint = new Paint();
//         paint.setAntiAlias(true);
//         paint.setColor(0xDDCCCCCC); // white gray
// 
//         final float radius = size / 2f;
// 
//         Bitmap icon = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_4444);
//         Canvas canvas = new Canvas(icon);
//         canvas.drawCircle(radius, radius, radius, paint);
// 
//         Drawable drawable = res.getDrawable(R.drawable.ic_action_warning_white);
//         drawable.setBounds(0, 0, size, size);
//         drawable.draw(canvas);
// 
//         return icon;
//     }
// 
// }
// 
// Path: project/app/src/main/java/com/achep/base/interfaces/ISubscriptable.java
// public interface ISubscriptable<T> {
// 
//     /**
//      * Register a listener to something. Don't forget to
//      * {@link #unregisterListener(Object) unregister} it later!
//      *
//      * @see #unregisterListener(Object)
//      */
//     void registerListener(@NonNull T listener);
// 
//     /**
//      * @see #registerListener(Object)
//      */
//     void unregisterListener(@NonNull T listener);
// 
// }


import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Notification;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.SystemClock;
import android.service.notification.StatusBarNotification;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.graphics.Palette;
import android.text.TextUtils;
import com.achep.acdisplay.graphics.IconFactory;
import com.achep.base.Device;
import com.achep.base.async.AsyncTask;
import com.achep.base.interfaces.ISubscriptable;
import com.achep.base.utils.PackageUtils;
import com.achep.base.utils.smiley.SmileyParser;
import java.util.ArrayList;
    public Notification getNotification() {
        return mNotification;
    }

    /**
     * Array of all {@link Action} structures attached to this notification.
     */
    @Nullable
    public Action[] getActions() {
        return mActions;
    }

    @Nullable
    public Bitmap getIcon() {
        return mIconBitmap;
    }

    /**
     * The number of events that this notification represents. For example, in a new mail
     * notification, this could be the number of unread messages.
     * <p/>
     * The system may or may not use this field to modify the appearance of the notification. For
     * example, before {@link android.os.Build.VERSION_CODES#HONEYCOMB}, this number was
     * superimposed over the icon in the status bar. Starting with
     * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
     * {@link Notification.Builder} has displayed the number in the expanded notification view.
     * <p/>
     * If the number is 0 or negative, it is never shown.
     */
    public int getNumber() {
// Path: project/app/src/main/java/com/achep/acdisplay/graphics/IconFactory.java
// public class IconFactory {
// 
//     private static final String TAG = "IconFactory";
// 
//     public interface IconAsyncListener {
//         void onGenerated(@NonNull Bitmap bitmap);
//     }
// 
//     @NonNull
//     public static AsyncTask<Void, Void, Bitmap> generateAsync(final @NonNull Context context,
//                                                               final @NonNull OpenNotification notification,
//                                                               final @NonNull IconAsyncListener listener) {
//         return (AsyncTask<Void, Void, Bitmap>) AsyncTaskCompat.executeParallel(
//                 new AsyncTask<Void, Void, Bitmap>() {
// 
//                     @Override
//                     protected Bitmap doInBackground(Void... params) {
//                         final long start = SystemClock.elapsedRealtime();
// 
//                         Bitmap output = generate(context, notification);
// 
//                         if (DEBUG) {
//                             long delta = SystemClock.elapsedRealtime() - start;
//                             Log.d(TAG, "Notification icon created in " + delta + " millis:"
//                                     + " width=" + output.getWidth()
//                                     + " height=" + output.getHeight());
//                         }
// 
//                         return output;
//                     }
// 
//                     @Override
//                     protected void onPostExecute(Bitmap bitmap) {
//                         super.onPostExecute(bitmap);
//                         listener.onGenerated(bitmap);
//                     }
// 
//                 });
//     }
// 
//     public static Bitmap generate(final @NonNull Context context,
//                                   final @NonNull OpenNotification notification) {
//         Resources res = context.getResources();
// 
//         int iconRes = notification.getNotification().icon;
//         Drawable drawable = NotificationUtils.getDrawable(context, notification, iconRes);
// 
//         final int size = res.getDimensionPixelSize(R.dimen.notification_icon_size);
//         return drawable == null ? createEmptyIcon(res, size) : createIcon(drawable, size);
//     }
// 
//     // TODO: Automatically scale the icon.
//     @NonNull
//     private static Bitmap createIcon(@NonNull Drawable drawable, int size) {
//         Bitmap icon = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_4444);
//         Canvas canvas = new Canvas(icon);
// 
//         drawable = drawable.mutate();
//         drawable.setBounds(0, 0, size, size);
//         drawable.draw(canvas);
// 
//         return icon;
//     }
// 
//     @NonNull
//     private static Bitmap createEmptyIcon(@NonNull Resources res, int size) {
//         Paint paint = new Paint();
//         paint.setAntiAlias(true);
//         paint.setColor(0xDDCCCCCC); // white gray
// 
//         final float radius = size / 2f;
// 
//         Bitmap icon = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_4444);
//         Canvas canvas = new Canvas(icon);
//         canvas.drawCircle(radius, radius, radius, paint);
// 
//         Drawable drawable = res.getDrawable(R.drawable.ic_action_warning_white);
//         drawable.setBounds(0, 0, size, size);
//         drawable.draw(canvas);
// 
//         return icon;
//     }
// 
// }
// 
// Path: project/app/src/main/java/com/achep/base/interfaces/ISubscriptable.java
// public interface ISubscriptable<T> {
// 
//     /**
//      * Register a listener to something. Don't forget to
//      * {@link #unregisterListener(Object) unregister} it later!
//      *
//      * @see #unregisterListener(Object)
//      */
//     void registerListener(@NonNull T listener);
// 
//     /**
//      * @see #registerListener(Object)
//      */
//     void unregisterListener(@NonNull T listener);
// 
// }


// Path: project/app/src/main/java/com/achep/acdisplay/notifications/OpenNotification.java
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Notification;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.SystemClock;
import android.service.notification.StatusBarNotification;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.graphics.Palette;
import android.text.TextUtils;
import com.achep.acdisplay.graphics.IconFactory;
import com.achep.base.Device;
import com.achep.base.async.AsyncTask;
import com.achep.base.interfaces.ISubscriptable;
import com.achep.base.utils.PackageUtils;
import com.achep.base.utils.smiley.SmileyParser;
import java.util.ArrayList;

    public Notification getNotification() {
        return mNotification;
    }

    /**
     * Array of all {@link Action} structures attached to this notification.
     */
    @Nullable
    public Action[] getActions() {
        return mActions;
    }

    @Nullable
    public Bitmap getIcon() {
        return mIconBitmap;
    }

    /**
     * The number of events that this notification represents. For example, in a new mail
     * notification, this could be the number of unread messages.
     * <p/>
     * The system may or may not use this field to modify the appearance of the notification. For
     * example, before {@link android.os.Build.VERSION_CODES#HONEYCOMB}, this number was
     * superimposed over the icon in the status bar. Starting with
     * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
     * {@link Notification.Builder} has displayed the number in the expanded notification view.
     * <p/>
     * If the number is 0 or negative, it is never shown.
     */
    public int getNumber() {
        return mNumber;