| OLD | NEW |
| 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.content.Context; | 8 import android.content.Context; |
| 9 import android.content.Intent; | 9 import android.content.Intent; |
| 10 import android.content.pm.PackageManager; | 10 import android.content.pm.PackageManager; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 @VisibleForTesting | 278 @VisibleForTesting |
| 279 @CalledByNative | 279 @CalledByNative |
| 280 void closeDialog() { | 280 void closeDialog() { |
| 281 mNativeBluetoothChooserDialogPtr = 0; | 281 mNativeBluetoothChooserDialogPtr = 0; |
| 282 mItemChooserDialog.dismiss(); | 282 mItemChooserDialog.dismiss(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 @VisibleForTesting | 285 @VisibleForTesting |
| 286 @CalledByNative | 286 @CalledByNative |
| 287 void removeDevice(String deviceId) { | |
| 288 mItemChooserDialog.setEnabled(deviceId, false); | |
| 289 } | |
| 290 | |
| 291 @VisibleForTesting | |
| 292 @CalledByNative | |
| 293 void notifyAdapterTurnedOff() { | 287 void notifyAdapterTurnedOff() { |
| 294 SpannableString adapterOffMessage = SpanApplier.applySpans( | 288 SpannableString adapterOffMessage = SpanApplier.applySpans( |
| 295 mContext.getString(R.string.bluetooth_adapter_off), | 289 mContext.getString(R.string.bluetooth_adapter_off), |
| 296 new SpanInfo("<link>", "</link>", | 290 new SpanInfo("<link>", "</link>", |
| 297 new BluetoothClickableSpan(LinkType.ADAPTER_OFF, mContex
t))); | 291 new BluetoothClickableSpan(LinkType.ADAPTER_OFF, mContex
t))); |
| 298 SpannableString adapterOffStatus = SpanApplier.applySpans( | 292 SpannableString adapterOffStatus = SpanApplier.applySpans( |
| 299 mContext.getString(R.string.bluetooth_adapter_off_help), | 293 mContext.getString(R.string.bluetooth_adapter_off_help), |
| 300 new SpanInfo("<link>", "</link>", | 294 new SpanInfo("<link>", "</link>", |
| 301 new BluetoothClickableSpan(LinkType.ADAPTER_OFF_HELP, mC
ontext))); | 295 new BluetoothClickableSpan(LinkType.ADAPTER_OFF_HELP, mC
ontext))); |
| 302 | 296 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 @VisibleForTesting | 332 @VisibleForTesting |
| 339 native void nativeRestartSearch(long nativeBluetoothChooserAndroid); | 333 native void nativeRestartSearch(long nativeBluetoothChooserAndroid); |
| 340 // Help links. | 334 // Help links. |
| 341 @VisibleForTesting | 335 @VisibleForTesting |
| 342 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro
id); | 336 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro
id); |
| 343 @VisibleForTesting | 337 @VisibleForTesting |
| 344 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd
roid); | 338 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd
roid); |
| 345 @VisibleForTesting | 339 @VisibleForTesting |
| 346 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser
Android); | 340 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser
Android); |
| 347 } | 341 } |
| OLD | NEW |