mirror of
https://github.com/bitwarden/android.git
synced 2025-03-28 00:29:24 +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 ISettings _settings;
|
||||||
private readonly IAppSettingsService _appSettings;
|
private readonly IAppSettingsService _appSettings;
|
||||||
private readonly IGoogleAnalyticsService _googleAnalyticsService;
|
|
||||||
|
|
||||||
public SettingsOptionsPage()
|
public SettingsOptionsPage()
|
||||||
{
|
{
|
||||||
_settings = Resolver.Resolve<ISettings>();
|
_settings = Resolver.Resolve<ISettings>();
|
||||||
_appSettings = Resolver.Resolve<IAppSettingsService>();
|
_appSettings = Resolver.Resolve<IAppSettingsService>();
|
||||||
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
|
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
@ -27,8 +25,6 @@ namespace Bit.App.Pages
|
||||||
private RedrawableStackLayout StackLayout { get; set; }
|
private RedrawableStackLayout StackLayout { get; set; }
|
||||||
private ExtendedSwitchCell CopyTotpCell { get; set; }
|
private ExtendedSwitchCell CopyTotpCell { get; set; }
|
||||||
private Label CopyTotpLabel { get; set; }
|
private Label CopyTotpLabel { get; set; }
|
||||||
private ExtendedSwitchCell AnalyticsCell { get; set; }
|
|
||||||
private Label AnalyticsLabel { get; set; }
|
|
||||||
private ExtendedSwitchCell WebsiteIconsCell { get; set; }
|
private ExtendedSwitchCell WebsiteIconsCell { get; set; }
|
||||||
private Label WebsiteIconsLabel { get; set; }
|
private Label WebsiteIconsLabel { get; set; }
|
||||||
private ExtendedSwitchCell AutofillPersistNotificationCell { 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)
|
CopyTotpLabel = new FormTableLabel(this)
|
||||||
{
|
{
|
||||||
Text = AppResources.DisableAutoTotpCopyDescription
|
Text = AppResources.DisableAutoTotpCopyDescription
|
||||||
};
|
};
|
||||||
|
|
||||||
AnalyticsLabel = new FormTableLabel(this)
|
|
||||||
{
|
|
||||||
Text = AppResources.DisableGADescription
|
|
||||||
};
|
|
||||||
|
|
||||||
WebsiteIconsLabel = new FormTableLabel(this)
|
WebsiteIconsLabel = new FormTableLabel(this)
|
||||||
{
|
{
|
||||||
Text = AppResources.DisableWebsiteIconsDescription
|
Text = AppResources.DisableWebsiteIconsDescription
|
||||||
|
@ -111,10 +85,7 @@ namespace Bit.App.Pages
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
websiteIconsTable, WebsiteIconsLabel,
|
websiteIconsTable, WebsiteIconsLabel,
|
||||||
totpTable, CopyTotpLabel,
|
totpTable, CopyTotpLabel
|
||||||
#if !FDROID
|
|
||||||
analyticsTable, AnalyticsLabel
|
|
||||||
#endif
|
|
||||||
},
|
},
|
||||||
Spacing = 0
|
Spacing = 0
|
||||||
};
|
};
|
||||||
|
@ -202,9 +173,6 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
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));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,8 +183,7 @@ namespace Bit.App.Pages
|
||||||
protected override void OnAppearing()
|
protected override void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
|
|
||||||
AnalyticsCell.OnChanged += AnalyticsCell_Changed;
|
|
||||||
WebsiteIconsCell.OnChanged += WebsiteIconsCell_Changed;
|
WebsiteIconsCell.OnChanged += WebsiteIconsCell_Changed;
|
||||||
CopyTotpCell.OnChanged += CopyTotpCell_OnChanged;
|
CopyTotpCell.OnChanged += CopyTotpCell_OnChanged;
|
||||||
|
|
||||||
|
@ -231,8 +198,7 @@ namespace Bit.App.Pages
|
||||||
protected override void OnDisappearing()
|
protected override void OnDisappearing()
|
||||||
{
|
{
|
||||||
base.OnDisappearing();
|
base.OnDisappearing();
|
||||||
|
|
||||||
AnalyticsCell.OnChanged -= AnalyticsCell_Changed;
|
|
||||||
WebsiteIconsCell.OnChanged -= WebsiteIconsCell_Changed;
|
WebsiteIconsCell.OnChanged -= WebsiteIconsCell_Changed;
|
||||||
CopyTotpCell.OnChanged -= CopyTotpCell_OnChanged;
|
CopyTotpCell.OnChanged -= CopyTotpCell_OnChanged;
|
||||||
|
|
||||||
|
@ -255,18 +221,6 @@ namespace Bit.App.Pages
|
||||||
_appSettings.DisableWebsiteIcons = cell.On;
|
_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)
|
private void CopyTotpCell_OnChanged(object sender, ToggledEventArgs e)
|
||||||
{
|
{
|
||||||
var cell = sender as ExtendedSwitchCell;
|
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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Disable Website Icons.
|
/// Looks up a localized string similar to Disable Website Icons.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -302,9 +302,6 @@
|
||||||
<value>Ok</value>
|
<value>Ok</value>
|
||||||
<comment>Acknowledgement.</comment>
|
<comment>Acknowledgement.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="DisableGA" xml:space="preserve">
|
|
||||||
<value>Disable Analytics</value>
|
|
||||||
</data>
|
|
||||||
<data name="Password" xml:space="preserve">
|
<data name="Password" xml:space="preserve">
|
||||||
<value>Password</value>
|
<value>Password</value>
|
||||||
<comment>Label for a password.</comment>
|
<comment>Label for a password.</comment>
|
||||||
|
@ -812,9 +809,6 @@
|
||||||
<data name="ShareVaultDescription" xml:space="preserve">
|
<data name="ShareVaultDescription" xml:space="preserve">
|
||||||
<value>Create an organization to securely share your items with other users.</value>
|
<value>Create an organization to securely share your items with other users.</value>
|
||||||
</data>
|
</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">
|
<data name="AutofillPasswordField" xml:space="preserve">
|
||||||
<value>Scan When Password Field Focused</value>
|
<value>Scan When Password Field Focused</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
Loading…
Add table
Reference in a new issue