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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/accessibility/AccessibilityTabModelListItem.java

Issue 2830843004: Update to newer Android Lint and suppress new Lint errors (Closed)
Patch Set: rebase Created 3 years, 7 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.widget.accessibility; 5 package org.chromium.chrome.browser.widget.accessibility;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.AnimatorSet; 9 import android.animation.AnimatorSet;
10 import android.animation.ObjectAnimator; 10 import android.animation.ObjectAnimator;
11 import android.annotation.SuppressLint;
11 import android.content.Context; 12 import android.content.Context;
12 import android.graphics.Bitmap; 13 import android.graphics.Bitmap;
13 import android.os.Handler; 14 import android.os.Handler;
14 import android.text.TextUtils; 15 import android.text.TextUtils;
15 import android.util.AttributeSet; 16 import android.util.AttributeSet;
16 import android.view.GestureDetector; 17 import android.view.GestureDetector;
17 import android.view.MotionEvent; 18 import android.view.MotionEvent;
18 import android.view.View; 19 import android.view.View;
19 import android.view.View.OnClickListener; 20 import android.view.View.OnClickListener;
20 import android.view.ViewGroup; 21 import android.view.ViewGroup;
21 import android.widget.AbsListView; 22 import android.widget.AbsListView;
22 import android.widget.Button; 23 import android.widget.Button;
23 import android.widget.FrameLayout; 24 import android.widget.FrameLayout;
24 import android.widget.ImageButton; 25 import android.widget.ImageButton;
25 import android.widget.ImageView; 26 import android.widget.ImageView;
26 import android.widget.LinearLayout; 27 import android.widget.LinearLayout;
27 import android.widget.TextView; 28 import android.widget.TextView;
28 29
29 import org.chromium.base.VisibleForTesting; 30 import org.chromium.base.VisibleForTesting;
31 import org.chromium.base.annotations.UsedByReflection;
30 import org.chromium.chrome.R; 32 import org.chromium.chrome.R;
31 import org.chromium.chrome.browser.tab.EmptyTabObserver; 33 import org.chromium.chrome.browser.tab.EmptyTabObserver;
32 import org.chromium.chrome.browser.tab.Tab; 34 import org.chromium.chrome.browser.tab.Tab;
33 import org.chromium.chrome.browser.tab.TabObserver; 35 import org.chromium.chrome.browser.tab.TabObserver;
34 36
35 /** 37 /**
36 * A widget that shows a single row of the {@link AccessibilityTabModelListView} list. 38 * A widget that shows a single row of the {@link AccessibilityTabModelListView} list.
37 * This list shows both the title of the {@link Tab} as well as a close button t o close 39 * This list shows both the title of the {@link Tab} as well as a close button t o close
38 * the tab. 40 * the tab.
39 */ 41 */
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return true; 398 return true;
397 } 399 }
398 return super.onTouchEvent(e); 400 return super.onTouchEvent(e);
399 } 401 }
400 402
401 /** 403 /**
402 * This call is exposed for the benefit of the animators. 404 * This call is exposed for the benefit of the animators.
403 * 405 *
404 * @param height The height of the current view. 406 * @param height The height of the current view.
405 */ 407 */
408 @SuppressLint("AnimatorKeep")
409 @UsedByReflection("")
406 public void setHeight(int height) { 410 public void setHeight(int height) {
407 AbsListView.LayoutParams params = (AbsListView.LayoutParams) getLayoutPa rams(); 411 AbsListView.LayoutParams params = (AbsListView.LayoutParams) getLayoutPa rams();
408 if (params == null) { 412 if (params == null) {
409 params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_P ARENT, height); 413 params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_P ARENT, height);
410 } else { 414 } else {
411 if (params.height == height) return; 415 if (params.height == height) return;
412 params.height = height; 416 params.height = height;
413 } 417 }
414 setLayoutParams(params); 418 setLayoutParams(params);
415 } 419 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 private void cancelRunningAnimation() { 567 private void cancelRunningAnimation() {
564 if (mActiveAnimation != null && mActiveAnimation.isRunning()) mActiveAni mation.cancel(); 568 if (mActiveAnimation != null && mActiveAnimation.isRunning()) mActiveAni mation.cancel();
565 569
566 mActiveAnimation = null; 570 mActiveAnimation = null;
567 } 571 }
568 572
569 private void notifyTabUpdated(Tab tab) { 573 private void notifyTabUpdated(Tab tab) {
570 if (mListener != null) mListener.tabChanged(tab.getId()); 574 if (mListener != null) mListener.tabChanged(tab.getId());
571 } 575 }
572 } 576 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698