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

Unified Diff: ui/android/java/src/org/chromium/ui/UiUtils.java

Issue 2632103002: (Android) Replacing deprecated API with current (Closed)
Patch Set: Indentation fix after previous patch set Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/android/java/src/org/chromium/ui/UiUtils.java
diff --git a/ui/android/java/src/org/chromium/ui/UiUtils.java b/ui/android/java/src/org/chromium/ui/UiUtils.java
index 4522ec45677710936c72f75d01c1bc13776c7cff..61fa37f2cf3329ee49812dae8339a9d63282d62e 100644
--- a/ui/android/java/src/org/chromium/ui/UiUtils.java
+++ b/ui/android/java/src/org/chromium/ui/UiUtils.java
@@ -8,7 +8,6 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
-import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
@@ -22,7 +21,7 @@ import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
-import org.chromium.base.ContentUriUtils;
+import org.chromium.base.ApiCompatibilityUtils;
import java.io.File;
import java.io.IOException;
@@ -164,7 +163,7 @@ public class UiUtils {
imManager.getEnabledInputMethodSubtypeList(enabledMethods.get(i), true);
if (subtypes == null) continue;
for (int j = 0; j < subtypes.size(); j++) {
- String locale = subtypes.get(j).getLocale();
+ String locale = ApiCompatibilityUtils.getLocale(subtypes.get(j));
if (!TextUtils.isEmpty(locale)) locales.add(locale);
}
}
@@ -321,20 +320,6 @@ public class UiUtils {
}
/**
- * Get a URI for |file| which has the image capture. This function assumes that path of |file|
- * is based on the result of UiUtils.getDirectoryForImageCapture().
- *
- * @param context The application context.
- * @param file image capture file.
- * @return URI for |file|.
- */
- public static Uri getUriForImageCaptureFile(Context context, File file) {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
- ? ContentUriUtils.getContentUriFromFile(context, file)
- : Uri.fromFile(file);
- }
-
- /**
* Removes the view from its parent {@link ViewGroup}. No-op if the {@link View} is not yet
* attached to the view hierarchy.
*

Powered by Google App Engine
This is Rietveld 408576698