diff --git a/src/main/java/dk/aau/netsec/hostage/ui/activity/MainActivity.java b/src/main/java/dk/aau/netsec/hostage/ui/activity/MainActivity.java index 60ab73be..b8bf85d5 100644 --- a/src/main/java/dk/aau/netsec/hostage/ui/activity/MainActivity.java +++ b/src/main/java/dk/aau/netsec/hostage/ui/activity/MainActivity.java @@ -52,7 +52,6 @@ import dk.aau.netsec.hostage.ui.adapter.DrawerListAdapter; import dk.aau.netsec.hostage.ui.fragment.AboutFragment; import dk.aau.netsec.hostage.ui.fragment.HomeFragment; -import dk.aau.netsec.hostage.ui.fragment.PrivacyFragment; import dk.aau.netsec.hostage.ui.fragment.ProfileManagerFragment; import dk.aau.netsec.hostage.ui.fragment.RecordOverviewFragment; import dk.aau.netsec.hostage.ui.fragment.ServicesFragment; @@ -419,7 +418,6 @@ private void loadDrawer() { mDrawerItems.add(new DrawerListItem(R.string.drawer_profile_manager, R.drawable.ic_menu_allfriends)); mDrawerItems.add(new DrawerListItem(R.string.drawer_settings, R.drawable.ic_menu_preferences)); mDrawerItems.add(new DrawerListItem(R.string.drawer_app_info, R.drawable.ic_menu_info_details)); - mDrawerItems.add(new DrawerListItem(R.string.privacy_policy, R.drawable.ic_menu_privacy)); DrawerListAdapter listAdapter = new DrawerListAdapter(this, mDrawerItems); @@ -817,8 +815,7 @@ public enum MainMenuItem { SERVICES(4, ServicesFragment.class), PROFILE_MANAGER(5, ProfileManagerFragment.class), SETTINGS(6, SettingsFragment.class), - APPLICATION_INFO(7, AboutFragment.class), - PRIVACY(8, PrivacyFragment.class); + APPLICATION_INFO(7, AboutFragment.class); private int value; diff --git a/src/main/java/dk/aau/netsec/hostage/ui/fragment/PrivacyFragment.java b/src/main/java/dk/aau/netsec/hostage/ui/fragment/PrivacyFragment.java deleted file mode 100644 index 45647079..00000000 --- a/src/main/java/dk/aau/netsec/hostage/ui/fragment/PrivacyFragment.java +++ /dev/null @@ -1,208 +0,0 @@ -package dk.aau.netsec.hostage.ui.fragment; - -import android.app.Activity; -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.text.method.LinkMovementMethod; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.text.HtmlCompat; -import androidx.fragment.app.Fragment; - -import dk.aau.netsec.hostage.R; - -/** - * Shows Privacy information - * Added as a part for fix in Android 11 - * - * @author Shreyas Srinivasa - * Created on 01-03-2021 - */ -public class PrivacyFragment extends Fragment { - - private static final String PRIVACY_POLICY_URL = "https://aau-network-security.github.io/HosTaGe/Privacy_policy.html"; - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - setHasOptionsMenu(true); - super.onCreate(savedInstanceState); - } - - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - super.onCreateView(inflater, container, savedInstanceState); - - final Activity activity = getActivity(); - if (activity != null) { - activity.setTitle(getResources().getString(R.string.privacy_policy)); - } - - View rootView = inflater.inflate(R.layout.fragment_privacy, container, false); - - String policyText = - "\n" + - " \n" + - "
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - "Last updated: July 20, 2021
\n" + - " Privacy Policy\n" + - " Aalborg University, Denmark built the HosTaGe app as" + - " an Open Source app. This SERVICE is provided by" + - " Aalborg University, Denmark at no cost and is intended for use as" + - " is." + - "
" + - " This page is used to inform visitors regarding our" + - " policies with the collection, use, and disclosure of Personal" + - " Information if anyone decided to use our Service." + - "
" + - " If you choose to use our Service, then you agree to" + - " the collection and use of information in relation to this" + - " policy. The Personal Information that we collect is" + - " used for providing and improving the Service. We will not use or share your information with" + - " anyone except as described in this Privacy Policy." + - "
" + - " The users can consent for the following:" + - "
" + - " The terms used in this Privacy Policy have the same meanings" + - " as in our Terms and Conditions, which is accessible at" + - " HosTaGe unless otherwise defined in this Privacy Policy." + - " The Privacy Policy of Aalborg University can be accessed at https://www.en.aau.dk/privacy-policy-cookies#370625 " + - "
Information Collection and Use
" + - " For a better experience, while using our Service, we" + - " may require you to provide us with certain personally" + - " identifiable information. The information that" + - " we request will be retained by us and used as described in this privacy policy." + - "
" + - " On app startup, we ask for user consent for accessing the location permission. " + - " This information is required to access the network related information, necessary for the app main functionality." + - "
" + - "
" + - " The app does use third party services that may collect" + - " information used to identify you." + - "
" + - " Link to privacy policy of third party service providers used" + - " by the app" + - "
Log Data
" + - " We want to inform you that whenever you" + - " use our Service, in a case of an error in the app" + - " we collect data and information (through third party" + - " products) on your phone called Log Data. This Log Data may" + - " include information such as your device Internet Protocol" + - " (“IP”) address, device name, operating system version, the" + - " configuration of the app when utilizing our Service," + - " the time and date of your use of the Service, and other" + - " statistics. The logs will be purged periodically every 3 months." + - "
Cookies
" + - " Cookies are files with a small amount of data that are" + - " commonly used as anonymous unique identifiers. These are sent" + - " to your browser from the websites that you visit and are" + - " stored on your device's internal memory." + - "
" + - " This Service does not use these “cookies” explicitly. However," + - " the app may use third party code and libraries that use" + - " “cookies” to collect information and improve their services." + - " You have the option to either accept or refuse these cookies" + - " and know when a cookie is being sent to your device. If you" + - " choose to refuse our cookies, you may not be able to use some" + - " portions of this Service." + - "
Service Providers
" + - " We may employ third-party companies and" + - " individuals due to the following reasons:" + - "
" + - " We want to inform users of this Service" + - " that these third parties have access to your Personal" + - " Information. The reason is to perform the tasks assigned to" + - " them on our behalf. However, they are obligated not to" + - " disclose or use the information for any other purpose." + - "
Security
" + - " We value your trust in providing us your" + - " Personal Information, thus we are striving to use commercially" + - " acceptable means of protecting it. But remember that no method" + - " of transmission over the internet, or method of electronic" + - " storage is 100% secure and reliable, and we cannot" + - " guarantee its absolute security." + - "
Links to Other Sites
" + - " This Service may contain links to other sites. If you click on" + - " a third-party link, you will be directed to that site. Note" + - " that these external sites are not operated by us." + - " Therefore, we strongly advise you to review the" + - " Privacy Policy of these websites. We have" + - " no control over and assume no responsibility for the content," + - " privacy policies, or practices of any third-party sites or" + - " services." + - "
Children’s Privacy
" + - " These Services do not address anyone under the age of 13." + - " We do not knowingly collect personally" + - " identifiable information from children under 13 years of age. In the case" + - " we discover that a child under 13 has provided" + - " us with personal information, we immediately" + - " delete this from our servers. If you are a parent or guardian" + - " and you are aware that your child has provided us with" + - " personal information, please contact us so that" + - " we will be able to do necessary actions." + - "
Changes to This Privacy Policy
" + - " We may update our Privacy Policy from" + - " time to time. Thus, you are advised to review this page" + - " periodically for any changes. We will" + - " notify you of any changes by posting the new Privacy Policy on" + - " this page." + - "
" + - " This Privacy Policy is also available at " - + PRIVACY_POLICY_URL + ""+ - "
This policy is effective as of 2021-03-08
Contact Us
" + - " If you have any questions or suggestions about our" + - " Privacy Policy, do not hesitate to contact us at hostage@es.aau.dk." + - "Data subjects have the right to submit a complaint about how their personal data is processed" + - "to the Danish Data Protection Agency at dt@datatilsynet.dk or by post to Datatilsynet/the " + - "Danish Data Protection Agency, Borgergade 28, 5., 1300 Copenhagen K." + - "Please contact our Data Protection Officer if you have any question about the processing of " + - "your personal data at dpo@aau.dk" + - "However, before contacting the Danish Data Protection Agency, we recommend that you " + - "contact Aalborg University’s data protection officer who may be able to solve the matter." + - "\n" + - " \n" + - " \n"; - - TextView policy = rootView.findViewById(R.id.policyText); - policy.setText(HtmlCompat.fromHtml(policyText, 0)); - policy.setMovementMethod(LinkMovementMethod.getInstance()); - - return rootView; - } - - @Override - public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) { - inflater.inflate(R.menu.privacy_policy_menu, menu); - } - - @Override - public boolean onOptionsItemSelected(@NonNull MenuItem item) { - if (item.getItemId() == R.id.privacy_link_open){ - - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(PRIVACY_POLICY_URL)); - startActivity(browserIntent); - - return true; - } - - return false; - } -} diff --git a/src/main/res/drawable-hdpi/ic_menu_privacy.png b/src/main/res/drawable-hdpi/ic_menu_privacy.png deleted file mode 100644 index 7eae80c1..00000000 Binary files a/src/main/res/drawable-hdpi/ic_menu_privacy.png and /dev/null differ diff --git a/src/main/res/drawable-hdpi/ic_menu_privacy_old.png b/src/main/res/drawable-hdpi/ic_menu_privacy_old.png deleted file mode 100644 index cd3a3e03..00000000 Binary files a/src/main/res/drawable-hdpi/ic_menu_privacy_old.png and /dev/null differ