Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License |
| 15 | */ |
| 16 | |
Rohan Shah | 20790b8 | 2018-07-02 17:21:04 -0700 | [diff] [blame] | 17 | package com.android.systemui.statusbar.notification.row.wrapper; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 18 | |
Gus Prevas | ab33679 | 2018-11-14 13:52:20 -0500 | [diff] [blame] | 19 | import static com.android.systemui.statusbar.notification.TransformState.TRANSFORM_Y; |
Selim Cinek | 82b33a2 | 2018-05-04 18:05:33 -0700 | [diff] [blame] | 20 | |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 21 | import android.app.AppOpsManager; |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 22 | import android.app.Notification; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 23 | import android.content.Context; |
Adrian Roos | 7552441 | 2016-06-21 11:56:57 -0700 | [diff] [blame] | 24 | import android.util.ArraySet; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 25 | import android.view.NotificationHeaderView; |
| 26 | import android.view.View; |
Selim Cinek | 0ffbda6 | 2016-01-01 20:29:12 +0100 | [diff] [blame] | 27 | import android.view.ViewGroup; |
Selim Cinek | 5be6f33 | 2017-01-19 11:54:04 -0800 | [diff] [blame] | 28 | import android.view.animation.Interpolator; |
| 29 | import android.view.animation.PathInterpolator; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 30 | import android.widget.ImageView; |
Selim Cinek | 6743c0b | 2017-01-18 18:24:01 -0800 | [diff] [blame] | 31 | import android.widget.TextView; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 32 | |
Selim Cinek | 79d9863 | 2020-03-24 19:16:02 -0700 | [diff] [blame] | 33 | import com.android.internal.widget.CachingIconView; |
Selim Cinek | 69e76f9 | 2017-04-05 17:06:02 -0700 | [diff] [blame] | 34 | import com.android.internal.widget.NotificationExpandButton; |
Selim Cinek | 5be6f33 | 2017-01-19 11:54:04 -0800 | [diff] [blame] | 35 | import com.android.systemui.Interpolators; |
Anthony Chen | 0f6e96c | 2017-04-07 15:48:17 -0700 | [diff] [blame] | 36 | import com.android.systemui.R; |
Gus Prevas | ab33679 | 2018-11-14 13:52:20 -0500 | [diff] [blame] | 37 | import com.android.systemui.statusbar.TransformableView; |
| 38 | import com.android.systemui.statusbar.ViewTransformationHelper; |
Rohan Shah | 20790b8 | 2018-07-02 17:21:04 -0700 | [diff] [blame] | 39 | import com.android.systemui.statusbar.notification.CustomInterpolatorTransformation; |
| 40 | import com.android.systemui.statusbar.notification.ImageTransformState; |
Gus Prevas | 5142531 | 2018-11-15 15:16:14 -0500 | [diff] [blame] | 41 | import com.android.systemui.statusbar.notification.NotificationUtils; |
Rohan Shah | 20790b8 | 2018-07-02 17:21:04 -0700 | [diff] [blame] | 42 | import com.android.systemui.statusbar.notification.TransformState; |
| 43 | import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 44 | |
Selim Cinek | 0ffbda6 | 2016-01-01 20:29:12 +0100 | [diff] [blame] | 45 | import java.util.Stack; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 46 | |
| 47 | /** |
| 48 | * Wraps a notification header view. |
| 49 | */ |
| 50 | public class NotificationHeaderViewWrapper extends NotificationViewWrapper { |
| 51 | |
Selim Cinek | 5be6f33 | 2017-01-19 11:54:04 -0800 | [diff] [blame] | 52 | private static final Interpolator LOW_PRIORITY_HEADER_CLOSE |
| 53 | = new PathInterpolator(0.4f, 0f, 0.7f, 1f); |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 54 | |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 55 | protected final ViewTransformationHelper mTransformationHelper; |
| 56 | |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 57 | protected int mColor; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 58 | |
Selim Cinek | 79d9863 | 2020-03-24 19:16:02 -0700 | [diff] [blame] | 59 | private CachingIconView mIcon; |
Selim Cinek | 69e76f9 | 2017-04-05 17:06:02 -0700 | [diff] [blame] | 60 | private NotificationExpandButton mExpandButton; |
Selim Cinek | 4b259a1 | 2019-05-09 19:10:51 -0700 | [diff] [blame] | 61 | protected NotificationHeaderView mNotificationHeader; |
Selim Cinek | 6743c0b | 2017-01-18 18:24:01 -0800 | [diff] [blame] | 62 | private TextView mHeaderText; |
| 63 | private ImageView mWorkProfileImage; |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 64 | private View mCameraIcon; |
| 65 | private View mMicIcon; |
| 66 | private View mOverlayIcon; |
| 67 | private View mAppOps; |
Selim Cinek | a2b1d37 | 2020-03-31 17:54:19 -0700 | [diff] [blame] | 68 | private View mAudiblyAlertedIcon; |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 69 | |
Selim Cinek | 6743c0b | 2017-01-18 18:24:01 -0800 | [diff] [blame] | 70 | private boolean mIsLowPriority; |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 71 | private boolean mTransformLowPriorityTitle; |
Anthony Chen | 0f6e96c | 2017-04-07 15:48:17 -0700 | [diff] [blame] | 72 | private boolean mShowExpandButtonAtEnd; |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 73 | |
Selim Cinek | 7d1c63e | 2016-04-21 15:26:10 -0700 | [diff] [blame] | 74 | protected NotificationHeaderViewWrapper(Context ctx, View view, ExpandableNotificationRow row) { |
Adrian Roos | 7bcf6d3 | 2017-04-04 16:44:25 -0700 | [diff] [blame] | 75 | super(ctx, view, row); |
Anthony Chen | 0f6e96c | 2017-04-07 15:48:17 -0700 | [diff] [blame] | 76 | mShowExpandButtonAtEnd = ctx.getResources().getBoolean( |
Gus Prevas | 5142531 | 2018-11-15 15:16:14 -0500 | [diff] [blame] | 77 | R.bool.config_showNotificationExpandButtonAtEnd) |
| 78 | || NotificationUtils.useNewInterruptionModel(ctx); |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 79 | mTransformationHelper = new ViewTransformationHelper(); |
Selim Cinek | 5be6f33 | 2017-01-19 11:54:04 -0800 | [diff] [blame] | 80 | |
| 81 | // we want to avoid that the header clashes with the other text when transforming |
| 82 | // low-priority |
| 83 | mTransformationHelper.setCustomTransformation( |
| 84 | new CustomInterpolatorTransformation(TRANSFORMING_VIEW_TITLE) { |
| 85 | |
| 86 | @Override |
| 87 | public Interpolator getCustomInterpolator(int interpolationType, |
| 88 | boolean isFrom) { |
| 89 | boolean isLowPriority = mView instanceof NotificationHeaderView; |
| 90 | if (interpolationType == TRANSFORM_Y) { |
| 91 | if (isLowPriority && !isFrom |
| 92 | || !isLowPriority && isFrom) { |
| 93 | return Interpolators.LINEAR_OUT_SLOW_IN; |
| 94 | } else { |
| 95 | return LOW_PRIORITY_HEADER_CLOSE; |
| 96 | } |
| 97 | } |
| 98 | return null; |
| 99 | } |
| 100 | |
| 101 | @Override |
| 102 | protected boolean hasCustomTransformation() { |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 103 | return mIsLowPriority && mTransformLowPriorityTitle; |
Selim Cinek | 5be6f33 | 2017-01-19 11:54:04 -0800 | [diff] [blame] | 104 | } |
| 105 | }, TRANSFORMING_VIEW_TITLE); |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 106 | resolveHeaderViews(); |
Julia Reynolds | b586745 | 2018-02-28 16:31:35 -0500 | [diff] [blame] | 107 | addAppOpsOnClickListener(row); |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | protected void resolveHeaderViews() { |
Selim Cinek | 69e76f9 | 2017-04-05 17:06:02 -0700 | [diff] [blame] | 111 | mIcon = mView.findViewById(com.android.internal.R.id.icon); |
| 112 | mHeaderText = mView.findViewById(com.android.internal.R.id.header_text); |
| 113 | mExpandButton = mView.findViewById(com.android.internal.R.id.expand_button); |
Selim Cinek | 69e76f9 | 2017-04-05 17:06:02 -0700 | [diff] [blame] | 114 | mWorkProfileImage = mView.findViewById(com.android.internal.R.id.profile_badge); |
Selim Cinek | 69e76f9 | 2017-04-05 17:06:02 -0700 | [diff] [blame] | 115 | mNotificationHeader = mView.findViewById(com.android.internal.R.id.notification_header); |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 116 | mCameraIcon = mView.findViewById(com.android.internal.R.id.camera); |
| 117 | mMicIcon = mView.findViewById(com.android.internal.R.id.mic); |
| 118 | mOverlayIcon = mView.findViewById(com.android.internal.R.id.overlay); |
| 119 | mAppOps = mView.findViewById(com.android.internal.R.id.app_ops); |
Selim Cinek | a2b1d37 | 2020-03-31 17:54:19 -0700 | [diff] [blame] | 120 | mAudiblyAlertedIcon = mView.findViewById(com.android.internal.R.id.alerted_icon); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 121 | if (mNotificationHeader != null) { |
| 122 | mNotificationHeader.setShowExpandButtonAtEnd(mShowExpandButtonAtEnd); |
| 123 | mColor = mNotificationHeader.getOriginalIconColor(); |
| 124 | } |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 125 | } |
| 126 | |
Julia Reynolds | b586745 | 2018-02-28 16:31:35 -0500 | [diff] [blame] | 127 | private void addAppOpsOnClickListener(ExpandableNotificationRow row) { |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 128 | View.OnClickListener listener = row.getAppOpsOnClickListener(); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 129 | if (mNotificationHeader != null) { |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 130 | mNotificationHeader.setAppOpsOnClickListener(listener); |
| 131 | } |
Selim Cinek | 78c8731 | 2020-04-03 12:30:03 -0700 | [diff] [blame] | 132 | if (mAppOps != null) { |
| 133 | mAppOps.setOnClickListener(listener); |
| 134 | } |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | /** |
| 138 | * Shows or hides 'app op in use' icons based on app usage. |
| 139 | */ |
| 140 | @Override |
| 141 | public void showAppOpsIcons(ArraySet<Integer> appOps) { |
| 142 | if (appOps == null) { |
| 143 | return; |
| 144 | } |
| 145 | if (mOverlayIcon != null) { |
| 146 | mOverlayIcon.setVisibility(appOps.contains(AppOpsManager.OP_SYSTEM_ALERT_WINDOW) |
| 147 | ? View.VISIBLE : View.GONE); |
| 148 | } |
| 149 | if (mCameraIcon != null) { |
| 150 | mCameraIcon.setVisibility(appOps.contains(AppOpsManager.OP_CAMERA) |
| 151 | ? View.VISIBLE : View.GONE); |
| 152 | } |
| 153 | if (mMicIcon != null) { |
| 154 | mMicIcon.setVisibility(appOps.contains(AppOpsManager.OP_RECORD_AUDIO) |
| 155 | ? View.VISIBLE : View.GONE); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 156 | } |
Julia Reynolds | b586745 | 2018-02-28 16:31:35 -0500 | [diff] [blame] | 157 | } |
| 158 | |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 159 | @Override |
Selim Cinek | 131f1a4 | 2017-06-05 17:50:19 -0700 | [diff] [blame] | 160 | public void onContentUpdated(ExpandableNotificationRow row) { |
| 161 | super.onContentUpdated(row); |
Selim Cinek | 792eb06 | 2020-04-08 12:36:43 -0700 | [diff] [blame] | 162 | mIsLowPriority = row.getEntry().isAmbient(); |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 163 | mTransformLowPriorityTitle = !row.isChildInGroup() && !row.isSummaryWithChildren(); |
Adrian Roos | 7552441 | 2016-06-21 11:56:57 -0700 | [diff] [blame] | 164 | ArraySet<View> previousViews = mTransformationHelper.getAllTransformingViews(); |
| 165 | |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 166 | // Reinspect the notification. |
| 167 | resolveHeaderViews(); |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 168 | updateTransformedTypes(); |
Selim Cinek | 646d205 | 2016-01-03 14:42:02 +0800 | [diff] [blame] | 169 | addRemainingTransformTypes(); |
Selim Cinek | 0ffbda6 | 2016-01-01 20:29:12 +0100 | [diff] [blame] | 170 | updateCropToPaddingForImageViews(); |
Ned Burns | 1c2b85a4 | 2019-11-14 15:37:03 -0500 | [diff] [blame] | 171 | Notification notification = row.getEntry().getSbn().getNotification(); |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 172 | mIcon.setTag(ImageTransformState.ICON_TAG, notification.getSmallIcon()); |
Adrian Roos | 7552441 | 2016-06-21 11:56:57 -0700 | [diff] [blame] | 173 | |
| 174 | // We need to reset all views that are no longer transforming in case a view was previously |
| 175 | // transformed, but now we decided to transform its container instead. |
| 176 | ArraySet<View> currentViews = mTransformationHelper.getAllTransformingViews(); |
| 177 | for (int i = 0; i < previousViews.size(); i++) { |
| 178 | View view = previousViews.valueAt(i); |
| 179 | if (!currentViews.contains(view)) { |
| 180 | mTransformationHelper.resetTransformedView(view); |
| 181 | } |
| 182 | } |
Selim Cinek | 0ffbda6 | 2016-01-01 20:29:12 +0100 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | /** |
Selim Cinek | 646d205 | 2016-01-03 14:42:02 +0800 | [diff] [blame] | 186 | * Adds the remaining TransformTypes to the TransformHelper. This is done to make sure that each |
| 187 | * child is faded automatically and doesn't have to be manually added. |
| 188 | * The keys used for the views are the ids. |
| 189 | */ |
| 190 | private void addRemainingTransformTypes() { |
| 191 | mTransformationHelper.addRemainingTransformTypes(mView); |
| 192 | } |
| 193 | |
| 194 | /** |
Selim Cinek | 0ffbda6 | 2016-01-01 20:29:12 +0100 | [diff] [blame] | 195 | * Since we are deactivating the clipping when transforming the ImageViews don't get clipped |
| 196 | * anymore during these transitions. We can avoid that by using |
| 197 | * {@link ImageView#setCropToPadding(boolean)} on all ImageViews. |
| 198 | */ |
| 199 | private void updateCropToPaddingForImageViews() { |
| 200 | Stack<View> stack = new Stack<>(); |
| 201 | stack.push(mView); |
| 202 | while (!stack.isEmpty()) { |
| 203 | View child = stack.pop(); |
| 204 | if (child instanceof ImageView) { |
| 205 | ((ImageView) child).setCropToPadding(true); |
| 206 | } else if (child instanceof ViewGroup){ |
| 207 | ViewGroup group = (ViewGroup) child; |
| 208 | for (int i = 0; i < group.getChildCount(); i++) { |
| 209 | stack.push(group.getChildAt(i)); |
| 210 | } |
| 211 | } |
| 212 | } |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 213 | } |
| 214 | |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 215 | protected void updateTransformedTypes() { |
| 216 | mTransformationHelper.reset(); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 217 | mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_ICON, |
| 218 | mIcon); |
Selim Cinek | ecf248f | 2020-03-20 16:17:21 -0700 | [diff] [blame] | 219 | mTransformationHelper.addViewTransformingToSimilar(mWorkProfileImage); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 220 | if (mIsLowPriority && mHeaderText != null) { |
Selim Cinek | 6743c0b | 2017-01-18 18:24:01 -0800 | [diff] [blame] | 221 | mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_TITLE, |
| 222 | mHeaderText); |
| 223 | } |
Selim Cinek | 4237e82 | 2020-03-31 17:22:28 -0700 | [diff] [blame] | 224 | if (mCameraIcon != null) { |
| 225 | mTransformationHelper.addViewTransformingToSimilar(mCameraIcon); |
| 226 | } |
| 227 | if (mMicIcon != null) { |
| 228 | mTransformationHelper.addViewTransformingToSimilar(mMicIcon); |
| 229 | } |
| 230 | if (mOverlayIcon != null) { |
| 231 | mTransformationHelper.addViewTransformingToSimilar(mOverlayIcon); |
| 232 | } |
Selim Cinek | a2b1d37 | 2020-03-31 17:54:19 -0700 | [diff] [blame] | 233 | if (mAudiblyAlertedIcon != null) { |
| 234 | mTransformationHelper.addViewTransformingToSimilar(mAudiblyAlertedIcon); |
| 235 | } |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | @Override |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 239 | public void updateExpandability(boolean expandable, View.OnClickListener onClickListener) { |
| 240 | mExpandButton.setVisibility(expandable ? View.VISIBLE : View.GONE); |
Selim Cinek | 20d1ee2 | 2020-02-03 16:04:26 -0500 | [diff] [blame] | 241 | if (mNotificationHeader != null) { |
| 242 | mNotificationHeader.setOnClickListener(expandable ? onClickListener : null); |
| 243 | } |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 244 | } |
| 245 | |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 246 | @Override |
Selim Cinek | a2b1d37 | 2020-03-31 17:54:19 -0700 | [diff] [blame] | 247 | public void setRecentlyAudiblyAlerted(boolean audiblyAlerted) { |
| 248 | if (mAudiblyAlertedIcon != null) { |
| 249 | mAudiblyAlertedIcon.setVisibility(audiblyAlerted ? View.VISIBLE : View.GONE); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | @Override |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 254 | public NotificationHeaderView getNotificationHeader() { |
| 255 | return mNotificationHeader; |
| 256 | } |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 257 | |
| 258 | @Override |
Selim Cinek | 79d9863 | 2020-03-24 19:16:02 -0700 | [diff] [blame] | 259 | public int getOriginalIconColor() { |
| 260 | return mIcon.getOriginalIconColor(); |
| 261 | } |
| 262 | |
| 263 | @Override |
| 264 | public View getShelfTransformationTarget() { |
| 265 | return mIcon; |
| 266 | } |
| 267 | |
| 268 | @Override |
Selim Cinek | 9ed6e04 | 2020-03-26 15:45:51 -0700 | [diff] [blame] | 269 | public void setShelfIconVisible(boolean visible) { |
| 270 | super.setShelfIconVisible(visible); |
| 271 | mIcon.setForceHidden(visible); |
Selim Cinek | 79d9863 | 2020-03-24 19:16:02 -0700 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | @Override |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 275 | public TransformState getCurrentState(int fadingView) { |
| 276 | return mTransformationHelper.getCurrentState(fadingView); |
| 277 | } |
| 278 | |
| 279 | @Override |
| 280 | public void transformTo(TransformableView notification, Runnable endRunnable) { |
| 281 | mTransformationHelper.transformTo(notification, endRunnable); |
| 282 | } |
| 283 | |
| 284 | @Override |
Selim Cinek | 8f2f6a6 | 2016-02-23 19:56:31 -0800 | [diff] [blame] | 285 | public void transformTo(TransformableView notification, float transformationAmount) { |
| 286 | mTransformationHelper.transformTo(notification, transformationAmount); |
| 287 | } |
| 288 | |
| 289 | @Override |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 290 | public void transformFrom(TransformableView notification) { |
| 291 | mTransformationHelper.transformFrom(notification); |
| 292 | } |
| 293 | |
| 294 | @Override |
Selim Cinek | 8f2f6a6 | 2016-02-23 19:56:31 -0800 | [diff] [blame] | 295 | public void transformFrom(TransformableView notification, float transformationAmount) { |
| 296 | mTransformationHelper.transformFrom(notification, transformationAmount); |
| 297 | } |
| 298 | |
| 299 | @Override |
Selim Cinek | 414ad33 | 2017-02-24 19:06:12 -0800 | [diff] [blame] | 300 | public void setIsChildInGroup(boolean isChildInGroup) { |
| 301 | super.setIsChildInGroup(isChildInGroup); |
| 302 | mTransformLowPriorityTitle = !isChildInGroup; |
| 303 | } |
| 304 | |
| 305 | @Override |
Selim Cinek | 4ffd636 | 2015-12-29 15:12:23 +0100 | [diff] [blame] | 306 | public void setVisible(boolean visible) { |
| 307 | super.setVisible(visible); |
| 308 | mTransformationHelper.setVisible(visible); |
| 309 | } |
Selim Cinek | 9c7712d | 2015-12-08 19:19:48 -0800 | [diff] [blame] | 310 | } |