merge in mnc-dr-release history after reset to mnc-dr-dev
diff --git a/res/layout-land/fingerprint_enroll_enrolling.xml b/res/layout-land/fingerprint_enroll_enrolling.xml
index 8577f5f..c72c029 100644
--- a/res/layout-land/fingerprint_enroll_enrolling.xml
+++ b/res/layout-land/fingerprint_enroll_enrolling.xml
@@ -61,7 +61,10 @@
android:layout_weight="1"
android:layout_height="match_parent">
- <include layout="@layout/fingerprint_enroll_enrolling_content"/>
+ <include layout="@layout/fingerprint_enroll_enrolling_content"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"/>
<TextView
style="@style/TextAppearance.FingerprintErrorText"
diff --git a/res/layout-land/fingerprint_enroll_finish.xml b/res/layout-land/fingerprint_enroll_finish.xml
index 558866c..f1bf885 100644
--- a/res/layout-land/fingerprint_enroll_finish.xml
+++ b/res/layout-land/fingerprint_enroll_finish.xml
@@ -79,8 +79,8 @@
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
- android:layout_width="120dp"
- android:layout_height="120dp"
+ android:layout_width="@dimen/fingerprint_in_app_indicator_size"
+ android:layout_height="@dimen/fingerprint_in_app_indicator_size"
android:layout_gravity="center_horizontal"
android:contentDescription="@android:string/fingerprint_icon_content_description"
android:src="@drawable/fp_app_indicator" />
diff --git a/res/layout/fingerprint_enroll_enrolling_base.xml b/res/layout/fingerprint_enroll_enrolling_base.xml
index 23ffa69..c93de4e 100644
--- a/res/layout/fingerprint_enroll_enrolling_base.xml
+++ b/res/layout/fingerprint_enroll_enrolling_base.xml
@@ -57,8 +57,8 @@
<include layout="@layout/fingerprint_enroll_enrolling_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="36dp"
- android:layout_gravity="center_horizontal"/>
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="@dimen/fingerprint_enrolling_content_margin_top"/>
<TextView
style="@style/TextAppearance.FingerprintErrorText"
@@ -67,6 +67,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_gravity="center_horizontal"
+ android:accessibilityLiveRegion="polite"
android:visibility="invisible"/>
</LinearLayout>
diff --git a/res/layout/fingerprint_enroll_enrolling_content.xml b/res/layout/fingerprint_enroll_enrolling_content.xml
index b3171a3..fd6d726 100644
--- a/res/layout/fingerprint_enroll_enrolling_content.xml
+++ b/res/layout/fingerprint_enroll_enrolling_content.xml
@@ -19,13 +19,12 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="36dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/fingerprint_animator"
- android:layout_width="88dp"
- android:layout_height="88dp"
+ android:layout_width="@dimen/fingerprint_animation_size"
+ android:layout_height="@dimen/fingerprint_animation_size"
android:layout_centerInParent="true"
android:background="@drawable/fp_illustration_enrollment"
android:backgroundTint="@color/fingerprint_indicator_background_resting"
@@ -33,8 +32,8 @@
<ProgressBar
android:id="@+id/fingerprint_progress_bar"
- android:layout_width="192dp"
- android:layout_height="192dp"
+ android:layout_width="@dimen/fingerprint_progress_bar_size"
+ android:layout_height="@dimen/fingerprint_progress_bar_size"
android:layout_centerInParent="true"
style="?android:attr/progressBarStyleHorizontal"
android:max="10000"
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index cbb6466..f65e932 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -37,9 +37,13 @@
android:layout_marginTop="@dimen/suw_description_margin_top"
android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
+ <View
+ android:layout_height="0dp"
+ android:layout_width="match_parent"
+ android:layout_weight="1"/>
+
<include
layout="@layout/fingerprint_enroll_find_sensor_graphic"
- android:layout_marginTop="32dp"
android:layout_width="@dimen/fingerprint_find_sensor_graphic_size"
android:layout_height="@dimen/fingerprint_find_sensor_graphic_size"
android:layout_gravity="center_horizontal"/>
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index e0e261e..3ca5dfc 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -37,11 +37,15 @@
android:layout_marginTop="@dimen/suw_description_margin_top"
android:text="@string/security_settings_fingerprint_enroll_finish_message"/>
+ <View
+ android:layout_height="0dp"
+ android:layout_width="match_parent"
+ android:layout_weight="1"/>
+
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
- android:layout_width="120dp"
- android:layout_height="120dp"
- android:layout_marginTop="56dp"
+ android:layout_width="@dimen/fingerprint_in_app_indicator_size"
+ android:layout_height="@dimen/fingerprint_in_app_indicator_size"
android:layout_gravity="center_horizontal"
android:contentDescription="@android:string/fingerprint_icon_content_description"
android:src="@drawable/fp_app_indicator" />
diff --git a/res/values-sw400dp/dimens.xml b/res/values-sw400dp/dimens.xml
new file mode 100755
index 0000000..fcc9c6f
--- /dev/null
+++ b/res/values-sw400dp/dimens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2015 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<resources>
+ <dimen name="fingerprint_ring_radius">106dp</dimen>
+ <dimen name="fingerprint_animation_size">100dp</dimen>
+ <dimen name="fingerprint_progress_bar_size">220dp</dimen>
+ <dimen name="fingerprint_enrolling_content_margin_top">56dp</dimen>
+ <dimen name="fingerprint_in_app_indicator_size">176dp</dimen>
+</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c10e83f..d41ff03 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -233,6 +233,10 @@
<dimen name="fingerprint_decor_padding_top">0dp</dimen>
<dimen name="fingerprint_error_text_appear_distance">16dp</dimen>
<dimen name="fingerprint_error_text_disappear_distance">-8dp</dimen>
+ <dimen name="fingerprint_animation_size">88dp</dimen>
+ <dimen name="fingerprint_progress_bar_size">192dp</dimen>
+ <dimen name="fingerprint_enrolling_content_margin_top">36dp</dimen>
+ <dimen name="fingerprint_in_app_indicator_size">120dp</dimen>
<dimen name="confirm_credentials_security_method_margin">48dp</dimen>
<dimen name="fab_size">56dp</dimen>
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 7a5a60a..e014465 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -485,7 +485,7 @@
// a header at the top.
FrameLayout pinnedHeader = (FrameLayout) rootView.findViewById(R.id.pinned_header);
AppHeader.createAppHeader(getActivity(), detail.icon, detail.label, null, pinnedHeader);
- AppDetailsFragment.show(DataUsageSummary.this, app, detail.label, false);
+ AppDetailsFragment.show(DataUsageSummary.this, app, detail.label, true);
} catch (NameNotFoundException e) {
Log.w(TAG, "Could not find " + mShowAppImmediatePkg, e);
Toast.makeText(getActivity(), getString(R.string.unknown_app), Toast.LENGTH_LONG)
@@ -936,9 +936,11 @@
if (isAppDetailMode()) {
mAppDetail.setVisibility(View.VISIBLE);
mCycleAdapter.setChangeVisible(false);
+ mChart.setVisibility(View.GONE);
} else {
mAppDetail.setVisibility(View.GONE);
mCycleAdapter.setChangeVisible(true);
+ mChart.setVisibility(View.VISIBLE);
// hide detail stats when not in detail mode
mChart.bindDetailNetworkStats(null);
@@ -1998,6 +2000,16 @@
target.mCurrentApp = null;
target.updateBody();
}
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ getFragmentManager().popBackStack();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
}
/**
diff --git a/src/com/android/settings/applications/AppStatePowerBridge.java b/src/com/android/settings/applications/AppStatePowerBridge.java
index 069c901..e25b9c9 100644
--- a/src/com/android/settings/applications/AppStatePowerBridge.java
+++ b/src/com/android/settings/applications/AppStatePowerBridge.java
@@ -56,7 +56,7 @@
}
public static final AppFilter FILTER_POWER_WHITELISTED = new CompoundFilter(
- ApplicationsState.FILTER_PERSONAL, new AppFilter() {
+ ApplicationsState.FILTER_PERSONAL_WITHOUT_DISABLED_UNTIL_USED, new AppFilter() {
@Override
public void init() {
}
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 27b6c80..3a0eee6 100755
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -836,6 +836,9 @@
@Override
protected ProcStatsPackageEntry doInBackground(Void... params) {
+ if (getActivity() == null) {
+ return null;
+ }
if (mPackageInfo == null) {
return null;
}
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index ce2dbe0..44ced66 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -154,7 +154,7 @@
public static final AppFilter[] FILTERS = new AppFilter[] {
new CompoundFilter(AppStatePowerBridge.FILTER_POWER_WHITELISTED,
ApplicationsState.FILTER_ALL_ENABLED), // High power whitelist, on
- new CompoundFilter(ApplicationsState.FILTER_PERSONAL,
+ new CompoundFilter(ApplicationsState.FILTER_PERSONAL_WITHOUT_DISABLED_UNTIL_USED,
ApplicationsState.FILTER_ALL_ENABLED), // All apps label, but personal filter
ApplicationsState.FILTER_EVERYTHING, // All apps
ApplicationsState.FILTER_ALL_ENABLED, // Enabled
diff --git a/src/com/android/settings/applications/ManageAssist.java b/src/com/android/settings/applications/ManageAssist.java
index de69bb6..f1d70ee 100644
--- a/src/com/android/settings/applications/ManageAssist.java
+++ b/src/com/android/settings/applications/ManageAssist.java
@@ -20,6 +20,7 @@
import android.content.ComponentName;
import android.content.DialogInterface;
import android.os.Bundle;
+import android.os.Handler;
import android.preference.Preference;
import android.preference.SwitchPreference;
import android.provider.Settings;
@@ -45,6 +46,7 @@
private SwitchPreference mContextPref;
private SwitchPreference mScreenshotPref;
private VoiceInputListPreference mVoiceInputPref;
+ private Handler mHandler = new Handler();
@Override
public void onCreate(Bundle icicle) {
@@ -78,6 +80,7 @@
if (preference == mContextPref) {
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ASSIST_STRUCTURE_ENABLED,
(boolean) newValue ? 1 : 0);
+ postUpdateUi();
return true;
}
if (preference == mScreenshotPref) {
@@ -102,6 +105,15 @@
return false;
}
+ private void postUpdateUi() {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ updateUi();
+ }
+ });
+ }
+
private void updateUi() {
mDefaultAssitPref.refreshAssistApps();
mVoiceInputPref.refreshVoiceInputs();
@@ -122,6 +134,11 @@
getPreferenceScreen().addPreference(mVoiceInputPref);
mVoiceInputPref.setAssistRestrict(currentAssist);
}
+
+ mScreenshotPref.setEnabled(mContextPref.isChecked());
+ if (!mContextPref.isChecked()) {
+ mScreenshotPref.setChecked(false);
+ }
}
private boolean isCurrentAssistVoiceService() {