quick fixes for app UI and VPN dialog

This commit is contained in:
Nathan Freitas 2016-10-29 11:20:51 -04:00
parent af8a867bfe
commit f4638873f8
3 changed files with 10 additions and 9 deletions

View File

@ -18,6 +18,7 @@
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<application android:name="org.torproject.android.OrbotApp" android:icon="@drawable/ic_launcher" <application android:name="org.torproject.android.OrbotApp" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
@ -26,9 +27,9 @@
android:theme="@style/DefaultTheme" android:theme="@style/DefaultTheme"
android:allowBackup="false" android:allowBackup="false"
android:allowClearUserData="true" android:allowClearUserData="true"
android:persistent="true"
android:stopWithTask="false"
android:largeHeap="false" android:largeHeap="false"
android:hardwareAccelerated="false"
> >
<activity android:name=".OrbotMainActivity" <activity android:name=".OrbotMainActivity"
@ -78,7 +79,6 @@
<activity <activity
android:name=".vpn.VPNEnableActivity" android:label="@string/app_name" android:exported="false" android:name=".vpn.VPNEnableActivity" android:label="@string/app_name" android:exported="false"
android:theme="@android:style/Theme.Translucent"
/> />

View File

@ -239,7 +239,7 @@ public class OrbotMainActivity extends AppCompatActivity
mDrawerToggle = new ActionBarDrawerToggle( mDrawerToggle = new ActionBarDrawerToggle(
this, mDrawer, this, mDrawer,
toolbar, toolbar,
android.R.string.ok, android.R.string.cancel R.string.btn_okay, R.string.btn_cancel
); );
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@ -979,7 +979,7 @@ public class OrbotMainActivity extends AppCompatActivity
} }
} }
}).setNegativeButton(android.R.string.cancel, new Dialog.OnClickListener() }).setNegativeButton(R.string.btn_cancel, new Dialog.OnClickListener()
{ {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
@ -1010,7 +1010,7 @@ public class OrbotMainActivity extends AppCompatActivity
new AlertDialog.Builder(this) new AlertDialog.Builder(this)
.setTitle(R.string.bridge_mode) .setTitle(R.string.bridge_mode)
.setView(view) .setView(view)
.setNegativeButton(android.R.string.cancel, new Dialog.OnClickListener() .setNegativeButton(R.string.btn_cancel, new Dialog.OnClickListener()
{ {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
@ -1134,7 +1134,7 @@ public class OrbotMainActivity extends AppCompatActivity
.setIcon(R.drawable.onion32) .setIcon(R.drawable.onion32)
.setTitle(title) .setTitle(title)
.setMessage(msg) .setMessage(msg)
.setPositiveButton(android.R.string.ok, null) .setPositiveButton(R.string.btn_okay, null)
.show(); .show();
} }
else else

View File

@ -14,6 +14,7 @@ import android.content.Intent;
import android.net.VpnService; import android.net.VpnService;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.util.Log; import android.util.Log;
import android.view.Window; import android.view.Window;
@ -22,7 +23,7 @@ import android.view.Window;
*/ */
@TargetApi(14) @TargetApi(14)
public class VPNEnableActivity extends Activity { public class VPNEnableActivity extends AppCompatActivity {
private final static int REQUEST_VPN = 7777; private final static int REQUEST_VPN = 7777;
private Intent intent = null; private Intent intent = null;