Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9f8cd15b
Kaydet (Commit)
9f8cd15b
authored
Eyl 17, 2012
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add icons + device name display to pairing activity.
Change-Id: If27119e3e62bac8046fcc33cb12767b116bcc991
üst
9b0b15ee
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
2 deletions
+26
-2
AndroidManifest.xml
android/sdremote/AndroidManifest.xml
+4
-2
PairingActivity.java
...te/src/org/libreoffice/impressremote/PairingActivity.java
+8
-0
Client.java
...c/org/libreoffice/impressremote/communication/Client.java
+9
-0
CommunicationService.java
...ice/impressremote/communication/CommunicationService.java
+4
-0
NetworkClient.java
...ibreoffice/impressremote/communication/NetworkClient.java
+1
-0
No files found.
android/sdremote/AndroidManifest.xml
Dosyayı görüntüle @
9f8cd15b
...
@@ -26,12 +26,14 @@
...
@@ -26,12 +26,14 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".PairingActivity"
android:icon=
"@drawable/actionbar_icon_computer"
>
</activity>
<service
android:name=
".communication.CommunicationService"
>
<service
android:name=
".communication.CommunicationService"
>
</service>
</service>
<activity
android:name=
".PairingActivity"
>
</activity>
<activity
android:name=
".StartPresentationActivity"
>
<activity
android:name=
".StartPresentationActivity"
>
</activity>
</activity>
<activity
<activity
...
...
android/sdremote/src/org/libreoffice/impressremote/PairingActivity.java
Dosyayı görüntüle @
9f8cd15b
...
@@ -44,6 +44,8 @@ public class PairingActivity extends SherlockActivity {
...
@@ -44,6 +44,8 @@ public class PairingActivity extends SherlockActivity {
LocalBroadcastManager
.
getInstance
(
this
).
registerReceiver
(
mListener
,
LocalBroadcastManager
.
getInstance
(
this
).
registerReceiver
(
mListener
,
aFilter
);
aFilter
);
getSupportActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
}
}
@Override
@Override
...
@@ -69,6 +71,8 @@ public class PairingActivity extends SherlockActivity {
...
@@ -69,6 +71,8 @@ public class PairingActivity extends SherlockActivity {
if
(
mCommunicationService
.
getState
()
==
State
.
CONNECTING
)
{
if
(
mCommunicationService
.
getState
()
==
State
.
CONNECTING
)
{
mPinText
.
setText
(
mCommunicationService
.
getPairingPin
());
mPinText
.
setText
(
mCommunicationService
.
getPairingPin
());
getSupportActionBar
().
setTitle
(
mCommunicationService
.
getPairingDeviceName
());
}
}
}
}
...
@@ -91,6 +95,10 @@ public class PairingActivity extends SherlockActivity {
...
@@ -91,6 +95,10 @@ public class PairingActivity extends SherlockActivity {
String
aPin
=
aIntent
.
getStringExtra
(
"PIN"
);
String
aPin
=
aIntent
.
getStringExtra
(
"PIN"
);
mPinText
.
setText
(
aPin
);
mPinText
.
setText
(
aPin
);
if
(
mCommunicationService
!=
null
)
getSupportActionBar
().
setTitle
(
mCommunicationService
.
getPairingDeviceName
());
// refreshLists();
// refreshLists();
}
else
if
(
aIntent
.
getAction
().
equals
(
}
else
if
(
aIntent
.
getAction
().
equals
(
CommunicationService
.
MSG_PAIRING_SUCCESSFUL
))
{
CommunicationService
.
MSG_PAIRING_SUCCESSFUL
))
{
...
...
android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
Dosyayı görüntüle @
9f8cd15b
...
@@ -33,6 +33,7 @@ public abstract class Client {
...
@@ -33,6 +33,7 @@ public abstract class Client {
protected
BufferedReader
mReader
;
protected
BufferedReader
mReader
;
protected
OutputStream
mOutputStream
;
protected
OutputStream
mOutputStream
;
protected
String
mPin
=
""
;
protected
String
mPin
=
""
;
protected
String
mName
=
""
;
private
static
Client
latestInstance
=
null
;
private
static
Client
latestInstance
=
null
;
...
@@ -108,6 +109,14 @@ public abstract class Client {
...
@@ -108,6 +109,14 @@ public abstract class Client {
}
}
}
}
public
static
String
getName
()
{
if
(
latestInstance
!=
null
)
{
return
latestInstance
.
mName
;
}
else
{
return
""
;
}
}
/**
/**
* Send a valid command to the Server.
* Send a valid command to the Server.
*/
*/
...
...
android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
Dosyayı görüntüle @
9f8cd15b
...
@@ -59,6 +59,10 @@ public class CommunicationService extends Service implements Runnable {
...
@@ -59,6 +59,10 @@ public class CommunicationService extends Service implements Runnable {
return
Client
.
getPin
();
return
Client
.
getPin
();
}
}
public
String
getPairingDeviceName
()
{
return
Client
.
getName
();
}
private
State
mStateDesired
=
State
.
DISCONNECTED
;
private
State
mStateDesired
=
State
.
DISCONNECTED
;
private
Server
mServerDesired
=
null
;
private
Server
mServerDesired
=
null
;
...
...
android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java
Dosyayı görüntüle @
9f8cd15b
...
@@ -35,6 +35,7 @@ public class NetworkClient extends Client {
...
@@ -35,6 +35,7 @@ public class NetworkClient extends Client {
CommunicationService
aCommunicationService
)
{
CommunicationService
aCommunicationService
)
{
super
(
aServer
,
aCommunicationService
);
super
(
aServer
,
aCommunicationService
);
try
{
try
{
mName
=
aServer
.
getName
();
mSocket
=
new
Socket
(
aServer
.
getAddress
(),
PORT
);
mSocket
=
new
Socket
(
aServer
.
getAddress
(),
PORT
);
mInputStream
=
mSocket
.
getInputStream
();
mInputStream
=
mSocket
.
getInputStream
();
mReader
=
new
BufferedReader
(
new
InputStreamReader
(
mInputStream
,
mReader
=
new
BufferedReader
(
new
InputStreamReader
(
mInputStream
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment