Loading core/java/android/service/notification/StatusBarNotification.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -186,7 +186,7 @@ public class StatusBarNotification implements Parcelable { } } /** The package of the app that posted the notification. */ /** The package of the app that posted the notification. */ public String getPkg() { public String getPackageName() { return pkg; return pkg; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +12 −12 Original line number Original line Diff line number Diff line Loading @@ -315,7 +315,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected View updateNotificationVetoButton(View row, StatusBarNotification n) { protected View updateNotificationVetoButton(View row, StatusBarNotification n) { View vetoButton = row.findViewById(R.id.veto); View vetoButton = row.findViewById(R.id.veto); if (n.isClearable()) { if (n.isClearable()) { final String _pkg = n.getPkg(); final String _pkg = n.getPackageName(); final String _tag = n.getTag(); final String _tag = n.getTag(); final int _id = n.getId(); final int _id = n.getId(); vetoButton.setOnClickListener(new View.OnClickListener() { vetoButton.setOnClickListener(new View.OnClickListener() { Loading Loading @@ -345,10 +345,10 @@ public abstract class BaseStatusBar extends SystemUI implements com.android.internal.R.layout.notification_template_base) { com.android.internal.R.layout.notification_template_base) { int version = 0; int version = 0; try { try { ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPkg(), 0); ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); version = info.targetSdkVersion; version = info.targetSdkVersion; } catch (NameNotFoundException ex) { } catch (NameNotFoundException ex) { Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPkg(), ex); Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); } } if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { content.setBackgroundResource(R.drawable.notification_row_legacy_bg); content.setBackgroundResource(R.drawable.notification_row_legacy_bg); Loading Loading @@ -741,7 +741,7 @@ public abstract class BaseStatusBar extends SystemUI implements View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); // for blaming (see SwipeHelper.setLongPressListener) // for blaming (see SwipeHelper.setLongPressListener) row.setTag(sbn.getPkg()); row.setTag(sbn.getPackageName()); workAroundBadLayerDrawableOpacity(row); workAroundBadLayerDrawableOpacity(row); View vetoButton = updateNotificationVetoButton(row, sbn); View vetoButton = updateNotificationVetoButton(row, sbn); Loading @@ -759,7 +759,7 @@ public abstract class BaseStatusBar extends SystemUI implements PendingIntent contentIntent = sbn.getNotification().contentIntent; PendingIntent contentIntent = sbn.getNotification().contentIntent; if (contentIntent != null) { if (contentIntent != null) { final View.OnClickListener listener = new NotificationClicker(contentIntent, final View.OnClickListener listener = new NotificationClicker(contentIntent, sbn.getPkg(), sbn.getTag(), sbn.getId()); sbn.getPackageName(), sbn.getTag(), sbn.getId()); content.setOnClickListener(listener); content.setOnClickListener(listener); } else { } else { content.setOnClickListener(null); content.setOnClickListener(null); Loading @@ -775,7 +775,7 @@ public abstract class BaseStatusBar extends SystemUI implements } } } } catch (RuntimeException e) { catch (RuntimeException e) { final String ident = sbn.getPkg() + "/0x" + Integer.toHexString(sbn.getId()); final String ident = sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()); Slog.e(TAG, "couldn't inflate view for notification " + ident, e); Slog.e(TAG, "couldn't inflate view for notification " + ident, e); return false; return false; } } Loading Loading @@ -904,7 +904,7 @@ public abstract class BaseStatusBar extends SystemUI implements void handleNotificationError(IBinder key, StatusBarNotification n, String message) { void handleNotificationError(IBinder key, StatusBarNotification n, String message) { removeNotification(key); removeNotification(key); try { try { mBarService.onNotificationError(n.getPkg(), n.getTag(), n.getId(), n.getUid(), n.getInitialPid(), message); mBarService.onNotificationError(n.getPackageName(), n.getTag(), n.getId(), n.getUid(), n.getInitialPid(), message); } catch (RemoteException ex) { } catch (RemoteException ex) { // The end is nigh. // The end is nigh. } } Loading Loading @@ -932,11 +932,11 @@ public abstract class BaseStatusBar extends SystemUI implements } } // Construct the icon. // Construct the icon. final StatusBarIconView iconView = new StatusBarIconView(mContext, final StatusBarIconView iconView = new StatusBarIconView(mContext, notification.getPkg() + "/0x" + Integer.toHexString(notification.getId()), notification.getPackageName() + "/0x" + Integer.toHexString(notification.getId()), notification.getNotification()); notification.getNotification()); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); final StatusBarIcon ic = new StatusBarIcon(notification.getPkg(), final StatusBarIcon ic = new StatusBarIcon(notification.getPackageName(), notification.getUser(), notification.getUser(), notification.getNotification().icon, notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().iconLevel, Loading Loading @@ -1083,13 +1083,13 @@ public abstract class BaseStatusBar extends SystemUI implements final PendingIntent contentIntent = notification.getNotification().contentIntent; final PendingIntent contentIntent = notification.getNotification().contentIntent; if (contentIntent != null) { if (contentIntent != null) { final View.OnClickListener listener = makeClicker(contentIntent, final View.OnClickListener listener = makeClicker(contentIntent, notification.getPkg(), notification.getTag(), notification.getId()); notification.getPackageName(), notification.getTag(), notification.getId()); oldEntry.content.setOnClickListener(listener); oldEntry.content.setOnClickListener(listener); } else { } else { oldEntry.content.setOnClickListener(null); oldEntry.content.setOnClickListener(null); } } // Update the icon. // Update the icon. final StatusBarIcon ic = new StatusBarIcon(notification.getPkg(), final StatusBarIcon ic = new StatusBarIcon(notification.getPackageName(), notification.getUser(), notification.getUser(), notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().number, notification.getNotification().number, Loading Loading @@ -1155,7 +1155,7 @@ public abstract class BaseStatusBar extends SystemUI implements // A: Almost none! Only things coming from the system (package is "android") that also // A: Almost none! Only things coming from the system (package is "android") that also // have special "kind" tags marking them as relevant for setup (see below). // have special "kind" tags marking them as relevant for setup (see below). protected boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn) { protected boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn) { if ("android".equals(sbn.getPkg())) { if ("android".equals(sbn.getPackageName())) { if (sbn.getNotification().kind != null) { if (sbn.getNotification().kind != null) { for (String aKind : sbn.getNotification().kind) { for (String aKind : sbn.getNotification().kind) { // IME switcher, created by InputMethodManagerService // IME switcher, created by InputMethodManagerService Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2066,7 +2066,7 @@ public class PhoneStatusBar extends BaseStatusBar { NotificationData.Entry e = mNotificationData.get(i); NotificationData.Entry e = mNotificationData.get(i); pw.println(" [" + i + "] key=" + e.key + " icon=" + e.icon); pw.println(" [" + i + "] key=" + e.key + " icon=" + e.icon); StatusBarNotification n = e.notification; StatusBarNotification n = e.notification; pw.println(" pkg=" + n.getPkg() + " id=" + n.getId() + " score=" + n.getScore()); pw.println(" pkg=" + n.getPackageName() + " id=" + n.getId() + " score=" + n.getScore()); pw.println(" notification=" + n.getNotification()); pw.println(" notification=" + n.getNotification()); pw.println(" tickerText=\"" + n.getNotification().tickerText + "\""); pw.println(" tickerText=\"" + n.getNotification().tickerText + "\""); } } Loading Loading @@ -2369,7 +2369,7 @@ public class PhoneStatusBar extends BaseStatusBar { try { try { mBarService.onNotificationClear( mBarService.onNotificationClear( mCurrentlyIntrudingNotification.getPkg(), mCurrentlyIntrudingNotification.getPackageName(), mCurrentlyIntrudingNotification.getTag(), mCurrentlyIntrudingNotification.getTag(), mCurrentlyIntrudingNotification.getId()); mCurrentlyIntrudingNotification.getId()); } catch (android.os.RemoteException ex) { } catch (android.os.RemoteException ex) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -189,7 +189,7 @@ public abstract class Ticker { // a notification storm). // a notification storm). if (initialCount > 0) { if (initialCount > 0) { final Segment seg = mSegments.get(0); final Segment seg = mSegments.get(0); if (n.getPkg().equals(seg.notification.getPkg()) if (n.getPackageName().equals(seg.notification.getPackageName()) && n.getNotification().icon == seg.notification.getNotification().icon && n.getNotification().icon == seg.notification.getNotification().icon && n.getNotification().iconLevel == seg.notification.getNotification().iconLevel && n.getNotification().iconLevel == seg.notification.getNotification().iconLevel && CharSequences.equals(seg.notification.getNotification().tickerText, && CharSequences.equals(seg.notification.getNotification().tickerText, Loading @@ -199,7 +199,7 @@ public abstract class Ticker { } } final Drawable icon = StatusBarIconView.getIcon(mContext, final Drawable icon = StatusBarIconView.getIcon(mContext, new StatusBarIcon(n.getPkg(), n.getUser(), n.getNotification().icon, n.getNotification().iconLevel, 0, new StatusBarIcon(n.getPackageName(), n.getUser(), n.getNotification().icon, n.getNotification().iconLevel, 0, n.getNotification().tickerText)); n.getNotification().tickerText)); final CharSequence text = n.getNotification().tickerText; final CharSequence text = n.getNotification().tickerText; final Segment newSegment = new Segment(n, icon, text); final Segment newSegment = new Segment(n, icon, text); Loading @@ -207,7 +207,7 @@ public abstract class Ticker { // If there's already a notification schedule for this package and id, remove it. // If there's already a notification schedule for this package and id, remove it. for (int i=0; i<mSegments.size(); i++) { for (int i=0; i<mSegments.size(); i++) { Segment seg = mSegments.get(i); Segment seg = mSegments.get(i); if (n.getId() == seg.notification.getId() && n.getPkg().equals(seg.notification.getPkg())) { if (n.getId() == seg.notification.getId() && n.getPackageName().equals(seg.notification.getPackageName())) { // just update that one to use this new data instead // just update that one to use this new data instead mSegments.remove(i--); // restart iteration here mSegments.remove(i--); // restart iteration here } } Loading Loading @@ -235,7 +235,7 @@ public abstract class Ticker { public void removeEntry(StatusBarNotification n) { public void removeEntry(StatusBarNotification n) { for (int i=mSegments.size()-1; i>=0; i--) { for (int i=mSegments.size()-1; i>=0; i--) { Segment seg = mSegments.get(i); Segment seg = mSegments.get(i); if (n.getId() == seg.notification.getId() && n.getPkg().equals(seg.notification.getPkg())) { if (n.getId() == seg.notification.getId() && n.getPackageName().equals(seg.notification.getPackageName())) { mSegments.remove(i); mSegments.remove(i); } } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class TabletTicker exception = e; exception = e; } } if (expanded == null) { if (expanded == null) { final String ident = notification.getPkg() final String ident = notification.getPackageName() + "/0x" + Integer.toHexString(notification.getId()); + "/0x" + Integer.toHexString(notification.getId()); Slog.e(TAG, "couldn't inflate view for notification " + ident, exception); Slog.e(TAG, "couldn't inflate view for notification " + ident, exception); return null; return null; Loading @@ -286,7 +286,7 @@ public class TabletTicker } else if (n.tickerText != null) { } else if (n.tickerText != null) { group = (ViewGroup)inflater.inflate(R.layout.system_bar_ticker_compat, mWindow, false); group = (ViewGroup)inflater.inflate(R.layout.system_bar_ticker_compat, mWindow, false); final Drawable icon = StatusBarIconView.getIcon(mContext, final Drawable icon = StatusBarIconView.getIcon(mContext, new StatusBarIcon(notification.getPkg(), notification.getUser(), n.icon, n.iconLevel, 0, new StatusBarIcon(notification.getPackageName(), notification.getUser(), n.icon, n.iconLevel, 0, n.tickerText)); n.tickerText)); ImageView iv = (ImageView)group.findViewById(iconId); ImageView iv = (ImageView)group.findViewById(iconId); iv.setImageDrawable(icon); iv.setImageDrawable(icon); Loading Loading @@ -318,7 +318,7 @@ public class TabletTicker // create the usual notification clicker, but chain it together with a halt() call // create the usual notification clicker, but chain it together with a halt() call // to abort the ticker too // to abort the ticker too final View.OnClickListener clicker = mBar.makeClicker(contentIntent, final View.OnClickListener clicker = mBar.makeClicker(contentIntent, notification.getPkg(), notification.getTag(), notification.getId()); notification.getPackageName(), notification.getTag(), notification.getId()); group.setOnClickListener(new View.OnClickListener() { group.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { public void onClick(View v) { halt(); halt(); Loading Loading
core/java/android/service/notification/StatusBarNotification.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -186,7 +186,7 @@ public class StatusBarNotification implements Parcelable { } } /** The package of the app that posted the notification. */ /** The package of the app that posted the notification. */ public String getPkg() { public String getPackageName() { return pkg; return pkg; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +12 −12 Original line number Original line Diff line number Diff line Loading @@ -315,7 +315,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected View updateNotificationVetoButton(View row, StatusBarNotification n) { protected View updateNotificationVetoButton(View row, StatusBarNotification n) { View vetoButton = row.findViewById(R.id.veto); View vetoButton = row.findViewById(R.id.veto); if (n.isClearable()) { if (n.isClearable()) { final String _pkg = n.getPkg(); final String _pkg = n.getPackageName(); final String _tag = n.getTag(); final String _tag = n.getTag(); final int _id = n.getId(); final int _id = n.getId(); vetoButton.setOnClickListener(new View.OnClickListener() { vetoButton.setOnClickListener(new View.OnClickListener() { Loading Loading @@ -345,10 +345,10 @@ public abstract class BaseStatusBar extends SystemUI implements com.android.internal.R.layout.notification_template_base) { com.android.internal.R.layout.notification_template_base) { int version = 0; int version = 0; try { try { ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPkg(), 0); ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); version = info.targetSdkVersion; version = info.targetSdkVersion; } catch (NameNotFoundException ex) { } catch (NameNotFoundException ex) { Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPkg(), ex); Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); } } if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { content.setBackgroundResource(R.drawable.notification_row_legacy_bg); content.setBackgroundResource(R.drawable.notification_row_legacy_bg); Loading Loading @@ -741,7 +741,7 @@ public abstract class BaseStatusBar extends SystemUI implements View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); // for blaming (see SwipeHelper.setLongPressListener) // for blaming (see SwipeHelper.setLongPressListener) row.setTag(sbn.getPkg()); row.setTag(sbn.getPackageName()); workAroundBadLayerDrawableOpacity(row); workAroundBadLayerDrawableOpacity(row); View vetoButton = updateNotificationVetoButton(row, sbn); View vetoButton = updateNotificationVetoButton(row, sbn); Loading @@ -759,7 +759,7 @@ public abstract class BaseStatusBar extends SystemUI implements PendingIntent contentIntent = sbn.getNotification().contentIntent; PendingIntent contentIntent = sbn.getNotification().contentIntent; if (contentIntent != null) { if (contentIntent != null) { final View.OnClickListener listener = new NotificationClicker(contentIntent, final View.OnClickListener listener = new NotificationClicker(contentIntent, sbn.getPkg(), sbn.getTag(), sbn.getId()); sbn.getPackageName(), sbn.getTag(), sbn.getId()); content.setOnClickListener(listener); content.setOnClickListener(listener); } else { } else { content.setOnClickListener(null); content.setOnClickListener(null); Loading @@ -775,7 +775,7 @@ public abstract class BaseStatusBar extends SystemUI implements } } } } catch (RuntimeException e) { catch (RuntimeException e) { final String ident = sbn.getPkg() + "/0x" + Integer.toHexString(sbn.getId()); final String ident = sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()); Slog.e(TAG, "couldn't inflate view for notification " + ident, e); Slog.e(TAG, "couldn't inflate view for notification " + ident, e); return false; return false; } } Loading Loading @@ -904,7 +904,7 @@ public abstract class BaseStatusBar extends SystemUI implements void handleNotificationError(IBinder key, StatusBarNotification n, String message) { void handleNotificationError(IBinder key, StatusBarNotification n, String message) { removeNotification(key); removeNotification(key); try { try { mBarService.onNotificationError(n.getPkg(), n.getTag(), n.getId(), n.getUid(), n.getInitialPid(), message); mBarService.onNotificationError(n.getPackageName(), n.getTag(), n.getId(), n.getUid(), n.getInitialPid(), message); } catch (RemoteException ex) { } catch (RemoteException ex) { // The end is nigh. // The end is nigh. } } Loading Loading @@ -932,11 +932,11 @@ public abstract class BaseStatusBar extends SystemUI implements } } // Construct the icon. // Construct the icon. final StatusBarIconView iconView = new StatusBarIconView(mContext, final StatusBarIconView iconView = new StatusBarIconView(mContext, notification.getPkg() + "/0x" + Integer.toHexString(notification.getId()), notification.getPackageName() + "/0x" + Integer.toHexString(notification.getId()), notification.getNotification()); notification.getNotification()); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); final StatusBarIcon ic = new StatusBarIcon(notification.getPkg(), final StatusBarIcon ic = new StatusBarIcon(notification.getPackageName(), notification.getUser(), notification.getUser(), notification.getNotification().icon, notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().iconLevel, Loading Loading @@ -1083,13 +1083,13 @@ public abstract class BaseStatusBar extends SystemUI implements final PendingIntent contentIntent = notification.getNotification().contentIntent; final PendingIntent contentIntent = notification.getNotification().contentIntent; if (contentIntent != null) { if (contentIntent != null) { final View.OnClickListener listener = makeClicker(contentIntent, final View.OnClickListener listener = makeClicker(contentIntent, notification.getPkg(), notification.getTag(), notification.getId()); notification.getPackageName(), notification.getTag(), notification.getId()); oldEntry.content.setOnClickListener(listener); oldEntry.content.setOnClickListener(listener); } else { } else { oldEntry.content.setOnClickListener(null); oldEntry.content.setOnClickListener(null); } } // Update the icon. // Update the icon. final StatusBarIcon ic = new StatusBarIcon(notification.getPkg(), final StatusBarIcon ic = new StatusBarIcon(notification.getPackageName(), notification.getUser(), notification.getUser(), notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().icon, notification.getNotification().iconLevel, notification.getNotification().number, notification.getNotification().number, Loading Loading @@ -1155,7 +1155,7 @@ public abstract class BaseStatusBar extends SystemUI implements // A: Almost none! Only things coming from the system (package is "android") that also // A: Almost none! Only things coming from the system (package is "android") that also // have special "kind" tags marking them as relevant for setup (see below). // have special "kind" tags marking them as relevant for setup (see below). protected boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn) { protected boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn) { if ("android".equals(sbn.getPkg())) { if ("android".equals(sbn.getPackageName())) { if (sbn.getNotification().kind != null) { if (sbn.getNotification().kind != null) { for (String aKind : sbn.getNotification().kind) { for (String aKind : sbn.getNotification().kind) { // IME switcher, created by InputMethodManagerService // IME switcher, created by InputMethodManagerService Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2066,7 +2066,7 @@ public class PhoneStatusBar extends BaseStatusBar { NotificationData.Entry e = mNotificationData.get(i); NotificationData.Entry e = mNotificationData.get(i); pw.println(" [" + i + "] key=" + e.key + " icon=" + e.icon); pw.println(" [" + i + "] key=" + e.key + " icon=" + e.icon); StatusBarNotification n = e.notification; StatusBarNotification n = e.notification; pw.println(" pkg=" + n.getPkg() + " id=" + n.getId() + " score=" + n.getScore()); pw.println(" pkg=" + n.getPackageName() + " id=" + n.getId() + " score=" + n.getScore()); pw.println(" notification=" + n.getNotification()); pw.println(" notification=" + n.getNotification()); pw.println(" tickerText=\"" + n.getNotification().tickerText + "\""); pw.println(" tickerText=\"" + n.getNotification().tickerText + "\""); } } Loading Loading @@ -2369,7 +2369,7 @@ public class PhoneStatusBar extends BaseStatusBar { try { try { mBarService.onNotificationClear( mBarService.onNotificationClear( mCurrentlyIntrudingNotification.getPkg(), mCurrentlyIntrudingNotification.getPackageName(), mCurrentlyIntrudingNotification.getTag(), mCurrentlyIntrudingNotification.getTag(), mCurrentlyIntrudingNotification.getId()); mCurrentlyIntrudingNotification.getId()); } catch (android.os.RemoteException ex) { } catch (android.os.RemoteException ex) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -189,7 +189,7 @@ public abstract class Ticker { // a notification storm). // a notification storm). if (initialCount > 0) { if (initialCount > 0) { final Segment seg = mSegments.get(0); final Segment seg = mSegments.get(0); if (n.getPkg().equals(seg.notification.getPkg()) if (n.getPackageName().equals(seg.notification.getPackageName()) && n.getNotification().icon == seg.notification.getNotification().icon && n.getNotification().icon == seg.notification.getNotification().icon && n.getNotification().iconLevel == seg.notification.getNotification().iconLevel && n.getNotification().iconLevel == seg.notification.getNotification().iconLevel && CharSequences.equals(seg.notification.getNotification().tickerText, && CharSequences.equals(seg.notification.getNotification().tickerText, Loading @@ -199,7 +199,7 @@ public abstract class Ticker { } } final Drawable icon = StatusBarIconView.getIcon(mContext, final Drawable icon = StatusBarIconView.getIcon(mContext, new StatusBarIcon(n.getPkg(), n.getUser(), n.getNotification().icon, n.getNotification().iconLevel, 0, new StatusBarIcon(n.getPackageName(), n.getUser(), n.getNotification().icon, n.getNotification().iconLevel, 0, n.getNotification().tickerText)); n.getNotification().tickerText)); final CharSequence text = n.getNotification().tickerText; final CharSequence text = n.getNotification().tickerText; final Segment newSegment = new Segment(n, icon, text); final Segment newSegment = new Segment(n, icon, text); Loading @@ -207,7 +207,7 @@ public abstract class Ticker { // If there's already a notification schedule for this package and id, remove it. // If there's already a notification schedule for this package and id, remove it. for (int i=0; i<mSegments.size(); i++) { for (int i=0; i<mSegments.size(); i++) { Segment seg = mSegments.get(i); Segment seg = mSegments.get(i); if (n.getId() == seg.notification.getId() && n.getPkg().equals(seg.notification.getPkg())) { if (n.getId() == seg.notification.getId() && n.getPackageName().equals(seg.notification.getPackageName())) { // just update that one to use this new data instead // just update that one to use this new data instead mSegments.remove(i--); // restart iteration here mSegments.remove(i--); // restart iteration here } } Loading Loading @@ -235,7 +235,7 @@ public abstract class Ticker { public void removeEntry(StatusBarNotification n) { public void removeEntry(StatusBarNotification n) { for (int i=mSegments.size()-1; i>=0; i--) { for (int i=mSegments.size()-1; i>=0; i--) { Segment seg = mSegments.get(i); Segment seg = mSegments.get(i); if (n.getId() == seg.notification.getId() && n.getPkg().equals(seg.notification.getPkg())) { if (n.getId() == seg.notification.getId() && n.getPackageName().equals(seg.notification.getPackageName())) { mSegments.remove(i); mSegments.remove(i); } } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class TabletTicker exception = e; exception = e; } } if (expanded == null) { if (expanded == null) { final String ident = notification.getPkg() final String ident = notification.getPackageName() + "/0x" + Integer.toHexString(notification.getId()); + "/0x" + Integer.toHexString(notification.getId()); Slog.e(TAG, "couldn't inflate view for notification " + ident, exception); Slog.e(TAG, "couldn't inflate view for notification " + ident, exception); return null; return null; Loading @@ -286,7 +286,7 @@ public class TabletTicker } else if (n.tickerText != null) { } else if (n.tickerText != null) { group = (ViewGroup)inflater.inflate(R.layout.system_bar_ticker_compat, mWindow, false); group = (ViewGroup)inflater.inflate(R.layout.system_bar_ticker_compat, mWindow, false); final Drawable icon = StatusBarIconView.getIcon(mContext, final Drawable icon = StatusBarIconView.getIcon(mContext, new StatusBarIcon(notification.getPkg(), notification.getUser(), n.icon, n.iconLevel, 0, new StatusBarIcon(notification.getPackageName(), notification.getUser(), n.icon, n.iconLevel, 0, n.tickerText)); n.tickerText)); ImageView iv = (ImageView)group.findViewById(iconId); ImageView iv = (ImageView)group.findViewById(iconId); iv.setImageDrawable(icon); iv.setImageDrawable(icon); Loading Loading @@ -318,7 +318,7 @@ public class TabletTicker // create the usual notification clicker, but chain it together with a halt() call // create the usual notification clicker, but chain it together with a halt() call // to abort the ticker too // to abort the ticker too final View.OnClickListener clicker = mBar.makeClicker(contentIntent, final View.OnClickListener clicker = mBar.makeClicker(contentIntent, notification.getPkg(), notification.getTag(), notification.getId()); notification.getPackageName(), notification.getTag(), notification.getId()); group.setOnClickListener(new View.OnClickListener() { group.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { public void onClick(View v) { halt(); halt(); Loading