summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Ofir <iofir@google.com>2014-07-08 15:17:30 -0700
committerIdo Ofir <iofir@google.com>2014-07-08 15:17:30 -0700
commit286558bab0352df9b210b6319005b3ab21edb376 (patch)
treef36e3ddf9a95438be74a52678c29cd495db512d4
parent60f803f49c91a4b35a75db75f07b56f029db3397 (diff)
downloadpackages_apps_Settings-286558bab0352df9b210b6319005b3ab21edb376.tar.gz
packages_apps_Settings-286558bab0352df9b210b6319005b3ab21edb376.tar.bz2
packages_apps_Settings-286558bab0352df9b210b6319005b3ab21edb376.zip
b/16154604 removing the settings link from the trust agent menu.
Change-Id: If5050a16ffd776a5ca2eec6f1dad4eef47f2f0e4
-rw-r--r--res/layout/trust_agent_item.xml17
-rw-r--r--src/com/android/settings/AdvancedSecuritySettings.java27
2 files changed, 2 insertions, 42 deletions
diff --git a/res/layout/trust_agent_item.xml b/res/layout/trust_agent_item.xml
index e2ef953e5..e7b3bc8ad 100644
--- a/res/layout/trust_agent_item.xml
+++ b/res/layout/trust_agent_item.xml
@@ -67,21 +67,4 @@
android:maxLines="4"/>
</RelativeLayout>
</LinearLayout>
- <View
- android:layout_width="2dip"
- android:layout_height="match_parent"
- android:layout_marginTop="5dip"
- android:layout_marginBottom="5dip"
- android:background="@android:drawable/divider_horizontal_dark"/>
- <ImageView
- android:id="@+id/settings"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:paddingStart="15dip"
- android:src="@drawable/ic_sysbar_quicksettings"
- android:contentDescription="@string/input_method_settings_button"
- android:layout_gravity="center"
- android:clickable="true"
- android:focusable="true"
- android:background="?android:attr/selectableItemBackground"/>
</LinearLayout>
diff --git a/src/com/android/settings/AdvancedSecuritySettings.java b/src/com/android/settings/AdvancedSecuritySettings.java
index 2a8c623e8..3ddbf967e 100644
--- a/src/com/android/settings/AdvancedSecuritySettings.java
+++ b/src/com/android/settings/AdvancedSecuritySettings.java
@@ -24,7 +24,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.service.trust.TrustAgentService;
import android.util.ArrayMap;
@@ -34,7 +33,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
-import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
@@ -52,9 +50,7 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
public static final class AgentInfo {
CharSequence label;
- Drawable icon;
ComponentName component; // service that implements ITrustAgent
- ComponentName settings; // setting to launch to modify agent.
@Override
public boolean equals(Object other) {
@@ -114,11 +110,7 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
if (!mAvailableAgents.containsKey(name)) {
AgentInfo agentInfo = new AgentInfo();
agentInfo.label = resolveInfo.loadLabel(pm);
- agentInfo.icon = resolveInfo.loadIcon(pm);
agentInfo.component = name;
- TrustAgentUtils.TrustAgentComponentInfo trustAgentComponentInfo =
- TrustAgentUtils.getSettingsComponent(pm, resolveInfo);
- agentInfo.settings = trustAgentComponentInfo.componentName;
mAvailableAgents.put(name, agentInfo);
}
}
@@ -128,16 +120,8 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
@Override
public void onClick(View view) {
ViewHolder h = (ViewHolder) view.getTag();
- AgentInfo agentInfo = h.agentInfo;
-
- if (view.getId() == R.id.settings) {
- if (agentInfo.settings != null) {
- Intent intent = new Intent();
- intent.setComponent(agentInfo.settings);
- intent.setAction("TODO");
- startActivity(intent);
- }
- } else if (view.getId() == R.id.clickable) {
+
+ if (view.getId() == R.id.clickable) {
boolean wasActive = mActiveAgents.contains(h.agentInfo.component);
loadActiveAgents();
if (!wasActive) {
@@ -163,13 +147,11 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
}
static class ViewHolder {
- ImageView icon;
TextView name;
CheckBox checkbox;
TextView description;
AgentInfo agentInfo;
View clickable;
- View settings;
}
class AgentListAdapter extends BaseAdapter {
@@ -218,16 +200,12 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
public View newView(ViewGroup parent) {
View v = mInflater.inflate(R.layout.trust_agent_item, parent, false);
ViewHolder h = new ViewHolder();
- h.icon = (ImageView)v.findViewById(R.id.icon);
h.name = (TextView)v.findViewById(R.id.name);
h.checkbox = (CheckBox)v.findViewById(R.id.checkbox);
h.clickable = v.findViewById(R.id.clickable);
h.clickable.setOnClickListener(AdvancedSecuritySettings.this);
h.description = (TextView)v.findViewById(R.id.description);
- h.settings = v.findViewById(R.id.settings);
- h.settings.setOnClickListener(AdvancedSecuritySettings.this);
v.setTag(h);
- h.settings.setTag(h);
h.clickable.setTag(h);
return v;
}
@@ -238,7 +216,6 @@ public class AdvancedSecuritySettings extends ListFragment implements View.OnCli
vh.name.setText(item.label);
vh.checkbox.setChecked(mActiveAgents.contains(item.component));
vh.agentInfo = item;
- vh.settings.setVisibility(item.settings != null ? View.VISIBLE : View.INVISIBLE);
}
}
}