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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java

Issue 2894523004: Photo Picker dialog: Add a test. (Closed)
Patch Set: Fix vector drawable error 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.init; 5 package org.chromium.chrome.browser.init;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.SharedPreferences; 9 import android.content.SharedPreferences;
10 import android.os.AsyncTask; 10 import android.os.AsyncTask;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 PrefServiceBridge.getInstance().migratePreferences(application); 216 PrefServiceBridge.getInstance().migratePreferences(application);
217 217
218 if (ChromeFeatureList.isEnabled(ChromeFeatureList.NEW_PHOTO_PICKER)) { 218 if (ChromeFeatureList.isEnabled(ChromeFeatureList.NEW_PHOTO_PICKER)) {
219 UiUtils.setPhotoPickerDelegate(new UiUtils.PhotoPickerDelegate() { 219 UiUtils.setPhotoPickerDelegate(new UiUtils.PhotoPickerDelegate() {
220 private PhotoPickerDialog mDialog; 220 private PhotoPickerDialog mDialog;
221 221
222 @Override 222 @Override
223 public void showPhotoPicker( 223 public void showPhotoPicker(
224 Context context, PhotoPickerListener listener, boolean a llowMultiple) { 224 Context context, PhotoPickerListener listener, boolean a llowMultiple) {
225 mDialog = new PhotoPickerDialog(context, listener, allowMult iple); 225 mDialog = new PhotoPickerDialog(context, listener, allowMult iple, null);
226 mDialog.getWindow().getAttributes().windowAnimations = 226 mDialog.getWindow().getAttributes().windowAnimations =
227 R.style.PhotoPickerDialogAnimation; 227 R.style.PhotoPickerDialogAnimation;
228 mDialog.show(); 228 mDialog.show();
229 } 229 }
230 230
231 @Override 231 @Override
232 public void dismissPhotoPicker() { 232 public void dismissPhotoPicker() {
233 mDialog.dismiss(); 233 mDialog.dismiss();
234 mDialog = null; 234 mDialog = null;
235 } 235 }
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 InputMethodSubtype currentSubtype = imm.getCurrentInputMethodSubtype(); 602 InputMethodSubtype currentSubtype = imm.getCurrentInputMethodSubtype();
603 Locale systemLocale = Locale.getDefault(); 603 Locale systemLocale = Locale.getDefault();
604 if (currentSubtype != null && currentSubtype.getLocale() != null && syst emLocale != null) { 604 if (currentSubtype != null && currentSubtype.getLocale() != null && syst emLocale != null) {
605 String keyboardLanguage = currentSubtype.getLocale().split("_")[0]; 605 String keyboardLanguage = currentSubtype.getLocale().split("_")[0];
606 boolean match = systemLocale.getLanguage().equalsIgnoreCase(keyboard Language); 606 boolean match = systemLocale.getLanguage().equalsIgnoreCase(keyboard Language);
607 RecordHistogram.recordBooleanHistogram("InputMethod.MatchesSystemLan guage", match); 607 RecordHistogram.recordBooleanHistogram("InputMethod.MatchesSystemLan guage", match);
608 } 608 }
609 } 609 }
610 } 610 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698