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

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

Issue 2065893002: bluetooth: android: removed duplicate restart of scanning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved restart of search from Android chooser to chooser controller. Created 4 years, 6 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 | chrome/browser/ui/android/bluetooth_chooser_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.Manifest; 7 import android.Manifest;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 mActivity.getString(R.string.bluetooth_adapter_off_help), 300 mActivity.getString(R.string.bluetooth_adapter_off_help),
301 new SpanInfo("<link>", "</link>", 301 new SpanInfo("<link>", "</link>",
302 new BluetoothClickableSpan(LinkType.ADAPTER_OFF_HELP, mA ctivity))); 302 new BluetoothClickableSpan(LinkType.ADAPTER_OFF_HELP, mA ctivity)));
303 303
304 mItemChooserDialog.setErrorState(adapterOffMessage, adapterOffStatus); 304 mItemChooserDialog.setErrorState(adapterOffMessage, adapterOffStatus);
305 } 305 }
306 306
307 @CalledByNative 307 @CalledByNative
308 private void notifyAdapterTurnedOn() { 308 private void notifyAdapterTurnedOn() {
309 mItemChooserDialog.clear(); 309 mItemChooserDialog.clear();
310 if (mNativeBluetoothChooserDialogPtr != 0) {
311 nativeRestartSearch(mNativeBluetoothChooserDialogPtr);
312 }
313 } 310 }
314 311
315 @VisibleForTesting 312 @VisibleForTesting
316 @CalledByNative 313 @CalledByNative
317 void notifyDiscoveryState(int discoveryState) { 314 void notifyDiscoveryState(int discoveryState) {
318 switch (discoveryState) { 315 switch (discoveryState) {
319 case DISCOVERY_FAILED_TO_START: { 316 case DISCOVERY_FAILED_TO_START: {
320 // FAILED_TO_START might be caused by a missing Location permiss ion. 317 // FAILED_TO_START might be caused by a missing Location permiss ion.
321 // Check, and show a request if so. 318 // Check, and show a request if so.
322 checkLocationPermission(); 319 checkLocationPermission();
(...skipping 16 matching lines...) Expand all
339 @VisibleForTesting 336 @VisibleForTesting
340 native void nativeRestartSearch(long nativeBluetoothChooserAndroid); 337 native void nativeRestartSearch(long nativeBluetoothChooserAndroid);
341 // Help links. 338 // Help links.
342 @VisibleForTesting 339 @VisibleForTesting
343 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro id); 340 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro id);
344 @VisibleForTesting 341 @VisibleForTesting
345 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd roid); 342 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd roid);
346 @VisibleForTesting 343 @VisibleForTesting
347 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser Android); 344 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser Android);
348 } 345 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/android/bluetooth_chooser_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698