Switched the expanded button of the big content view
Previously it was always the same.
Change-Id: Iebfbf6203241356d5acdfa5b16b02f976c8ce310
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 97e3bf7..cdd6242 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3271,18 +3271,27 @@
* Construct a RemoteViews for the final big notification layout.
*/
public RemoteViews makeBigContentView() {
+ RemoteViews result = null;
if (mN.bigContentView != null) {
return mN.bigContentView;
} else if (mStyle != null) {
- final RemoteViews styleView = mStyle.makeBigContentView();
- if (styleView != null) {
- return styleView;
- }
+ result = mStyle.makeBigContentView();
} else if (mActions.size() == 0) {
return null;
}
+ if (result == null) {
+ result = applyStandardTemplateWithActions(getBigBaseLayoutResource());
+ }
+ adaptNotificationHeaderForBigContentView(result);
+ return result;
+ }
- return applyStandardTemplateWithActions(getBigBaseLayoutResource());
+ private void adaptNotificationHeaderForBigContentView(RemoteViews result) {
+ // We have to set the collapse button instead
+ result.setImageViewResource(R.id.expand_button, R.drawable.ic_arrow_up_14dp);
+ // Apply the color again
+ result.setDrawableParameters(R.id.expand_button, false, -1, resolveColor(),
+ PorterDuff.Mode.SRC_ATOP, -1);
}
/**
diff --git a/core/res/res/drawable/ic_arrow_up_14dp.xml b/core/res/res/drawable/ic_arrow_up_14dp.xml
new file mode 100644
index 0000000..c4cc0d1
--- /dev/null
+++ b/core/res/res/drawable/ic_arrow_up_14dp.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2015 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="14.0dp"
+ android:height="14.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M12.000000,8.000000l-6.000000,6.000000 1.400000,1.400000 4.600000,-4.599999 4.600000,4.599999 1.400000,-1.400000z"
+ android:fillColor="#FF000000"/>
+</vector>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c6bf9ce..763f61e 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2357,6 +2357,7 @@
<java-symbol type="id" name="expand_button" />
<java-symbol type="id" name="line2" />
<java-symbol type="id" name="notification_header" />
+ <java-symbol type="drawable" name="ic_arrow_up_14dp" />
<java-symbol type="dimen" name="notification_header_shrink_min_width" />
<java-symbol type="dimen" name="notification_content_margin_start" />
<java-symbol type="dimen" name="notification_content_margin_end" />