Added GitHub/BitBucket privacy policy links

pull/209/head
M66B 2 years ago
parent e5ba419e75
commit 84809619b2

@ -137,9 +137,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private EditText etSend; private EditText etSend;
private ImageButton ibSend; private ImageButton ibSend;
private SwitchCompat swUpdates; private SwitchCompat swUpdates;
private TextView tvGithubPrivacy;
private ImageButton ibChannelUpdated; private ImageButton ibChannelUpdated;
private SwitchCompat swCheckWeekly; private SwitchCompat swCheckWeekly;
private SwitchCompat swBeta; private SwitchCompat swBeta;
private TextView tvBitBucketPrivacy;
private SwitchCompat swChangelog; private SwitchCompat swChangelog;
private SwitchCompat swCrashReports; private SwitchCompat swCrashReports;
private TextView tvUuid; private TextView tvUuid;
@ -350,9 +352,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
etSend = view.findViewById(R.id.etSend); etSend = view.findViewById(R.id.etSend);
ibSend = view.findViewById(R.id.ibSend); ibSend = view.findViewById(R.id.ibSend);
swUpdates = view.findViewById(R.id.swUpdates); swUpdates = view.findViewById(R.id.swUpdates);
tvGithubPrivacy = view.findViewById(R.id.tvGithubPrivacy);
ibChannelUpdated = view.findViewById(R.id.ibChannelUpdated); ibChannelUpdated = view.findViewById(R.id.ibChannelUpdated);
swCheckWeekly = view.findViewById(R.id.swWeekly); swCheckWeekly = view.findViewById(R.id.swWeekly);
swBeta = view.findViewById(R.id.swBeta); swBeta = view.findViewById(R.id.swBeta);
tvBitBucketPrivacy = view.findViewById(R.id.tvBitBucketPrivacy);
swChangelog = view.findViewById(R.id.swChangelog); swChangelog = view.findViewById(R.id.swChangelog);
swCrashReports = view.findViewById(R.id.swCrashReports); swCrashReports = view.findViewById(R.id.swCrashReports);
tvUuid = view.findViewById(R.id.tvUuid); tvUuid = view.findViewById(R.id.tvUuid);
@ -817,6 +821,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
} }
}); });
tvGithubPrivacy.getPaint().setUnderlineText(true);
tvGithubPrivacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Uri.parse(Helper.GITHUB_PRIVACY_URI), true);
}
});
final Intent channelUpdate = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS) final Intent channelUpdate = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
.putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName()) .putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName())
.putExtra(Settings.EXTRA_CHANNEL_ID, "update"); .putExtra(Settings.EXTRA_CHANNEL_ID, "update");
@ -843,6 +855,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
} }
}); });
tvBitBucketPrivacy.getPaint().setUnderlineText(true);
tvBitBucketPrivacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Uri.parse(Helper.BITBUCKET_PRIVACY_URI), true);
}
});
swChangelog.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swChangelog.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -197,6 +197,8 @@ public class Helper {
static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID; static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID;
static final String BIMI_PRIVACY_URI = "https://datatracker.ietf.org/doc/html/draft-brotman-ietf-bimi-guidance-03#section-7.4"; static final String BIMI_PRIVACY_URI = "https://datatracker.ietf.org/doc/html/draft-brotman-ietf-bimi-guidance-03#section-7.4";
static final String LT_PRIVACY_URI = "https://languagetool.org/legal/privacy"; static final String LT_PRIVACY_URI = "https://languagetool.org/legal/privacy";
static final String GITHUB_PRIVACY_URI = "https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement";
static final String BITBUCKET_PRIVACY_URI = "https://www.atlassian.com/legal/privacy-policy";
static final String ID_COMMAND_URI = "https://datatracker.ietf.org/doc/html/rfc2971#section-3.1"; static final String ID_COMMAND_URI = "https://datatracker.ietf.org/doc/html/rfc2971#section-3.1";
static final String AUTH_RESULTS_URI = "https://datatracker.ietf.org/doc/html/rfc7601"; static final String AUTH_RESULTS_URI = "https://datatracker.ietf.org/doc/html/rfc7601";
static final String FAVICON_PRIVACY_URI = "https://en.wikipedia.org/wiki/Favicon"; static final String FAVICON_PRIVACY_URI = "https://en.wikipedia.org/wiki/Favicon";

@ -536,6 +536,21 @@
app:layout_constraintTop_toBottomOf="@id/ibSend" app:layout_constraintTop_toBottomOf="@id/ibSend"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<TextView
android:id="@+id/tvGithubPrivacy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:text="@string/title_privacy_policy"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swUpdates" />
<ImageButton <ImageButton
android:id="@+id/ibChannelUpdated" android:id="@+id/ibChannelUpdated"
android:layout_width="24dp" android:layout_width="24dp"
@ -544,7 +559,7 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/swUpdates" app:layout_constraintTop_toBottomOf="@+id/tvGithubPrivacy"
app:srcCompat="@drawable/switch_off_on" /> app:srcCompat="@drawable/switch_off_on" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
@ -571,6 +586,21 @@
app:layout_constraintTop_toBottomOf="@id/swWeekly" app:layout_constraintTop_toBottomOf="@id/swWeekly"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<TextView
android:id="@+id/tvBitBucketPrivacy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:text="@string/title_privacy_policy"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:drawableTint="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swBeta" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swChangelog" android:id="@+id/swChangelog"
android:layout_width="0dp" android:layout_width="0dp"
@ -579,7 +609,7 @@
android:text="@string/title_advanced_changelog" android:text="@string/title_advanced_changelog"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swBeta" app:layout_constraintTop_toBottomOf="@id/tvBitBucketPrivacy"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
@ -707,7 +737,7 @@
android:id="@+id/grpUpdates" android:id="@+id/grpUpdates"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:constraint_referenced_ids="swUpdates,swWeekly" /> app:constraint_referenced_ids="swUpdates,tvGithubPrivacy,swWeekly,swBeta,tvBitBucketPrivacy" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

Loading…
Cancel
Save