diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-01-16 15:38:38 +0000 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-01-16 15:42:38 +0000 |
commit | 17e7bc358faab29ddb524d478f6b5ca2fed1a5f8 (patch) | |
tree | 3503d46f6f85e2cac0d2ff2ecbdedad8ccde27e3 /android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java | |
parent | 6d87a2c28f074953a84fd9e5a4aed333ae30136a (diff) |
Revert "fdo#60486 Fix auto-enabling bluetooth and improve bluetooth handling."
This will be superceded by the following sdremote improvments, which
would otherwise have path conflicts due to this patch.
This reverts commit 3cc31f89787e435c893b38a0adc0a23f566ab60f.
Change-Id: I49f004d068fdf852f5690e365a17168b001b9136
Diffstat (limited to 'android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java index 4e013c8ee855..bd80f6cfc65f 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.concurrent.TimeUnit; import android.app.Activity; -import android.bluetooth.BluetoothAdapter; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; @@ -54,8 +53,6 @@ public class ComputersFragment extends ListFragment implements ServiceConnection WIFI, BLUETOOTH } - boolean mBluetoothDisabled = false; - private CommunicationService mCommunicationService; private BroadcastReceiver mIntentsReceiver; @@ -149,10 +146,7 @@ public class ComputersFragment extends ListFragment implements ServiceConnection return getString(R.string.message_search_wifi); case BLUETOOTH: - if (mBluetoothDisabled != true) - return getString(R.string.message_search_bluetooth); - else - return getString(R.string.message_bluetooth_disabled); + return getString(R.string.message_search_bluetooth); default: return ""; @@ -214,8 +208,6 @@ public class ComputersFragment extends ListFragment implements ServiceConnection } } - mBluetoothDisabled = !BluetoothAdapter.getDefaultAdapter().isEnabled(); - return aComputers; } @@ -257,10 +249,18 @@ public class ComputersFragment extends ListFragment implements ServiceConnection return; } + if (!isShowingProgressMessageRequired()) { + return; + } + showProgressMessage(); showLearnMoreMessage(); } + private boolean isShowingProgressMessageRequired() { + return getProgressMessageView().getVisibility() == View.INVISIBLE; + } + private void tearDownComputersAdapter() { setListAdapter(null); } @@ -328,8 +328,6 @@ public class ComputersFragment extends ListFragment implements ServiceConnection public void onReceive(Context aContext, Intent aIntent) { if (Intents.Actions.SERVERS_LIST_CHANGED.equals(aIntent.getAction())) { mComputersFragment.loadComputers(); - } else if (Intents.Actions.BLUETOOTH_STATE_CHANGED.equals(aIntent.getAction())) { - mComputersFragment.loadComputers(); } } } @@ -337,7 +335,7 @@ public class ComputersFragment extends ListFragment implements ServiceConnection private IntentFilter buildIntentsReceiverFilter() { IntentFilter aIntentFilter = new IntentFilter(); aIntentFilter.addAction(Intents.Actions.SERVERS_LIST_CHANGED); - aIntentFilter.addAction(Intents.Actions.BLUETOOTH_STATE_CHANGED); + return aIntentFilter; } |