Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 850a854c authored by Selim Cinek's avatar Selim Cinek
Browse files

Switched the expanded button of the big content view

Previously it was always the same.

Change-Id: Iebfbf6203241356d5acdfa5b16b02f976c8ce310
parent 90c8f47a
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -3271,18 +3271,27 @@ public class Notification implements Parcelable
         * 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);
        }

        /**
+24 −0
Original line number Diff line number Diff line
<!--
  ~ 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>
+1 −0
Original line number Diff line number Diff line
@@ -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" />