Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Fixed randomize on boot setting being restored
Browse files Browse the repository at this point in the history
Refs #1164
  • Loading branch information
M66B committed Jan 26, 2014
1 parent 15dd884 commit 774cca5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Test and beta releases will have experimental functions enabled by default.

**Next release**

* Fixed randomize on boot setting being restored (again) ([issue](https://github.com/M66B/XPrivacy/issues/1164))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

**Version 1.99.14 TEST**
Expand Down
43 changes: 22 additions & 21 deletions src/biz/bokhorst/xprivacy/SettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
tvAppName.setText(TextUtils.join(", ", appInfo.getApplicationName()));

// Get current values
boolean notify = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingNotify, true, false);
boolean usage = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingUsage, true, false);
boolean log = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingLog, false, false);
boolean components = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingSystem, false, false);
Expand All @@ -286,21 +285,23 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
boolean https = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingHttps, true, false);
String confidence = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingConfidence, "", false);
final boolean expert = (components || dangerous || experimental || !https || !"".equals(confidence));

// Application specific
boolean notify = PrivacyManager.getSettingBool(null, -uid, PrivacyManager.cSettingNotify, true, false);
boolean global = (PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingSerial, null, false) == null);
boolean random = PrivacyManager.getSettingBool(null, uid, PrivacyManager.cSettingRandom, false, false);

String serial = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingSerial, "", false);
String lat = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingLatitude, "", false);
String lon = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingLongitude, "", false);
String mac = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingMac, "", false);
String imei = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingImei, "", false);
String phone = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingPhone, "", false);
String id = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingId, "", false);
String gsfid = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingGsfId, "", false);
String adid = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingAdId, "", false);
String country = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingCountry, "", false);
String subscriber = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingSubscriber, "", false);
String ssid = PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingSSID, "", false);
boolean random = PrivacyManager.getSettingBool(null, -uid, PrivacyManager.cSettingRandom, false, false);
String serial = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingSerial, "", false);
String lat = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingLatitude, "", false);
String lon = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingLongitude, "", false);
String mac = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingMac, "", false);
String imei = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingImei, "", false);
String phone = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingPhone, "", false);
String id = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingId, "", false);
String gsfid = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingGsfId, "", false);
String adid = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingAdId, "", false);
String country = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingCountry, "", false);
String subscriber = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingSubscriber, "", false);
String ssid = PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingSSID, "", false);

// Set current values
if (uid == 0) {
Expand Down Expand Up @@ -384,12 +385,12 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
etSubscriber.setEnabled(!cbSubscriber.isChecked());
etSSID.setEnabled(!cbSSID.isChecked());

etIP.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingIP, "", false));
etMcc.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingMcc, "", false));
etMnc.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingMnc, "", false));
etOperator.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingOperator, "", false));
etIccId.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingIccId, "", false));
etUa.setText(PrivacyManager.getSetting(null, uid, PrivacyManager.cSettingUa, "", false));
etIP.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingIP, "", false));
etMcc.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingMcc, "", false));
etMnc.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingMnc, "", false));
etOperator.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingOperator, "", false));
etIccId.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingIccId, "", false));
etUa.setText(PrivacyManager.getSetting(null, -uid, PrivacyManager.cSettingUa, "", false));

cbRandom.setChecked(random);

Expand Down

0 comments on commit 774cca5

Please sign in to comment.