mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
remove analytics settings
This commit is contained in:
parent
5b6becc63f
commit
d3d4cca0e8
3 changed files with 3 additions and 73 deletions
|
@ -13,13 +13,11 @@ namespace Bit.App.Pages
|
|||
{
|
||||
private readonly ISettings _settings;
|
||||
private readonly IAppSettingsService _appSettings;
|
||||
private readonly IGoogleAnalyticsService _googleAnalyticsService;
|
||||
|
||||
public SettingsOptionsPage()
|
||||
{
|
||||
_settings = Resolver.Resolve<ISettings>();
|
||||
_appSettings = Resolver.Resolve<IAppSettingsService>();
|
||||
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
@ -27,8 +25,6 @@ namespace Bit.App.Pages
|
|||
private RedrawableStackLayout StackLayout { get; set; }
|
||||
private ExtendedSwitchCell CopyTotpCell { get; set; }
|
||||
private Label CopyTotpLabel { get; set; }
|
||||
private ExtendedSwitchCell AnalyticsCell { get; set; }
|
||||
private Label AnalyticsLabel { get; set; }
|
||||
private ExtendedSwitchCell WebsiteIconsCell { get; set; }
|
||||
private Label WebsiteIconsLabel { get; set; }
|
||||
private ExtendedSwitchCell AutofillPersistNotificationCell { get; set; }
|
||||
|
@ -74,33 +70,11 @@ namespace Bit.App.Pages
|
|||
}
|
||||
};
|
||||
|
||||
AnalyticsCell = new ExtendedSwitchCell
|
||||
{
|
||||
Text = AppResources.DisableGA,
|
||||
On = _settings.GetValueOrDefault(Constants.SettingGaOptOut, false)
|
||||
};
|
||||
|
||||
var analyticsTable = new FormTableView(this)
|
||||
{
|
||||
Root = new TableRoot
|
||||
{
|
||||
new TableSection(Helpers.GetEmptyTableSectionTitle())
|
||||
{
|
||||
AnalyticsCell
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CopyTotpLabel = new FormTableLabel(this)
|
||||
{
|
||||
Text = AppResources.DisableAutoTotpCopyDescription
|
||||
};
|
||||
|
||||
AnalyticsLabel = new FormTableLabel(this)
|
||||
{
|
||||
Text = AppResources.DisableGADescription
|
||||
};
|
||||
|
||||
WebsiteIconsLabel = new FormTableLabel(this)
|
||||
{
|
||||
Text = AppResources.DisableWebsiteIconsDescription
|
||||
|
@ -111,10 +85,7 @@ namespace Bit.App.Pages
|
|||
Children =
|
||||
{
|
||||
websiteIconsTable, WebsiteIconsLabel,
|
||||
totpTable, CopyTotpLabel,
|
||||
#if !FDROID
|
||||
analyticsTable, AnalyticsLabel
|
||||
#endif
|
||||
totpTable, CopyTotpLabel
|
||||
},
|
||||
Spacing = 0
|
||||
};
|
||||
|
@ -202,9 +173,6 @@ namespace Bit.App.Pages
|
|||
|
||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||
{
|
||||
analyticsTable.RowHeight = websiteIconsTable.RowHeight = totpTable.RowHeight = -1;
|
||||
analyticsTable.EstimatedRowHeight = websiteIconsTable.EstimatedRowHeight =
|
||||
totpTable.EstimatedRowHeight = 70;
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||
}
|
||||
|
||||
|
@ -215,8 +183,7 @@ namespace Bit.App.Pages
|
|||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
||||
AnalyticsCell.OnChanged += AnalyticsCell_Changed;
|
||||
|
||||
WebsiteIconsCell.OnChanged += WebsiteIconsCell_Changed;
|
||||
CopyTotpCell.OnChanged += CopyTotpCell_OnChanged;
|
||||
|
||||
|
@ -231,8 +198,7 @@ namespace Bit.App.Pages
|
|||
protected override void OnDisappearing()
|
||||
{
|
||||
base.OnDisappearing();
|
||||
|
||||
AnalyticsCell.OnChanged -= AnalyticsCell_Changed;
|
||||
|
||||
WebsiteIconsCell.OnChanged -= WebsiteIconsCell_Changed;
|
||||
CopyTotpCell.OnChanged -= CopyTotpCell_OnChanged;
|
||||
|
||||
|
@ -255,18 +221,6 @@ namespace Bit.App.Pages
|
|||
_appSettings.DisableWebsiteIcons = cell.On;
|
||||
}
|
||||
|
||||
private void AnalyticsCell_Changed(object sender, ToggledEventArgs e)
|
||||
{
|
||||
var cell = sender as ExtendedSwitchCell;
|
||||
if(cell == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_settings.AddOrUpdateValue(Constants.SettingGaOptOut, cell.On);
|
||||
_googleAnalyticsService.SetAppOptOut(cell.On);
|
||||
}
|
||||
|
||||
private void CopyTotpCell_OnChanged(object sender, ToggledEventArgs e)
|
||||
{
|
||||
var cell = sender as ExtendedSwitchCell;
|
||||
|
|
18
src/App/Resources/AppResources.Designer.cs
generated
18
src/App/Resources/AppResources.Designer.cs
generated
|
@ -1122,24 +1122,6 @@ namespace Bit.App.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable Analytics.
|
||||
/// </summary>
|
||||
public static string DisableGA {
|
||||
get {
|
||||
return ResourceManager.GetString("DisableGA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to We use analytics to better learn how the app is being used so that we can make it better. All data collection is completely anonymous..
|
||||
/// </summary>
|
||||
public static string DisableGADescription {
|
||||
get {
|
||||
return ResourceManager.GetString("DisableGADescription", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable Website Icons.
|
||||
/// </summary>
|
||||
|
|
|
@ -302,9 +302,6 @@
|
|||
<value>Ok</value>
|
||||
<comment>Acknowledgement.</comment>
|
||||
</data>
|
||||
<data name="DisableGA" xml:space="preserve">
|
||||
<value>Disable Analytics</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
<comment>Label for a password.</comment>
|
||||
|
@ -812,9 +809,6 @@
|
|||
<data name="ShareVaultDescription" xml:space="preserve">
|
||||
<value>Create an organization to securely share your items with other users.</value>
|
||||
</data>
|
||||
<data name="DisableGADescription" xml:space="preserve">
|
||||
<value>We use analytics to better learn how the app is being used so that we can make it better. All data collection is completely anonymous.</value>
|
||||
</data>
|
||||
<data name="AutofillPasswordField" xml:space="preserve">
|
||||
<value>Scan When Password Field Focused</value>
|
||||
</data>
|
||||
|
|
Loading…
Reference in a new issue