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();
conn.setRequestMethod("GET");
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());
ByteArrayOutputStream result = new ByteArrayOutputStream();
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());
((ImageView) childview.findViewById(R.id.item_icon))
.setImageResource(file == null ? R.drawable.config
: file.isDirectory() ? R.drawable.open_folder
: R.drawable.disk_unknown);
.setImageResource(file == null ? R.drawable.config : file.isDirectory()
? R.drawable.open_folder : R.drawable.disk_unknown);
childview.setTag(file);

View File

@ -247,7 +247,8 @@ public class MainActivity extends AppCompatActivity implements
public void onGameSelected(Uri uri) {
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;
if (!isBiosExisting(MainActivity.this))
@ -258,7 +259,8 @@ public class MainActivity extends AppCompatActivity implements
if (msg != null) {
launchBIOSdetection();
} 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) {
startActivity(new Intent("com.reicast.EMULATOR", uri, getApplicationContext(),
GL2JNINative.class));
@ -301,7 +303,8 @@ public class MainActivity extends AppCompatActivity implements
builder.setNegativeButton(R.string.gdrive,
new DialogInterface.OnClickListener() {
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();

View File

@ -107,8 +107,7 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
writer.close();
os.close();
int responseCode=conn.getResponseCode();
int responseCode = conn.getResponseCode();
if (responseCode != HttpsURLConnection.HTTP_OK) {
String header = conn.getHeaderField("Location");
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"
android:id="@+id/drawer_layout"
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
<LinearLayout
android:id="@+id/root_list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/root_list"
android:id="@+id/header_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/header_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginBottom="2dp"
android:orientation="horizontal" >
<LinearLayout
<ImageView
android:id="@+id/header_menu"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginBottom="2dp"
android:orientation="horizontal" >
android:layout_height="fill_parent"
app:srcCompat="@drawable/ic_drawer" />
<ImageView
android:id="@+id/header_menu"
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"
<ImageView
android:id="@+id/header_icon"
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" />
android:layout_height="fill_parent"
app:srcCompat="@drawable/ic_launcher" />
</LinearLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/menu_heading"
style="@android:style/TextAppearance.Large"
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>
</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="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">
<item>Controller A</item>