Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cbe4af7623 | |||
| fc9e45270a | |||
| 94c1fc2b66 | |||
| 49999634c1 | |||
| 09f4827d02 | |||
| 52e4e81e35 | |||
| 56b752f63f | |||
| 2e6e835a8e | |||
| d8b0a0ffb5 | |||
| b82d74474a | |||
| 508b855e36 |
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.limelight"
|
package="com.limelight"
|
||||||
android:versionCode="13"
|
android:versionCode="14"
|
||||||
android:versionName="2.2" >
|
android:versionName="2.2.1" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="16"
|
android:minSdkVersion="16"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
|||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="10dp"
|
||||||
tools:context=".Connection" >
|
tools:context=".Connection" >
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -93,21 +93,21 @@
|
|||||||
android:id="@+id/config720p60Selected"
|
android:id="@+id/config720p60Selected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="7dp"
|
||||||
android:text="720p 60 FPS (Recommended for most devices and networks)" />
|
android:text="720p 60 FPS (Recommended for most devices and networks)" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/config1080p30Selected"
|
android:id="@+id/config1080p30Selected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="7dp"
|
||||||
android:text="1080p 30 FPS (Recommended for most devices if 1080p streaming is desired)" />
|
android:text="1080p 30 FPS (Recommended for most devices if 1080p streaming is desired)" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/config1080p60Selected"
|
android:id="@+id/config1080p60Selected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="7dp"
|
||||||
android:text="1080p 60 FPS (Requires extremely fast device and network)" />
|
android:text="1080p 60 FPS (Requires extremely fast device and network)" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -226,6 +226,12 @@ public class Connection extends Activity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure that the bitrate preference is up to date before
|
||||||
|
// starting the game activity
|
||||||
|
prefs.edit().
|
||||||
|
putInt(Game.BITRATE_PREF_STRING, bitrateSlider.getProgress()).
|
||||||
|
commit();
|
||||||
|
|
||||||
Intent intent = new Intent(Connection.this, Game.class);
|
Intent intent = new Intent(Connection.this, Game.class);
|
||||||
intent.putExtra("host", Connection.this.hostText.getText().toString());
|
intent.putExtra("host", Connection.this.hostText.getText().toString());
|
||||||
Connection.this.startActivity(intent);
|
Connection.this.startActivity(intent);
|
||||||
@@ -299,6 +305,6 @@ public class Connection extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateBitrateLabel() {
|
private void updateBitrateLabel() {
|
||||||
bitrateLabel.setText(bitrateSlider.getProgress()+" Mbps");
|
bitrateLabel.setText("Max Bitrate: "+bitrateSlider.getProgress()+" Mbps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-14
@@ -20,6 +20,7 @@ import android.graphics.Point;
|
|||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.InputDevice;
|
import android.view.InputDevice;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
@@ -65,14 +66,14 @@ public class Game extends Activity implements SurfaceHolder.Callback, OnGenericM
|
|||||||
public static final String DECODER_PREF_STRING = "Decoder";
|
public static final String DECODER_PREF_STRING = "Decoder";
|
||||||
public static final String BITRATE_PREF_STRING = "Bitrate";
|
public static final String BITRATE_PREF_STRING = "Bitrate";
|
||||||
|
|
||||||
public static final int BITRATE_FLOOR_720_30 = 4;
|
public static final int BITRATE_FLOOR_720_30 = 2;
|
||||||
public static final int BITRATE_FLOOR_720_60 = 8;
|
public static final int BITRATE_FLOOR_720_60 = 4;
|
||||||
public static final int BITRATE_FLOOR_1080_30 = 10;
|
public static final int BITRATE_FLOOR_1080_30 = 4;
|
||||||
public static final int BITRATE_FLOOR_1080_60 = 20;
|
public static final int BITRATE_FLOOR_1080_60 = 10;
|
||||||
|
|
||||||
public static final int BITRATE_DEFAULT_720_30 = 7;
|
public static final int BITRATE_DEFAULT_720_30 = 5;
|
||||||
public static final int BITRATE_DEFAULT_720_60 = 10;
|
public static final int BITRATE_DEFAULT_720_60 = 10;
|
||||||
public static final int BITRATE_DEFAULT_1080_30 = 16;
|
public static final int BITRATE_DEFAULT_1080_30 = 10;
|
||||||
public static final int BITRATE_DEFAULT_1080_60 = 30;
|
public static final int BITRATE_DEFAULT_1080_60 = 30;
|
||||||
|
|
||||||
public static final int BITRATE_CEILING = 50;
|
public static final int BITRATE_CEILING = 50;
|
||||||
@@ -91,15 +92,24 @@ public class Game extends Activity implements SurfaceHolder.Callback, OnGenericM
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// We don't want a title bar
|
||||||
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
|
||||||
// Full-screen and don't let the display go off
|
// Full-screen and don't let the display go off
|
||||||
getWindow().setFlags(
|
getWindow().addFlags(
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
|
||||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
||||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
// We don't want a title bar
|
// If we're going to use immersive mode, we want to have
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
// the entire screen
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||||
|
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
// Change volume button behavior
|
// Change volume button behavior
|
||||||
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||||
@@ -162,8 +172,7 @@ public class Game extends Activity implements SurfaceHolder.Callback, OnGenericM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
@SuppressLint("InlinedApi")
|
||||||
private void hideSystemUi() {
|
private Runnable hideSystemUi = new Runnable() {
|
||||||
runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// Use immersive mode on 4.4+ or standard low profile on previous builds
|
// Use immersive mode on 4.4+ or standard low profile on previous builds
|
||||||
@@ -182,7 +191,14 @@ public class Game extends Activity implements SurfaceHolder.Callback, OnGenericM
|
|||||||
View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
private void hideSystemUi() {
|
||||||
|
Handler h = getWindow().getDecorView().getHandler();
|
||||||
|
if (h != null) {
|
||||||
|
h.removeCallbacks(hideSystemUi);
|
||||||
|
h.postDelayed(hideSystemUi, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -235,6 +251,16 @@ public class Game extends Activity implements SurfaceHolder.Callback, OnGenericM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
|
// Pressing a volume button drops the immersive flag so the UI shows up again and doesn't
|
||||||
|
// go away. I'm not sure if that's a bug or a feature, but we're working around it here
|
||||||
|
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
|
||||||
|
Handler h = getWindow().getDecorView().getHandler();
|
||||||
|
if (h != null) {
|
||||||
|
h.removeCallbacks(hideSystemUi);
|
||||||
|
h.postDelayed(hideSystemUi, 2000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (event.getDevice() != null &&
|
if (event.getDevice() != null &&
|
||||||
(event.getDevice().getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC)) {
|
(event.getDevice().getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC)) {
|
||||||
short translated = keybTranslator.translate(event.getKeyCode());
|
short translated = keybTranslator.translate(event.getKeyCode());
|
||||||
|
|||||||
@@ -25,8 +25,11 @@ public class Dialog implements Runnable {
|
|||||||
|
|
||||||
public static void closeDialogs()
|
public static void closeDialogs()
|
||||||
{
|
{
|
||||||
for (Dialog d : rundownDialogs)
|
for (Dialog d : rundownDialogs) {
|
||||||
d.alert.dismiss();
|
if (d.alert.isShowing()) {
|
||||||
|
d.alert.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rundownDialogs.clear();
|
rundownDialogs.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,11 @@ public class SpinnerDialog implements Runnable,OnCancelListener {
|
|||||||
|
|
||||||
public static void closeDialogs()
|
public static void closeDialogs()
|
||||||
{
|
{
|
||||||
for (SpinnerDialog d : rundownDialogs)
|
for (SpinnerDialog d : rundownDialogs) {
|
||||||
d.progress.dismiss();
|
if (d.progress.isShowing()) {
|
||||||
|
d.progress.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rundownDialogs.clear();
|
rundownDialogs.clear();
|
||||||
}
|
}
|
||||||
@@ -86,7 +89,9 @@ public class SpinnerDialog implements Runnable,OnCancelListener {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
progress.dismiss();
|
if (progress.isShowing()) {
|
||||||
|
progress.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user