Browse Source

perms prompt now doesn't show the back button - android

pull/1117/head
hypnosis-i2p 7 years ago
parent
commit
1de4c2e8c6
  1. 1
      android/AndroidManifest.xml
  2. 2
      android/src/org/purplei2p/i2pd/I2PDPermsAskerActivity.java
  3. 4
      android/src/org/purplei2p/i2pd/I2PDPermsExplanationActivity.java

1
android/AndroidManifest.xml

@ -18,6 +18,7 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"
> >
<receiver android:name=".NetworkStateChangeReceiver"> <receiver android:name=".NetworkStateChangeReceiver">
<intent-filter> <intent-filter>

2
android/src/org/purplei2p/i2pd/I2PDPermsAskerActivity.java

@ -124,6 +124,8 @@ public class I2PDPermsAskerActivity extends Activity {
ActivityCompat.requestPermissions(I2PDPermsAskerActivity.this, ActivityCompat.requestPermissions(I2PDPermsAskerActivity.this,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
PERMISSION_WRITE_EXTERNAL_STORAGE); PERMISSION_WRITE_EXTERNAL_STORAGE);
} else {
finish(); //close the app
} }
} }
} }

4
android/src/org/purplei2p/i2pd/I2PDPermsExplanationActivity.java

@ -1,5 +1,6 @@
package org.purplei2p.i2pd; package org.purplei2p.i2pd;
import android.app.ActionBar;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.app.Activity; import android.app.Activity;
@ -12,7 +13,8 @@ public class I2PDPermsExplanationActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_perms_explanation); setContentView(R.layout.activity_perms_explanation);
//getActionBar().setDisplayHomeAsUpEnabled(true); ActionBar actionBar = getActionBar();
if(actionBar!=null)actionBar.setHomeButtonEnabled(false);
Button button_ok = (Button) findViewById(R.id.button_ok); Button button_ok = (Button) findViewById(R.id.button_ok);
button_ok.setOnClickListener(new View.OnClickListener() { button_ok.setOnClickListener(new View.OnClickListener() {
@Override @Override

Loading…
Cancel
Save