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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java

Issue 597283007: Suppress lint warning "SdCardPath" for getRawAcceptableDirectories() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint;
7 import android.content.Context; 8 import android.content.Context;
8 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
9 import android.media.MediaMetadataRetriever; 10 import android.media.MediaMetadataRetriever;
10 import android.net.ConnectivityManager; 11 import android.net.ConnectivityManager;
11 import android.net.NetworkInfo; 12 import android.net.NetworkInfo;
12 import android.os.ParcelFileDescriptor; 13 import android.os.ParcelFileDescriptor;
13 import android.text.TextUtils; 14 import android.text.TextUtils;
14 import android.util.Log; 15 import android.util.Log;
15 16
16 import org.chromium.base.CalledByNative; 17 import org.chromium.base.CalledByNative;
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 return null; 354 return null;
354 } 355 }
355 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); 356 NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
356 if (info == null) { 357 if (info == null) {
357 Log.d(TAG, "no active network"); 358 Log.d(TAG, "no active network");
358 return null; 359 return null;
359 } 360 }
360 return info.getType(); 361 return info.getType();
361 } 362 }
362 363
364 @SuppressLint("SdCardPath")
363 private List<String> getRawAcceptableDirectories(Context context) { 365 private List<String> getRawAcceptableDirectories(Context context) {
364 List<String> result = new ArrayList<String>(); 366 List<String> result = new ArrayList<String>();
365 result.add("/mnt/sdcard/"); 367 result.add("/mnt/sdcard/");
366 result.add("/sdcard/"); 368 result.add("/sdcard/");
367 result.add("/data/data/" + context.getPackageName() + "/cache/"); 369 result.add("/data/data/" + context.getPackageName() + "/cache/");
368 return result; 370 return result;
369 } 371 }
370 372
371 private List<String> canonicalize(List<String> paths) { 373 private List<String> canonicalize(List<String> paths) {
372 List<String> result = new ArrayList<String>(paths.size()); 374 List<String> result = new ArrayList<String>(paths.size());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 @VisibleForTesting 412 @VisibleForTesting
411 void configure(String path) { 413 void configure(String path) {
412 mRetriever.setDataSource(path); 414 mRetriever.setDataSource(path);
413 } 415 }
414 416
415 @VisibleForTesting 417 @VisibleForTesting
416 String extractMetadata(int key) { 418 String extractMetadata(int key) {
417 return mRetriever.extractMetadata(key); 419 return mRetriever.extractMetadata(key);
418 } 420 }
419 } 421 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698