am 7aabcfa3: Merge "Deprecate and stop generating tickerViews." into lmp-dev

* commit '7aabcfa391a7f0e4955aa5b8f8f396b4dab3579f':
  Deprecate and stop generating tickerViews.
This commit is contained in:
Dan Sandler
2014-07-18 18:03:48 +00:00
committed by Android Git Automerger
5 changed files with 16 additions and 119 deletions

View File

@@ -4642,7 +4642,7 @@ package android.app {
field public android.app.Notification publicVersion;
field public android.net.Uri sound;
field public java.lang.CharSequence tickerText;
field public android.widget.RemoteViews tickerView;
field public deprecated android.widget.RemoteViews tickerView;
field public long[] vibrate;
field public int visibility;
field public long when;
@@ -4743,7 +4743,7 @@ package android.app {
method public android.app.Notification.Builder setStyle(android.app.Notification.Style);
method public android.app.Notification.Builder setSubText(java.lang.CharSequence);
method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
method public android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
method public android.app.Notification.Builder setUsesChronometer(boolean);
method public android.app.Notification.Builder setVibrate(long[]);
method public android.app.Notification.Builder setVisibility(int);

View File

@@ -212,17 +212,22 @@ public class Notification implements Parcelable
public PendingIntent fullScreenIntent;
/**
* Text to scroll across the screen when this item is added to
* the status bar on large and smaller devices.
* Text that summarizes this notification for accessibility services.
*
* As of the L release, this text is no longer shown on screen, but it is still useful to
* accessibility services (where it serves as an audible announcement of the notification's
* appearance).
*
* @see #tickerView
*/
public CharSequence tickerText;
/**
* The view to show as the ticker in the status bar when the notification
* is posted.
* Formerly, a view showing the {@link #tickerText}.
*
* No longer displayed in the status bar as of API 21.
*/
@Deprecated
public RemoteViews tickerView;
/**
@@ -1969,8 +1974,7 @@ public class Notification implements Parcelable
}
/**
* Set the "ticker" text which is displayed in the status bar when the notification first
* arrives.
* Set the "ticker" text which is sent to accessibility services.
*
* @see Notification#tickerText
*/
@@ -1980,16 +1984,13 @@ public class Notification implements Parcelable
}
/**
* Set the text that is displayed in the status bar when the notification first
* arrives, and also a RemoteViews object that may be displayed instead on some
* devices.
* Obsolete version of {@link #setTicker(CharSequence)}.
*
* @see Notification#tickerText
* @see Notification#tickerView
*/
@Deprecated
public Builder setTicker(CharSequence tickerText, RemoteViews views) {
mTickerText = safeCharSequence(tickerText);
mTickerView = views;
mTickerView = views; // we'll save it for you anyway
return this;
}
@@ -2530,15 +2531,8 @@ public class Notification implements Parcelable
private RemoteViews makeTickerView() {
if (mTickerView != null) {
return mTickerView;
} else {
if (mContentView == null) {
return applyStandardTemplate(mLargeIcon == null
? R.layout.status_bar_latest_event_ticker
: R.layout.status_bar_latest_event_ticker_large_icon, true);
} else {
return null;
}
}
return null; // tickers are not created by default anymore
}
private RemoteViews makeBigContentView() {

View File

@@ -1,45 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_height"
>
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="match_parent"
android:scaleType="center"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
/>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
/>
</LinearLayout>
<TextView android:id="@+id/info"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="6dip"
android:gravity="bottom"
android:singleLine="true"
/>
</LinearLayout>

View File

@@ -1,50 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
/>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
/>
</LinearLayout>
<TextView android:id="@+id/info"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="6dip"
android:gravity="bottom"
android:singleLine="true"
/>
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="13dip"
android:scaleType="center"
android:layout_marginEnd="4dip"
android:layout_marginStart="16dip"
/>
</LinearLayout>

View File

@@ -1169,8 +1169,6 @@
<java-symbol type="layout" name="select_dialog" />
<java-symbol type="layout" name="simple_dropdown_hint" />
<java-symbol type="layout" name="status_bar_latest_event_content" />
<java-symbol type="layout" name="status_bar_latest_event_ticker" />
<java-symbol type="layout" name="status_bar_latest_event_ticker_large_icon" />
<java-symbol type="layout" name="text_edit_action_popup_text" />
<java-symbol type="layout" name="text_drag_thumbnail" />
<java-symbol type="layout" name="typing_filter" />