Skip to content

Commit

Permalink
Adding Privacy - AllowLinguisticDataCollection
Browse files Browse the repository at this point in the history
Add  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput  -> AllowLinguisticDataCollection to HandwritingData.cs in Privacy section...

hopefully can help towards Issue builtbybel#55
  • Loading branch information
jddcef committed Jan 31, 2022
1 parent 93a9ac4 commit f91188b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Privatezilla/Settings/Privacy/HandwritingData.cs
Expand Up @@ -10,6 +10,8 @@ internal class HandwritingData : SettingBase
private const string RestrictImplicitTextCollection = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization";
private const string PreventHandwritingErrorReports = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports";
private const string PreventHandwritingDataSharing = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC";
private const string AllowLinguisticDataCollection = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput";

private const int DesiredValue = 1;

public override string ID()
Expand All @@ -29,7 +31,8 @@ public override bool CheckSetting()
RegistryHelper.IntEquals(RestrictImplicitInkCollection, "RestrictImplicitInkCollection", DesiredValue) &&
RegistryHelper.IntEquals(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", DesiredValue) &&
RegistryHelper.IntEquals(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", DesiredValue) &&
RegistryHelper.IntEquals(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", DesiredValue)
RegistryHelper.IntEquals(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", DesiredValue) &&
RegistryHelper.IntEquals(AllowLinguisticDataCollection, "AllowLinguisticDataCollection", 0)
);
}

Expand All @@ -42,6 +45,7 @@ public override bool DoSetting()
Registry.SetValue(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", DesiredValue, RegistryValueKind.DWord);
Registry.SetValue(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", DesiredValue, RegistryValueKind.DWord);
Registry.SetValue(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", DesiredValue, RegistryValueKind.DWord);
Registry.SetValue(AllowLinguisticDataCollection, "AllowLinguisticDataCollection", 0, RegistryValueKind.DWord);
return true;
}
catch
Expand All @@ -58,7 +62,8 @@ public override bool UndoSetting()
Registry.SetValue(RestrictImplicitInkCollection, "RestrictImplicitInkCollection", 0, RegistryValueKind.DWord);
Registry.SetValue(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", 0, RegistryValueKind.DWord);
Registry.SetValue(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", 0, RegistryValueKind.DWord);
Registry.SetValue(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", 0, RegistryValueKind.DWord); ;
Registry.SetValue(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", 0, RegistryValueKind.DWord);
Registry.SetValue(AllowLinguisticDataCollection, "AllowLinguisticDataCollection", 1, RegistryValueKind.DWord);
return true;
}
catch
Expand All @@ -69,4 +74,4 @@ public override bool UndoSetting()


}
}
}

0 comments on commit f91188b

Please sign in to comment.