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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ManageSpaceActivity.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.preferences.website; 5 package org.chromium.chrome.browser.preferences.website;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.ActivityManager; 9 import android.app.ActivityManager;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 private Button mClearUnimportantButton; 66 private Button mClearUnimportantButton;
67 private Button mManageSiteDataButton; 67 private Button mManageSiteDataButton;
68 private Button mClearAllDataButton; 68 private Button mClearAllDataButton;
69 // Stored for testing. 69 // Stored for testing.
70 private AlertDialog mUnimportantDialog; 70 private AlertDialog mUnimportantDialog;
71 71
72 private static boolean sActivityNotExportedChecked; 72 private static boolean sActivityNotExportedChecked;
73 73
74 private boolean mIsNativeInitialized; 74 private boolean mIsNativeInitialized;
75 75
76 @SuppressLint("CommitPrefEdits") 76 @SuppressLint({"ApplySharedPref", "CommitPrefEdits"})
77 @Override 77 @Override
78 protected void onCreate(Bundle savedInstanceState) { 78 protected void onCreate(Bundle savedInstanceState) {
79 ensureActivityNotExported(); 79 ensureActivityNotExported();
80 80
81 setContentView(R.layout.manage_space_activity); 81 setContentView(R.layout.manage_space_activity);
82 Resources r = getResources(); 82 Resources r = getResources();
83 setTitle(String.format(r.getString(R.string.storage_management_activity_ label), 83 setTitle(String.format(r.getString(R.string.storage_management_activity_ label),
84 r.getString(R.string.app_name))); 84 r.getString(R.string.app_name)));
85 85
86 mSiteDataSizeText = (TextView) findViewById(R.id.site_data_storage_size_ text); 86 mSiteDataSizeText = (TextView) findViewById(R.id.site_data_storage_size_ text);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 ActivityInfo activityInfo = getPackageManager().getActivityInfo(getC omponentName(), 0); 342 ActivityInfo activityInfo = getPackageManager().getActivityInfo(getC omponentName(), 0);
343 if (activityInfo.exported) { 343 if (activityInfo.exported) {
344 throw new IllegalStateException("ManageSpaceActivity must not be exported."); 344 throw new IllegalStateException("ManageSpaceActivity must not be exported.");
345 } 345 }
346 } catch (NameNotFoundException ex) { 346 } catch (NameNotFoundException ex) {
347 // Something terribly wrong has happened. 347 // Something terribly wrong has happened.
348 throw new RuntimeException(ex); 348 throw new RuntimeException(ex);
349 } 349 }
350 } 350 }
351 } 351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698