diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b062520e..579a3675f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ Test and beta releases will have experimental functions enabled by default.
**Next release**
* Notify action for application settings ([issue](https://github.com/M66B/XPrivacy/issues/955))
+* Display grayed usage data icon for methods with no usage data ([issue](https://github.com/M66B/XPrivacy/issues/878))
[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
diff --git a/res/drawable/used_holo_dark_grayed.png b/res/drawable/used_holo_dark_grayed.png
new file mode 100644
index 000000000..e87b7e087
Binary files /dev/null and b/res/drawable/used_holo_dark_grayed.png differ
diff --git a/res/drawable/used_holo_light_grayed.png b/res/drawable/used_holo_light_grayed.png
new file mode 100644
index 000000000..44217021e
Binary files /dev/null and b/res/drawable/used_holo_light_grayed.png differ
diff --git a/res/values-v14/styles.xml b/res/values-v14/styles.xml
index 95a5a4d16..379d4fdbb 100644
--- a/res/values-v14/styles.xml
+++ b/res/values-v14/styles.xml
@@ -6,6 +6,7 @@
- @drawable/info_holo_dark
- @drawable/internet_holo_dark
- @drawable/used_holo_dark
+ - @drawable/used_holo_dark_grayed
- @drawable/system_holo_dark
- @drawable/expander_ic_minimized_holo_dark
- @drawable/expander_ic_maximized_holo_dark
@@ -31,6 +32,7 @@
- @drawable/info_holo_light
- @drawable/internet_holo_light
- @drawable/used_holo_light
+ - @drawable/used_holo_light_grayed
- @drawable/system_holo_light
- @drawable/expander_ic_minimized_holo_light
- @drawable/expander_ic_maximized_holo_light
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index dd836f7c4..4302a8d9b 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -8,6 +8,7 @@
+
diff --git a/src/biz/bokhorst/xprivacy/ActivityApp.java b/src/biz/bokhorst/xprivacy/ActivityApp.java
index 8d09885bb..6a75593e2 100644
--- a/src/biz/bokhorst/xprivacy/ActivityApp.java
+++ b/src/biz/bokhorst/xprivacy/ActivityApp.java
@@ -1334,7 +1334,10 @@ protected void onPostExecute(Object result) {
holder.ctvMethodName.setText(String.format("%s (%s)", md.getName(), sLastUsage));
}
holder.ctvMethodName.setEnabled(parentRestricted);
- holder.imgUsed.setVisibility(lastUsage == 0 ? View.INVISIBLE : View.VISIBLE);
+ holder.imgUsed.setImageResource(Util.getThemed(ActivityApp.this,
+ md.hasNoUsageData() ? R.attr.icon_used_grayed : R.attr.icon_used));
+ holder.imgUsed
+ .setVisibility(lastUsage == 0 && !md.hasNoUsageData() ? View.INVISIBLE : View.VISIBLE);
holder.ctvMethodName.setTypeface(null, lastUsage == 0 ? Typeface.NORMAL : Typeface.BOLD_ITALIC);
holder.imgGranted.setVisibility(permission ? View.VISIBLE : View.INVISIBLE);
holder.ctvMethodName.setChecked(restricted);
diff --git a/src/biz/bokhorst/xprivacy/PrivacyManager.java b/src/biz/bokhorst/xprivacy/PrivacyManager.java
index 7dfde3f20..1192eb6e4 100644
--- a/src/biz/bokhorst/xprivacy/PrivacyManager.java
+++ b/src/biz/bokhorst/xprivacy/PrivacyManager.java
@@ -1288,6 +1288,10 @@ public boolean isRestartRequired() {
return mRestart;
}
+ public boolean hasNoUsageData() {
+ return isRestartRequired();
+ }
+
public String[] getPermissions() {
return mPermissions;
}