Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Commit

Permalink
Textual updates: copyright year, license, privacy information
Browse files Browse the repository at this point in the history
 - Removed year from copyright in about dialog
 - Removed license information for Firebase JobDispatcher which is no longer used (directly)
 - Added privacy information to signup process (general and notifications) and user settings (notifications) to make data usage more transparent
  • Loading branch information
jpelgrom committed Feb 6, 2019
1 parent c3ecc39 commit 4cbddbe
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class AccountNotificationsFragment extends Fragment {
@BindView(R.id.error) TextView error;

@BindView(R.id.types) LinearLayout types;
@BindView(R.id.privacy) LinearLayout privacy;

@BindView(R.id.go) Button go;

Expand Down Expand Up @@ -69,12 +70,9 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {

getTypes();

go.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
error.setVisibility(View.GONE);
save();
}
go.setOnClickListener(view1 -> {
error.setVisibility(View.GONE);
save();
});
}

Expand All @@ -91,9 +89,11 @@ public void onResponse(Call<List<NotificationType>> call, Response<List<Notifica
updateTypesList();

error.setVisibility(View.GONE);
privacy.setVisibility(View.VISIBLE);
} else {
error.setText(ErrorUtil.getErrorMessage(getContext(), response));
error.setVisibility(View.VISIBLE);
privacy.setVisibility(View.GONE);
}
}

Expand All @@ -106,6 +106,7 @@ public void onFailure(Call<List<NotificationType>> call, Throwable t) {

error.setText(ErrorUtil.getErrorMessage(getContext(), null));
error.setVisibility(View.VISIBLE);
privacy.setVisibility(View.GONE);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class SettingsAccountOverviewFragment extends Fragment {

@BindView(R.id.notifications) LinearLayout notificationsWrapper;
@BindView(R.id.notificationsEmpty) TextView notificationsEmpty;
@BindView(R.id.notificationsPrivacy) LinearLayout notificationsPrivacy;
@BindView(R.id.notificationTypes) LinearLayout notificationsList;

private User user;
Expand Down Expand Up @@ -207,6 +208,7 @@ public void run() {
notificationsWrapper.setVisibility(View.VISIBLE);
notificationsList.setVisibility(typeList.size() > 0 ? View.VISIBLE : View.GONE);
notificationsEmpty.setVisibility(typeList.size() > 0 ? View.GONE : View.VISIBLE);
notificationsPrivacy.setVisibility(typeList.size() > 0 ? View.VISIBLE : View.GONE);
}

private void editDetail(SettingsAccountUpdateFragment.UpdateMode mode) {
Expand Down Expand Up @@ -417,6 +419,7 @@ public void onResponse(Call<List<NotificationType>> call, Response<List<Notifica
notificationsWrapper.setVisibility(user != null ? View.VISIBLE : View.GONE);
notificationsList.setVisibility(View.GONE);
notificationsEmpty.setVisibility(View.VISIBLE);
notificationsPrivacy.setVisibility(View.GONE);
}
}

Expand All @@ -428,6 +431,7 @@ public void onFailure(Call<List<NotificationType>> call, Throwable t) {
notificationsWrapper.setVisibility(user != null ? View.VISIBLE : View.GONE);
notificationsList.setVisibility(View.GONE);
notificationsEmpty.setVisibility(View.VISIBLE);
notificationsPrivacy.setVisibility(View.GONE);
}
});
}
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable-night/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#BDBDBD"
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#676767"
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
22 changes: 22 additions & 0 deletions app/src/main/res/layout/fragment_account_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@

</com.google.android.material.textfield.TextInputLayout>

<LinearLayout
android:id="@+id/privacy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/listPreferredItemHeightSmall"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_marginTop="16dp">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
app:srcCompat="@drawable/ic_info"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/user_privacy_general"/>

</LinearLayout>

<Button
android:id="@+id/go"
android:layout_width="match_parent"
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/res/layout/fragment_account_notifications.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand Down Expand Up @@ -59,6 +60,32 @@
android:layout_height="wrap_content"
android:orientation="vertical"/>

<LinearLayout
android:id="@+id/privacy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/listPreferredItemHeightSmall"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_marginTop="16dp"
android:visibility="gone"
tools:visibility="visible">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
app:srcCompat="@drawable/ic_info"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/user_privacy_notifications"/>

</LinearLayout>

<Button
android:id="@+id/go"
android:layout_width="match_parent"
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/res/layout/fragment_settings_account_overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,31 @@
android:layout_height="wrap_content"
android:orientation="vertical"/>

<LinearLayout
android:id="@+id/notificationsPrivacy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/listPreferredItemHeightSmall"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:visibility="gone"
tools:visibility="visible">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="32dp"
app:srcCompat="@drawable/ic_info"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/user_privacy_notifications"/>

</LinearLayout>

</LinearLayout>

</LinearLayout>
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/layout/fragment_settings_licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
app:licenseNotice="Copyright 2013 Jake Wharton"
app:licenseLicense="@string/license_apache" />

<nl.jpelgrm.movienotifier.ui.view.LicenseTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:licenseTitle="Firebase JobDispatcher"
app:licenseNotice="Copyright 2016 Google Inc."
app:licenseLicense="@string/license_apache" />

<nl.jpelgrm.movienotifier.ui.view.LicenseTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<string name="settings_about_title">About</string>
<string name="settings_about_name">Movie Notifier Android</string>
<string name="settings_about_version">Version %1$s, build %2$s</string>
<string name="settings_about_copyright">App © 2017 Joris Pelgröm\nService © 2017 Sijmen Huizenga</string>
<string name="settings_about_copyright">App © Joris Pelgröm\nService © Sijmen Huizenga</string>
<string name="settings_about_github"><a href='https://github.com/jpelgrom/Movie-Notifier-Android'>View source code</a></string>

<string name="account_start_title">Hi there!</string>
Expand Down Expand Up @@ -153,6 +153,8 @@
<string name="user_settings_update_name_success">Username updated</string>
<string name="user_settings_update_email_success">Email address updated</string>
<string name="user_settings_update_phone_success">Phone number updated</string>
<string name="user_privacy_general">Your data is stored securely and will only be used to allow you to use Movie Notifier. You can update or delete your account at any time in the app.</string>
<string name="user_privacy_notifications">Your email address or phone number is only shared with the notification service when a notification is sent. No data is shared when there aren\'t any notifications or if you haven\'t turned the notification service on.</string>

<string name="error_login_401">Your username and/or password is incorrect.</string>
<string name="error_watchers_400">Sorry, please try again.</string>
Expand Down

0 comments on commit 4cbddbe

Please sign in to comment.