summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorZoltan Szatmary-Ban <szatmz@google.com>2014-09-04 11:55:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-04 11:55:49 +0000
commit1e0ea452635fb3e8fbac733567489a38ee3ed635 (patch)
treee998c6cafe5600cef1979fd0c74d9df356f5a10b /src/com
parent9dce0791f8e9a0e91eabe61589c9a9c5f695f7b2 (diff)
parentf20d39e87d7fdabdf17d0b5f49c30bd85dfabefb (diff)
downloadpackages_apps_Settings-1e0ea452635fb3e8fbac733567489a38ee3ed635.zip
packages_apps_Settings-1e0ea452635fb3e8fbac733567489a38ee3ed635.tar.gz
packages_apps_Settings-1e0ea452635fb3e8fbac733567489a38ee3ed635.tar.bz2
Merge "Start activity for the correct user in Settings > Data Usage" into lmp-dev
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/DataUsageSummary.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 009c758..17c6d88 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -402,7 +402,6 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
mAppSwitches = (LinearLayout) mAppDetail.findViewById(R.id.app_switches);
mAppSettings = (Button) mAppDetail.findViewById(R.id.app_settings);
- mAppSettings.setOnClickListener(mAppSettingsListener);
mAppRestrict = new Switch(inflater.getContext());
mAppRestrict.setClickable(false);
@@ -860,11 +859,24 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
}
}
+ mAppSettings.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (!isAdded()) {
+ return;
+ }
+
+ // TODO: target towards entire UID instead of just first package
+ getActivity().startActivityAsUser(mAppSettingsIntent,
+ new UserHandle(UserHandle.getUserId(uid)));
+ }
+ });
mAppSettings.setEnabled(matchFound);
mAppSettings.setVisibility(View.VISIBLE);
} else {
mAppSettingsIntent = null;
+ mAppSettings.setOnClickListener(null);
mAppSettings.setVisibility(View.GONE);
}
@@ -1117,16 +1129,6 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
}
};
- private OnClickListener mAppSettingsListener = new OnClickListener() {
- @Override
- public void onClick(View v) {
- if (!isAdded()) return;
-
- // TODO: target torwards entire UID instead of just first package
- startActivity(mAppSettingsIntent);
- }
- };
-
private OnItemClickListener mListListener = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {