@@ -189,12 +189,6 @@ public class Notification implements Parcelable
189189 */
190190 public RemoteViews contentView ;
191191
192- /**
193- * The view that will represent this notification in the pop-up "intruder alert" dialog.
194- * @hide
195- */
196- public RemoteViews intruderView ;
197-
198192 /**
199193 * A large-format version of {@link #contentView}, giving the Notification an
200194 * opportunity to show more detail. The system UI may choose to show this
@@ -589,9 +583,6 @@ public Notification(Parcel parcel)
589583 }
590584
591585 actions = parcel .createTypedArray (Action .CREATOR );
592- if (parcel .readInt () != 0 ) {
593- intruderView = RemoteViews .CREATOR .createFromParcel (parcel );
594- }
595586 if (parcel .readInt () != 0 ) {
596587 bigContentView = RemoteViews .CREATOR .createFromParcel (parcel );
597588 }
@@ -658,9 +649,6 @@ public Notification clone() {
658649 for (int i =0 ; i <this .actions .length ; i ++) {
659650 that .actions [i ] = this .actions [i ].clone ();
660651 }
661- if (this .intruderView != null ) {
662- that .intruderView = this .intruderView .clone ();
663- }
664652 if (this .bigContentView != null ) {
665653 that .bigContentView = this .bigContentView .clone ();
666654 }
@@ -755,13 +743,6 @@ public void writeToParcel(Parcel parcel, int flags)
755743
756744 parcel .writeTypedArray (actions , 0 );
757745
758- if (intruderView != null ) {
759- parcel .writeInt (1 );
760- intruderView .writeToParcel (parcel , 0 );
761- } else {
762- parcel .writeInt (0 );
763- }
764-
765746 if (bigContentView != null ) {
766747 parcel .writeInt (1 );
767748 bigContentView .writeToParcel (parcel , 0 );
@@ -942,8 +923,6 @@ public static class Builder {
942923 private Bundle mExtras ;
943924 private int mPriority ;
944925 private ArrayList <Action > mActions = new ArrayList <Action >(3 );
945- private boolean mCanHasIntruder ;
946- private boolean mIntruderActionsShowText ;
947926 private boolean mUseChronometer ;
948927
949928 /**
@@ -1349,38 +1328,6 @@ public Builder addAction(int icon, CharSequence title, PendingIntent intent) {
13491328 return this ;
13501329 }
13511330
1352- /**
1353- * Specify whether this notification should pop up as an
1354- * "intruder alert" (a small window that shares the screen with the
1355- * current activity). This sort of notification is (as the name implies)
1356- * very intrusive, so use it sparingly for notifications that require
1357- * the user's attention.
1358- *
1359- * Notes:
1360- * <ul>
1361- * <li>Intruder alerts only show when the screen is on.</li>
1362- * <li>Intruder alerts take precedence over fullScreenIntents.</li>
1363- * </ul>
1364- *
1365- * @param intrude Whether to pop up an intruder alert (default false).
1366- */
1367- public Builder setUsesIntruderAlert (boolean intrude ) {
1368- mCanHasIntruder = intrude ;
1369- return this ;
1370- }
1371-
1372- /**
1373- * Control text on intruder alert action buttons. By default, action
1374- * buttons in intruders do not show textual labels.
1375- *
1376- * @param showActionText Whether to show text labels beneath action
1377- * icons (default false).
1378- */
1379- public Builder setIntruderActionsShowText (boolean showActionText ) {
1380- mIntruderActionsShowText = showActionText ;
1381- return this ;
1382- }
1383-
13841331 private void setFlag (int mask , boolean value ) {
13851332 if (value ) {
13861333 mFlags |= mask ;
@@ -1506,45 +1453,6 @@ private RemoteViews makeBigContentView() {
15061453 return applyStandardTemplateWithActions (R .layout .notification_template_base );
15071454 }
15081455
1509- private RemoteViews makeIntruderView (boolean showLabels ) {
1510- RemoteViews intruderView = new RemoteViews (mContext .getPackageName (),
1511- R .layout .notification_intruder_content );
1512- if (mLargeIcon != null ) {
1513- intruderView .setImageViewBitmap (R .id .icon , mLargeIcon );
1514- intruderView .setViewVisibility (R .id .icon , View .VISIBLE );
1515- } else if (mSmallIcon != 0 ) {
1516- intruderView .setImageViewResource (R .id .icon , mSmallIcon );
1517- intruderView .setViewVisibility (R .id .icon , View .VISIBLE );
1518- } else {
1519- intruderView .setViewVisibility (R .id .icon , View .GONE );
1520- }
1521- if (mContentTitle != null ) {
1522- intruderView .setTextViewText (R .id .title , mContentTitle );
1523- }
1524- if (mContentText != null ) {
1525- intruderView .setTextViewText (R .id .text , mContentText );
1526- }
1527- if (mActions .size () > 0 ) {
1528- intruderView .setViewVisibility (R .id .actions , View .VISIBLE );
1529- int N = mActions .size ();
1530- if (N >3 ) N =3 ;
1531- final int [] BUTTONS = { R .id .action0 , R .id .action1 , R .id .action2 };
1532- for (int i =0 ; i <N ; i ++) {
1533- final Action action = mActions .get (i );
1534- final int buttonId = BUTTONS [i ];
1535-
1536- intruderView .setViewVisibility (buttonId , View .VISIBLE );
1537- intruderView .setTextViewText (buttonId , showLabels ? action .title : null );
1538- intruderView .setTextViewCompoundDrawables (buttonId , 0 , action .icon , 0 , 0 );
1539- intruderView .setContentDescription (buttonId , action .title );
1540- intruderView .setOnClickPendingIntent (buttonId , action .actionIntent );
1541- }
1542- } else {
1543- intruderView .setViewVisibility (R .id .actions , View .GONE );
1544- }
1545- return intruderView ;
1546- }
1547-
15481456 private RemoteViews generateActionButton (Action action ) {
15491457 RemoteViews button = new RemoteViews (mContext .getPackageName (), R .layout .notification_action );
15501458 button .setTextViewCompoundDrawables (R .id .action0 , action .icon , 0 , 0 , 0 );
@@ -1579,9 +1487,6 @@ public Notification getNotification() {
15791487 n .ledOffMS = mLedOffMs ;
15801488 n .defaults = mDefaults ;
15811489 n .flags = mFlags ;
1582- if (mCanHasIntruder ) {
1583- n .intruderView = makeIntruderView (mIntruderActionsShowText );
1584- }
15851490 n .bigContentView = makeBigContentView ();
15861491 if (mLedOnMs != 0 && mLedOffMs != 0 ) {
15871492 n .flags |= FLAG_SHOW_LIGHTS ;
0 commit comments