From 7e1b6143630a4e46a9044827a47f66d9711db0f9 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 30 May 2014 10:28:18 +0200 Subject: [PATCH] Make whitelist icon clickable Refs #1654 --- src/biz/bokhorst/xprivacy/ActivityApp.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/biz/bokhorst/xprivacy/ActivityApp.java b/src/biz/bokhorst/xprivacy/ActivityApp.java index f3341e1e1..ec70cdbcd 100644 --- a/src/biz/bokhorst/xprivacy/ActivityApp.java +++ b/src/biz/bokhorst/xprivacy/ActivityApp.java @@ -1375,8 +1375,19 @@ protected void onPostExecute(Object result) { holder.imgCbMethodRestricted.setImageBitmap(getCheckBoxImage(rstate)); holder.imgCbMethodRestricted.setVisibility(View.VISIBLE); + // Show whitelist icon holder.imgCbMethodWhitelist.setVisibility(whitelist ? View.VISIBLE : View.GONE); + if (whitelist) + holder.imgCbMethodWhitelist.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + ActivityApp.this.optionWhitelists(); + } + }); + else + holder.imgCbMethodWhitelist.setClickable(false); + // Show asked state if (ondemand) { holder.imgCbMethodAsk.setImageBitmap(getAskBoxImage(rstate)); holder.imgCbMethodAsk.setVisibility(View.VISIBLE);