summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2015-11-02 17:34:00 -0800
committerRoman Birg <roman@cyngn.com>2015-11-03 12:21:37 -0800
commitb0b82ba44ec037fab81f47353c17e85c794f8051 (patch)
tree415c2410b0b8d21217ffe36efd10e991ca098925 /src
parent60e61e2391e4cbf3a9e3a141f3a622f153fe9613 (diff)
downloadpackages_apps_Settings-b0b82ba44ec037fab81f47353c17e85c794f8051.zip
packages_apps_Settings-b0b82ba44ec037fab81f47353c17e85c794f8051.tar.gz
packages_apps_Settings-b0b82ba44ec037fab81f47353c17e85c794f8051.tar.bz2
Fix advanced privacy guard screen
Change-Id: I1064f2df748b21384f53219b87645f1569f595d5 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/applications/AppOpsSummary.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/settings/applications/AppOpsSummary.java b/src/com/android/settings/applications/AppOpsSummary.java
index 782b8fb..46ffb9d 100644
--- a/src/com/android/settings/applications/AppOpsSummary.java
+++ b/src/com/android/settings/applications/AppOpsSummary.java
@@ -18,12 +18,14 @@ package com.android.settings.applications;
import android.app.Fragment;
import android.app.FragmentManager;
+import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.preference.PreferenceFrameLayout;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.ViewPager;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -112,14 +114,11 @@ public class AppOpsSummary extends InstrumentedFragment {
mViewPager.setOnPageChangeListener(adapter);
PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
- // This should be set in the XML layout, but PagerTabStrip lives in
- // support-v4 and doesn't have styleable attributes.
- final TypedArray ta = tabs.getContext().obtainStyledAttributes(
- new int[] { android.R.attr.colorAccent });
- final int colorAccent = ta.getColor(0, 0);
- ta.recycle();
-
- tabs.setTabIndicatorColorResource(colorAccent);
+ Resources.Theme theme = tabs.getContext().getTheme();
+ TypedValue typedValue = new TypedValue();
+ theme.resolveAttribute(android.R.attr.colorAccent, typedValue, true);
+ final int colorAccent = getContext().getColor(typedValue.resourceId);
+ tabs.setTabIndicatorColor(colorAccent);
// We have to do this now because PreferenceFrameLayout looks at it
// only when the view is added.