public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
/**
+ * The duration in milliseconds between the first tap's up event and the second tap's
+ * down event for an interaction to be considered part of the same multi-press.
+ * @hide
+ */
+ public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout";
+
+ /**
* List of the enabled print services.
*
* N and beyond uses {@link #DISABLED_PRINT_SERVICES}. But this might be used in an upgrade
* on the screen.
*/
private boolean shouldDrawRoundScrollbar() {
- if (!mResources.getConfiguration().isScreenRound()) {
+ if (!mResources.getConfiguration().isScreenRound() || mAttachInfo == null) {
return false;
}
private static final int DEFAULT_LONG_PRESS_TIMEOUT = 500;
/**
+ * Defines the default duration in milliseconds between the first tap's up event and the second
+ * tap's down event for an interaction to be considered part of the same multi-press.
+ */
+ private static final int DEFAULT_MULTI_PRESS_TIMEOUT = 300;
+
+ /**
* Defines the time between successive key repeats in milliseconds.
*/
private static final int KEY_REPEAT_DELAY = 50;
}
/**
+ * @return the duration in milliseconds between the first tap's up event and the second tap's
+ * down event for an interaction to be considered part of the same multi-press.
+ * @hide
+ */
+ public static int getMultiPressTimeout() {
+ return AppGlobals.getIntCoreSetting(Settings.Secure.MULTI_PRESS_TIMEOUT,
+ DEFAULT_MULTI_PRESS_TIMEOUT);
+ }
+
+ /**
* @return the time before the first key repeat in milliseconds.
*/
public static int getKeyRepeatTimeout() {
return true;
}
return mEvent instanceof MotionEvent
- && mEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER);
+ && (mEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER)
+ || mEvent.isFromSource(InputDevice.SOURCE_ROTARY_ENCODER));
}
public boolean shouldSendToSynthesizer() {
env->CallIntMethod(db.jniInfo.jContextHubService,
db.jniInfo.contextHubServiceMsgReceiptCallback,
jheader, jmsg);
+ env->DeleteLocalRef(jmsg);
+ env->DeleteLocalRef(jheader);
delete[] msg;
}
-<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2016 The Android Open Source Project
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueType="pathType" />
+ <objectAnimator
+ android:duration="49"
+ android:interpolator="@android:interpolator/linear"
+ android:propertyName="pathData"
+ android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
<objectAnimator
- android:duration="66"
+ android:duration="83"
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
<objectAnimator
- android:duration="66"
+ android:duration="50"
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
+ <objectAnimator
+ android:duration="33"
+ android:interpolator="@android:interpolator/linear"
+ android:propertyName="pathData"
+ android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueType="pathType" />
</set>
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueType="pathType" />
+ <objectAnimator
+ android:duration="49"
+ android:interpolator="@android:interpolator/linear"
+ android:propertyName="pathData"
+ android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
<objectAnimator
- android:duration="66"
+ android:duration="83"
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
<objectAnimator
- android:duration="66"
+ android:duration="50"
android:interpolator="@android:interpolator/linear"
android:propertyName="pathData"
android:valueFrom="M -3.0,-7.0 l 6.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l -6.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
android:valueType="pathType" />
+ <objectAnimator
+ android:duration="33"
+ android:interpolator="@android:interpolator/linear"
+ android:propertyName="pathData"
+ android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 3.8659932486,0.0 7.0,3.1340067514 7.0,7.0 l 0.0,0.0 c 0.0,3.8659932486 -3.1340067514,7.0 -7.0,7.0 l 0.0,0.0 c -3.8659932486,0.0 -7.0,-3.1340067514 -7.0,-7.0 l 0.0,0.0 c 0.0,-3.8659932486 3.1340067514,-7.0 7.0,-7.0 Z"
+ android:valueType="pathType" />
</set>
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="?android:colorButtonNormal" android:state_enabled="false" />
- <item android:color="?android:colorControlActivated" android:state_checked="true" />
- <item android:color="?android:colorButtonNormal" />
-</selector>
\ No newline at end of file
+ <item android:color="?attr/colorButtonNormal" android:alpha="?attr/disabledAlpha"
+ android:state_enabled="false" />
+ <item android:color="?attr/colorControlActivated" android:state_checked="true" />
+ <item android:color="?attr/colorButtonNormal" />
+</selector>
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
See the License for the specific language governing permissions and
limitations under the License.
-->
-<resources>
- <style name="TextAppearance.Material.AlertDialogMessage" parent="TextAppearance.Material.Body1">
- <item name="textAlignment">center</item>
- </style>
-</resources>
+<!-- Used for the background of switch track for watch switch preference. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:alpha="0.4" android:color="?attr/colorPrimary" />
+ <item android:color="?attr/colorPrimary" />
+</selector>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@null" />
- <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
+ <TextView android:id="@+id/alertTitle"
style="?android:attr/windowTitleStyle"
- android:ellipsize="end"
- android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="viewStart" />
+ android:layout_height="wrap_content" />
</LinearLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@null" />
- <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
+ <TextView android:id="@+id/alertTitle"
style="?android:attr/windowTitleStyle"
- android:ellipsize="end"
android:layout_marginTop="36dp"
- android:layout_marginBottom="4dp"
+ android:layout_marginBottom="8dp"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="center" />
+ android:layout_height="wrap_content" />
</FrameLayout>
<include android:id="@+id/title_template"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- layout="@layout/alert_dialog_header_micro"/>
+ layout="@layout/alert_dialog_title_material"/>
</FrameLayout>
<!-- Content Panel -->
<TextView android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.Material.Body1"
+ android:gravity="@integer/config_dialogTextGravity"
+ android:textAppearance="@style/TextAppearance.Material.Subhead"
android:paddingStart="?dialogPreferredPadding"
android:paddingEnd="?dialogPreferredPadding"
android:paddingTop="8dip"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
android:orientation="vertical"
android:minHeight="@dimen/alert_dialog_button_bar_height"
android:paddingBottom="?dialogPreferredPadding"
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2007 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.
+-->
+
+<DatePicker xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/datePicker"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:spinnersShown="true"
+ android:calendarViewShown="false"
+ android:datePickerMode="@integer/date_picker_mode" />
android:thumb="@drawable/watch_switch_thumb_material_anim"
android:thumbTint="@color/watch_switch_thumb_color_material"
android:track="@drawable/watch_switch_track_material"
- android:trackTint="?android:colorPrimary"
+ android:trackTint="@color/watch_switch_track_color_material"
android:focusable="false"
android:clickable="false"
android:background="@null" />
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2007, 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.
+*/
+-->
+
+<TimePicker xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/timePicker"
+ android:layout_gravity="center_horizontal"
+ android:gravity="center_horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:timePickerMode="@integer/time_picker_mode" />
android:id="@+id/month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:layout_marginStart="8dip"
android:layout_marginEnd="8dip"
android:focusable="true"
android:id="@+id/day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:layout_marginStart="8dip"
android:layout_marginEnd="8dip"
android:focusable="true"
android:id="@+id/year"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:layout_marginStart="8dip"
android:layout_marginEnd="16dip"
android:focusable="true"
android:gravity="center"
android:singleLine="true"
android:background="@null"
- android:textAppearance="@style/TextAppearance.Material.Body1" />
+ android:textAppearance="@style/TextAppearance.Material.NumberPicker" />
android:id="@+id/hour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:focusable="true"
android:focusableInTouchMode="true"
/>
android:id="@+id/minute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:focusable="true"
android:focusableInTouchMode="true"
/>
android:id="@+id/amPm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="16dip"
+ android:layout_marginTop="@dimen/picker_top_margin"
+ android:layout_marginBottom="@dimen/picker_bottom_margin"
android:layout_marginStart="8dip"
android:layout_marginEnd="8dip"
android:focusable="true"
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="byteShort" msgid="8340973892742019101">"B"</string>
- <string name="kilobyteShort" msgid="5973789783504771878">"ko"</string>
+ <string name="kilobyteShort" msgid="5973789783504771878">"Ko"</string>
<string name="megabyteShort" msgid="6355851576770428922">"Mo"</string>
<string name="gigabyteShort" msgid="3259882455212193214">"Go"</string>
<string name="terabyteShort" msgid="231613018159186962">"To"</string>
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
See the License for the specific language governing permissions and
limitations under the License.
-->
-<resources>
- <style name="TextAppearance.Material.AlertDialogMessage" parent="TextAppearance.Material.Body1"/>
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds, only for Material theme. Do not translate.
+
+ NOTE: The naming convention is "config_camelCaseValue". -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Gravity that should be used for dialog text styles. Equivalent to: Gravity.START | Gravity.TOP -->
+ <integer name="config_dialogTextGravity">0x00800033</integer>
</resources>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Don't clip on round screens so the list can scroll past the rounded edges. -->
<bool name="config_preferenceFragmentClipToPadding">false</bool>
+
+ <!-- Gravity that should be used for dialog text styles. Equivalent to: Gravity.CENTER_HORIZONTAL | Gravity.TOP -->
+ <integer name="config_dialogTextGravity">0x00000031</integer>
</resources>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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="text_size_display_4_material">80sp</dimen>
+ <dimen name="text_size_display_3_material">50sp</dimen>
+ <dimen name="text_size_display_2_material">40sp</dimen>
+ <dimen name="text_size_display_1_material">30sp</dimen>
+ <dimen name="text_size_headline_material">20sp</dimen>
+ <dimen name="text_size_title_material">18sp</dimen>
+ <dimen name="text_size_subhead_material">18sp</dimen>
+ <dimen name="text_size_title_material_toolbar">18dp</dimen>
+ <dimen name="text_size_subtitle_material_toolbar">18dp</dimen>
+ <dimen name="text_size_menu_material">18sp</dimen>
+ <dimen name="text_size_menu_header_material">16sp</dimen>
+ <dimen name="text_size_body_2_material">16sp</dimen>
+ <dimen name="text_size_body_1_material">16sp</dimen>
+ <dimen name="text_size_caption_material">14sp</dimen>
+ <dimen name="text_size_button_material">16sp</dimen>
+
+ <dimen name="text_size_large_material">18sp</dimen>
+ <dimen name="text_size_medium_material">16sp</dimen>
+ <dimen name="text_size_small_material">14sp</dimen>
+</resources>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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="text_size_display_4_material">80sp</dimen>
+ <dimen name="text_size_display_3_material">50sp</dimen>
+ <dimen name="text_size_display_2_material">40sp</dimen>
+ <dimen name="text_size_display_1_material">30sp</dimen>
+ <dimen name="text_size_headline_material">20sp</dimen>
+ <dimen name="text_size_title_material">18sp</dimen>
+ <dimen name="text_size_subhead_material">18sp</dimen>
+ <dimen name="text_size_title_material_toolbar">18dp</dimen>
+ <dimen name="text_size_subtitle_material_toolbar">18dp</dimen>
+ <dimen name="text_size_menu_material">18sp</dimen>
+ <dimen name="text_size_menu_header_material">16sp</dimen>
+ <dimen name="text_size_body_2_material">16sp</dimen>
+ <dimen name="text_size_body_1_material">16sp</dimen>
+ <dimen name="text_size_caption_material">14sp</dimen>
+ <dimen name="text_size_button_material">16sp</dimen>
+
+ <dimen name="text_size_large_material">18sp</dimen>
+ <dimen name="text_size_medium_material">16sp</dimen>
+ <dimen name="text_size_small_material">14sp</dimen>
+</resources>
<!-- Always overscan by default to ensure onApplyWindowInsets will always be called. -->
<bool name="config_windowOverscanByDefault">true</bool>
-
- <!-- Due to the smaller screen size, have dialog titles occupy more than 1 line. -->
- <integer name="config_dialogWindowTitleMaxLines">3</integer>
</resources>
limitations under the License.
-->
<resources>
+ <dimen name="text_size_display_4_material">71sp</dimen>
+ <dimen name="text_size_display_3_material">44sp</dimen>
+ <dimen name="text_size_display_2_material">36sp</dimen>
+ <dimen name="text_size_display_1_material">27sp</dimen>
+ <dimen name="text_size_headline_material">18sp</dimen>
+ <dimen name="text_size_title_material">16sp</dimen>
+ <dimen name="text_size_subhead_material">16sp</dimen>
+ <dimen name="text_size_title_material_toolbar">16dp</dimen>
+ <dimen name="text_size_subtitle_material_toolbar">16dp</dimen>
+ <dimen name="text_size_menu_material">16sp</dimen>
+ <dimen name="text_size_menu_header_material">14sp</dimen>
+ <dimen name="text_size_body_2_material">14sp</dimen>
+ <dimen name="text_size_body_1_material">14sp</dimen>
+ <dimen name="text_size_caption_material">12sp</dimen>
+ <dimen name="text_size_button_material">14sp</dimen>
+
+ <dimen name="text_size_large_material">16sp</dimen>
+ <dimen name="text_size_medium_material">14sp</dimen>
+ <dimen name="text_size_small_material">12sp</dimen>
+
<item name="text_line_spacing_multiplier_material" format="float" type="dimen">1.2</item>
+
+ <!-- Date and time picker legacy dimens -->
+ <dimen name="picker_top_margin">1dip</dimen>
+ <dimen name="picker_bottom_margin">1dip</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!--
-**
+/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** limitations under the License.
*/
-->
+<resources>
+ <!-- Specifies date picker mode to be 'spinner' -->
+ <integer name="date_picker_mode_material">1</integer>
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <view class="android.widget.NumberPicker$CustomEditText"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:id="@+id/numberpicker_input"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:singleLine="true"
- android:background="@null" />
-
-</merge>
+ <!-- Specifies time picker mode to be 'spinner' -->
+ <integer name="time_picker_mode_material">1</integer>
+</resources>
<item name="divider">@empty</item>
</style>
+ <style name="TextAppearance.Material.ListItem" parent="TextAppearance.Material.Body1" />
+ <style name="TextAppearance.Material.ListItemSecondary" parent="TextAppearance.Material.Caption" />
+
<style name="Widget.Material.TextView" parent="Widget.TextView">
<item name="breakStrategy">balanced</item>
</style>
<style name="Widget.Material.ButtonBar" parent="Widget.Material.BaseButtonBar" />
+ <style name="TextAppearance.Material.NumberPicker" parent="TextAppearance.Material.Body1">
+ <item name="textSize">@dimen/text_size_medium_material</item>
+ </style>
+
<!-- Alert dialog button bar button -->
<style name="Widget.Material.Button.ButtonBar.AlertDialog" parent="Widget.Material.Button.Borderless.Small">
<item name="paddingStart">@dimen/list_item_padding_start_material</item>
<item name="solidColor">@color/transparent</item>
<item name="selectionDivider">@drawable/numberpicker_selection_divider</item>
<item name="selectionDividerHeight">2dp</item>
- <item name="selectionDividersDistance">48dp</item>
- <item name="internalMinWidth">64dp</item>
- <item name="internalMaxHeight">180dp</item>
+ <item name="selectionDividersDistance">24dp</item>
+ <item name="internalMinWidth">32dp</item>
+ <item name="internalMaxHeight">90dp</item>
<item name="virtualButtonPressedDrawable">?selectableItemBackground</item>
<item name="descendantFocusability">blocksDescendants</item>
</style>
+ <style name="DialogWindowTitle.Material">
+ <item name="maxLines">3</item>
+ <item name="scrollHorizontally">false</item>
+ <item name="textAppearance">@style/TextAppearance.Material.DialogWindowTitle</item>
+ <item name="gravity">@integer/config_dialogTextGravity</item>
+ <item name="ellipsize">end</item>
+ </style>
+
<!-- DO NOTE TRANSLATE Spans within this text are applied to style composing regions
within an EditText widget. The text content is ignored and not used.
Note: This is @color/material_deep_teal_200, cannot use @color references here. -->
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
<item name="windowIsFloating">false</item>
</style>
+
+ <!-- Force all settings themes to use normal Material theme. -->
+ <style name="Theme.Material.Settings" parent="Theme.Material"/>
+ <style name="Theme.Material.Settings.NoActionBar" parent="Theme.Material"/>
+ <style name="Theme.Material.Settings.BaseDialog" parent="Theme.Material.Dialog"/>
+ <style name="Theme.Material.Settings.Dialog" parent="Theme.Material.Settings.BaseDialog"/>
+ <style name="Theme.Material.Settings.Dialog.BaseAlert" parent="Theme.Material.Dialog.BaseAlert"/>
+ <style name="Theme.Material.Settings.Dialog.Alert" parent="Theme.Material.Settings.Dialog.BaseAlert"/>
+ <style name="Theme.Material.Settings.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge"/>
+ <style name="Theme.Material.Settings.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar"/>
+ <style name="Theme.Material.Settings.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation"/>
+ <style name="Theme.Material.Settings.SearchBar" parent="Theme.Material.SearchBar"/>
+ <style name="Theme.Material.Settings.CompactMenu" parent="Theme.Material.CompactMenu"/>
</resources>
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">false</bool>
- <!-- Fast brightness animation ramp rate -->
+ <!-- Fast brightness animation ramp rate in brightness units per second-->
<integer translatable="false" name="config_brightness_ramp_rate_fast">200</integer>
+ <!-- Slow brightness animation ramp rate in brightness units per second-->
+ <integer translatable="false" name="config_brightness_ramp_rate_slow">40</integer>
+
<!-- Don't name config resources like this. It should look like config_annoyDianne -->
<bool name="config_annoy_dianne">true</bool>
-->
<integer name="config_longPressOnBackBehavior">0</integer>
+ <!-- Control the behavior when the user panic presses the back button.
+ 0 - Nothing
+ 1 - Go to home
+ -->
+ <integer name="config_backPanicBehavior">0</integer>
+
<!-- Control the behavior when the user short presses the power button.
0 - Nothing
1 - Go to sleep (doze)
Note: Also update appropriate overlay files. -->
<string-array translatable="false" name="config_defaultFirstUserRestrictions">
</string-array>
+
+ <string name="config_networkOverLimitComponent" translatable="false">com.android.systemui/com.android.systemui.net.NetworkOverLimitActivity</string>
+ <string name="config_dataUsageSummaryComponent" translatable="false">com.android.settings/com.android.settings.Settings$DataUsageSummaryActivity</string>
</resources>
<!-- True if windowOverscan should be on by default. -->
<bool name="config_windowOverscanByDefault">false</bool>
- <!-- Max number of lines for the dialog title. -->
- <integer name="config_dialogWindowTitleMaxLines">1</integer>
-
<!-- True if preference fragment should clip to padding. -->
<bool name="config_preferenceFragmentClipToPadding">true</bool>
</resources>
<dimen name="day_picker_button_margin_top">0dp</dimen>
<dimen name="datepicker_view_animator_height">226dp</dimen>
+
+ <!-- Date and time picker legacy dimens -->
+ <dimen name="picker_top_margin">16dip</dimen>
+ <dimen name="picker_bottom_margin">16dip</dimen>
</resources>
<integer name="date_picker_mode">1</integer>
<integer name="time_picker_mode">1</integer>
+
+ <!-- Specifies date picker mode to be 'calendar' -->
+ <integer name="date_picker_mode_material">2</integer>
+
+ <!-- Specifies time picker mode to be 'clock' -->
+ <integer name="time_picker_mode_material">2</integer>
+
<integer name="date_picker_header_max_lines_material">2</integer>
</resources>
<string name="lockscreen_access_pattern_cleared">Pattern cleared</string>
<!-- Accessibility description sent when user adds a dot to the pattern. [CHAR LIMIT=NONE] -->
<string name="lockscreen_access_pattern_cell_added">Cell added</string>
- <!-- Accessibility description sent when user adds a dot to the pattern. Announces the
+ <!-- Accessibility description sent when user adds a dot to the pattern. Announces the
actual cell when headphones are connected [CHAR LIMIT=NONE] -->
<string name="lockscreen_access_pattern_cell_added_verbose">
Cell <xliff:g id="cell_index" example="3">%1$s</xliff:g> added</string>
<!-- Button to restart the device after the factory test. -->
<string name="factorytest_reboot">Reboot</string>
+ <!-- Do not translate. timepicker mode, overridden for watch -->
+ <string name="time_picker_mode" translatable="false">"clock"</string>
+
+ <!-- Do not translate. datepicker mode, overridden for watch -->
+ <string name="date_picker_mode" translatable="false">"calendar"</string>
+
<!-- Do not translate. WebView User Agent string -->
<string name="web_user_agent" translatable="false">Mozilla/5.0 (Linux; U; <xliff:g id="x">Android %s</xliff:g>)
AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 <xliff:g id="mobile">%s</xliff:g>Safari/534.30</string>
<item name="textColor">?attr/textColorPrimary</item>
</style>
+ <style name="TextAppearance.Material.NumberPicker" parent="TextAppearance.Material.Body1"/>
+
<!-- Deprecated text styles -->
<style name="TextAppearance.Material.Inverse">
<item name="textColor">#66000000</item>
</style>
+ <style name="TextAppearance.Material.ListItem" parent="TextAppearance.Material.Subhead" />
+ <style name="TextAppearance.Material.ListItemSecondary" parent="TextAppearance.Material.Body1" />
+
<style name="Widget.Material.Notification.ProgressBar" parent="Widget.Material.Light.ProgressBar.Horizontal" />
<style name="Widget.Material.Notification.MessagingText" parent="Widget.Material.Light.TextView">
</style>
<style name="Widget.Material.TimePicker">
- <item name="timePickerMode">clock</item>
+ <item name="timePickerMode">@integer/time_picker_mode_material</item>
<item name="legacyLayout">@layout/time_picker_legacy_material</item>
<!-- Attributes for new-style TimePicker. -->
<item name="internalLayout">@layout/time_picker_material</item>
</style>
<style name="Widget.Material.DatePicker">
- <item name="datePickerMode">calendar</item>
+ <item name="datePickerMode">@integer/date_picker_mode_material</item>
<item name="legacyLayout">@layout/date_picker_legacy_holo</item>
<item name="calendarViewShown">true</item>
<!-- Attributes for new-style DatePicker. -->
<style name="DialogWindowTitleBackground.Material.Light" />
<style name="DialogWindowTitle.Material">
- <item name="maxLines">@integer/config_dialogWindowTitleMaxLines</item>
+ <item name="maxLines">1</item>
<item name="scrollHorizontally">true</item>
<item name="textAppearance">@style/TextAppearance.Material.DialogWindowTitle</item>
</style>
<java-symbol type="integer" name="config_immersive_mode_confirmation_panic" />
<java-symbol type="integer" name="config_longPressOnPowerBehavior" />
<java-symbol type="integer" name="config_longPressOnBackBehavior" />
+ <java-symbol type="integer" name="config_backPanicBehavior" />
<java-symbol type="integer" name="config_lowMemoryKillerMinFreeKbytesAdjust" />
<java-symbol type="integer" name="config_lowMemoryKillerMinFreeKbytesAbsolute" />
<java-symbol type="integer" name="config_max_pan_devices" />
<java-symbol type="integer" name="config_undockedHdmiRotation" />
<java-symbol type="integer" name="config_virtualKeyQuietTimeMillis" />
<java-symbol type="integer" name="config_brightness_ramp_rate_fast" />
+ <java-symbol type="integer" name="config_brightness_ramp_rate_slow" />
<java-symbol type="layout" name="am_compat_mode_dialog" />
<java-symbol type="layout" name="launch_warning" />
<java-symbol type="layout" name="safe_mode" />
<!-- Colon separated list of package names that should be granted DND access -->
<java-symbol type="string" name="config_defaultDndAccessPackages" />
+ <!-- For NetworkPolicyManagerService -->
+ <java-symbol type="string" name="config_networkOverLimitComponent" />
+ <java-symbol type="string" name="config_dataUsageSummaryComponent" />
+
<java-symbol type="string" name="lockscreen_storage_locked" />
<!-- Used for MimeIconUtils. -->
<item name="listPreferredItemHeightSmall">48dip</item>
<item name="listPreferredItemHeightLarge">80dip</item>
<item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
- <item name="textAppearanceListItem">@style/TextAppearance.Material.Subhead</item>
- <item name="textAppearanceListItemSmall">@style/TextAppearance.Material.Subhead</item>
- <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.Body1</item>
+ <item name="textAppearanceListItem">@style/TextAppearance.Material.ListItem</item>
+ <item name="textAppearanceListItemSmall">@style/TextAppearance.Material.ListItem</item>
+ <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.ListItemSecondary</item>
<item name="listPreferredItemPaddingLeft">@dimen/list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingRight">@dimen/list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingStart">@dimen/list_item_padding_start_material</item>
<item name="listPreferredItemHeightSmall">48dip</item>
<item name="listPreferredItemHeightLarge">80dip</item>
<item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
- <item name="textAppearanceListItem">@style/TextAppearance.Material.Subhead</item>
- <item name="textAppearanceListItemSmall">@style/TextAppearance.Material.Subhead</item>
- <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.Body1</item>
+ <item name="textAppearanceListItem">@style/TextAppearance.Material.ListItem</item>
+ <item name="textAppearanceListItemSmall">@style/TextAppearance.Material.ListItem</item>
+ <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.ListItemSecondary</item>
<item name="listPreferredItemPaddingLeft">@dimen/list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingRight">@dimen/list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingStart">@dimen/list_item_padding_start_material</item>
<!-- Default configuration for zen mode. See android.service.notification.ZenModeConfig. -->
<zen version="2">
- <!-- Allow starred contacts to go through only. Repeated calls on.
- Calls, messages, reminders, events off.-->
- <allow from="2" repeatCallers="true" calls="false" messages="false" reminders="false"
+ <!-- Allow starred contacts to go through only.
+ Repeated calls, calls, messages, reminders, events off. -->
+ <allow from="2" repeatCallers="false" calls="false" messages="false" reminders="false"
events="false"/>
</zen>
<string name="app_name" msgid="5934709770924185752">"CaptivePortalLogin"</string>
<string name="action_use_network" msgid="6076184727448466030">"যেভাবে আছে সেভাবেই এই নেটওয়ার্ক ব্যবহার করুন"</string>
<string name="action_do_not_use_network" msgid="4577366536956516683">"এই নেটওয়ার্ক ব্যবহার করবেন না"</string>
- <string name="action_bar_label" msgid="917235635415966620">"নেটওয়ার্কে প্রবেশ করুন করুন"</string>
+ <string name="action_bar_label" msgid="917235635415966620">"নেটওয়ার্কে প্রবেশ করুন"</string>
<string name="ssl_error_warning" msgid="6653188881418638872">"আপনি যে নেটওয়ার্কে যোগ দেওয়ার চেষ্টা করছেন তাতে নিরাপত্তার সমস্যা আছে।"</string>
<string name="ssl_error_example" msgid="647898534624078900">"উদাহরণস্বরূপ, লগইন পৃষ্ঠাটি প্রদর্শিত প্রতিষ্ঠানের অন্তর্গত নাও হতে পারে৷"</string>
<string name="ssl_error_continue" msgid="6492718244923937110">"যাই হোক না কেন ব্রাউজারের মাধ্যমে অবিরত রাখুন"</string>
* Displays an alphanumeric (latin-1) key entry for the user to enter
* an unlock password
*/
-
public class KeyguardPasswordView extends KeyguardAbsKeyInputView
implements KeyguardSecurityView, OnEditorActionListener, TextWatcher {
private final boolean mShowImeAtScreenOn;
private final int mDisappearYTranslation;
+ // A delay constant to be used in a workaround for the situation where InputMethodManagerService
+ // is not switched to the new user yet.
+ // TODO: Remove this by ensuring such a race condition never happens.
+ private static final int DELAY_MILLIS_TO_REEVALUATE_IME_SWITCH_ICON = 500; // 500ms
+
InputMethodManager mImm;
private TextView mPasswordEntry;
private TextViewInputDisabler mPasswordEntryDisabler;
+ private View mSwitchImeButton;
private Interpolator mLinearOutSlowInInterpolator;
private Interpolator mFastOutLinearInInterpolator;
mPasswordEntry.requestFocus();
}
+ private void updateSwitchImeButton() {
+ // If there's more than one IME, enable the IME switcher button
+ final boolean wasVisible = mSwitchImeButton.getVisibility() == View.VISIBLE;
+ final boolean shouldBeVisible = hasMultipleEnabledIMEsOrSubtypes(mImm, false);
+ if (wasVisible != shouldBeVisible) {
+ mSwitchImeButton.setVisibility(shouldBeVisible ? View.VISIBLE : View.GONE);
+ }
+
+ // TODO: Check if we still need this hack.
+ // If no icon is visible, reset the start margin on the password field so the text is
+ // still centered.
+ if (mSwitchImeButton.getVisibility() != View.VISIBLE) {
+ android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams();
+ if (params instanceof MarginLayoutParams) {
+ final MarginLayoutParams mlp = (MarginLayoutParams) params;
+ mlp.setMarginStart(0);
+ mPasswordEntry.setLayoutParams(params);
+ }
+ }
+ }
+
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- boolean imeOrDeleteButtonVisible = false;
-
mImm = (InputMethodManager) getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
mPasswordEntry.requestFocus();
+ mSwitchImeButton = findViewById(R.id.switch_ime_button);
+ mSwitchImeButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mCallback.userActivity(); // Leave the screen on a bit longer
+ // Do not show auxiliary subtypes in password lock screen.
+ mImm.showInputMethodPicker(false /* showAuxiliarySubtypes */);
+ }
+ });
+
// If there's more than one IME, enable the IME switcher button
- View switchImeButton = findViewById(R.id.switch_ime_button);
- if (switchImeButton != null && hasMultipleEnabledIMEsOrSubtypes(mImm, false)) {
- switchImeButton.setVisibility(View.VISIBLE);
- imeOrDeleteButtonVisible = true;
- switchImeButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- mCallback.userActivity(); // Leave the screen on a bit longer
- // Do not show auxiliary subtypes in password lock screen.
- mImm.showInputMethodPicker(false /* showAuxiliarySubtypes */);
- }
- });
- }
+ updateSwitchImeButton();
- // If no icon is visible, reset the start margin on the password field so the text is
- // still centered.
- if (!imeOrDeleteButtonVisible) {
- android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams();
- if (params instanceof MarginLayoutParams) {
- final MarginLayoutParams mlp = (MarginLayoutParams) params;
- mlp.setMarginStart(0);
- mPasswordEntry.setLayoutParams(params);
+ // When we the current user is switching, InputMethodManagerService sometimes has not
+ // switched internal state yet here. As a quick workaround, we check the keyboard state
+ // again.
+ // TODO: Remove this workaround by ensuring such a race condition never happens.
+ postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ updateSwitchImeButton();
}
- }
+ }, DELAY_MILLIS_TO_REEVALUATE_IME_SWITCH_ICON);
}
@Override
<string name="vpn_settings_not_available" msgid="956841430176985598">"VPN postavke nisu dostupne za ovog korisnika"</string>
<string name="tethering_settings_not_available" msgid="6765770438438291012">"Postavke za privezivanje nisu dostupne za ovog korisnika"</string>
<string name="apn_settings_not_available" msgid="7873729032165324000">"Postavke za naziv pristupne tačke nisu dostupne za ovog korisnika"</string>
- <string name="enable_adb" msgid="7982306934419797485">"Otklanjanje grešaka putem uređaja spojenog na USB"</string>
+ <string name="enable_adb" msgid="7982306934419797485">"USB otklanjanje grešaka"</string>
<string name="enable_adb_summary" msgid="4881186971746056635">"Način rada za uklanjanje grešaka kada je povezan USB"</string>
- <string name="clear_adb_keys" msgid="4038889221503122743">"Ukini odobrenja otklanjanja grešaka putem uređaja spojenog na USB"</string>
+ <string name="clear_adb_keys" msgid="4038889221503122743">"Ukini odobrenja otklanjanja grešaka USB-om"</string>
<string name="bugreport_in_power" msgid="7923901846375587241">"Prečica za izvještaj o greškama"</string>
<string name="bugreport_in_power_summary" msgid="1778455732762984579">"Prikaži tipku za prijavu grešaka u izborniku za potrošnju energije"</string>
<string name="keep_screen_on" msgid="1146389631208760344">"Ostani aktivan"</string>
<string name="allow_mock_location_summary" msgid="317615105156345626">"Dozvoli lažne lokacije"</string>
<string name="debug_view_attributes" msgid="6485448367803310384">"Omogući pregled atributa prikaza"</string>
<string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Uvijek drži mobilne podatke aktivnim, čak i kada je Wi-Fi je aktivan (za brzo prebacivanje između mreža)."</string>
- <string name="adb_warning_title" msgid="6234463310896563253">"Omogućiti otklanjanje grešaka putem uređaja spojenog na USB?"</string>
- <string name="adb_warning_message" msgid="7316799925425402244">"Otklanjanje grešaka putem uređaja spojenog na USB je namijenjeno samo u svrhe razvoja aplikacija. Koristite ga za kopiranje podataka između računara i uređaja, instaliranje aplikacija na uređaj bez obavještenja te čitanje podataka iz zapisnika."</string>
- <string name="adb_keys_warning_message" msgid="5659849457135841625">"Opozvati pristup otklanjanju grešaka putem uređaja spojenog na USB za sve računare koje ste prethodno ovlastili?"</string>
+ <string name="adb_warning_title" msgid="6234463310896563253">"Omogućiti USB otklanjanje grešaka?"</string>
+ <string name="adb_warning_message" msgid="7316799925425402244">"USB otklanjanje grešaka je namijenjeno samo u svrhe razvoja aplikacija. Koristite ga za kopiranje podataka između računara i uređaja, instaliranje aplikacija na uređaj bez obavještenja te čitanje podataka iz zapisnika."</string>
+ <string name="adb_keys_warning_message" msgid="5659849457135841625">"Opozvati pristup otklanjanju grešaka USB-om za sve računare koje ste prethodno ovlastili?"</string>
<string name="dev_settings_warning_title" msgid="7244607768088540165">"Dopustiti postavke za razvoj?"</string>
<string name="dev_settings_warning_message" msgid="2298337781139097964">"Ove postavke su namijenjene samo za svrhe razvoja. Mogu izazvati pogrešno ponašanje uređaja i aplikacija na njemu."</string>
<string name="verify_apps_over_usb_title" msgid="4177086489869041953">"Verifikuj aplikacije putem USB-a"</string>
<string name="tts_play_example_summary" msgid="8029071615047894486">"Reprodueix una breu demostració de síntesi de veu"</string>
<string name="tts_install_data_title" msgid="4264378440508149986">"Instal·la dades de veu"</string>
<string name="tts_install_data_summary" msgid="5742135732511822589">"Instal·la les dades de veu necessàries per a la síntesi de veu"</string>
- <string name="tts_engine_security_warning" msgid="8786238102020223650">"Pot ser que aquest motor de síntesi de la parla pugui recopilar tot el text que es dirà en veu alta, incloses les dades personals, com ara les contrasenyes i els números de les targetes de crèdit. Ve del motor <xliff:g id="TTS_PLUGIN_ENGINE_NAME">%s</xliff:g>. Vols activar l\'ús d\'aquest motor de síntesi de la parla?"</string>
+ <string name="tts_engine_security_warning" msgid="8786238102020223650">"Pot ser que aquest motor de síntesi de la parla pugui recopilar tot el text que es dirà en veu alta, incloses les dades personals, com ara les contrasenyes i els números de les targetes de crèdit. Ve del motor <xliff:g id="TTS_PLUGIN_ENGINE_NAME">%s</xliff:g>. Voleu activar l\'ús d\'aquest motor de síntesi de la parla?"</string>
<string name="tts_engine_network_required" msgid="1190837151485314743">"Aquest idioma requereix una connexió de xarxa activa per a la sortida de síntesi de veu."</string>
<string name="tts_default_sample_string" msgid="4040835213373086322">"Això és un exemple de síntesi de veu"</string>
<string name="tts_status_title" msgid="7268566550242584413">"Estat de l\'idioma predeterminat"</string>
<string name="screen_zoom_summary_very_large" msgid="7108563375663670067">"ಸ್ವಲ್ಪ ದೊಡ್ಡ"</string>
<string name="screen_zoom_summary_extremely_large" msgid="7427320168263276227">"ದೊಡ್ಡ"</string>
<string name="screen_zoom_summary_custom" msgid="5611979864124160447">"ಕಸ್ಟಮ್ (<xliff:g id="DENSITYDPI">%d</xliff:g>)"</string>
- <string name="help_feedback_label" msgid="6815040660801785649">"ಸಹಾಯ ಮತ್ತು ಪ್ರತಿಕ್ರಿಯೆ"</string>
+ <string name="help_feedback_label" msgid="6815040660801785649">"ಸಹಾಯ & ಪ್ರತಿಕ್ರಿಯೆ"</string>
</resources>
<!-- Default for Settings.Secure.LONG_PRESS_TIMEOUT_MILLIS -->
<integer name="def_long_press_timeout_millis">400</integer>
+ <!-- Default for Settings.Secure.MULTI_PRESS_TIMEOUT -->
+ <integer name="def_multi_press_timeout_millis">300</integer>
+
<!-- Default for Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD -->
<bool name="def_show_ime_with_hard_keyboard">false</bool>
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 130;
+ private static final int SETTINGS_VERSION = 131;
private final int mUserId;
currentVersion = 130;
}
+ if (currentVersion == 130) {
+ // Initialize new multi-press timeout to default value
+ final SettingsState systemSecureSettings = getSecureSettingsLocked(userId);
+ final String oldValue = systemSecureSettings.getSettingLocked(
+ Settings.Secure.MULTI_PRESS_TIMEOUT).getValue();
+ if (TextUtils.equals(null, oldValue)) {
+ systemSecureSettings.insertSettingLocked(
+ Settings.Secure.MULTI_PRESS_TIMEOUT,
+ String.valueOf(getContext().getResources().getInteger(
+ R.integer.def_multi_press_timeout_millis)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+
+ currentVersion = 131;
+ }
+
if (currentVersion != newVersion) {
Slog.w("SettingsProvider", "warning: upgrading settings database to version "
+ newVersion + " left it at "
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Đang dùng làm điểm truy cập Internet"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Điểm phát sóng"</string>
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Thông báo"</string>
- <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Đèn pin"</string>
+ <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Đèn nháy"</string>
<string name="quick_settings_cellular_detail_title" msgid="8575062783675171695">"Dữ liệu di động"</string>
<string name="quick_settings_cellular_detail_data_usage" msgid="1964260360259312002">"Sử dụng dữ liệu"</string>
<string name="quick_settings_cellular_detail_remaining_data" msgid="722715415543541249">"Dữ liệu còn lại"</string>
}
public final boolean replaceParallelBroadcastLocked(BroadcastRecord r) {
+ final Intent intent = r.intent;
for (int i = mParallelBroadcasts.size() - 1; i >= 0; i--) {
- if (r.intent.filterEquals(mParallelBroadcasts.get(i).intent)) {
+ if (intent.filterEquals(mParallelBroadcasts.get(i).intent)) {
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST,
"***** DROPPING PARALLEL ["
- + mQueueName + "]: " + r.intent);
+ + mQueueName + "]: " + intent);
mParallelBroadcasts.set(i, r);
return true;
}
}
public final boolean replaceOrderedBroadcastLocked(BroadcastRecord r) {
+ final Intent intent = r.intent;
for (int i = mOrderedBroadcasts.size() - 1; i > 0; i--) {
- if (r.intent.filterEquals(mOrderedBroadcasts.get(i).intent)) {
+ if (intent.filterEquals(mOrderedBroadcasts.get(i).intent)) {
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST,
"***** DROPPING ORDERED ["
- + mQueueName + "]: " + r.intent);
+ + mQueueName + "]: " + intent);
mOrderedBroadcasts.set(i, r);
return true;
}
String, Class<?>>();
static {
sSecureSettingToTypeMap.put(Settings.Secure.LONG_PRESS_TIMEOUT, int.class);
+ sSecureSettingToTypeMap.put(Settings.Secure.MULTI_PRESS_TIMEOUT, int.class);
// add other secure settings here...
sSystemSettingToTypeMap.put(Settings.System.TIME_12_24, String.class);
// Trigger proximity if distance is less than 5 cm.
private static final float TYPICAL_PROXIMITY_THRESHOLD = 5.0f;
- // Brightness animation ramp rate in brightness units per second.
- private static final int BRIGHTNESS_RAMP_RATE_SLOW = 40;
-
private static final int REPORTED_TO_POLICY_SCREEN_OFF = 0;
private static final int REPORTED_TO_POLICY_SCREEN_TURNING_ON = 1;
private static final int REPORTED_TO_POLICY_SCREEN_ON = 2;
private boolean mAppliedDimming;
private boolean mAppliedLowPower;
- // Brightness ramp rate fast.
+ // Brightness animation ramp rates in brightness units per second
private final int mBrightnessRampRateFast;
+ private final int mBrightnessRampRateSlow;
// The controller for the automatic brightness level.
private AutomaticBrightnessController mAutomaticBrightnessController;
mBrightnessRampRateFast = resources.getInteger(
com.android.internal.R.integer.config_brightness_ramp_rate_fast);
+ mBrightnessRampRateSlow = resources.getInteger(
+ com.android.internal.R.integer.config_brightness_ramp_rate_slow);
int lightSensorRate = resources.getInteger(
com.android.internal.R.integer.config_autoBrightnessLightSensorRate);
if (!mPendingScreenOff) {
if (state == Display.STATE_ON || state == Display.STATE_DOZE) {
animateScreenBrightness(brightness,
- slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : mBrightnessRampRateFast);
+ slowChange ? mBrightnessRampRateSlow : mBrightnessRampRateFast);
} else {
animateScreenBrightness(brightness, 0);
}
*/
private void notifyOverLimitNL(NetworkTemplate template) {
if (!mOverLimitNotified.contains(template)) {
- mContext.startActivity(buildNetworkOverLimitIntent(template));
+ mContext.startActivity(buildNetworkOverLimitIntent(mContext.getResources(), template));
mOverLimitNotified.add(template);
}
}
builder.setDeleteIntent(PendingIntent.getBroadcast(
mContext, 0, snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT));
- final Intent viewIntent = buildViewDataUsageIntent(policy.template);
+ final Intent viewIntent = buildViewDataUsageIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, viewIntent, PendingIntent.FLAG_UPDATE_CURRENT));
builder.setContentTitle(title);
builder.setContentText(body);
- final Intent intent = buildNetworkOverLimitIntent(policy.template);
+ final Intent intent = buildNetworkOverLimitIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
break;
builder.setContentTitle(title);
builder.setContentText(body);
- final Intent intent = buildViewDataUsageIntent(policy.template);
+ final Intent intent = buildViewDataUsageIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
break;
return intent;
}
- private static Intent buildNetworkOverLimitIntent(NetworkTemplate template) {
+ private static Intent buildNetworkOverLimitIntent(Resources res, NetworkTemplate template) {
final Intent intent = new Intent();
- intent.setComponent(new ComponentName(
- "com.android.systemui", "com.android.systemui.net.NetworkOverLimitActivity"));
+ intent.setComponent(ComponentName.unflattenFromString(
+ res.getString(R.string.config_networkOverLimitComponent)));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_NETWORK_TEMPLATE, template);
return intent;
}
- private static Intent buildViewDataUsageIntent(NetworkTemplate template) {
+ private static Intent buildViewDataUsageIntent(Resources res, NetworkTemplate template) {
final Intent intent = new Intent();
- intent.setComponent(new ComponentName(
- "com.android.settings", "com.android.settings.Settings$DataUsageSummaryActivity"));
+ intent.setComponent(ComponentName.unflattenFromString(
+ res.getString(R.string.config_dataUsageSummaryComponent)));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_NETWORK_TEMPLATE, template);
return intent;
static final int MULTI_PRESS_POWER_THEATER_MODE = 1;
static final int MULTI_PRESS_POWER_BRIGHTNESS_BOOST = 2;
+ // Number of presses needed before we induce panic press behavior on the back button
+ static final int PANIC_PRESS_BACK_COUNT = 4;
+ static final int PANIC_PRESS_BACK_NOTHING = 0;
+ static final int PANIC_PRESS_BACK_HOME = 1;
+
// These need to match the documentation/constant in
// core/res/res/values/config.xml
static final int LONG_PRESS_HOME_NOTHING = 0;
volatile boolean mBackKeyHandled;
volatile boolean mBeganFromNonInteractive;
volatile int mPowerKeyPressCounter;
+ volatile int mBackKeyPressCounter;
volatile boolean mEndCallKeyHandled;
volatile boolean mCameraGestureTriggeredDuringGoingToSleep;
volatile boolean mGoingToSleep;
int mDoublePressOnPowerBehavior;
int mTriplePressOnPowerBehavior;
int mLongPressOnBackBehavior;
+ int mPanicPressOnBackBehavior;
int mShortPressOnSleepBehavior;
int mShortPressWindowBehavior;
boolean mAwake;
private static final int MSG_SHOW_TV_PICTURE_IN_PICTURE_MENU = 17;
private static final int MSG_BACK_LONG_PRESS = 18;
private static final int MSG_DISPOSE_INPUT_CONSUMER = 19;
+ private static final int MSG_BACK_DELAYED_PRESS = 20;
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0;
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1;
break;
case MSG_BACK_LONG_PRESS:
backLongPress();
+ finishBackKeyPress();
break;
case MSG_DISPOSE_INPUT_CONSUMER:
disposeInputConsumer((InputConsumer) msg.obj);
break;
+ case MSG_BACK_DELAYED_PRESS:
+ backMultiPressAction((Long) msg.obj, msg.arg1);
+ finishBackKeyPress();
+ break;
}
}
}
}
}
+ private void interceptBackKeyDown() {
+ // Reset back key state for long press
+ mBackKeyHandled = false;
+
+ // Cancel multi-press detection timeout.
+ if (hasPanicPressOnBackBehavior()) {
+ if (mBackKeyPressCounter != 0
+ && mBackKeyPressCounter < PANIC_PRESS_BACK_COUNT) {
+ mHandler.removeMessages(MSG_BACK_DELAYED_PRESS);
+ }
+ }
+
+ if (hasLongPressOnBackBehavior()) {
+ Message msg = mHandler.obtainMessage(MSG_BACK_LONG_PRESS);
+ msg.setAsynchronous(true);
+ mHandler.sendMessageDelayed(msg,
+ ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout());
+ }
+ }
+
+ // returns true if the key was handled and should not be passed to the user
+ private boolean interceptBackKeyUp(KeyEvent event) {
+ // Cache handled state
+ boolean handled = mBackKeyHandled;
+
+ if (hasPanicPressOnBackBehavior()) {
+ // Check for back key panic press
+ ++mBackKeyPressCounter;
+
+ final long eventTime = event.getDownTime();
+
+ if (mBackKeyPressCounter <= PANIC_PRESS_BACK_COUNT) {
+ // This could be a multi-press. Wait a little bit longer to confirm.
+ Message msg = mHandler.obtainMessage(MSG_BACK_DELAYED_PRESS,
+ mBackKeyPressCounter, 0, eventTime);
+ msg.setAsynchronous(true);
+ mHandler.sendMessageDelayed(msg, ViewConfiguration.getMultiPressTimeout());
+ }
+ }
+
+ // Reset back long press state
+ cancelPendingBackKeyAction();
+
+ return handled;
+ }
+
private void interceptPowerKeyDown(KeyEvent event, boolean interactive) {
// Hold a wake lock until the power key is released.
if (!mPowerKeyWakeLock.isHeld()) {
}
}
+ private void finishBackKeyPress() {
+ mBackKeyPressCounter = 0;
+ }
+
private void cancelPendingPowerKeyAction() {
if (!mPowerKeyHandled) {
mPowerKeyHandled = true;
}
}
+ private void backMultiPressAction(long eventTime, int count) {
+ if (count >= PANIC_PRESS_BACK_COUNT) {
+ switch (mPanicPressOnBackBehavior) {
+ case PANIC_PRESS_BACK_NOTHING:
+ break;
+ case PANIC_PRESS_BACK_HOME:
+ launchHomeFromHotKey();
+ break;
+ }
+ }
+ }
+
private void powerPress(long eventTime, boolean interactive, int count) {
if (mScreenOnEarly && !mScreenOnFully) {
Slog.i(TAG, "Suppressed redundant power key press while "
return mLongPressOnBackBehavior != LONG_PRESS_BACK_NOTHING;
}
+ private boolean hasPanicPressOnBackBehavior() {
+ return mPanicPressOnBackBehavior != PANIC_PRESS_BACK_NOTHING;
+ }
+
private void interceptScreenshotChord() {
if (mScreenshotChordEnabled
&& mScreenshotChordVolumeDownKeyTriggered && mScreenshotChordPowerKeyTriggered
mLongPressOnBackBehavior = mContext.getResources().getInteger(
com.android.internal.R.integer.config_longPressOnBackBehavior);
+ mPanicPressOnBackBehavior = mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_backPanicBehavior);
mShortPressOnPowerBehavior = mContext.getResources().getInteger(
com.android.internal.R.integer.config_shortPressOnPowerBehavior);
switch (keyCode) {
case KeyEvent.KEYCODE_BACK: {
if (down) {
- mBackKeyHandled = false;
- if (hasLongPressOnBackBehavior()) {
- Message msg = mHandler.obtainMessage(MSG_BACK_LONG_PRESS);
- msg.setAsynchronous(true);
- mHandler.sendMessageDelayed(msg,
- ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout());
- }
+ interceptBackKeyDown();
} else {
- boolean handled = mBackKeyHandled;
-
- // Reset back key state
- cancelPendingBackKeyAction();
+ boolean handled = interceptBackKeyUp(event);
- // Don't pass back press to app if we've already handled it
+ // Don't pass back press to app if we've already handled it via long press
if (handled) {
result &= ~ACTION_PASS_TO_USER;
}
mPendingDestroySurface = null;
}
+ void applyMagnificationSpec(MagnificationSpec spec, Matrix transform) {
+ final int surfaceInsetLeft = mWin.mAttrs.surfaceInsets.left;
+ final int surfaceInsetTop = mWin.mAttrs.surfaceInsets.top;
+
+ if (spec != null && !spec.isNop()) {
+ float scale = spec.scale;
+ transform.postScale(scale, scale);
+ transform.postTranslate(spec.offsetX, spec.offsetY);
+
+ // As we are scaling the whole surface, to keep the content
+ // in the same position we will also have to scale the surfaceInsets.
+ transform.postTranslate(-(surfaceInsetLeft*scale - surfaceInsetLeft),
+ -(surfaceInsetTop*scale - surfaceInsetTop));
+ }
+ }
+
void computeShownFrameLocked() {
final boolean selfTransformation = mHasLocalTransformation;
Transformation attachedTransformation =
if (mService.mAccessibilityController != null && displayId == DEFAULT_DISPLAY) {
MagnificationSpec spec = mService.mAccessibilityController
.getMagnificationSpecForWindowLocked(mWin);
- if (spec != null && !spec.isNop()) {
- tmpMatrix.postScale(spec.scale, spec.scale);
- tmpMatrix.postTranslate(spec.offsetX, spec.offsetY);
- }
+ applyMagnificationSpec(spec, tmpMatrix);
}
// "convert" it into SurfaceFlinger's format
tmpMatrix.setScale(mWin.mGlobalScale, mWin.mGlobalScale);
tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
- if (spec != null && !spec.isNop()) {
- tmpMatrix.postScale(spec.scale, spec.scale);
- tmpMatrix.postTranslate(spec.offsetX, spec.offsetY);
- }
+ applyMagnificationSpec(spec, tmpMatrix);
tmpMatrix.getValues(tmpFloats);
updateDeviceOwnerLocked();
disableSecurityLoggingIfNotCompliant();
try {
- // Reactivate backup service.
- mInjector.getIBackupManager().setBackupServiceActive(UserHandle.USER_SYSTEM, true);
+ if (mInjector.getIBackupManager() != null) {
+ // Reactivate backup service.
+ mInjector.getIBackupManager().setBackupServiceActive(UserHandle.USER_SYSTEM, true);
+ }
} catch (RemoteException e) {
throw new IllegalStateException("Failed reactivating backup service.", e);
}
*/
public static final int NETWORK_SELECTION_ENABLE = 0;
/**
+ * @deprecated it is not used any more.
* This network is disabled because higher layer (>2) network is bad
*/
public static final int DISABLED_BAD_LINK = 1;
*/
private static final String[] QUALITY_NETWORK_SELECTION_DISABLE_REASON = {
"NETWORK_SELECTION_ENABLE",
- "NETWORK_SELECTION_DISABLED_BAD_LINK",
+ "NETWORK_SELECTION_DISABLED_BAD_LINK", // deprecated
"NETWORK_SELECTION_DISABLED_ASSOCIATION_REJECTION ",
"NETWORK_SELECTION_DISABLED_AUTHENTICATION_FAILURE",
"NETWORK_SELECTION_DISABLED_DHCP_FAILURE",