[Libreoffice-commits] core.git: 2 commits - android/sdremote

2014-01-16 Thread Christian Lohmaier
 android/sdremote/res/values/strings.xml
  |1 
 
android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
   |  113 +---
 
android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java
|   15 -
 
android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
 |   41 ---
 
android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java
   |  135 ++
 android/sdremote/src/org/libreoffice/impressremote/util/BluetoothOperator.java 
  |   10 
 android/sdremote/src/org/libreoffice/impressremote/util/Intents.java   
  |5 
 7 files changed, 63 insertions(+), 257 deletions(-)

New commits:
commit c0693031a7887a3146a049a5aabe36ed0ee14941
Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com
Date:   Sun Dec 15 16:38:17 2013 +0100

get rid of some useless indirection/wrapper functions

there's no point in adding a layer of indirection if all that the called
function does is running one single command, and is only called in one
place. Getting rid of that indirection makes the code easier to read and
understand.

Change-Id: Ie2f3e03fe2870d1d4a84df738ebb3d0f34a2713c
Reviewed-on: https://gerrit.libreoffice.org/7089
Reviewed-by: Andrzej Hunt andrzej.h...@collabora.com
Tested-by: Andrzej Hunt andrzej.h...@collabora.com

diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
 
b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
index f75d197..0c7bd68 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
@@ -36,10 +36,24 @@ public class ComputersActivity extends ActionBarActivity 
implements ActionBar.Ta
 super.onCreate(aSavedInstanceState);
 
 saveBluetoothState(aSavedInstanceState);
-enableBluetooth();
+BluetoothOperator.enable();
+
+// Looks hacky but it seems to be the best way to set activity’s 
title
+// different to application’s label. The other way is setting title
+// to intents filter but it shows wrong label for recent apps screen 
then.
+
+ActionBar aActionBar = getSupportActionBar();
+
+aActionBar.setTitle(R.string.title_computers);
+aActionBar.setDisplayShowTitleEnabled(true);
 
-setUpTitle();
-setUpContent();
+if (BluetoothOperator.isAvailable()) {
+setUpComputersLists();
+}
+else {
+Fragment aComputersFragment = 
ComputersFragment.newInstance(ComputersFragment.Type.WIFI);
+Fragments.Operator.add(this, aComputersFragment);
+}
 }
 
 private void saveBluetoothState(Bundle aSavedInstanceState) {
@@ -63,50 +77,22 @@ public class ComputersActivity extends ActionBarActivity 
implements ActionBar.Ta
 return 
aSavedInstanceState.getBoolean(SavedStates.Keys.BLUETOOTH_ENABLED);
 }
 
-private void enableBluetooth() {
-BluetoothOperator.enable();
-}
-
-private void setUpTitle() {
-// Looks hacky but it seems to be the best way to set activity’s 
title
-// different to application’s label. The other way is setting title
-// to intents filter but it shows wrong label for recent apps screen 
then.
-
-ActionBar aActionBar = getSupportActionBar();
-
-aActionBar.setTitle(R.string.title_computers);
-aActionBar.setDisplayShowTitleEnabled(true);
-}
-
-private void setUpContent() {
-if (areMultipleComputersTypesAvailable()) {
-setUpComputersLists();
-}
-else {
-setUpComputersList();
-}
-}
-
-private boolean areMultipleComputersTypesAvailable() {
-return BluetoothOperator.isAvailable();
-}
-
 private void setUpComputersLists() {
 setContentView(R.layout.activity_computers);
 
-setUpTabs();
-setUpComputersPager();
-
-setUpSavedTab();
-}
-
-private void setUpTabs() {
 ActionBar aActionBar = getSupportActionBar();
 
 aActionBar.addTab(buildActionBarTab(
 R.string.title_bluetooth), 
ComputersPagerAdapter.PagesIndices.BLUETOOTH);
 aActionBar.addTab(buildActionBarTab(
 R.string.title_wifi), ComputersPagerAdapter.PagesIndices.WIFI);
+
+ViewPager aComputersPager = getComputersPager();
+
+aComputersPager.setAdapter(new 
ComputersPagerAdapter(getSupportFragmentManager()));
+aComputersPager.setOnPageChangeListener(this);
+
+getSupportActionBar().setSelectedNavigationItem(loadTabIndex());
 }
 
 private ActionBar.Tab buildActionBarTab(int aTitleResourceId) {
@@ -122,17 +108,13 @@ public class 

[Libreoffice-commits] core.git: 2 commits - android/sdremote

2013-09-19 Thread Artur Dryomov
 
android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
   |9 ++-
 
android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
 |   19 ++
 android/sdremote/src/org/libreoffice/impressremote/communication/Server.java   
  |   30 +++---
 
android/sdremote/src/org/libreoffice/impressremote/communication/ServersManager.java
 |   26 
 
android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
  |   25 ++--
 android/sdremote/src/org/libreoffice/impressremote/util/Intents.java   
  |   13 +++-
 6 files changed, 102 insertions(+), 20 deletions(-)

New commits:
commit 95e95e0a26694dd01412220eb6b44150dfead2bf
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Sep 19 12:47:45 2013 +0300

Add switching to the slides pager from the grid when selecting a slide.

Change-Id: I029c298a90ff7f0cbaada25388e3a758dc4d583e

diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
 
b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index defd6a0..3c41ecc 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -40,7 +40,7 @@ import org.libreoffice.impressremote.util.Preferences;
 import org.libreoffice.impressremote.util.SavedStates;
 
 public class SlideShowActivity extends SherlockFragmentActivity implements 
ServiceConnection {
-private static enum Mode {
+public static enum Mode {
 PAGER, GRID, EMPTY
 }
 
@@ -160,6 +160,12 @@ public class SlideShowActivity extends 
SherlockFragmentActivity implements Servi
 
 @Override
 public void onReceive(Context aContext, Intent aIntent) {
+if 
(Intents.Actions.SLIDE_SHOW_MODE_CHANGED.equals(aIntent.getAction())) {
+Mode aMode = (Mode) 
aIntent.getSerializableExtra(Intents.Extras.MODE);
+mSlideShowActivity.changeMode(aMode);
+return;
+}
+
 if (Intents.Actions.SLIDE_CHANGED.equals(aIntent.getAction())) {
 mSlideShowActivity.setUpSlideShowInformation();
 return;
@@ -193,6 +199,7 @@ public class SlideShowActivity extends 
SherlockFragmentActivity implements Servi
 
 private IntentFilter buildIntentsReceiverFilter() {
 IntentFilter aIntentFilter = new IntentFilter();
+aIntentFilter.addAction(Intents.Actions.SLIDE_SHOW_MODE_CHANGED);
 aIntentFilter.addAction(Intents.Actions.SLIDE_CHANGED);
 aIntentFilter.addAction(Intents.Actions.TIMER_UPDATED);
 aIntentFilter.addAction(Intents.Actions.TIMER_STARTED);
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
 
b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
index 14e46e0..053648b 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
@@ -24,6 +24,7 @@ import android.widget.AdapterView;
 import android.widget.GridView;
 
 import com.actionbarsherlock.app.SherlockFragment;
+import org.libreoffice.impressremote.activity.SlideShowActivity;
 import org.libreoffice.impressremote.communication.SlideShow;
 import org.libreoffice.impressremote.util.Intents;
 import org.libreoffice.impressremote.R;
@@ -86,7 +87,23 @@ public class SlidesGridFragment extends SherlockFragment 
implements ServiceConne
 
 @Override
 public void onItemClick(AdapterView? aAdapterView, View aView, int 
aPosition, long aId) {
-
mCommunicationService.getCommandsTransmitter().setCurrentSlide(aPosition);
+changeCurrentSlide(aPosition);
+changeSlideShowMode();
+}
+
+private void changeCurrentSlide(int aSlideIndex) {
+
mCommunicationService.getCommandsTransmitter().setCurrentSlide(aSlideIndex);
+}
+
+private void changeSlideShowMode() {
+Intent aIntent = 
Intents.buildSlideShowModeChangedIntent(SlideShowActivity.Mode.PAGER);
+getBroadcastManager().sendBroadcast(aIntent);
+}
+
+private LocalBroadcastManager getBroadcastManager() {
+Context aContext = getActivity().getApplicationContext();
+
+return LocalBroadcastManager.getInstance(aContext);
 }
 
 @Override
@@ -138,12 +155,6 @@ public class SlidesGridFragment extends SherlockFragment 
implements ServiceConne
 return aIntentFilter;
 }
 
-private LocalBroadcastManager getBroadcastManager() {
-Context aContext = getActivity().getApplicationContext();
-
-return LocalBroadcastManager.getInstance(aContext);
-}
-
 private void refreshSlidesGrid() {
 getSlidesGrid().invalidateViews();
 }
diff --git 

[Libreoffice-commits] core.git: 2 commits - android/sdremote

2013-09-05 Thread Artur Dryomov
 android/sdremote/AndroidManifest.xml   
  |5 
 android/sdremote/res/menu/menu_action_bar_computers.xml
  |5 
 android/sdremote/res/values/strings.xml
  |7 
 android/sdremote/res/xml/preferences.xml   
  |   14 +
 
android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
   |9 +
 
android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java
|   54 +++
 
android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
   |   72 +-
 
android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
 |1 
 android/sdremote/src/org/libreoffice/impressremote/util/Intents.java   
  |5 
 android/sdremote/src/org/libreoffice/impressremote/util/Preferences.java   
  |   28 +++
 10 files changed, 194 insertions(+), 6 deletions(-)

New commits:
commit f98a01f061d6d8895a3a2397a1545f052769ba3d
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Sep 5 19:12:43 2013 +0300

Remove triggering next transitions on last slide.

The current server-side code calls finishing of a slide show multiple
times so we cannot rely on this inidicator to exit the slide show.

Change-Id: I78b11f62d45d45bcf005e6f0a36f2d632b886900

diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
 
b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index 18f1691..d229c58 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -257,7 +257,9 @@ public class SlideShowActivity extends 
SherlockFragmentActivity implements Servi
 
 switch (aKeyCode) {
 case KeyEvent.KEYCODE_VOLUME_UP:
-mCommunicationService.getTransmitter().performNextTransition();
+if (!isLastSlideDisplayed()) {
+
mCommunicationService.getTransmitter().performNextTransition();
+}
 return true;
 
 case KeyEvent.KEYCODE_VOLUME_DOWN:
@@ -275,6 +277,13 @@ public class SlideShowActivity extends 
SherlockFragmentActivity implements Servi
 return preferences.getBoolean(Preferences.Keys.VOLUME_KEYS_ACTIONS);
 }
 
+private boolean isLastSlideDisplayed() {
+int aCurrentSlideIndex = 
mCommunicationService.getSlideShow().getHumanCurrentSlideIndex();
+int aSlidesCount = 
mCommunicationService.getSlideShow().getSlidesCount();
+
+return aCurrentSlideIndex == aSlidesCount;
+}
+
 @Override
 public boolean onKeyUp(int aKeyCode, KeyEvent aKeyEvent) {
 if (!areVolumeKeysActionsRequired()) {
commit 3c1c51020c07c748248d0c6e4ae33f3f37ce1390
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Sep 5 11:59:27 2013 +0300

Add the settings screen.

It contains options that can confuse user:
* changing transitions using volume keys;
* keeping screenon while presenting.

Change-Id: I1a9cb9afdf1409fc78e713b899d68ae045db5cb7

diff --git a/android/sdremote/AndroidManifest.xml 
b/android/sdremote/AndroidManifest.xml
index 109c1c2..7b80b66 100644
--- a/android/sdremote/AndroidManifest.xml
+++ b/android/sdremote/AndroidManifest.xml
@@ -54,6 +54,11 @@
 /activity
 
 activity
+android:name=.activity.SettingsActivity
+android:label=@string/title_settings
+/activity
+
+activity
 android:name=.activity.LicensesActivity
 android:label=@string/title_licenses
 /activity
diff --git a/android/sdremote/res/menu/menu_action_bar_computers.xml 
b/android/sdremote/res/menu/menu_action_bar_computers.xml
index 7835fa9..f99df21 100644
--- a/android/sdremote/res/menu/menu_action_bar_computers.xml
+++ b/android/sdremote/res/menu/menu_action_bar_computers.xml
@@ -8,6 +8,11 @@
 android:showAsAction=always/
 
 item
+android:id=@+id/menu_settings
+android:title=@string/title_settings
+android:showAsAction=never/
+
+item
 android:id=@+id/menu_licenses
 android:title=@string/menu_licenses
 android:showAsAction=never/
diff --git a/android/sdremote/res/values/strings.xml 
b/android/sdremote/res/values/strings.xml
index 0aaa46f..f810f0e 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -7,12 +7,14 @@
 string name=title_bluetooth translatable=falseBluetooth/string
 string name=title_wifi translatable=falseWiFi/string
 string name=title_licensesOpen source licenses/string
+string name=title_settingsSettings/string
 string name=title_connectionConnection/string
 string 

[Libreoffice-commits] core.git: 2 commits - android/sdremote

2013-08-01 Thread Artur Dryomov
 android/sdremote/res/drawable/background_grid_slide.xml|2 +-
 android/sdremote/res/layout/activity_computer_creation.xml |8 
 android/sdremote/res/layout/view_grid_slide.xml|1 -
 android/sdremote/res/values/dimens.xml |1 -
 android/sdremote/res/values/strings.xml|5 ++---
 5 files changed, 3 insertions(+), 14 deletions(-)

New commits:
commit 46de4c598e9a78cc9a8401c701b75f434707d186
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Aug 1 17:00:35 2013 +0300

Fix computer creation spelling.

Replace a notice with different hint. Change error message to be
shorter.

Change-Id: I93f063bb07c37749466787d7a965893fc79a69bb

diff --git a/android/sdremote/res/layout/activity_computer_creation.xml 
b/android/sdremote/res/layout/activity_computer_creation.xml
index 4ef3f86..74751ea9 100644
--- a/android/sdremote/res/layout/activity_computer_creation.xml
+++ b/android/sdremote/res/layout/activity_computer_creation.xml
@@ -22,12 +22,4 @@
 android:layout_width=match_parent
 android:layout_height=wrap_content/
 
-TextView
-style=?textAppearanceSmall
-android:text=@string/message_name_notice
-android:gravity=center_horizontal
-android:paddingTop=@dimen/padding_vertical_notice
-android:layout_width=match_parent
-android:layout_height=wrap_content/
-
 /LinearLayout
\ No newline at end of file
diff --git a/android/sdremote/res/values/dimens.xml 
b/android/sdremote/res/values/dimens.xml
index 9739e15..a5f9447 100644
--- a/android/sdremote/res/values/dimens.xml
+++ b/android/sdremote/res/values/dimens.xml
@@ -21,7 +21,6 @@
 dimen name=padding_vertical_pin8dp/dimen
 dimen name=padding_vertical_error_message12dp/dimen
 dimen name=padding_vertical_edit8dp/dimen
-dimen name=padding_vertical_notice16dp/dimen
 
 dimen name=margin_vertical_action_bar_divider12dp/dimen
 dimen name=margin_slide8dp/dimen
diff --git a/android/sdremote/res/values/strings.xml 
b/android/sdremote/res/values/strings.xml
index 2f5117a..92a2022 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -31,12 +31,11 @@
 string name=message_impress_remote_enablingMake sure you enabled 
remote control. Go to “Tools → Options → LibreOffice Impress → 
General” in LibreOffice Impress./string
 string name=message_impress_wifi_enablingYou should enable 
experimental features at “Tools → Options → LibreOffice → Advanced” 
as well./string
 string name=message_impress_pairing_checkIf you have Bluetooth pairing 
issues check instructions related to your desktop OS./string
-string name=message_ip_address_validationYou should type a valid IP 
address./string
-string name=message_name_noticeName is not required — IP address 
would be used instead if you wish./string
+string name=message_ip_address_validationType in a valid IP 
address./string
 string name=message_time_is_upTime is up/string
 
 string name=hint_ip_addressIP address/string
-string name=hint_nameName/string
+string name=hint_nameName (optional)/string
 
 string name=header_notesNotes/string
 
commit dc2e2d0068315500ed70880667802f1f52a77f70
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Aug 1 16:54:27 2013 +0300

Remove custon scaling for GridView slide previews.

Should make thinks less hacky.

Change-Id: I007800558ce8a0a567addde3b01926bb53c311f6

diff --git a/android/sdremote/res/drawable/background_grid_slide.xml 
b/android/sdremote/res/drawable/background_grid_slide.xml
index 9c76602..e7fca36 100644
--- a/android/sdremote/res/drawable/background_grid_slide.xml
+++ b/android/sdremote/res/drawable/background_grid_slide.xml
@@ -12,6 +12,6 @@
 android:left=1dp
 android:top=1dp
 android:right=1dp
-android:bottom=1.5dp/
+android:bottom=1dp/
 
 /shape
\ No newline at end of file
diff --git a/android/sdremote/res/layout/view_grid_slide.xml 
b/android/sdremote/res/layout/view_grid_slide.xml
index a79ca3e..4c3d573 100644
--- a/android/sdremote/res/layout/view_grid_slide.xml
+++ b/android/sdremote/res/layout/view_grid_slide.xml
@@ -6,7 +6,6 @@
 
 ImageView
 android:id=@+id/image_slide_preview
-android:scaleType=centerCrop
 android:adjustViewBounds=true
 android:background=@drawable/background_grid_slide
 android:contentDescription=@string/description_grid_slide
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - android/sdremote

2013-08-01 Thread Artur Dryomov
 
android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
 |   82 +-
 
android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
   |   25 +--
 
android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java
   |4 
 android/sdremote/src/org/libreoffice/impressremote/util/BluetoothOperator.java 
  |6 
 4 files changed, 68 insertions(+), 49 deletions(-)

New commits:
commit 7e07a45500dcbb891a85f0bc9b7049cf4d50bba1
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Aug 1 19:44:47 2013 +0300

Change search timeouts from milliseconds to seconds.

Makes things readable and should prevent potential typing bugs.

Change-Id: Ifcb90568859e94896f5c2a313546fe1fdd6fa4bc

diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
 
b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
index 4f1029b..2152cef 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
@@ -12,6 +12,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import android.bluetooth.BluetoothAdapter;
 import android.bluetooth.BluetoothDevice;
@@ -26,7 +27,7 @@ import org.libreoffice.impressremote.util.BluetoothOperator;
 import org.libreoffice.impressremote.util.Intents;
 
 class BluetoothServersFinder extends BroadcastReceiver implements 
ServersFinder, Runnable {
-private static final int SEARCH_DELAY_IN_MILLISECONDS = 1000 * 10;
+private static final int SEARCH_DELAY_IN_SECONDS = 10;
 
 private final Context mContext;
 
@@ -102,7 +103,7 @@ class BluetoothServersFinder extends BroadcastReceiver 
implements ServersFinder,
 }
 
 Handler aHandler = new Handler();
-aHandler.postDelayed(this, SEARCH_DELAY_IN_MILLISECONDS);
+aHandler.postDelayed(this, 
TimeUnit.SECONDS.toMillis(SEARCH_DELAY_IN_SECONDS));
 }
 
 @Override
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java
 
b/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java
index 9f50fc1..f3280eb 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java
@@ -33,7 +33,7 @@ import org.libreoffice.impressremote.util.Intents;
 
 class TcpServersFinder implements ServersFinder, Runnable {
 private static final int SEARCH_DELAY_IN_SECONDS = 10;
-private static final int BLOCKING_TIMEOUT_IN_MILLISECONDS = 1000 * 10;
+private static final int BLOCKING_TIMEOUT_IN_SECONDS = 10;
 
 private static final int SEARCH_RESULT_BUFFER_SIZE = 1024;
 
@@ -74,7 +74,7 @@ class TcpServersFinder implements ServersFinder, Runnable {
 private void setUpSearchSocket() {
 try {
 mSearchSocket = new DatagramSocket();
-mSearchSocket.setSoTimeout(BLOCKING_TIMEOUT_IN_MILLISECONDS);
+mSearchSocket.setSoTimeout((int) 
TimeUnit.SECONDS.toMillis(BLOCKING_TIMEOUT_IN_SECONDS));
 } catch (SocketException e) {
 throw new RuntimeException(Unable to open search socket.);
 }
commit 9864a2d5d4dbc9988ada970dfe713559e7db9326
Author: Artur Dryomov artur.dryo...@gmail.com
Date:   Thu Aug 1 19:32:19 2013 +0300

Fix Bluetooth devices discovery.

* Listen async Bluetooth status messages and start discovery properly.
* Remember Bluetooth status before running the app and manage the state.

Change-Id: I2be3fb6a503c5f6ace96732ebd0302935f1afb84

diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
 
b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
index 35be694..4f1029b 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
@@ -24,10 +24,9 @@ import android.support.v4.content.LocalBroadcastManager;
 
 import org.libreoffice.impressremote.util.BluetoothOperator;
 import org.libreoffice.impressremote.util.Intents;
-import org.libreoffice.impressremote.communication.Server.Protocol;
 
 class BluetoothServersFinder extends BroadcastReceiver implements 
ServersFinder, Runnable {
-private static final int SEARCH_DELAY_IN_MILLISECONDS = 1000 * 5;
+private static final int SEARCH_DELAY_IN_MILLISECONDS = 1000 * 10;
 
 private final Context mContext;
 
@@ -49,55 +48,53 @@ class BluetoothServersFinder extends BroadcastReceiver 
implements 

[Libreoffice-commits] core.git: 2 commits - android/sdremote

2013-02-13 Thread Michael Meeks
 android/sdremote/res/values/styles.xml |   56 +++--
 1 file changed, 54 insertions(+), 2 deletions(-)

New commits:
commit 31eeb79521b952212e3018f262e25e6b3f4599e7
Author: Michael Meeks michael.me...@suse.com
Date:   Wed Feb 13 14:12:00 2013 +

Revert resolve fdo#60379 Impress Remote: Options look disabled

This reverts commit 23e6ac150b217be70a80d42deb5b253059030783.

diff --git a/android/sdremote/res/values/styles.xml 
b/android/sdremote/res/values/styles.xml
index c88c947..80a4b4a 100644
--- a/android/sdremote/res/values/styles.xml
+++ b/android/sdremote/res/values/styles.xml
@@ -72,9 +72,9 @@
 item 
name=android:actionDropDownStyle@style/Theme.ImpressRemote.ActionBarMenu/item
 item name=android:windowBackground@color/light_grey/item
 item 
name=android:homeAsUpIndicator@drawable/up_indicator_white/item
-item name=android:textColor@color/light_grey/item
+item name=android:textColor@color/text_grey/item
 item 
name=android:alertDialogStyle@style/Theme.ImpressRemote.Dialog/item
 
 /style
 
-/resources
+/resources
\ No newline at end of file
commit c922df9814c85c080272fc4962584133fa6f5316
Author: Michael Meeks michael.me...@suse.com
Date:   Wed Feb 13 14:09:02 2013 +

Revert Just use default colours until proven they don't work;)

Colors should be orange by design.

This reverts commit ab0bbe53ae02361d521c133dd5c0b6db3423b0cb.

diff --git a/android/sdremote/res/values/styles.xml 
b/android/sdremote/res/values/styles.xml
index 683114f..c88c947 100644
--- a/android/sdremote/res/values/styles.xml
+++ b/android/sdremote/res/values/styles.xml
@@ -14,15 +14,67 @@
 color name=thumbnail_border#B4B4B4/color
 color name=thumbnail_border_selected#EE4400/color
 
+style name=Theme.ImpressRemote.ActionBar.Title 
parent=android:style/Widget.Holo.Light.ActionBar
+item name=android:textColor@color/white/item
+item name=android:textSize18dp/item
+/style
+
+style name=Theme.ImpressRemote.ActionBar 
parent=Widget.Sherlock.Light.ActionBar.Solid.Inverse
+item name=android:background@color/orange/item
+item name=background@color/orange/item
+item 
name=android:titleTextStyle@style/Theme.ImpressRemote.ActionBar.Title/item
+item 
name=titleTextStyle@style/Theme.ImpressRemote.ActionBar.Title/item
+item name=backgroundSplit@color/text_grey/item
+item name=android:backgroundSplit@color/text_grey/item
+/style
+
+style name=Theme.ImpressRemote.ActionBarWidget 
parent=android:style/Widget.Holo.Light
+item name=android:background@color/orange/item
+item name=android:textColor@color/white/item
+item name=android:textSize22dp/item
+/style
+
+style name=Theme.ImpressRemote.ActionBarMenu 
parent=android:style/Widget.Holo.Light.ListPopupWindow
+item name=android:background@color/grey/item
+!-- item name=android:popupBackground@color/black/item --
+/style
+
 style name=Theme.ImpressRemote.ActionBarMenuItem 
parent=Widget.Sherlock.Light.Spinner.DropDown.ActionBar
+item name=android:background@color/grey/item
+item name=android:textColor@color/white/item
 item name=android:textSize16dp/item
 /style
 
+style name=Theme.ImpressRemote.Dialog 
parent=@android:style/Theme.Dialog
+item name=android:windowBackground@color/light_grey/item
+item name=android:fullDark@color/light_grey/item
+item name=android:topDark@color/light_grey/item
+item name=android:centerDark@color/light_grey/item
+item name=android:bottomDark@color/light_grey/item
+item name=android:fullBright@color/light_grey/item
+item name=android:centerBright@color/light_grey/item
+item name=android:bottomBright@color/light_grey/item
+item name=android:bottomMedium@color/light_grey/item
+item name=android:centerMedium@color/light_grey/item
+item name=android:textColor@color/grey/item
+/style
+
+style name=Theme.ImpressRemote.Dialog.Title 
parent=@android:style/Theme.Dialog
+item name=android:textColor@color/grey/item
+/style
+
 style name=Theme.ImpressRemote 
parent=Theme.Sherlock.Light.DarkActionBar
+item 
name=android:actionBarStyle@style/Theme.ImpressRemote.ActionBar/item
+item name=actionBarStyle@style/Theme.ImpressRemote.ActionBar/item
+item 
name=android:popupMenuStyle@style/Theme.ImpressRemote.ActionBarMenu/item
 item 
name=android:dropDownListViewStyle@style/Theme.ImpressRemote.ActionBarMenuItem/item
-item 
name=android:textAppearanceLargePopupMenu@style/Theme.ImpressRemote.ActionBarMenuItem/item
+item 
name=android:textAppearanceLargePopupMenu@style/Theme.ImpressRemote.ActionBarMenuItem/item
 !-- item 
name=android:actionBarWidgetTheme@style/Theme.ImpressRemote.ActionBarWidget/item
 --
+item