Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698