Loading api/current.xml +13 −13 Original line number Diff line number Diff line Loading @@ -32774,6 +32774,19 @@ <parameter name="highPriority" type="boolean"> </parameter> </method> <method name="setIconNumber" return="android.app.Notification.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="number" type="int"> </parameter> </method> <method name="setLargeIcon" return="android.app.Notification.Builder" abstract="false" Loading Loading @@ -32858,19 +32871,6 @@ <parameter name="level" type="int"> </parameter> </method> <method name="setSmallIconNumber" return="android.app.Notification.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="number" type="int"> </parameter> </method> <method name="setSound" return="android.app.Notification.Builder" abstract="false" core/java/android/app/Notification.java +20 −11 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app; import java.text.NumberFormat; import java.util.Date; import android.app.PendingIntent; Loading @@ -30,6 +31,7 @@ import android.text.TextUtils; import android.text.format.DateFormat; import android.text.format.DateUtils; import android.util.Slog; import android.view.View; import android.widget.RemoteViews; /** Loading Loading @@ -607,7 +609,7 @@ public class Notification implements Parcelable private long mWhen; private int mSmallIcon; private int mSmallIconLevel; private int mSmallIconNumber; private int mNumber; private CharSequence mContentTitle; private CharSequence mContentText; private CharSequence mContentInfo; Loading Loading @@ -648,11 +650,6 @@ public class Notification implements Parcelable return this; } public Builder setSmallIconNumber(int number) { mSmallIconNumber = number; return this; } public Builder setContentTitle(CharSequence title) { mContentTitle = title; return this; Loading @@ -663,6 +660,11 @@ public class Notification implements Parcelable return this; } public Builder setNumber(int number) { mNumber = number; return this; } public Builder setContentInfo(CharSequence info) { mContentInfo = info; return this; Loading Loading @@ -767,10 +769,17 @@ public class Notification implements Parcelable if (mContentText != null) { contentView.setTextViewText(com.android.internal.R.id.text, mContentText); } //TODO //if (mContentInfo) { // contentVeiw.setTextViewText(com.android.internal.R.id.info, mContentInfo); //} if (mContentInfo != null) { contentView.setTextViewText(com.android.internal.R.id.info, mContentInfo); } else if (mNumber > 0) { NumberFormat f = NumberFormat.getIntegerInstance(); contentView.setTextViewText(com.android.internal.R.id.info, f.format(mNumber)); contentView.setFloat(com.android.internal.R.id.info, "setTextSize", mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_content_number_size)); } else { contentView.setViewVisibility(com.android.internal.R.id.info, View.GONE); } if (mWhen != 0) { contentView.setLong(com.android.internal.R.id.time, "setTime", mWhen); } Loading @@ -791,7 +800,7 @@ public class Notification implements Parcelable n.when = mWhen; n.icon = mSmallIcon; n.iconLevel = mSmallIconLevel; n.number = mSmallIconNumber; n.number = mNumber; n.contentView = makeContentView(); n.contentIntent = mContentIntent; n.deleteIntent = mDeleteIntent; Loading core/res/res/layout-xlarge/status_bar_latest_event_content.xml +9 −5 Original line number Diff line number Diff line Loading @@ -6,8 +6,6 @@ <ImageView android:id="@+id/icon" android:layout_width="48dp" android:layout_height="64dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:scaleType="center" /> Loading Loading @@ -37,5 +35,11 @@ android:fadingEdge="horizontal" /> </LinearLayout> <TextView android:id="@+id/info" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" /> </LinearLayout> core/res/res/values-xlarge/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ <dimen name="status_bar_height">48dip</dimen> <!-- Height of the status bar --> <dimen name="status_bar_icon_size">48dip</dimen> <!-- Size of the giant number (unread count) in the notifications --> <dimen name="status_bar_content_number_size">48sp</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">48dip</dimen> Loading core/res/res/values/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -213,12 +213,17 @@ <item name="android:textStyle">bold</item> </style> <style name="TextAppearance.StatusBar.EventContent"> <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> </style> <style name="TextAppearance.StatusBar.EventContent.Title"> <item name="android:textSize">18sp</item> <item name="android:textStyle">bold</item> </style> <style name="TextAppearance.StatusBar.EventContent.Info"> <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> <item name="android:textColor">#ff272727</item> </style> <!-- Widget Styles --> Loading Loading
api/current.xml +13 −13 Original line number Diff line number Diff line Loading @@ -32774,6 +32774,19 @@ <parameter name="highPriority" type="boolean"> </parameter> </method> <method name="setIconNumber" return="android.app.Notification.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="number" type="int"> </parameter> </method> <method name="setLargeIcon" return="android.app.Notification.Builder" abstract="false" Loading Loading @@ -32858,19 +32871,6 @@ <parameter name="level" type="int"> </parameter> </method> <method name="setSmallIconNumber" return="android.app.Notification.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="number" type="int"> </parameter> </method> <method name="setSound" return="android.app.Notification.Builder" abstract="false"
core/java/android/app/Notification.java +20 −11 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app; import java.text.NumberFormat; import java.util.Date; import android.app.PendingIntent; Loading @@ -30,6 +31,7 @@ import android.text.TextUtils; import android.text.format.DateFormat; import android.text.format.DateUtils; import android.util.Slog; import android.view.View; import android.widget.RemoteViews; /** Loading Loading @@ -607,7 +609,7 @@ public class Notification implements Parcelable private long mWhen; private int mSmallIcon; private int mSmallIconLevel; private int mSmallIconNumber; private int mNumber; private CharSequence mContentTitle; private CharSequence mContentText; private CharSequence mContentInfo; Loading Loading @@ -648,11 +650,6 @@ public class Notification implements Parcelable return this; } public Builder setSmallIconNumber(int number) { mSmallIconNumber = number; return this; } public Builder setContentTitle(CharSequence title) { mContentTitle = title; return this; Loading @@ -663,6 +660,11 @@ public class Notification implements Parcelable return this; } public Builder setNumber(int number) { mNumber = number; return this; } public Builder setContentInfo(CharSequence info) { mContentInfo = info; return this; Loading Loading @@ -767,10 +769,17 @@ public class Notification implements Parcelable if (mContentText != null) { contentView.setTextViewText(com.android.internal.R.id.text, mContentText); } //TODO //if (mContentInfo) { // contentVeiw.setTextViewText(com.android.internal.R.id.info, mContentInfo); //} if (mContentInfo != null) { contentView.setTextViewText(com.android.internal.R.id.info, mContentInfo); } else if (mNumber > 0) { NumberFormat f = NumberFormat.getIntegerInstance(); contentView.setTextViewText(com.android.internal.R.id.info, f.format(mNumber)); contentView.setFloat(com.android.internal.R.id.info, "setTextSize", mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_content_number_size)); } else { contentView.setViewVisibility(com.android.internal.R.id.info, View.GONE); } if (mWhen != 0) { contentView.setLong(com.android.internal.R.id.time, "setTime", mWhen); } Loading @@ -791,7 +800,7 @@ public class Notification implements Parcelable n.when = mWhen; n.icon = mSmallIcon; n.iconLevel = mSmallIconLevel; n.number = mSmallIconNumber; n.number = mNumber; n.contentView = makeContentView(); n.contentIntent = mContentIntent; n.deleteIntent = mDeleteIntent; Loading
core/res/res/layout-xlarge/status_bar_latest_event_content.xml +9 −5 Original line number Diff line number Diff line Loading @@ -6,8 +6,6 @@ <ImageView android:id="@+id/icon" android:layout_width="48dp" android:layout_height="64dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:scaleType="center" /> Loading Loading @@ -37,5 +35,11 @@ android:fadingEdge="horizontal" /> </LinearLayout> <TextView android:id="@+id/info" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" /> </LinearLayout>
core/res/res/values-xlarge/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ <dimen name="status_bar_height">48dip</dimen> <!-- Height of the status bar --> <dimen name="status_bar_icon_size">48dip</dimen> <!-- Size of the giant number (unread count) in the notifications --> <dimen name="status_bar_content_number_size">48sp</dimen> <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. --> <!-- Margin for permanent screen decorations at the bottom. --> <dimen name="screen_margin_bottom">48dip</dimen> Loading
core/res/res/values/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -213,12 +213,17 @@ <item name="android:textStyle">bold</item> </style> <style name="TextAppearance.StatusBar.EventContent"> <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> </style> <style name="TextAppearance.StatusBar.EventContent.Title"> <item name="android:textSize">18sp</item> <item name="android:textStyle">bold</item> </style> <style name="TextAppearance.StatusBar.EventContent.Info"> <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> <item name="android:textColor">#ff272727</item> </style> <!-- Widget Styles --> Loading