mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2026-08-20 21:03:08 +00:00
Add privacy policy inside application and repository
This should permit to prevent Google play removal due to this missing information.
This commit is contained in:
@@ -73,8 +73,10 @@ public class MainActivity extends AppCompatActivity
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
setupToolbar();
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
drawer = findViewById(R.id.drawer_layout);
|
||||
setupDrawer();
|
||||
@@ -153,7 +155,7 @@ public class MainActivity extends AppCompatActivity
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(MenuItem item) {
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
boolean res = true;
|
||||
|
||||
@@ -176,6 +178,11 @@ public class MainActivity extends AppCompatActivity
|
||||
case R.id.nav_appinfo_perms:
|
||||
res = openAppInfos();
|
||||
break;
|
||||
case R.id.nav_appinfo_privacy_policy:
|
||||
res = openPrivacyPolicy();
|
||||
break;
|
||||
default:
|
||||
Log.e(TAG, "Unhandled navigation item " + Integer.toString(id));
|
||||
}
|
||||
closeDrawer();
|
||||
return res;
|
||||
@@ -218,7 +225,7 @@ public class MainActivity extends AppCompatActivity
|
||||
Intent intent;
|
||||
try {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + getPackageName()));
|
||||
} catch (android.content.ActivityNotFoundException anfe) {
|
||||
} catch (android.content.ActivityNotFoundException e) {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + getPackageName()));
|
||||
}
|
||||
|
||||
@@ -235,6 +242,11 @@ public class MainActivity extends AppCompatActivity
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean openPrivacyPolicy() {
|
||||
startActivity(new Intent(this, PrivacyPolicyActivity.class));
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Permissions
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package fr.unix_experience.owncloud_sms.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
|
||||
import fr.unix_experience.owncloud_sms.R;
|
||||
|
||||
public class PrivacyPolicyActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_privacy_policy);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user