OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.media.ui; | 5 package org.chromium.chrome.browser.media.ui; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 /** | 39 /** |
40 * The invalid notification id. | 40 * The invalid notification id. |
41 */ | 41 */ |
42 public static final int INVALID_ID = -1; | 42 public static final int INVALID_ID = -1; |
43 | 43 |
44 /** | 44 /** |
45 * Use this class to construct an instance of {@link MediaNotificationInfo}. | 45 * Use this class to construct an instance of {@link MediaNotificationInfo}. |
46 */ | 46 */ |
47 public static final class Builder { | 47 public static final class Builder { |
48 | 48 |
49 private MediaMetadata mMetadata = null; | 49 private MediaMetadata mMetadata; |
50 private boolean mIsPaused = false; | 50 private boolean mIsPaused; |
51 private String mOrigin = ""; | 51 private String mOrigin = ""; |
52 private int mTabId = Tab.INVALID_TAB_ID; | 52 private int mTabId = Tab.INVALID_TAB_ID; |
53 private boolean mIsPrivate = true; | 53 private boolean mIsPrivate = true; |
54 private int mIcon = 0; | 54 private int mIcon; |
55 private Bitmap mLargeIcon = null; | 55 private Bitmap mLargeIcon; |
56 private int mDefaultLargeIcon = 0; | 56 private int mDefaultLargeIcon; |
57 private int mActions = ACTION_PLAY_PAUSE | ACTION_SWIPEAWAY; | 57 private int mActions = ACTION_PLAY_PAUSE | ACTION_SWIPEAWAY; |
58 private int mId = INVALID_ID; | 58 private int mId = INVALID_ID; |
59 private Intent mContentIntent = null; | 59 private Intent mContentIntent; |
60 private MediaNotificationListener mListener = null; | 60 private MediaNotificationListener mListener; |
61 private Set<Integer> mMediaSessionActions = null; | 61 private Set<Integer> mMediaSessionActions; |
62 | 62 |
63 /** | 63 /** |
64 * Initializes the builder with the default values. | 64 * Initializes the builder with the default values. |
65 */ | 65 */ |
66 public Builder() { | 66 public Builder() { |
67 } | 67 } |
68 | 68 |
69 public MediaNotificationInfo build() { | 69 public MediaNotificationInfo build() { |
70 assert mMetadata != null; | 70 assert mMetadata != null; |
71 assert mOrigin != null; | 71 assert mOrigin != null; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 result = 31 * result + icon; | 305 result = 31 * result + icon; |
306 result = 31 * result + (largeIcon == null ? 0 : largeIcon.hashCode()); | 306 result = 31 * result + (largeIcon == null ? 0 : largeIcon.hashCode()); |
307 result = 31 * result + defaultLargeIcon; | 307 result = 31 * result + defaultLargeIcon; |
308 result = 31 * result + mActions; | 308 result = 31 * result + mActions; |
309 result = 31 * result + id; | 309 result = 31 * result + id; |
310 result = 31 * result + listener.hashCode(); | 310 result = 31 * result + listener.hashCode(); |
311 result = 31 * result + mediaSessionActions.hashCode(); | 311 result = 31 * result + mediaSessionActions.hashCode(); |
312 return result; | 312 return result; |
313 } | 313 } |
314 } | 314 } |
OLD | NEW |