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

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

Issue 2271413002: bluetooth: Implement RSSI indicator on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-impl-rssi-tx-power
Patch Set: Draft of LevelListDrawable and StateListDrawable Created 4 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
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; 5 package org.chromium.chrome.browser;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.text.SpannableString; 8 import android.text.SpannableString;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.view.View; 10 import android.view.View;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 view.invalidate(); 83 view.invalidate();
84 } 84 }
85 })); 85 }));
86 SpannableString statusIdleNoneFound = statusActive; 86 SpannableString statusIdleNoneFound = statusActive;
87 SpannableString statusIdleSomeFound = statusActive; 87 SpannableString statusIdleSomeFound = statusActive;
88 String positiveButton = activity.getString(R.string.usb_chooser_dialog_c onnect_button_text); 88 String positiveButton = activity.getString(R.string.usb_chooser_dialog_c onnect_button_text);
89 89
90 ItemChooserDialog.ItemChooserLabels labels = 90 ItemChooserDialog.ItemChooserLabels labels =
91 new ItemChooserDialog.ItemChooserLabels(title, searching, noneFo und, statusActive, 91 new ItemChooserDialog.ItemChooserLabels(title, searching, noneFo und, statusActive,
92 statusIdleNoneFound, statusIdleSomeFound, positiveButton ); 92 statusIdleNoneFound, statusIdleSomeFound, positiveButton );
93 mItemChooserDialog = new ItemChooserDialog(activity, this, labels); 93 mItemChooserDialog = new ItemChooserDialog(activity, this, labels, false /* usingIcon */);
94 } 94 }
95 95
96 @Override 96 @Override
97 public void onItemSelected(String id) { 97 public void onItemSelected(String id) {
98 if (mNativeUsbChooserDialogPtr != 0) { 98 if (mNativeUsbChooserDialogPtr != 0) {
99 if (id.isEmpty()) { 99 if (id.isEmpty()) {
100 nativeOnDialogCancelled(mNativeUsbChooserDialogPtr); 100 nativeOnDialogCancelled(mNativeUsbChooserDialogPtr);
101 } else { 101 } else {
102 nativeOnItemSelected(mNativeUsbChooserDialogPtr, id); 102 nativeOnItemSelected(mNativeUsbChooserDialogPtr, id);
103 } 103 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 mItemChooserDialog.dismiss(); 141 mItemChooserDialog.dismiss();
142 } 142 }
143 143
144 @VisibleForTesting 144 @VisibleForTesting
145 native void nativeOnItemSelected(long nativeUsbChooserDialogAndroid, String deviceId); 145 native void nativeOnItemSelected(long nativeUsbChooserDialogAndroid, String deviceId);
146 @VisibleForTesting 146 @VisibleForTesting
147 native void nativeOnDialogCancelled(long nativeUsbChooserDialogAndroid); 147 native void nativeOnDialogCancelled(long nativeUsbChooserDialogAndroid);
148 @VisibleForTesting 148 @VisibleForTesting
149 native void nativeLoadUsbHelpPage(long nativeUsbChooserDialogAndroid); 149 native void nativeLoadUsbHelpPage(long nativeUsbChooserDialogAndroid);
150 } 150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698