NotificationCompatCompatV14() { super(); mRemoteViewsFixer = new RemoteViewsFixer(this); }
return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId); VLog.v(TAG, "createView:apply"); View view1 = apply(context, remoteViews); if (view1 instanceof ViewGroup) { VLog.v(TAG, "createView:fixTextView"); fixTextView((ViewGroup) view1);
View cache = toView(pluginContext, contentView, isBig, systemId); final Bitmap bmp = createBitmap(cache); if (bmp == null) { VLog.e(TAG, "bmp is null,contentView=" + contentView); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {
private void fixTextView(ViewGroup viewGroup) { int count = viewGroup.getChildCount(); for (int i = 0; i < count; i++) { View v = viewGroup.getChildAt(i); if (v instanceof TextView) { TextView tv = (TextView) v; if (isSingleLine(tv)) { tv.setSingleLine(false); tv.setMaxLines(1); } } else if (v instanceof ViewGroup) { fixTextView((ViewGroup) v); } } }
View toView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { View mCache = null; try { mCache = createView(context, remoteViews, isBig, systemId); } catch (Throwable throwable) { VLog.w(TAG, "toView 1", throwable); try { mCache = LayoutInflater.from(context).inflate(remoteViews.getLayoutId(), null); } catch (Throwable e) { VLog.w(TAG, "toView 2", e); } } return mCache; }
notification_side_padding = 0; } else { notification_side_padding = getDimem(context, systemUi, "notification_side_padding", R.dimen.notification_side_padding); notification_panel_width = getDimem(context, systemUi, "notification_panel_width", R.dimen.notification_panel_width); if (notification_panel_width <= 0) { notification_panel_width = context.getResources().getDisplayMetrics().widthPixels; notification_min_height = getDimem(context, systemUi, "notification_min_height", R.dimen.notification_min_height); notification_max_height = getDimem(context, systemUi, "notification_max_height", R.dimen.notification_max_height); notification_mid_height = getDimem(context, systemUi, "notification_mid_height", R.dimen.notification_mid_height); notification_padding = getDimem(context, systemUi, "notification_padding", R.dimen.notification_padding);
getNotificationFixer().fixRemoteViewActions(appContext, false, notification.tickerView); } else { notification.tickerView = getRemoteViewsFixer().makeRemoteViews(id + ":tickerView", appContext, notification.tickerView, false, false); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.contentView = getRemoteViewsFixer().makeRemoteViews(id + ":contentView", appContext, notification.contentView, false, true); getNotificationFixer().fixRemoteViewActions(appContext, false, notification.bigContentView); } else { notification.bigContentView = getRemoteViewsFixer().makeRemoteViews(id + ":bigContentView", appContext, notification.bigContentView, true, true); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.headsUpContentView = getRemoteViewsFixer().makeRemoteViews(id + ":headsUpContentView", appContext, notification.headsUpContentView, false, false);
private void fixTextView(ViewGroup viewGroup) { int count = viewGroup.getChildCount(); for (int i = 0; i < count; i++) { View v = viewGroup.getChildAt(i); if (v instanceof TextView) { TextView tv = (TextView) v; if (isSingleLine(tv)) { tv.setSingleLine(false); tv.setMaxLines(1); } } else if (v instanceof ViewGroup) { fixTextView((ViewGroup) v); } } }
View toView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { View mCache = null; try { mCache = createView(context, remoteViews, isBig, systemId); } catch (Throwable throwable) { VLog.w(TAG, "toView 1", throwable); try { mCache = LayoutInflater.from(context).inflate(remoteViews.getLayoutId(), null); } catch (Throwable e) { VLog.w(TAG, "toView 2", e); } } return mCache; }
notification_side_padding = 0; } else { notification_side_padding = getDimem(context, systemUi, "notification_side_padding", R.dimen.notification_side_padding); notification_panel_width = getDimem(context, systemUi, "notification_panel_width", R.dimen.notification_panel_width); if (notification_panel_width <= 0) { notification_panel_width = context.getResources().getDisplayMetrics().widthPixels; notification_min_height = getDimem(context, systemUi, "notification_min_height", R.dimen.notification_min_height); notification_max_height = getDimem(context, systemUi, "notification_max_height", R.dimen.notification_max_height); notification_mid_height = getDimem(context, systemUi, "notification_mid_height", R.dimen.notification_mid_height); notification_padding = getDimem(context, systemUi, "notification_padding", R.dimen.notification_padding);
getNotificationFixer().fixRemoteViewActions(appContext, false, notification.tickerView); } else { notification.tickerView = getRemoteViewsFixer().makeRemoteViews(id + ":tickerView", appContext, notification.tickerView, false, false); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.contentView = getRemoteViewsFixer().makeRemoteViews(id + ":contentView", appContext, notification.contentView, false, true); getNotificationFixer().fixRemoteViewActions(appContext, false, notification.bigContentView); } else { notification.bigContentView = getRemoteViewsFixer().makeRemoteViews(id + ":bigContentView", appContext, notification.bigContentView, true, true); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.headsUpContentView = getRemoteViewsFixer().makeRemoteViews(id + ":headsUpContentView", appContext, notification.headsUpContentView, false, false);
return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId); VLog.v(TAG, "createView:apply"); View view1 = apply(context, remoteViews); if (view1 instanceof ViewGroup) { VLog.v(TAG, "createView:fixTextView"); fixTextView((ViewGroup) view1);
private void fixTextView(ViewGroup viewGroup) { int count = viewGroup.getChildCount(); for (int i = 0; i < count; i++) { View v = viewGroup.getChildAt(i); if (v instanceof TextView) { TextView tv = (TextView) v; if (isSingleLine(tv)) { tv.setSingleLine(false); tv.setMaxLines(1); } } else if (v instanceof ViewGroup) { fixTextView((ViewGroup) v); } } }
View cache = toView(pluginContext, contentView, isBig, systemId); final Bitmap bmp = createBitmap(cache); if (bmp == null) { VLog.e(TAG, "bmp is null,contentView=" + contentView); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {
NotificationCompatCompatV14() { super(); mRemoteViewsFixer = new RemoteViewsFixer(this); }
View toView(final Context context, RemoteViews remoteViews, boolean isBig, boolean systemId) { View mCache = null; try { mCache = createView(context, remoteViews, isBig, systemId); } catch (Throwable throwable) { VLog.w(TAG, "toView 1", throwable); try { mCache = LayoutInflater.from(context).inflate(remoteViews.getLayoutId(), null); } catch (Throwable e) { VLog.w(TAG, "toView 2", e); } } return mCache; }
notification_side_padding = 0; } else { notification_side_padding = getDimem(context, systemUi, "notification_side_padding", R.dimen.notification_side_padding); notification_panel_width = getDimem(context, systemUi, "notification_panel_width", R.dimen.notification_panel_width); if (notification_panel_width <= 0) { notification_panel_width = context.getResources().getDisplayMetrics().widthPixels; notification_min_height = getDimem(context, systemUi, "notification_min_height", R.dimen.notification_min_height); notification_max_height = getDimem(context, systemUi, "notification_max_height", R.dimen.notification_max_height); notification_mid_height = getDimem(context, systemUi, "notification_mid_height", R.dimen.notification_mid_height); notification_padding = getDimem(context, systemUi, "notification_padding", R.dimen.notification_padding);
getNotificationFixer().fixRemoteViewActions(appContext, false, notification.tickerView); } else { notification.tickerView = getRemoteViewsFixer().makeRemoteViews(id + ":tickerView", appContext, notification.tickerView, false, false); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.contentView = getRemoteViewsFixer().makeRemoteViews(id + ":contentView", appContext, notification.contentView, false, true); getNotificationFixer().fixRemoteViewActions(appContext, false, notification.bigContentView); } else { notification.bigContentView = getRemoteViewsFixer().makeRemoteViews(id + ":bigContentView", appContext, notification.bigContentView, true, true); getNotificationFixer().fixIconImage(appContext.getResources(), notification.contentView, hasIconBitmap, notification); } else { notification.headsUpContentView = getRemoteViewsFixer().makeRemoteViews(id + ":headsUpContentView", appContext, notification.headsUpContentView, false, false);
return null; Context base = mNotificationCompat.getHostContext(); init(base); VLog.v(TAG, "createView:big=" + isBig + ",system=" + systemId); VLog.v(TAG, "createView:apply"); View view1 = apply(context, remoteViews); if (view1 instanceof ViewGroup) { VLog.v(TAG, "createView:fixTextView"); fixTextView((ViewGroup) view1);
View cache = toView(pluginContext, contentView, isBig, systemId); final Bitmap bmp = createBitmap(cache); if (bmp == null) { VLog.e(TAG, "bmp is null,contentView=" + contentView); try { pendIntentCompat.setPendIntent(remoteViews, toView(mNotificationCompat.getHostContext(), remoteViews, isBig, systemId), cache); } catch (Exception e) {