Realign with cherry-pick and fix formatting

This commit is contained in:
TwistedUmbrella 2018-04-02 05:10:16 -04:00
parent c9be03bc5e
commit 29ce6bd71a
6 changed files with 48 additions and 54 deletions

View File

@ -219,9 +219,9 @@ public class AboutFragment extends Fragment {
HttpURLConnection conn = (HttpURLConnection) new URL(urlString).openConnection(); HttpURLConnection conn = (HttpURLConnection) new URL(urlString).openConnection();
conn.setRequestMethod("GET"); conn.setRequestMethod("GET");
conn.setDoInput(true); conn.setDoInput(true);
int responseCode = conn.getResponseCode();
if (responseCode != HttpsURLConnection.HTTP_OK) { int responseCode = conn.getResponseCode();
if (responseCode == HttpsURLConnection.HTTP_OK) {
InputStream is = new BufferedInputStream(conn.getInputStream()); InputStream is = new BufferedInputStream(conn.getInputStream());
ByteArrayOutputStream result = new ByteArrayOutputStream(); ByteArrayOutputStream result = new ByteArrayOutputStream();
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];

View File

@ -467,9 +467,8 @@ public class FileBrowser extends Fragment {
((TextView) childview.findViewById(R.id.item_name)).setText(file.getName()); ((TextView) childview.findViewById(R.id.item_name)).setText(file.getName());
((ImageView) childview.findViewById(R.id.item_icon)) ((ImageView) childview.findViewById(R.id.item_icon))
.setImageResource(file == null ? R.drawable.config .setImageResource(file == null ? R.drawable.config : file.isDirectory()
: file.isDirectory() ? R.drawable.open_folder ? R.drawable.open_folder : R.drawable.disk_unknown);
: R.drawable.disk_unknown);
childview.setTag(file); childview.setTag(file);

View File

@ -247,7 +247,8 @@ public class MainActivity extends AppCompatActivity implements
public void onGameSelected(Uri uri) { public void onGameSelected(Uri uri) {
if (Config.readOutput("uname -a").equals(getString(R.string.error_kernel))) { if (Config.readOutput("uname -a").equals(getString(R.string.error_kernel))) {
MainActivity.showToastMessage(MainActivity.this, getString(R.string.unsupported), R.drawable.ic_notification, Toast.LENGTH_SHORT); MainActivity.showToastMessage(MainActivity.this, getString(R.string.unsupported),
R.drawable.ic_notification, Toast.LENGTH_SHORT);
} }
String msg = null; String msg = null;
if (!isBiosExisting(MainActivity.this)) if (!isBiosExisting(MainActivity.this))
@ -258,7 +259,8 @@ public class MainActivity extends AppCompatActivity implements
if (msg != null) { if (msg != null) {
launchBIOSdetection(); launchBIOSdetection();
} else { } else {
Config.nativeact = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean(Config.pref_nativeact, Config.nativeact); Config.nativeact = PreferenceManager.getDefaultSharedPreferences(
getApplicationContext()).getBoolean(Config.pref_nativeact, Config.nativeact);
if (Config.nativeact) { if (Config.nativeact) {
startActivity(new Intent("com.reicast.EMULATOR", uri, getApplicationContext(), startActivity(new Intent("com.reicast.EMULATOR", uri, getApplicationContext(),
GL2JNINative.class)); GL2JNINative.class));
@ -301,7 +303,8 @@ public class MainActivity extends AppCompatActivity implements
builder.setNegativeButton(R.string.gdrive, builder.setNegativeButton(R.string.gdrive,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
Toast.makeText(MainActivity.this, R.string.require_bios, Toast.LENGTH_SHORT).show(); Toast.makeText(MainActivity.this,
R.string.require_bios, Toast.LENGTH_SHORT).show();
} }
}); });
builder.create(); builder.create();

View File

@ -107,8 +107,7 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
writer.close(); writer.close();
os.close(); os.close();
int responseCode=conn.getResponseCode(); int responseCode = conn.getResponseCode();
if (responseCode != HttpsURLConnection.HTTP_OK) { if (responseCode != HttpsURLConnection.HTTP_OK) {
String header = conn.getHeaderField("Location"); String header = conn.getHeaderField("Location");
if (header != null && header.length() != 0) { if (header != null && header.length() != 0) {

View File

@ -1,64 +1,57 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout" android:id="@+id/content_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent" >
<!-- The main content view --> <!-- The main content view -->
<LinearLayout
<FrameLayout android:id="@+id/root_list"
android:id="@+id/content_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout <LinearLayout
android:id="@+id/root_list" android:id="@+id/header_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" > android:layout_marginBottom="2dp"
android:orientation="horizontal" >
<LinearLayout <LinearLayout
android:id="@+id/header_list" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="48dp"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:orientation="horizontal" > android:orientation="horizontal" >
<LinearLayout <ImageView
android:id="@+id/header_menu"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48dp" android:layout_height="fill_parent"
android:layout_marginBottom="2dp" app:srcCompat="@drawable/ic_drawer" />
android:orientation="horizontal" >
<ImageView <ImageView
android:id="@+id/header_menu" android:id="@+id/header_icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
app:srcCompat="@drawable/ic_drawer" />
<ImageView
android:id="@+id/header_icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
app:srcCompat="@drawable/ic_launcher" />
</LinearLayout>
<TextView
android:id="@+id/menu_heading"
style="@android:style/TextAppearance.Large"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="fill_parent"
android:layout_gravity="center_vertical" app:srcCompat="@drawable/ic_launcher" />
android:layout_marginLeft="4dp"
android:layout_weight="1"
android:text="@string/app_name" />
</LinearLayout> </LinearLayout>
<FrameLayout <TextView
android:id="@+id/fragment_container" android:id="@+id/menu_heading"
android:layout_width="match_parent" style="@android:style/TextAppearance.Large"
android:layout_height="match_parent" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_weight="1"
android:text="@string/app_name" />
</LinearLayout> </LinearLayout>
</FrameLayout>
</android.support.v4.widget.DrawerLayout> <FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</FrameLayout>

View File

@ -87,7 +87,7 @@
<string name="moga_connect">MOGA verbunden!</string> <string name="moga_connect">MOGA verbunden!</string>
<string name="about_text">reicast ist ein Dreamcast-Emulator</string> <string name="about_text">reicast ist ein Dreamcast-Emulator</string>
<string name="revision_text">Version: %1$s</string> <string name="revision_text">Version: %1$s [%2$s]</string>
<string-array name="controllers"> <string-array name="controllers">
<item>Controller A</item> <item>Controller A</item>