From 42c69b9ce4ead51fc5e2a0ed55c40b498893047e Mon Sep 17 00:00:00 2001
From: Yigit Boyar
Date: Fri, 19 Aug 2016 10:15:52 -0700
Subject: [PATCH 01/98] List all methods that change data in the docs
Bug: 27442518
Change-Id: I671e05d55b263eead42370cfefc305a7daf248d7
---
core/java/android/widget/ArrayAdapter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java
index 9d228cf667b16..bbc50dafa5764 100644
--- a/core/java/android/widget/ArrayAdapter.java
+++ b/core/java/android/widget/ArrayAdapter.java
@@ -312,10 +312,10 @@ public class ArrayAdapter extends BaseAdapter implements Filterable, ThemedSp
}
/**
- * Control whether methods that change the list ({@link #add},
- * {@link #insert}, {@link #remove}, {@link #clear}) automatically call
- * {@link #notifyDataSetChanged}. If set to false, caller must
- * manually call notifyDataSetChanged() to have the changes
+ * Control whether methods that change the list ({@link #add}, {@link #addAll(Collection)},
+ * {@link #addAll(Object[])}, {@link #insert}, {@link #remove}, {@link #clear},
+ * {@link #sort(Comparator)}) automatically call {@link #notifyDataSetChanged}. If set to
+ * false, caller must manually call notifyDataSetChanged() to have the changes
* reflected in the attached view.
*
* The default is true, and calling notifyDataSetChanged()
From e6680d93db9fe5b8d87e9b62aa393d5873ea4ba7 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 13 Sep 2016 16:02:33 -0700
Subject: [PATCH 02/98] DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.
If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.
Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
---
core/java/android/provider/Settings.java | 7 +
.../policy/EmergencyAffordanceManager.java | 101 ++++++
core/res/res/drawable/emergency_icon.xml | 34 ++
core/res/res/values/config.xml | 10 +
core/res/res/values/strings.xml | 3 +
core/res/res/values/symbols.xml | 5 +
.../com/android/keyguard/EmergencyButton.java | 38 +++
.../emergency/EmergencyAffordanceService.java | 312 ++++++++++++++++++
.../android/server/policy/GlobalActions.java | 28 ++
.../java/com/android/server/SystemServer.java | 7 +
10 files changed, 545 insertions(+)
create mode 100644 core/java/com/android/internal/policy/EmergencyAffordanceManager.java
create mode 100644 core/res/res/drawable/emergency_icon.xml
create mode 100644 services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 293eb9ba80aaa..6c04399b5f047 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -8188,6 +8188,13 @@ public final class Settings {
*/
public static final String CALL_AUTO_RETRY = "call_auto_retry";
+ /**
+ * A setting that can be read whether the emergency affordance is currently needed.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed";
+
/**
* See RIL_PreferredNetworkType in ril.h
* @hide
diff --git a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
new file mode 100644
index 0000000000000..bed7c1ba4ed3e
--- /dev/null
+++ b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package com.android.internal.policy;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.provider.Settings;
+
+/**
+ * A class that manages emergency affordances and enables immediate calling to emergency services
+ */
+public class EmergencyAffordanceManager {
+
+ public static final boolean ENABLED = true;
+
+ /**
+ * Global setting override with the number to call with the emergency affordance.
+ * @hide
+ */
+ private static final String EMERGENCY_CALL_NUMBER_SETTING = "emergency_affordance_number";
+
+ /**
+ * Global setting, whether the emergency affordance should be shown regardless of device state.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String FORCE_EMERGENCY_AFFORDANCE_SETTING = "force_emergency_affordance";
+
+ private final Context mContext;
+
+ public EmergencyAffordanceManager(Context context) {
+ mContext = context;
+ }
+
+ /**
+ * perform an emergency call.
+ */
+ public final void performEmergencyCall() {
+ performEmergencyCall(mContext);
+ }
+
+ private static Uri getPhoneUri(Context context) {
+ String number = context.getResources().getString(
+ com.android.internal.R.string.config_emergency_call_number);
+ if (Build.IS_DEBUGGABLE) {
+ String override = Settings.Global.getString(
+ context.getContentResolver(), EMERGENCY_CALL_NUMBER_SETTING);
+ if (override != null) {
+ number = override;
+ }
+ }
+ return Uri.fromParts("tel", number, null);
+ }
+
+ private static void performEmergencyCall(Context context) {
+ Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY);
+ intent.setData(getPhoneUri(context));
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ }
+
+ /**
+ * @return whether emergency affordance should be active.
+ */
+ public boolean needsEmergencyAffordance() {
+ if (!ENABLED) {
+ return false;
+ }
+ if (forceShowing()) {
+ return true;
+ }
+ return isEmergencyAffordanceNeeded();
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, 0) != 0;
+ }
+
+
+ private boolean forceShowing() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ FORCE_EMERGENCY_AFFORDANCE_SETTING, 0) != 0;
+ }
+}
diff --git a/core/res/res/drawable/emergency_icon.xml b/core/res/res/drawable/emergency_icon.xml
new file mode 100644
index 0000000000000..8e460d786643f
--- /dev/null
+++ b/core/res/res/drawable/emergency_icon.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d0fd36ad269e4..48af3cc65f082 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2486,4 +2486,14 @@
+
+ 112
+
+
+
+ - 404
+ - 405
+
+
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index b55a9b22118b3..ceb79edd04bf4 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -482,6 +482,9 @@
Power off
+
+ Emergency
+
Bug report
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index d154b034e058f..d5db4252fd6d2 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2612,4 +2612,9 @@
+
+
+
+
+
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index 8d411453b5ae1..725684332fe96 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -28,13 +28,16 @@ import android.os.UserHandle;
import android.telecom.TelecomManager;
import android.util.AttributeSet;
import android.util.Slog;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewConfiguration;
import android.widget.Button;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.internal.telephony.IccCardConstants.State;
import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.policy.EmergencyAffordanceManager;
/**
* This class implements a smart emergency button that updates itself based
@@ -51,7 +54,10 @@ public class EmergencyButton extends Button {
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
private static final String LOG_TAG = "EmergencyButton";
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
+ private int mDownX;
+ private int mDownY;
KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() {
@Override
@@ -64,6 +70,7 @@ public class EmergencyButton extends Button {
updateEmergencyCallButton();
}
};
+ private boolean mLongPressWasDragged;
public interface EmergencyButtonCallback {
public void onEmergencyButtonClickedWhenInCall();
@@ -86,6 +93,7 @@ public class EmergencyButton extends Button {
com.android.internal.R.bool.config_voice_capable);
mEnableEmergencyCallWhileSimLocked = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_enable_emergency_call_while_sim_locked);
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
@Override
@@ -110,9 +118,39 @@ public class EmergencyButton extends Button {
takeEmergencyCallAction();
}
});
+ setOnLongClickListener(new OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ if (!mLongPressWasDragged
+ && mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ return true;
+ }
+ return false;
+ }
+ });
updateEmergencyCallButton();
}
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+ if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
+ mDownX = x;
+ mDownY = y;
+ mLongPressWasDragged = false;
+ } else {
+ final int xDiff = Math.abs(x - mDownX);
+ final int yDiff = Math.abs(y - mDownY);
+ int touchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
+ if (Math.abs(yDiff) > touchSlop || Math.abs(xDiff) > touchSlop) {
+ mLongPressWasDragged = true;
+ }
+ }
+ return super.onTouchEvent(event);
+ }
+
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
new file mode 100644
index 0000000000000..cca9f10c630bd
--- /dev/null
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -0,0 +1,312 @@
+/*
+ * 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
+ */
+
+package com.android.server.emergency;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+import android.provider.Settings;
+import android.telephony.CellInfo;
+import android.telephony.CellInfoGsm;
+import android.telephony.CellInfoLte;
+import android.telephony.CellInfoWcdma;
+import android.telephony.CellLocation;
+import android.telephony.PhoneStateListener;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.server.SystemService;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A service that listens to connectivity and SIM card changes and determines if the emergency mode
+ * should be enabled
+ */
+public class EmergencyAffordanceService extends SystemService {
+
+ private static final String TAG = "EmergencyAffordanceService";
+
+ private static final int NUM_SCANS_UNTIL_ABORT = 4;
+
+ private static final int INITIALIZE_STATE = 1;
+ private static final int CELL_INFO_STATE_CHANGED = 2;
+ private static final int SUBSCRIPTION_CHANGED = 3;
+
+ /**
+ * Global setting, whether the last scan of the sim cards reveal that a sim was inserted that
+ * requires the emergency affordance. The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String EMERGENCY_SIM_INSERTED_SETTING = "emergency_sim_inserted_before";
+
+ private final Context mContext;
+ private final ArrayList mEmergencyCallMccNumbers;
+
+ private final Object mLock = new Object();
+
+ private TelephonyManager mTelephonyManager;
+ private SubscriptionManager mSubscriptionManager;
+ private boolean mEmergencyAffordanceNeeded;
+ private MyHandler mHandler;
+ private int mScansCompleted;
+ private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+ @Override
+ public void onCellInfoChanged(List cellInfo) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+
+ @Override
+ public void onCellLocationChanged(CellLocation location) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+ };
+ private BroadcastReceiver mAirplaneModeReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.AIRPLANE_MODE_ON, 0) == 0) {
+ startScanning();
+ requestCellScan();
+ }
+ }
+ };
+ private boolean mSimNeedsEmergencyAffordance;
+ private boolean mNetworkNeedsEmergencyAffordance;
+
+ private void requestCellScan() {
+ mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
+ }
+
+ private SubscriptionManager.OnSubscriptionsChangedListener mSubscriptionChangedListener
+ = new SubscriptionManager.OnSubscriptionsChangedListener() {
+ @Override
+ public void onSubscriptionsChanged() {
+ mHandler.obtainMessage(SUBSCRIPTION_CHANGED).sendToTarget();
+ }
+ };
+
+ public EmergencyAffordanceService(Context context) {
+ super(context);
+ mContext = context;
+ int[] numbers = context.getResources().getIntArray(
+ com.android.internal.R.array.config_emergency_mcc_codes);
+ mEmergencyCallMccNumbers = new ArrayList<>(numbers.length);
+ for (int i = 0; i < numbers.length; i++) {
+ mEmergencyCallMccNumbers.add(numbers[i]);
+ }
+ }
+
+ private void updateEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
+ mEmergencyAffordanceNeeded ? 1 : 0);
+ if (mEmergencyAffordanceNeeded) {
+ stopScanning();
+ }
+ }
+ }
+
+ private void stopScanning() {
+ synchronized (mLock) {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+ mScansCompleted = 0;
+ }
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ return mEmergencyAffordanceNeeded;
+ }
+ }
+
+ @Override
+ public void onStart() {
+ }
+
+ @Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
+ mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
+ mSubscriptionManager = SubscriptionManager.from(mContext);
+ HandlerThread thread = new HandlerThread(TAG);
+ thread.start();
+ mHandler = new MyHandler(thread.getLooper());
+ mHandler.obtainMessage(INITIALIZE_STATE).sendToTarget();
+ startScanning();
+ IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ mContext.registerReceiver(mAirplaneModeReceiver, filter);
+ mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangedListener);
+ }
+ }
+
+ private void startScanning() {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_INFO
+ | PhoneStateListener.LISTEN_CELL_LOCATION);
+ }
+
+ /** Handler to do the heavier work on */
+ private class MyHandler extends Handler {
+
+ public MyHandler(Looper l) {
+ super(l);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case INITIALIZE_STATE:
+ handleInitializeState();
+ break;
+ case CELL_INFO_STATE_CHANGED:
+ handleUpdateCellInfo();
+ break;
+ case SUBSCRIPTION_CHANGED:
+ handleUpdateSimSubscriptionInfo();
+ break;
+ }
+ }
+ }
+
+ private void handleInitializeState() {
+ if (handleUpdateSimSubscriptionInfo()) {
+ return;
+ }
+ if (handleUpdateCellInfo()) {
+ return;
+ }
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean handleUpdateSimSubscriptionInfo() {
+ boolean neededBefore = simNeededAffordanceBefore();
+ boolean neededNow = neededBefore;
+ List activeSubscriptionInfoList =
+ mSubscriptionManager.getActiveSubscriptionInfoList();
+ if (activeSubscriptionInfoList == null) {
+ return neededNow;
+ }
+ for (SubscriptionInfo info : activeSubscriptionInfoList) {
+ int mcc = info.getMcc();
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE){
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ String simOperator = mTelephonyManager.getSimOperator(info.getSubscriptionId());
+ mcc = 0;
+ if (simOperator != null && simOperator.length() >= 3) {
+ mcc = Integer.parseInt(simOperator.substring(0, 3));
+ }
+ if (mcc != 0) {
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else {
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ }
+ }
+ if (neededNow != neededBefore) {
+ setSimNeedsEmergencyAffordance(neededNow);
+ }
+ return neededNow;
+ }
+
+ private void setSimNeedsEmergencyAffordance(boolean simNeedsEmergencyAffordance) {
+ mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ EMERGENCY_SIM_INSERTED_SETTING,
+ simNeedsEmergencyAffordance ? 1 : 0);
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean simNeededAffordanceBefore() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ "emergency_sim_inserted_before", 0) != 0;
+ }
+
+ private boolean handleUpdateCellInfo() {
+ List cellInfos = mTelephonyManager.getAllCellInfo();
+ if (cellInfos == null) {
+ return false;
+ }
+ boolean stopScanningAfterScan = false;
+ for (CellInfo cellInfo : cellInfos) {
+ int mcc = 0;
+ if (cellInfo instanceof CellInfoGsm) {
+ mcc = ((CellInfoGsm) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoLte) {
+ mcc = ((CellInfoLte) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoWcdma) {
+ mcc = ((CellInfoWcdma) cellInfo).getCellIdentity().getMcc();
+ }
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ setNetworkNeedsEmergencyAffordance(true);
+ return true;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE) {
+ // we found an mcc that isn't in the list, abort
+ stopScanningAfterScan = true;
+ }
+ }
+ if (stopScanningAfterScan) {
+ stopScanning();
+ } else {
+ onCellScanFinishedUnsuccessful();
+ }
+ setNetworkNeedsEmergencyAffordance(false);
+ return false;
+ }
+
+ private void setNetworkNeedsEmergencyAffordance(boolean needsAffordance) {
+ synchronized (mLock) {
+ mNetworkNeedsEmergencyAffordance = needsAffordance;
+ updateEmergencyAffordanceNeeded();
+ }
+ }
+
+ private void onCellScanFinishedUnsuccessful() {
+ synchronized (mLock) {
+ mScansCompleted++;
+ if (mScansCompleted >= NUM_SCANS_UNTIL_ABORT) {
+ stopScanning();
+ }
+ }
+ }
+
+ private boolean mccRequiresEmergencyAffordance(int mcc) {
+ return mEmergencyCallMccNumbers.contains(mcc);
+ }
+}
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index 5ef518e21c58c..6e2fb10d306c7 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -20,6 +20,7 @@ import com.android.internal.app.AlertController;
import com.android.internal.app.AlertController.AlertParams;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.R;
@@ -124,6 +125,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
private boolean mHasTelephony;
private boolean mHasVibrator;
private final boolean mShowSilentToggle;
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
/**
* @param context everything needs a context :(
@@ -158,6 +160,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
mShowSilentToggle = SHOW_SILENT_TOGGLE && !mContext.getResources().getBoolean(
com.android.internal.R.bool.config_useFixedVolume);
+
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
/**
@@ -305,6 +309,10 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
addedKeys.add(actionKey);
}
+ if (mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mItems.add(getEmergencyAction());
+ }
+
mAdapter = new MyAdapter();
AlertParams params = new AlertParams(mContext);
@@ -458,6 +466,26 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
};
}
+ private Action getEmergencyAction() {
+ return new SinglePressAction(com.android.internal.R.drawable.emergency_icon,
+ R.string.global_action_emergency) {
+ @Override
+ public void onPress() {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ }
+
+ @Override
+ public boolean showDuringKeyguard() {
+ return true;
+ }
+
+ @Override
+ public boolean showBeforeProvisioning() {
+ return true;
+ }
+ };
+ }
+
private Action getAssistAction() {
return new SinglePressAction(com.android.internal.R.drawable.ic_action_assist_focused,
R.string.global_action_assist) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index f59b2ff16482f..b1836443190c5 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -52,6 +52,7 @@ import com.android.internal.R;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
import com.android.internal.os.ZygoteInit;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.internal.widget.ILockSettings;
import com.android.server.accessibility.AccessibilityManagerService;
import com.android.server.am.ActivityManagerService;
@@ -62,6 +63,7 @@ import com.android.server.connectivity.MetricsLoggerService;
import com.android.server.devicepolicy.DevicePolicyManagerService;
import com.android.server.display.DisplayManagerService;
import com.android.server.dreams.DreamManagerService;
+import com.android.server.emergency.EmergencyAffordanceService;
import com.android.server.fingerprint.FingerprintService;
import com.android.server.hdmi.HdmiControlService;
import com.android.server.input.InputManagerService;
@@ -1077,6 +1079,11 @@ public final class SystemServer {
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
}
+ if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) {
+ // EmergencyMode sevice
+ mSystemServiceManager.startService(EmergencyAffordanceService.class);
+ }
+
if (!disableNonCoreServices) {
// Dreams (interactive idle-time views, a/k/a screen savers, and doze mode)
mSystemServiceManager.startService(DreamManagerService.class);
From 5fbc86bfd6e0b26b6597798095138521597fa9ea Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 13 Sep 2016 16:02:33 -0700
Subject: [PATCH 03/98] DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.
If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.
Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
---
core/java/android/provider/Settings.java | 7 +
.../policy/EmergencyAffordanceManager.java | 101 ++++++
core/res/res/drawable/emergency_icon.xml | 34 ++
core/res/res/values/config.xml | 9 +
core/res/res/values/strings.xml | 3 +
core/res/res/values/symbols.xml | 5 +
.../com/android/keyguard/EmergencyButton.java | 38 +++
.../internal/policy/impl/GlobalActions.java | 28 ++
.../emergency/EmergencyAffordanceService.java | 313 ++++++++++++++++++
.../java/com/android/server/SystemServer.java | 7 +
10 files changed, 545 insertions(+)
create mode 100644 core/java/com/android/internal/policy/EmergencyAffordanceManager.java
create mode 100644 core/res/res/drawable/emergency_icon.xml
create mode 100644 services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 838686a53ec22..3b450583a52fc 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6377,6 +6377,13 @@ public final class Settings {
*/
public static final String CALL_AUTO_RETRY = "call_auto_retry";
+ /**
+ * A setting that can be read whether the emergency affordance is currently needed.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed";
+
/**
* The preferred network mode 7 = Global
* 6 = EvDo only
diff --git a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
new file mode 100644
index 0000000000000..bed7c1ba4ed3e
--- /dev/null
+++ b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package com.android.internal.policy;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.provider.Settings;
+
+/**
+ * A class that manages emergency affordances and enables immediate calling to emergency services
+ */
+public class EmergencyAffordanceManager {
+
+ public static final boolean ENABLED = true;
+
+ /**
+ * Global setting override with the number to call with the emergency affordance.
+ * @hide
+ */
+ private static final String EMERGENCY_CALL_NUMBER_SETTING = "emergency_affordance_number";
+
+ /**
+ * Global setting, whether the emergency affordance should be shown regardless of device state.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String FORCE_EMERGENCY_AFFORDANCE_SETTING = "force_emergency_affordance";
+
+ private final Context mContext;
+
+ public EmergencyAffordanceManager(Context context) {
+ mContext = context;
+ }
+
+ /**
+ * perform an emergency call.
+ */
+ public final void performEmergencyCall() {
+ performEmergencyCall(mContext);
+ }
+
+ private static Uri getPhoneUri(Context context) {
+ String number = context.getResources().getString(
+ com.android.internal.R.string.config_emergency_call_number);
+ if (Build.IS_DEBUGGABLE) {
+ String override = Settings.Global.getString(
+ context.getContentResolver(), EMERGENCY_CALL_NUMBER_SETTING);
+ if (override != null) {
+ number = override;
+ }
+ }
+ return Uri.fromParts("tel", number, null);
+ }
+
+ private static void performEmergencyCall(Context context) {
+ Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY);
+ intent.setData(getPhoneUri(context));
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ }
+
+ /**
+ * @return whether emergency affordance should be active.
+ */
+ public boolean needsEmergencyAffordance() {
+ if (!ENABLED) {
+ return false;
+ }
+ if (forceShowing()) {
+ return true;
+ }
+ return isEmergencyAffordanceNeeded();
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, 0) != 0;
+ }
+
+
+ private boolean forceShowing() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ FORCE_EMERGENCY_AFFORDANCE_SETTING, 0) != 0;
+ }
+}
diff --git a/core/res/res/drawable/emergency_icon.xml b/core/res/res/drawable/emergency_icon.xml
new file mode 100644
index 0000000000000..8e460d786643f
--- /dev/null
+++ b/core/res/res/drawable/emergency_icon.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 68df6f1a30109..624006f72fa77 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2010,6 +2010,15 @@
- false
+
+ 112
+
+
+
+ - 404
+ - 405
+
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 20b4b62f3e808..2923bf608ea25 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -448,6 +448,9 @@
Power off
+
+ Emergency
+
Bug report
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 105554794f53d..54a2f20fa4c02 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2141,6 +2141,11 @@
+
+
+
+
+
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index 50ac2612e550c..104043a8782b5 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -23,11 +23,14 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.telephony.TelephonyManager;
import android.util.AttributeSet;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewConfiguration;
import android.widget.Button;
import com.android.internal.telephony.IccCardConstants.State;
import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.policy.EmergencyAffordanceManager;
/**
* This class implements a smart emergency button that updates itself based
@@ -37,7 +40,10 @@ import com.android.internal.widget.LockPatternUtils;
*/
public class EmergencyButton extends Button {
private static final String ACTION_EMERGENCY_DIAL = "com.android.phone.EmergencyDialer.DIAL";
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
+ private int mDownX;
+ private int mDownY;
KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() {
@Override
@@ -50,6 +56,7 @@ public class EmergencyButton extends Button {
updateEmergencyCallButton();
}
};
+ private boolean mLongPressWasDragged;
private LockPatternUtils mLockPatternUtils;
private PowerManager mPowerManager;
@@ -59,6 +66,7 @@ public class EmergencyButton extends Button {
public EmergencyButton(Context context, AttributeSet attrs) {
super(context, attrs);
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
@Override
@@ -84,6 +92,36 @@ public class EmergencyButton extends Button {
}
});
updateEmergencyCallButton();
+ setOnLongClickListener(new OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ if (!mLongPressWasDragged
+ && mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ return true;
+ }
+ return false;
+ }
+ });
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+ if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
+ mDownX = x;
+ mDownY = y;
+ mLongPressWasDragged = false;
+ } else {
+ final int xDiff = Math.abs(x - mDownX);
+ final int yDiff = Math.abs(y - mDownY);
+ int touchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
+ if (Math.abs(yDiff) > touchSlop || Math.abs(xDiff) > touchSlop) {
+ mLongPressWasDragged = true;
+ }
+ }
+ return super.onTouchEvent(event);
}
/**
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
index b0b2886fcdb4d..6494bf86c9e93 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -18,6 +18,7 @@ package com.android.internal.policy.impl;
import com.android.internal.app.AlertController;
import com.android.internal.app.AlertController.AlertParams;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.R;
@@ -121,6 +122,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
private boolean mHasTelephony;
private boolean mHasVibrator;
private final boolean mShowSilentToggle;
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
/**
* @param context everything needs a context :(
@@ -155,6 +157,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
mShowSilentToggle = SHOW_SILENT_TOGGLE && !mContext.getResources().getBoolean(
com.android.internal.R.bool.config_useFixedVolume);
+
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
/**
@@ -298,6 +302,10 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
addedKeys.add(actionKey);
}
+ if (mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mItems.add(getEmergencyAction());
+ }
+
mAdapter = new MyAdapter();
AlertParams params = new AlertParams(mContext);
@@ -436,6 +444,26 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
};
}
+ private Action getEmergencyAction() {
+ return new SinglePressAction(com.android.internal.R.drawable.emergency_icon,
+ R.string.global_action_emergency) {
+ @Override
+ public void onPress() {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ }
+
+ @Override
+ public boolean showDuringKeyguard() {
+ return true;
+ }
+
+ @Override
+ public boolean showBeforeProvisioning() {
+ return true;
+ }
+ };
+ }
+
private Action getLockdownAction() {
return new SinglePressAction(com.android.internal.R.drawable.ic_lock_lock,
R.string.global_action_lockdown) {
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
new file mode 100644
index 0000000000000..fa96bc682deeb
--- /dev/null
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -0,0 +1,313 @@
+/*
+ * 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
+ */
+
+package com.android.server.emergency;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+import android.provider.Settings;
+import android.telephony.CellInfo;
+import android.telephony.CellInfoGsm;
+import android.telephony.CellInfoLte;
+import android.telephony.CellInfoWcdma;
+import android.telephony.CellLocation;
+import android.telephony.PhoneStateListener;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.server.SystemService;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A service that listens to connectivity and SIM card changes and determines if the emergency mode
+ * should be enabled
+ */
+public class EmergencyAffordanceService extends SystemService {
+
+ private static final String TAG = "EmergencyAffordanceService";
+
+ private static final int NUM_SCANS_UNTIL_ABORT = 4;
+
+ private static final int INITIALIZE_STATE = 1;
+ private static final int CELL_INFO_STATE_CHANGED = 2;
+ private static final int SUBSCRIPTION_CHANGED = 3;
+
+ /**
+ * Global setting, whether the last scan of the sim cards reveal that a sim was inserted that
+ * requires the emergency affordance. The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String EMERGENCY_SIM_INSERTED_SETTING = "emergency_sim_inserted_before";
+
+ private final Context mContext;
+ private final ArrayList mEmergencyCallMccNumbers;
+
+ private final Object mLock = new Object();
+
+ private TelephonyManager mTelephonyManager;
+ private SubscriptionManager mSubscriptionManager;
+ private boolean mEmergencyAffordanceNeeded;
+ private MyHandler mHandler;
+ private int mScansCompleted;
+ private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+ @Override
+ public void onCellInfoChanged(List cellInfo) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+
+ @Override
+ public void onCellLocationChanged(CellLocation location) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+ };
+ private BroadcastReceiver mAirplaneModeReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.AIRPLANE_MODE_ON, 0) == 0) {
+ startScanning();
+ requestCellScan();
+ }
+ }
+ };
+ private boolean mSimNeedsEmergencyAffordance;
+ private boolean mNetworkNeedsEmergencyAffordance;
+
+ private void requestCellScan() {
+ mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
+ }
+
+ private SubscriptionManager.OnSubscriptionsChangedListener mSubscriptionChangedListener
+ = new SubscriptionManager.OnSubscriptionsChangedListener() {
+ @Override
+ public void onSubscriptionsChanged() {
+ mHandler.obtainMessage(SUBSCRIPTION_CHANGED).sendToTarget();
+ }
+ };
+
+ public EmergencyAffordanceService(Context context) {
+ super(context);
+ mContext = context;
+ int[] numbers = context.getResources().getIntArray(
+ com.android.internal.R.array.config_emergency_mcc_codes);
+ mEmergencyCallMccNumbers = new ArrayList<>(numbers.length);
+ for (int i = 0; i < numbers.length; i++) {
+ mEmergencyCallMccNumbers.add(numbers[i]);
+ }
+ }
+
+ private void updateEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
+ mEmergencyAffordanceNeeded ? 1 : 0);
+ if (mEmergencyAffordanceNeeded) {
+ stopScanning();
+ }
+ }
+ }
+
+ private void stopScanning() {
+ synchronized (mLock) {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+ mScansCompleted = 0;
+ }
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ return mEmergencyAffordanceNeeded;
+ }
+ }
+
+ @Override
+ public void onStart() {
+ }
+
+ @Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
+ mTelephonyManager = (TelephonyManager) mContext.getSystemService(
+ Context.TELEPHONY_SERVICE);
+ mSubscriptionManager = SubscriptionManager.from(mContext);
+ HandlerThread thread = new HandlerThread(TAG);
+ thread.start();
+ mHandler = new MyHandler(thread.getLooper());
+ mHandler.obtainMessage(INITIALIZE_STATE).sendToTarget();
+ startScanning();
+ IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ mContext.registerReceiver(mAirplaneModeReceiver, filter);
+ mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangedListener);
+ }
+ }
+
+ private void startScanning() {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_INFO
+ | PhoneStateListener.LISTEN_CELL_LOCATION);
+ }
+
+ /** Handler to do the heavier work on */
+ private class MyHandler extends Handler {
+
+ public MyHandler(Looper l) {
+ super(l);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case INITIALIZE_STATE:
+ handleInitializeState();
+ break;
+ case CELL_INFO_STATE_CHANGED:
+ handleUpdateCellInfo();
+ break;
+ case SUBSCRIPTION_CHANGED:
+ handleUpdateSimSubscriptionInfo();
+ break;
+ }
+ }
+ }
+
+ private void handleInitializeState() {
+ if (handleUpdateSimSubscriptionInfo()) {
+ return;
+ }
+ if (handleUpdateCellInfo()) {
+ return;
+ }
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean handleUpdateSimSubscriptionInfo() {
+ boolean neededBefore = simNeededAffordanceBefore();
+ boolean neededNow = neededBefore;
+ List activeSubscriptionInfoList =
+ mSubscriptionManager.getActiveSubscriptionInfoList();
+ if (activeSubscriptionInfoList == null) {
+ return neededNow;
+ }
+ for (SubscriptionInfo info : activeSubscriptionInfoList) {
+ int mcc = info.getMcc();
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE){
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ String simOperator = mTelephonyManager.getSimOperator(info.getSubscriptionId());
+ mcc = 0;
+ if (simOperator != null && simOperator.length() >= 3) {
+ mcc = Integer.parseInt(simOperator.substring(0, 3));
+ }
+ if (mcc != 0) {
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else {
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ }
+ }
+ if (neededNow != neededBefore) {
+ setSimNeedsEmergencyAffordance(neededNow);
+ }
+ return neededNow;
+ }
+
+ private void setSimNeedsEmergencyAffordance(boolean simNeedsEmergencyAffordance) {
+ mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ EMERGENCY_SIM_INSERTED_SETTING,
+ simNeedsEmergencyAffordance ? 1 : 0);
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean simNeededAffordanceBefore() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ "emergency_sim_inserted_before", 0) != 0;
+ }
+
+ private boolean handleUpdateCellInfo() {
+ List cellInfos = mTelephonyManager.getAllCellInfo();
+ if (cellInfos == null) {
+ return false;
+ }
+ boolean stopScanningAfterScan = false;
+ for (CellInfo cellInfo : cellInfos) {
+ int mcc = 0;
+ if (cellInfo instanceof CellInfoGsm) {
+ mcc = ((CellInfoGsm) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoLte) {
+ mcc = ((CellInfoLte) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoWcdma) {
+ mcc = ((CellInfoWcdma) cellInfo).getCellIdentity().getMcc();
+ }
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ setNetworkNeedsEmergencyAffordance(true);
+ return true;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE) {
+ // we found an mcc that isn't in the list, abort
+ stopScanningAfterScan = true;
+ }
+ }
+ if (stopScanningAfterScan) {
+ stopScanning();
+ } else {
+ onCellScanFinishedUnsuccessful();
+ }
+ setNetworkNeedsEmergencyAffordance(false);
+ return false;
+ }
+
+ private void setNetworkNeedsEmergencyAffordance(boolean needsAffordance) {
+ synchronized (mLock) {
+ mNetworkNeedsEmergencyAffordance = needsAffordance;
+ updateEmergencyAffordanceNeeded();
+ }
+ }
+
+ private void onCellScanFinishedUnsuccessful() {
+ synchronized (mLock) {
+ mScansCompleted++;
+ if (mScansCompleted >= NUM_SCANS_UNTIL_ABORT) {
+ stopScanning();
+ }
+ }
+ }
+
+ private boolean mccRequiresEmergencyAffordance(int mcc) {
+ return mEmergencyCallMccNumbers.contains(mcc);
+ }
+}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 334cdf6246aaf..340b9a273cbb7 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -56,6 +56,7 @@ import com.android.internal.R;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.Zygote;
import com.android.internal.os.SamplingProfilerIntegration;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.server.accessibility.AccessibilityManagerService;
import com.android.server.accounts.AccountManagerService;
import com.android.server.am.ActivityManagerService;
@@ -65,6 +66,7 @@ import com.android.server.content.ContentService;
import com.android.server.devicepolicy.DevicePolicyManagerService;
import com.android.server.display.DisplayManagerService;
import com.android.server.dreams.DreamManagerService;
+import com.android.server.emergency.EmergencyAffordanceService;
import com.android.server.fingerprint.FingerprintService;
import com.android.server.hdmi.HdmiControlService;
import com.android.server.input.InputManagerService;
@@ -899,6 +901,11 @@ public final class SystemServer {
}
}
+ if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) {
+ // EmergencyMode sevice
+ mSystemServiceManager.startService(EmergencyAffordanceService.class);
+ }
+
if (!disableNonCoreServices) {
// Dreams (interactive idle-time views, a/k/a screen savers, and doze mode)
mSystemServiceManager.startService(DreamManagerService.class);
From cd22634003056f8d7f0c10ac7b8a30e11a981110 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 13 Sep 2016 16:02:33 -0700
Subject: [PATCH 04/98] DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.
If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.
Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
---
core/java/android/provider/Settings.java | 7 +
.../policy/EmergencyAffordanceManager.java | 101 ++++++
core/res/res/drawable/emergency_icon.xml | 34 ++
core/res/res/values/config.xml | 10 +
core/res/res/values/strings.xml | 3 +
core/res/res/values/symbols.xml | 5 +
.../com/android/keyguard/EmergencyButton.java | 40 +++
.../emergency/EmergencyAffordanceService.java | 312 ++++++++++++++++++
.../android/server/policy/GlobalActions.java | 28 ++
.../java/com/android/server/SystemServer.java | 7 +
10 files changed, 547 insertions(+)
create mode 100644 core/java/com/android/internal/policy/EmergencyAffordanceManager.java
create mode 100644 core/res/res/drawable/emergency_icon.xml
create mode 100644 services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index fe95864e41724..2f9caf8c46387 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7405,6 +7405,13 @@ public final class Settings {
*/
public static final String CALL_AUTO_RETRY = "call_auto_retry";
+ /**
+ * A setting that can be read whether the emergency affordance is currently needed.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed";
+
/**
* See RIL_PreferredNetworkType in ril.h
* @hide
diff --git a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
new file mode 100644
index 0000000000000..bed7c1ba4ed3e
--- /dev/null
+++ b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package com.android.internal.policy;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.provider.Settings;
+
+/**
+ * A class that manages emergency affordances and enables immediate calling to emergency services
+ */
+public class EmergencyAffordanceManager {
+
+ public static final boolean ENABLED = true;
+
+ /**
+ * Global setting override with the number to call with the emergency affordance.
+ * @hide
+ */
+ private static final String EMERGENCY_CALL_NUMBER_SETTING = "emergency_affordance_number";
+
+ /**
+ * Global setting, whether the emergency affordance should be shown regardless of device state.
+ * The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String FORCE_EMERGENCY_AFFORDANCE_SETTING = "force_emergency_affordance";
+
+ private final Context mContext;
+
+ public EmergencyAffordanceManager(Context context) {
+ mContext = context;
+ }
+
+ /**
+ * perform an emergency call.
+ */
+ public final void performEmergencyCall() {
+ performEmergencyCall(mContext);
+ }
+
+ private static Uri getPhoneUri(Context context) {
+ String number = context.getResources().getString(
+ com.android.internal.R.string.config_emergency_call_number);
+ if (Build.IS_DEBUGGABLE) {
+ String override = Settings.Global.getString(
+ context.getContentResolver(), EMERGENCY_CALL_NUMBER_SETTING);
+ if (override != null) {
+ number = override;
+ }
+ }
+ return Uri.fromParts("tel", number, null);
+ }
+
+ private static void performEmergencyCall(Context context) {
+ Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY);
+ intent.setData(getPhoneUri(context));
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ }
+
+ /**
+ * @return whether emergency affordance should be active.
+ */
+ public boolean needsEmergencyAffordance() {
+ if (!ENABLED) {
+ return false;
+ }
+ if (forceShowing()) {
+ return true;
+ }
+ return isEmergencyAffordanceNeeded();
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, 0) != 0;
+ }
+
+
+ private boolean forceShowing() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ FORCE_EMERGENCY_AFFORDANCE_SETTING, 0) != 0;
+ }
+}
diff --git a/core/res/res/drawable/emergency_icon.xml b/core/res/res/drawable/emergency_icon.xml
new file mode 100644
index 0000000000000..8e460d786643f
--- /dev/null
+++ b/core/res/res/drawable/emergency_icon.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index ae8cae87ee963..7b457d418cfc7 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2270,4 +2270,14 @@
+
+ 112
+
+
+
+ - 404
+ - 405
+
+
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index d9fa287361c00..ffb4160c61e48 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -481,6 +481,9 @@
Power off
+
+ Emergency
+
Bug report
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 262aa7640da34..87442a56cb8db 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2320,4 +2320,9 @@
+
+
+
+
+
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index cbf22c00d61cf..635706fc87851 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -25,12 +25,15 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.telecom.TelecomManager;
import android.util.AttributeSet;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewConfiguration;
import android.widget.Button;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.telephony.IccCardConstants.State;
import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.policy.EmergencyAffordanceManager;
/**
* This class implements a smart emergency button that updates itself based
@@ -46,6 +49,11 @@ public class EmergencyButton extends Button {
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ private static final String LOG_TAG = "EmergencyButton";
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
+
+ private int mDownX;
+ private int mDownY;
KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() {
@Override
@@ -58,6 +66,7 @@ public class EmergencyButton extends Button {
updateEmergencyCallButton();
}
};
+ private boolean mLongPressWasDragged;
public interface EmergencyButtonCallback {
public void onEmergencyButtonClickedWhenInCall();
@@ -80,6 +89,7 @@ public class EmergencyButton extends Button {
com.android.internal.R.bool.config_voice_capable);
mEnableEmergencyCallWhileSimLocked = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_enable_emergency_call_while_sim_locked);
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
@Override
@@ -104,9 +114,39 @@ public class EmergencyButton extends Button {
takeEmergencyCallAction();
}
});
+ setOnLongClickListener(new OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ if (!mLongPressWasDragged
+ && mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ return true;
+ }
+ return false;
+ }
+ });
updateEmergencyCallButton();
}
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ final int x = (int) event.getX();
+ final int y = (int) event.getY();
+ if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
+ mDownX = x;
+ mDownY = y;
+ mLongPressWasDragged = false;
+ } else {
+ final int xDiff = Math.abs(x - mDownX);
+ final int yDiff = Math.abs(y - mDownY);
+ int touchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
+ if (Math.abs(yDiff) > touchSlop || Math.abs(xDiff) > touchSlop) {
+ mLongPressWasDragged = true;
+ }
+ }
+ return super.onTouchEvent(event);
+ }
+
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
new file mode 100644
index 0000000000000..cca9f10c630bd
--- /dev/null
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -0,0 +1,312 @@
+/*
+ * 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
+ */
+
+package com.android.server.emergency;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+import android.provider.Settings;
+import android.telephony.CellInfo;
+import android.telephony.CellInfoGsm;
+import android.telephony.CellInfoLte;
+import android.telephony.CellInfoWcdma;
+import android.telephony.CellLocation;
+import android.telephony.PhoneStateListener;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.server.SystemService;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A service that listens to connectivity and SIM card changes and determines if the emergency mode
+ * should be enabled
+ */
+public class EmergencyAffordanceService extends SystemService {
+
+ private static final String TAG = "EmergencyAffordanceService";
+
+ private static final int NUM_SCANS_UNTIL_ABORT = 4;
+
+ private static final int INITIALIZE_STATE = 1;
+ private static final int CELL_INFO_STATE_CHANGED = 2;
+ private static final int SUBSCRIPTION_CHANGED = 3;
+
+ /**
+ * Global setting, whether the last scan of the sim cards reveal that a sim was inserted that
+ * requires the emergency affordance. The value is a boolean (1 or 0).
+ * @hide
+ */
+ private static final String EMERGENCY_SIM_INSERTED_SETTING = "emergency_sim_inserted_before";
+
+ private final Context mContext;
+ private final ArrayList mEmergencyCallMccNumbers;
+
+ private final Object mLock = new Object();
+
+ private TelephonyManager mTelephonyManager;
+ private SubscriptionManager mSubscriptionManager;
+ private boolean mEmergencyAffordanceNeeded;
+ private MyHandler mHandler;
+ private int mScansCompleted;
+ private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+ @Override
+ public void onCellInfoChanged(List cellInfo) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+
+ @Override
+ public void onCellLocationChanged(CellLocation location) {
+ if (!isEmergencyAffordanceNeeded()) {
+ requestCellScan();
+ }
+ }
+ };
+ private BroadcastReceiver mAirplaneModeReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.AIRPLANE_MODE_ON, 0) == 0) {
+ startScanning();
+ requestCellScan();
+ }
+ }
+ };
+ private boolean mSimNeedsEmergencyAffordance;
+ private boolean mNetworkNeedsEmergencyAffordance;
+
+ private void requestCellScan() {
+ mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
+ }
+
+ private SubscriptionManager.OnSubscriptionsChangedListener mSubscriptionChangedListener
+ = new SubscriptionManager.OnSubscriptionsChangedListener() {
+ @Override
+ public void onSubscriptionsChanged() {
+ mHandler.obtainMessage(SUBSCRIPTION_CHANGED).sendToTarget();
+ }
+ };
+
+ public EmergencyAffordanceService(Context context) {
+ super(context);
+ mContext = context;
+ int[] numbers = context.getResources().getIntArray(
+ com.android.internal.R.array.config_emergency_mcc_codes);
+ mEmergencyCallMccNumbers = new ArrayList<>(numbers.length);
+ for (int i = 0; i < numbers.length; i++) {
+ mEmergencyCallMccNumbers.add(numbers[i]);
+ }
+ }
+
+ private void updateEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
+ mEmergencyAffordanceNeeded ? 1 : 0);
+ if (mEmergencyAffordanceNeeded) {
+ stopScanning();
+ }
+ }
+ }
+
+ private void stopScanning() {
+ synchronized (mLock) {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+ mScansCompleted = 0;
+ }
+ }
+
+ private boolean isEmergencyAffordanceNeeded() {
+ synchronized (mLock) {
+ return mEmergencyAffordanceNeeded;
+ }
+ }
+
+ @Override
+ public void onStart() {
+ }
+
+ @Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
+ mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
+ mSubscriptionManager = SubscriptionManager.from(mContext);
+ HandlerThread thread = new HandlerThread(TAG);
+ thread.start();
+ mHandler = new MyHandler(thread.getLooper());
+ mHandler.obtainMessage(INITIALIZE_STATE).sendToTarget();
+ startScanning();
+ IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ mContext.registerReceiver(mAirplaneModeReceiver, filter);
+ mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangedListener);
+ }
+ }
+
+ private void startScanning() {
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_INFO
+ | PhoneStateListener.LISTEN_CELL_LOCATION);
+ }
+
+ /** Handler to do the heavier work on */
+ private class MyHandler extends Handler {
+
+ public MyHandler(Looper l) {
+ super(l);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case INITIALIZE_STATE:
+ handleInitializeState();
+ break;
+ case CELL_INFO_STATE_CHANGED:
+ handleUpdateCellInfo();
+ break;
+ case SUBSCRIPTION_CHANGED:
+ handleUpdateSimSubscriptionInfo();
+ break;
+ }
+ }
+ }
+
+ private void handleInitializeState() {
+ if (handleUpdateSimSubscriptionInfo()) {
+ return;
+ }
+ if (handleUpdateCellInfo()) {
+ return;
+ }
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean handleUpdateSimSubscriptionInfo() {
+ boolean neededBefore = simNeededAffordanceBefore();
+ boolean neededNow = neededBefore;
+ List activeSubscriptionInfoList =
+ mSubscriptionManager.getActiveSubscriptionInfoList();
+ if (activeSubscriptionInfoList == null) {
+ return neededNow;
+ }
+ for (SubscriptionInfo info : activeSubscriptionInfoList) {
+ int mcc = info.getMcc();
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE){
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ String simOperator = mTelephonyManager.getSimOperator(info.getSubscriptionId());
+ mcc = 0;
+ if (simOperator != null && simOperator.length() >= 3) {
+ mcc = Integer.parseInt(simOperator.substring(0, 3));
+ }
+ if (mcc != 0) {
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ neededNow = true;
+ break;
+ } else {
+ // a Sim with a different mcc code was found
+ neededNow = false;
+ }
+ }
+ }
+ if (neededNow != neededBefore) {
+ setSimNeedsEmergencyAffordance(neededNow);
+ }
+ return neededNow;
+ }
+
+ private void setSimNeedsEmergencyAffordance(boolean simNeedsEmergencyAffordance) {
+ mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance;
+ Settings.Global.putInt(mContext.getContentResolver(),
+ EMERGENCY_SIM_INSERTED_SETTING,
+ simNeedsEmergencyAffordance ? 1 : 0);
+ updateEmergencyAffordanceNeeded();
+ }
+
+ private boolean simNeededAffordanceBefore() {
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ "emergency_sim_inserted_before", 0) != 0;
+ }
+
+ private boolean handleUpdateCellInfo() {
+ List cellInfos = mTelephonyManager.getAllCellInfo();
+ if (cellInfos == null) {
+ return false;
+ }
+ boolean stopScanningAfterScan = false;
+ for (CellInfo cellInfo : cellInfos) {
+ int mcc = 0;
+ if (cellInfo instanceof CellInfoGsm) {
+ mcc = ((CellInfoGsm) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoLte) {
+ mcc = ((CellInfoLte) cellInfo).getCellIdentity().getMcc();
+ } else if (cellInfo instanceof CellInfoWcdma) {
+ mcc = ((CellInfoWcdma) cellInfo).getCellIdentity().getMcc();
+ }
+ if (mccRequiresEmergencyAffordance(mcc)) {
+ setNetworkNeedsEmergencyAffordance(true);
+ return true;
+ } else if (mcc != 0 && mcc != Integer.MAX_VALUE) {
+ // we found an mcc that isn't in the list, abort
+ stopScanningAfterScan = true;
+ }
+ }
+ if (stopScanningAfterScan) {
+ stopScanning();
+ } else {
+ onCellScanFinishedUnsuccessful();
+ }
+ setNetworkNeedsEmergencyAffordance(false);
+ return false;
+ }
+
+ private void setNetworkNeedsEmergencyAffordance(boolean needsAffordance) {
+ synchronized (mLock) {
+ mNetworkNeedsEmergencyAffordance = needsAffordance;
+ updateEmergencyAffordanceNeeded();
+ }
+ }
+
+ private void onCellScanFinishedUnsuccessful() {
+ synchronized (mLock) {
+ mScansCompleted++;
+ if (mScansCompleted >= NUM_SCANS_UNTIL_ABORT) {
+ stopScanning();
+ }
+ }
+ }
+
+ private boolean mccRequiresEmergencyAffordance(int mcc) {
+ return mEmergencyCallMccNumbers.contains(mcc);
+ }
+}
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index 3cee9279c018b..43fd7745a5d3f 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -18,6 +18,7 @@ package com.android.server.policy;
import com.android.internal.app.AlertController;
import com.android.internal.app.AlertController.AlertParams;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.R;
@@ -122,6 +123,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
private boolean mHasTelephony;
private boolean mHasVibrator;
private final boolean mShowSilentToggle;
+ private final EmergencyAffordanceManager mEmergencyAffordanceManager;
/**
* @param context everything needs a context :(
@@ -156,6 +158,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
mShowSilentToggle = SHOW_SILENT_TOGGLE && !mContext.getResources().getBoolean(
com.android.internal.R.bool.config_useFixedVolume);
+
+ mEmergencyAffordanceManager = new EmergencyAffordanceManager(context);
}
/**
@@ -303,6 +307,10 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
addedKeys.add(actionKey);
}
+ if (mEmergencyAffordanceManager.needsEmergencyAffordance()) {
+ mItems.add(getEmergencyAction());
+ }
+
mAdapter = new MyAdapter();
AlertParams params = new AlertParams(mContext);
@@ -445,6 +453,26 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
};
}
+ private Action getEmergencyAction() {
+ return new SinglePressAction(com.android.internal.R.drawable.emergency_icon,
+ R.string.global_action_emergency) {
+ @Override
+ public void onPress() {
+ mEmergencyAffordanceManager.performEmergencyCall();
+ }
+
+ @Override
+ public boolean showDuringKeyguard() {
+ return true;
+ }
+
+ @Override
+ public boolean showBeforeProvisioning() {
+ return true;
+ }
+ };
+ }
+
private Action getAssistAction() {
return new SinglePressAction(com.android.internal.R.drawable.ic_action_assist_focused,
R.string.global_action_assist) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index bd72860b8dd8f..5b014b1428b01 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -49,6 +49,7 @@ import android.webkit.WebViewFactory;
import com.android.internal.R;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
+import com.android.internal.policy.EmergencyAffordanceManager;
import com.android.server.accessibility.AccessibilityManagerService;
import com.android.server.accounts.AccountManagerService;
import com.android.server.am.ActivityManagerService;
@@ -59,6 +60,7 @@ import com.android.server.content.ContentService;
import com.android.server.devicepolicy.DevicePolicyManagerService;
import com.android.server.display.DisplayManagerService;
import com.android.server.dreams.DreamManagerService;
+import com.android.server.emergency.EmergencyAffordanceService;
import com.android.server.fingerprint.FingerprintService;
import com.android.server.hdmi.HdmiControlService;
import com.android.server.input.InputManagerService;
@@ -922,6 +924,11 @@ public final class SystemServer {
}
}
+ if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) {
+ // EmergencyMode sevice
+ mSystemServiceManager.startService(EmergencyAffordanceService.class);
+ }
+
if (!disableNonCoreServices) {
// Dreams (interactive idle-time views, a/k/a screen savers, and doze mode)
mSystemServiceManager.startService(DreamManagerService.class);
From 65316661dd5423866530a21cb316e89824be2997 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 12:49:48 -0700
Subject: [PATCH 05/98] DO NOT MERGE - Fixed an issue where the emergency
affordance would show
If a device isn't voice capable, it shouldn't show the emergency
option.
Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
---
.../server/emergency/EmergencyAffordanceService.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
index cca9f10c630bd..353f4506e1e9b 100644
--- a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -99,6 +99,7 @@ public class EmergencyAffordanceService extends SystemService {
};
private boolean mSimNeedsEmergencyAffordance;
private boolean mNetworkNeedsEmergencyAffordance;
+ private boolean mVoiceCapable;
private void requestCellScan() {
mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
@@ -125,8 +126,8 @@ public class EmergencyAffordanceService extends SystemService {
private void updateEmergencyAffordanceNeeded() {
synchronized (mLock) {
- mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
- mNetworkNeedsEmergencyAffordance;
+ mEmergencyAffordanceNeeded = mVoiceCapable && (mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance);
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
mEmergencyAffordanceNeeded ? 1 : 0);
@@ -157,6 +158,11 @@ public class EmergencyAffordanceService extends SystemService {
public void onBootPhase(int phase) {
if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
+ mVoiceCapable = mTelephonyManager.isVoiceCapable();
+ if (!mVoiceCapable) {
+ updateEmergencyAffordanceNeeded();
+ return;
+ }
mSubscriptionManager = SubscriptionManager.from(mContext);
HandlerThread thread = new HandlerThread(TAG);
thread.start();
From a70bb895f5bae6e9a1e00809761d75311aca6c80 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 12:49:48 -0700
Subject: [PATCH 06/98] DO NOT MERGE - Fixed an issue where the emergency
affordance would show
If a device isn't voice capable, it shouldn't show the emergency
option.
Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
---
.../server/emergency/EmergencyAffordanceService.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
index cca9f10c630bd..353f4506e1e9b 100644
--- a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -99,6 +99,7 @@ public class EmergencyAffordanceService extends SystemService {
};
private boolean mSimNeedsEmergencyAffordance;
private boolean mNetworkNeedsEmergencyAffordance;
+ private boolean mVoiceCapable;
private void requestCellScan() {
mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
@@ -125,8 +126,8 @@ public class EmergencyAffordanceService extends SystemService {
private void updateEmergencyAffordanceNeeded() {
synchronized (mLock) {
- mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
- mNetworkNeedsEmergencyAffordance;
+ mEmergencyAffordanceNeeded = mVoiceCapable && (mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance);
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
mEmergencyAffordanceNeeded ? 1 : 0);
@@ -157,6 +158,11 @@ public class EmergencyAffordanceService extends SystemService {
public void onBootPhase(int phase) {
if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
+ mVoiceCapable = mTelephonyManager.isVoiceCapable();
+ if (!mVoiceCapable) {
+ updateEmergencyAffordanceNeeded();
+ return;
+ }
mSubscriptionManager = SubscriptionManager.from(mContext);
HandlerThread thread = new HandlerThread(TAG);
thread.start();
From d74366fc941270dc51bbf077a6ad10e632db017f Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 12:49:48 -0700
Subject: [PATCH 07/98] DO NOT MERGE - Fixed an issue where the emergency
affordance would show
If a device isn't voice capable, it shouldn't show the emergency
option.
Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
---
.../server/emergency/EmergencyAffordanceService.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
index fa96bc682deeb..9fb803b1f4ed2 100644
--- a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -99,6 +99,7 @@ public class EmergencyAffordanceService extends SystemService {
};
private boolean mSimNeedsEmergencyAffordance;
private boolean mNetworkNeedsEmergencyAffordance;
+ private boolean mVoiceCapable;
private void requestCellScan() {
mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget();
@@ -125,8 +126,8 @@ public class EmergencyAffordanceService extends SystemService {
private void updateEmergencyAffordanceNeeded() {
synchronized (mLock) {
- mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance ||
- mNetworkNeedsEmergencyAffordance;
+ mEmergencyAffordanceNeeded = mVoiceCapable && (mSimNeedsEmergencyAffordance ||
+ mNetworkNeedsEmergencyAffordance);
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
mEmergencyAffordanceNeeded ? 1 : 0);
@@ -158,6 +159,11 @@ public class EmergencyAffordanceService extends SystemService {
if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
mTelephonyManager = (TelephonyManager) mContext.getSystemService(
Context.TELEPHONY_SERVICE);
+ mVoiceCapable = mTelephonyManager.isVoiceCapable();
+ if (!mVoiceCapable) {
+ updateEmergencyAffordanceNeeded();
+ return;
+ }
mSubscriptionManager = SubscriptionManager.from(mContext);
HandlerThread thread = new HandlerThread(TAG);
thread.start();
From 1b60879b4b2191f427627da234351616b84a69bd Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 16:45:41 -0700
Subject: [PATCH 08/98] DO NOT MERGE - Added translations for emergency action
string
Bug: 30404490
Change-Id: Ic20d93005882bb71cef32a705443e427b0a9bd71
---
core/res/res/values-af/strings.xml | 1 +
core/res/res/values-am/strings.xml | 1 +
core/res/res/values-ar/strings.xml | 1 +
core/res/res/values-az-rAZ/strings.xml | 1 +
core/res/res/values-bg/strings.xml | 1 +
core/res/res/values-bn-rBD/strings.xml | 1 +
core/res/res/values-ca/strings.xml | 1 +
core/res/res/values-cs/strings.xml | 1 +
core/res/res/values-da/strings.xml | 1 +
core/res/res/values-de/strings.xml | 1 +
core/res/res/values-el/strings.xml | 1 +
core/res/res/values-en-rGB/strings.xml | 1 +
core/res/res/values-en-rIN/strings.xml | 1 +
core/res/res/values-es-rUS/strings.xml | 1 +
core/res/res/values-es/strings.xml | 1 +
core/res/res/values-et-rEE/strings.xml | 1 +
core/res/res/values-eu-rES/strings.xml | 1 +
core/res/res/values-fa/strings.xml | 1 +
core/res/res/values-fi/strings.xml | 1 +
core/res/res/values-fr-rCA/strings.xml | 1 +
core/res/res/values-fr/strings.xml | 1 +
core/res/res/values-gl-rES/strings.xml | 1 +
core/res/res/values-hi/strings.xml | 1 +
core/res/res/values-hr/strings.xml | 1 +
core/res/res/values-hu/strings.xml | 1 +
core/res/res/values-hy-rAM/strings.xml | 1 +
core/res/res/values-in/strings.xml | 1 +
core/res/res/values-is-rIS/strings.xml | 1 +
core/res/res/values-it/strings.xml | 1 +
core/res/res/values-iw/strings.xml | 1 +
core/res/res/values-ja/strings.xml | 1 +
core/res/res/values-ka-rGE/strings.xml | 1 +
core/res/res/values-kk-rKZ/strings.xml | 1 +
core/res/res/values-km-rKH/strings.xml | 1 +
core/res/res/values-kn-rIN/strings.xml | 1 +
core/res/res/values-ko/strings.xml | 1 +
core/res/res/values-lo-rLA/strings.xml | 1 +
core/res/res/values-lt/strings.xml | 1 +
core/res/res/values-lv/strings.xml | 1 +
core/res/res/values-mk-rMK/strings.xml | 1 +
core/res/res/values-ml-rIN/strings.xml | 1 +
core/res/res/values-mn-rMN/strings.xml | 1 +
core/res/res/values-mr-rIN/strings.xml | 1 +
core/res/res/values-ms-rMY/strings.xml | 1 +
core/res/res/values-my-rMM/strings.xml | 1 +
core/res/res/values-nb/strings.xml | 1 +
core/res/res/values-ne-rNP/strings.xml | 1 +
core/res/res/values-nl/strings.xml | 1 +
core/res/res/values-pl/strings.xml | 1 +
core/res/res/values-pt-rPT/strings.xml | 1 +
core/res/res/values-pt/strings.xml | 1 +
core/res/res/values-ro/strings.xml | 1 +
core/res/res/values-ru/strings.xml | 1 +
core/res/res/values-si-rLK/strings.xml | 1 +
core/res/res/values-sk/strings.xml | 1 +
core/res/res/values-sl/strings.xml | 1 +
core/res/res/values-sr/strings.xml | 1 +
core/res/res/values-sv/strings.xml | 1 +
core/res/res/values-sw/strings.xml | 1 +
core/res/res/values-ta-rIN/strings.xml | 1 +
core/res/res/values-te-rIN/strings.xml | 1 +
core/res/res/values-th/strings.xml | 1 +
core/res/res/values-tl/strings.xml | 1 +
core/res/res/values-tr/strings.xml | 1 +
core/res/res/values-uk/strings.xml | 1 +
core/res/res/values-ur-rPK/strings.xml | 1 +
core/res/res/values-uz-rUZ/strings.xml | 1 +
core/res/res/values-vi/strings.xml | 1 +
core/res/res/values-zh-rCN/strings.xml | 1 +
core/res/res/values-zh-rHK/strings.xml | 1 +
core/res/res/values-zh-rTW/strings.xml | 1 +
core/res/res/values-zu/strings.xml | 1 +
72 files changed, 72 insertions(+)
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index edadfc4d9166c..473e5ac4c6fed 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -192,6 +192,7 @@
"Foonopsies"
"Skermslot"
"Sit af"
+ "Noodgeval"
"Foutverslag"
"Neem foutverslag"
"Dit sal inligting oor die huidige toestand van jou toestel insamel om as \'n e-posboodskap te stuur. Dit sal \'n tydjie neem vandat die foutverslag begin is totdat dit reg is om gestuur te word; wees asseblief geduldig."
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index ac46b66fd8fcc..2acfd72fe3f7d 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -192,6 +192,7 @@
"የስልክ አማራጮች"
"ማያ ቆልፍ"
"ኃይል አጥፋ"
+ "ድንገተኛ አደጋ"
"የሳንካ ሪፖርት"
"የሳንካ ሪፖርት ውሰድ"
"ይሄ እንደ የኢሜይል መልዕክት አድርጎ የሚልከውን ስለመሣሪያዎ የአሁኑ ሁኔታ መረጃ ይሰበስባል። የሳንካ ሪፖርቱን ከመጀመር ጀምሮ እስኪላክ ድረስ ትንሽ ጊዜ ይወስዳል፤ እባክዎ ይታገሱ።"
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 838a4246504cb..bdc73fda342a3 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -192,6 +192,7 @@
"خيارات الهاتف"
"تأمين الشاشة"
"إيقاف التشغيل"
+ "الطوارئ"
"تقرير الأخطاء"
"إعداد تقرير بالأخطاء"
"سيجمع هذا معلومات حول حالة جهازك الحالي لإرسالها كرسالة إلكترونية، ولكنه سيستغرق وقتًا قليلاً من بدء عرض تقرير بالأخطاء. وحتى يكون جاهزًا للإرسال، الرجاء الانتظار."
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml
index 479cfcf14d2c7..866ef1317739e 100644
--- a/core/res/res/values-az-rAZ/strings.xml
+++ b/core/res/res/values-az-rAZ/strings.xml
@@ -154,6 +154,7 @@
"Telefon seçimləri"
"Ekran kilidi"
"Söndür"
+ "Təcili"
"Baq hesabatı"
"Baqı xəbər verin"
"Bu, sizin hazırkı cihaz durumu haqqında məlumat toplayacaq ki, elektron məktub şəklində göndərsin. Baq raportuna başlamaq üçün bir az vaxt lazım ola bilər, bir az səbr edin."
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 4828b484e9ab2..7302d72836f5e 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -192,6 +192,7 @@
"Опции на телефона"
"Заключване на екрана"
"Изключване"
+ "Спешно обаждане"
"Сигнал за програмна грешка"
"Получаване на сигнал за програмна грешка"
"По този начин ще се събере информация за текущото състояние на устройството ви, която да се изпрати като имейл съобщение. След стартирането на процеса ще мине известно време, докато сигналът за програмна грешка бъде готов за подаване. Моля, имайте търпение."
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index fc090ff563e86..c2b072789cdba 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -192,6 +192,7 @@
"ফোন বিকল্পগুলি"
"স্ক্রীণ লক"
"পাওয়ার বন্ধ করুন"
+ "জরুরী"
"ত্রুটির প্রতিবেদন"
"ত্রুটির প্রতিবেদন গ্রহণ করুন"
"এটি একটি ই-মেল বার্তা পাঠানোর জন্য আপনার ডিভাইসের বর্তমান অবস্থা সম্পর্কে তথ্য সংগ্রহ করবে৷ ত্রুটির প্রতিবেদন শুরুর সময় থেকে এটি পাঠানোর জন্য প্রস্তুত হতে কিছুটা সময় নেবে; দয়া করে ধৈর্য রাখুন৷"
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 30ce0d7ae10dc..26a72f3b53b4e 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -192,6 +192,7 @@
"Opcions del telèfon"
"Bloqueig de pantalla"
"Apaga"
+ "Emergències"
"Informe d\'error"
"Crea informe d\'errors"
"Es recopilarà informació sobre l\'estat actual del dispositiu i se t\'enviarà per correu electrònic. Passaran uns quants minuts des de l\'inici de l\'informe d\'errors fins al seu enviament, per la qual cosa et recomanem que tinguis paciència."
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 94a23a840aeeb..dfe47b89bf85b 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -192,6 +192,7 @@
"Možnosti telefonu"
"Zámek obrazovky"
"Vypnout"
+ "Stav nouze"
"Hlášení chyb"
"Vytvořit chybové hlášení"
"Shromažďuje informace o aktuálním stavu zařízení. Tyto informace je následně možné poslat v e-mailové zprávě, chvíli však potrvá, než bude hlášení o chybě připraveno k odeslání. Buďte prosím trpěliví."
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index a320cd473a7ee..2174444464ef6 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -192,6 +192,7 @@
"Indstillinger for telefon"
"Skærmlås"
"Sluk"
+ "Nødopkald"
"Fejlrapport"
"Lav fejlrapport"
"Der indsamles oplysninger om din enheds aktuelle status, der efterfølgende sendes i en e-mail. Der går lidt tid, fra fejlrapporten påbegyndes, til den er klar til at blive sendt. Tak for tålmodigheden."
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 8a54d54a8052d..1245e68375cbe 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -192,6 +192,7 @@
"Telefonoptionen"
"Displaysperre"
"Ausschalten"
+ "Notfall"
"Fehlerbericht"
"Fehlerbericht abrufen"
"Bei diesem Fehlerbericht werden Daten zum aktuellen Status Ihres Geräts erfasst und als E-Mail versandt. Vom Start des Berichts bis zu seinem Versand kann es eine Weile dauern. Bitte haben Sie etwas Geduld."
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index ea064737fbeb3..e9eab86b6a5a1 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -192,6 +192,7 @@
"Επιλογές τηλεφώνου"
"Κλείδωμα οθόνης"
"Απενεργοποίηση"
+ "Κλήση έκτακτης ανάγκης"
"Αναφορά σφαλμάτων"
"Λήψη αναφοράς σφάλματος"
"Θα συλλέξει πληροφορίες σχετικά με την τρέχουσα κατάσταση της συσκευής σας και θα τις στείλει μέσω μηνύματος ηλεκτρονικού ταχυδρομείου. Απαιτείται λίγος χρόνος για τη σύνταξη της αναφοράς σφάλματος και την αποστολή της. Κάντε λίγη υπομονή."
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index ef6f18d70fa97..8a1b7570cc621 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -192,6 +192,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index ef6f18d70fa97..8a1b7570cc621 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -192,6 +192,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 45ee7a30d8d11..34b25e67f7bb1 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -192,6 +192,7 @@
"Opciones de dispositivo"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencias"
"Informe de errores"
"Iniciar informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo, que se enviará por correo. Pasarán unos minutos desde que se inicie el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index cb8549cba9204..8bc477a13f604 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -192,6 +192,7 @@
"Opciones del teléfono"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencia"
"Informe de error"
"Crear informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo y se enviará por correo electrónico. Pasarán unos minutos desde que empiece a generarse el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index 36d8b892e18a6..3c32066a87bcf 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -192,6 +192,7 @@
"Telefonivalikud"
"Ekraanilukk"
"Lülita välja"
+ "Hädaabi"
"Veaaruanne"
"Veaaruande võtmine"
"Nii kogutakse teavet teie seadme praeguse oleku kohta, et saata see meilisõnumina. Enne kui saate veaaruande ära saata, võtab selle loomine natuke aega; varuge kannatust."
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 00e15e30146a3..f7b6f06e72eea 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -193,6 +193,7 @@
"Pantailaren blokeoa"
"Itzali"
"Programa-akatsen txostena"
+ "Larrialdiak"
"Sortu programa-akatsen txostena"
"Gailuaren uneko egoerari buruzko informazioa bilduko da, mezu elektroniko gisa bidaltzeko. Minutu batzuk igaroko dira programa-akatsen txostena sortzen hasten denetik bidaltzeko prest egon arte. Itxaron, mesedez."
"Isilik modua"
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index bfead99ef78fd..95fa9163d8be6 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -192,6 +192,7 @@
"گزینههای تلفن"
"قفل صفحه"
"خاموش کردن"
+ "اضطراری"
"گزارش اشکال"
"گرفتن گزارش اشکال"
"این گزارش اطلاعات مربوط به وضعیت دستگاه کنونی شما را جمعآوری میکند تا به صورت یک پیام ایمیل ارسال شود. از زمان شروع گزارش اشکال تا آماده شدن برای ارسال اندکی زمان میبرد؛ لطفاً شکیبا باشید."
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 6faab434cccf5..2c71372c3914c 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -192,6 +192,7 @@
"Puhelimen asetukset"
"Näytön lukitus"
"Katkaise virta"
+ "Hätäpuhelu"
"Virheraportti"
"Luo virheraportti"
"Toiminto kerää tietoja nykyisestä laitteen tilasta ja lähettää ne sähköpostitse. Kestää hetken aikaa, ennen kuin virheraportti on valmis lähetettäväksi, ole kärsivällinen."
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index b8a8257ab5b85..c83a97d897eea 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -192,6 +192,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgence"
"Rapport de bogue"
"Créer un rapport de bogue"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme de courriel. Merci de patienter pendant la préparation du rapport de bogue. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 9fb2e9f82eabf..8597ba853e3fd 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -192,6 +192,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgences"
"Rapport de bug"
"Créer un rapport de bug"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme d\'e-mail. Merci de patienter pendant la préparation du rapport de bug. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index bafdda8e30cb4..42de8403ccaee 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -192,6 +192,7 @@
"Opcións de teléfono"
"Bloqueo da pantalla"
"Apagar"
+ "Emerxencia"
"Informe de erros"
"Crear informe de erros"
"Este informe recompilará información acerca do estado actual do teu dispositivo para enviala en forma de mensaxe de correo electrónico. O informe de erros tardará un pouco en completarse desde o seu inicio ata que estea preparado para enviarse, polo que che recomendamos que teñas paciencia."
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 4e63de0977502..3c004b95731a7 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -192,6 +192,7 @@
"फ़ोन विकल्प"
"स्क्रीन लॉक"
"पावर बंद"
+ "आपातकाल"
"बग रिपोर्ट"
"बग रिपोर्ट प्राप्त करें"
"ईमेल संदेश के रूप में भेजने के लिए, इसके द्वारा आपके डिवाइस की वर्तमान स्थिति के बारे में जानकारी एकत्र की जाएगी. बग रिपोर्ट प्रारंभ करने से लेकर भेजने के लिए तैयार होने तक कुछ समय लगेगा; कृपया धैर्य रखें."
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 1da6527fe9ee8..bde55673ef431 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -192,6 +192,7 @@
"Opcije telefona"
"Zaključavanje zaslona"
"Isključi"
+ "Hitno"
"Izvješće o bugovima"
"Izradi izvješće o bugu"
"Time će se prikupiti podaci o trenutačnom stanju vašeg uređaja koje ćete nam poslati u e-poruci. Za pripremu izvješća o bugu potrebno je nešto vremena pa vas molimo za strpljenje."
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 8d959ff7a5362..13b79d0c3ac4b 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -192,6 +192,7 @@
"Telefonbeállítások"
"Képernyő lezárása"
"Kikapcsolás"
+ "Vészhívás"
"Programhiba bejelentése"
"Hibajelentés készítése"
"Ezzel információt fog gyűjteni az eszköz jelenlegi állapotáról, amelyet a rendszer e-mailben fog elküldeni. Kérjük, legyen türelemmel, amíg a hibajelentés elkészül, és küldhető állapotba kerül."
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 6de4b8e01b782..7056b7741bb1b 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -192,6 +192,7 @@
"Հեռախոսի ընտրանքներ"
"Էկրանի փական"
"Անջատել"
+ "Արտակարգ իրավիճակ"
"Վրիպակի զեկույց"
"Գրել սխալի զեկույց"
"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index ffabedaebaabe..e97db0566bf78 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -192,6 +192,7 @@
"Opsi telepon"
"Kunci layar"
"Matikan daya"
+ "Darurat"
"Laporan bug"
"Ambil laporan bug"
"Ini akan mengumpulkan informasi tentang status perangkat Anda saat ini, untuk dikirimkan sebagai pesan email. Akan memakan sedikit waktu dari memulai laporan bug hingga siap untuk dikirim; bersabarlah."
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index 9ca0f58134b16..4a718e6b5a589 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -192,6 +192,7 @@
"Valkostir síma"
"Skjálás"
"Slökkva"
+ "Neyðarsímtal"
"Villutilkynning"
"Útbúa villutilkynningu"
"Þetta safnar upplýsingum um núverandi stöðu tækisins til að senda með tölvupósti. Það tekur smástund frá því villutilkynningin er ræst og þar til hún er tilbúin til sendingar – sýndu biðlund."
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index d781042409963..f4f3e4e898002 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -192,6 +192,7 @@
"Opzioni telefono"
"Blocco schermo"
"Spegni"
+ "Emergenza"
"Segnalazione di bug"
"Apri segnalazione bug"
"Raccoglierà informazioni sullo stato corrente del dispositivo che verranno inviate sotto forma di messaggio email. Passerà un po\' di tempo prima che la segnalazione di bug aperta sia pronta per essere inviata; ti preghiamo di avere pazienza."
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index ac8d2a5274f3a..2d9ec2cf9c4b9 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -192,6 +192,7 @@
"אפשרויות טלפון"
"נעילת מסך"
"כיבוי"
+ "חירום"
"דיווח על באג"
"שלח דיווח על באג"
"פעולה זו תאסוף מידע על מצב המכשיר הנוכחי שלך על מנת לשלוח אותו כהודעת אימייל. היא תימשך זמן קצר מרגע פתיחת דיווח הבאג ועד שיהיה ניתן לבצע שליחה. התאזר בסבלנות."
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 640e8b215b181..4fb6763dd6286 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -192,6 +192,7 @@
"携帯電話オプション"
"画面ロック"
"電源を切る"
+ "緊急通報"
"バグレポート"
"バグレポートを取得"
"現在の端末の状態に関する情報が収集され、その内容がメールで送信されます。バグレポートが開始してから送信可能な状態となるまでには多少の時間がかかりますのでご了承ください。"
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index fe65d3dbdbb21..b98eb5bbe50aa 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -192,6 +192,7 @@
"ტელეფონის პარამეტრები"
"ეკრანის დაბლოკვა"
"კვების გამორთვა"
+ "საგანგებო სამსახურები"
"ხარვეზის შესახებ ანგარიში"
"შექმენით შეცდომის ანგარიში"
"იგი შეაგროვებს ინფორმაციას თქვენი მოწყობილობის ამჟამინდელი მდგომარეობის შესახებ, რათა ის ელფოსტის შეტყობინების სახით გააგზავნოს. ხარვეზის ანგარიშის მომზადებასა და შეტყობინების გაგზავნას გარკვეული დრო სჭირდება. გთხოვთ, მოითმინოთ."
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index c57e2cb541463..28fd2991f055a 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -192,6 +192,7 @@
"Телефон опциялары"
"Экранды бекіту"
"Өшіру"
+ "Төтенше жағдай"
"Вирус туралы хабарлау"
"Вирус туралы хабарды алу"
"Бұл эл. хабар ретінде жіберу үшін қазіргі құрылғы күйі туралы ақпарат жинайды. Вирус жайлы хабар жіберуге әзір болғанша біраз уақыт керек болады; шыдай тұрыңыз."
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index 542ba8ed0fe9b..147c1bf94bdbd 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -192,6 +192,7 @@
"ជម្រើសទូរស័ព្ទ"
"ចាក់សោអេក្រង់"
"បិទ"
+ "អាសន្ន"
"របាយការណ៍កំហុស"
"យករបាយការណ៍កំហុស"
"វានឹងប្រមូលព័ត៌មានអំពីស្ថានភាពឧបករណ៍របស់អ្នក ដើម្បីផ្ញើជាសារអ៊ីមែល។ វានឹងចំណាយពេលតិចពីពេលចាប់ផ្ដើមរបាយការណ៍រហូតដល់ពេលវារួចរាល់ដើម្បីផ្ញើ សូមអត់ធ្មត់។"
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 6d1730eb4b5cc..d734b40699e39 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -192,6 +192,7 @@
"ಫೋನ್ ಆಯ್ಕೆಗಳು"
"ಪರದೆ ಲಾಕ್"
"ಪವರ್ ಆಫ್ ಮಾಡು"
+ "ತುರ್ತು"
"ದೋಷದ ವರದಿ"
"ದೋಷದ ವರದಿಯನ್ನು ತೆಗೆದುಕೊಳ್ಳಿ"
"ಇ-ಮೇಲ್ ಸಂದೇಶದ ರೂಪದಲ್ಲಿ ಕಳುಹಿಸಲು, ನಿಮ್ಮ ಸಾಧನದ ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯ ಕುರಿತು ಮಾಹಿತಿಯನ್ನು ಇದು ಸಂಗ್ರಹಿಸಿಕೊಳ್ಳುತ್ತದೆ. ಇದು ದೋಷ ವರದಿಯನ್ನು ಪ್ರಾರಂಭಿಸಿದ ಸಮಯದಿಂದ ಅದನ್ನು ಕಳುಹಿಸುವವರೆಗೆ ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ; ದಯವಿಟ್ಟು ತಾಳ್ಮೆಯಿಂದಿರಿ."
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index ce316df6f1c3a..d211f2e196048 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -192,6 +192,7 @@
"휴대전화 옵션"
"화면 잠금"
"종료"
+ "긴급 전화"
"버그 신고"
"버그 신고"
"현재 기기 상태에 대한 정보를 수집하여 이메일 메시지로 전송합니다. 버그 신고를 시작하여 전송할 준비가 되려면 약간 시간이 걸립니다."
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index c866e3b9e923d..3d3c44db216bd 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -192,6 +192,7 @@
"ໂຕເລືອກໂທລະສັບ"
"ລັອກໜ້າຈໍ"
"ປິດ"
+ "ສຸກເສີນ"
"ລາຍງານຂໍ້ຜິດພາດ"
"ໃຊ້ລາຍງານຂໍ້ບົກພ່ອງ"
"ນີ້ຈະເປັນການເກັບກຳຂໍ້ມູນກ່ຽວກັບ ສະຖານະປັດຈຸບັນຂອງອຸປະກອນທ່ານ ເພື່ອສົ່ງເປັນຂໍ້ຄວາມທາງອີເມວ. ມັນຈະໃຊ້ເວລາໜ້ອຍນຶ່ງ ໃນການເລີ່ມຕົ້ນການລາຍງານຂໍ້ຜິດພາດ ຈົນກວ່າຈະພ້ອມທີ່ຈະສົ່ງໄດ້, ກະລຸນາລໍຖ້າ."
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 8f4a82f4d99a6..b5d3695531abb 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -192,6 +192,7 @@
"Telefono parinktys"
"Ekrano užraktas"
"Išjungiamas maitinimas"
+ "Skambutis pagalbos numeriu"
"Pranešimas apie riktą"
"Pranešti apie riktą"
"Bus surinkta informacija apie dabartinę įrenginio būseną ir išsiųsta el. pašto pranešimu. Šiek tiek užtruks, kol pranešimas apie riktą bus paruoštas siųsti; būkite kantrūs."
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 620ba067e3d20..b1a7677424e57 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -192,6 +192,7 @@
"Tālruņa opcijas"
"Ekrāna bloķētājs"
"Strāvas padeve ir izslēgta."
+ "Ārkārtas"
"Kļūdu ziņojums"
"Kļūdu ziņojuma sagatavošana"
"Veicot šo darbību, tiks apkopota informācija par jūsu ierīces pašreizējo stāvokli un nosūtīta e-pasta ziņojuma veidā. Kļūdu ziņojuma pabeigšanai un nosūtīšanai var būt nepieciešams laiks. Lūdzu, esiet pacietīgs."
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index 87131de6f874c..dfe4e27fdbdc0 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -192,6 +192,7 @@
"Опции на телефон"
"Заклучи екран"
"Исклучи"
+ "Итен случај"
"Извештај за грешка"
"Земи извештај за грешки"
"Ова ќе собира информации за моменталната состојба на вашиот уред, за да ги испрати како порака по е-пошта. Тоа ќе одземе малку време почнувајќи од извештајот за грешки додека не се подготви за праќање; бидете трпеливи."
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index fb866d71919b6..7d1e1ee4995fb 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -192,6 +192,7 @@
"ഫോൺ ഓപ്ഷനുകൾ"
"സ്ക്രീൻ ലോക്ക്"
"പവർ ഓഫാക്കുക"
+ "അടിയന്തിരാവശ്യം"
"ബഗ് റിപ്പോർട്ട്"
"ബഗ് റിപ്പോർട്ട് എടുക്കുക"
"ഒരു ഇമെയിൽ സന്ദേശമായി അയയ്ക്കുന്നതിന്, ഇത് നിങ്ങളുടെ നിലവിലെ ഉപകരണ നിലയെക്കുറിച്ചുള്ള വിവരങ്ങൾ ശേഖരിക്കും. ബഗ് റിപ്പോർട്ട് ആരംഭിക്കുന്നതിൽ നിന്ന് ഇത് അയയ്ക്കാനായി തയ്യാറാകുന്നതുവരെ അൽപ്പസമയമെടുക്കും; ക്ഷമയോടെ കാത്തിരിക്കുക."
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index 2094239bd7d8e..6ba19cf77a38b 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -192,6 +192,7 @@
"Утасны сонголтууд"
"Дэлгэцний түгжээ"
"Унтраах"
+ "Яаралтай тусламж"
"Алдаа мэдээллэх"
"Согог репорт авах"
"Энэ таны төхөөрөмжийн одоогийн статусын талаарх мэдээллийг цуглуулах ба имэйл мессеж болгон илгээнэ. Алдааны мэдэгдлээс эхэлж илгээхэд бэлэн болоход хэсэг хугацаа зарцуулагдана тэвчээртэй байна уу."
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index 81e234c999189..4ddaa7bdcc37f 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -192,6 +192,7 @@
"फोन पर्याय"
"स्क्रीन लॉक"
"बंद"
+ "आणीबाणी"
"दोष अहवाल"
"दोष अहवाल घ्या"
"ई-मेल संदेश म्हणून पाठविण्यासाठी, हे आपल्या वर्तमान डिव्हाइस स्थितीविषयी माहिती संकलित करेल. यास दोष अहवाल प्रारंभ करण्यापासून तो पाठविला जाण्यापर्यंत थोडा वेळ लागेल; कृपया धीर धरा."
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index e500742e161b7..279aff9d81dbf 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -192,6 +192,7 @@
"Pilihan telefon"
"Kunci skrin"
"Matikan kuasa"
+ "Kecemasan"
"Laporan pepijat"
"Ambil laporan pepijat"
"Ini akan mengumpul maklumat tentang keadaan peranti semasa anda untuk dihantarkan sebagai mesej e-mel. Proses ini akan mengambil sedikit masa bermula dari laporan pepijat sehingga siap untuk dihantar; jadi diharap bersabar."
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index af0ffadad694f..57699216f29ff 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -192,6 +192,7 @@
"ဖုန်းဆိုင်ရာရွေးချယ်မှုများ"
"ဖုန်းမျက်နှာပြင်အား သော့ချရန်"
"ပါဝါပိတ်ရန်"
+ "အရေးပေါ်"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်း"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းအား ယူရန်"
"သင့်ရဲ့ လက်ရှိ စက်အခြေအနေ အချက်အလက်များကို အီးမေးလ် အနေဖြင့် ပေးပို့ရန် စုဆောင်းပါမည်။ အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းမှ ပေးပို့ရန် အသင့်ဖြစ်သည်အထိ အချိန် အနည်းငယ်ကြာမြင့်မှာ ဖြစ်သဖြင့် သည်းခံပြီး စောင့်ပါရန်"
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 9088b967aa631..a40fcd72ad2ce 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -192,6 +192,7 @@
"Telefoninnstillinger"
"Lås skjermen"
"Slå av"
+ "Nødssituasjon"
"Feilrapport"
"Utfør feilrapport"
"Informasjon om tilstanden til enheten din samles inn og sendes som en e-post. Det tar litt tid fra du starter feilrapporten til e-posten er klar, så vær tålmodig."
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 6c7490071a773..128236b7bbe8a 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -192,6 +192,7 @@
"फोन विकल्पहरू"
"स्क्रिन बन्द"
"बन्द गर्नुहोस्"
+ "आपतकालीन"
"बग रिपोर्ट"
"बग रिपोर्ट लिनुहोस्"
"एउटा इमेल सन्देशको रूपमा पठाउनलाई यसले तपाईँको हालैको उपकरणको अवस्थाको बारेमा सूचना जम्मा गर्ने छ। बग रिपोर्ट सुरु गरेदेखि पठाउन तयार नभएसम्म यसले केही समय लिन्छ; कृपया धैर्य गर्नुहोस्।"
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 863cc0fc64cec..1e424628c7a20 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -192,6 +192,7 @@
"Telefoonopties"
"Schermvergrendeling"
"Uitschakelen"
+ "Noodgeval"
"Foutenrapport"
"Foutenrapport genereren"
"Hiermee worden gegevens over de huidige status van uw apparaat verzameld en als e-mail verzonden. Wanneer u een foutenrapport start, duurt het even voordat het kan worden verzonden. Even geduld alstublieft."
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index ebe0f87b83e1c..52f1fc7a6d6ca 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -192,6 +192,7 @@
"Opcje telefonu"
"Blokada ekranu"
"Wyłącz"
+ "Alarmowe"
"Zgłoszenie błędu"
"Zgłoś błąd"
"Informacje o bieżącym stanie urządzenia zostaną zebrane i wysłane e-mailem. Przygotowanie zgłoszenia błędu do wysłania chwilę potrwa, więc zachowaj cierpliwość."
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 0ac8ca9f884d0..3390ddb69a9b9 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -192,6 +192,7 @@
"Opções do telefone"
"Bloqueio de ecrã"
"Desligar"
+ "Emergência"
"Relatório de erros"
"Criar relatório de erros"
"Será recolhida informação sobre o estado atual do seu dispositivo a enviar através de uma mensagem de email. Demorará algum tempo até que o relatório de erro esteja pronto para ser enviado. Aguarde um pouco."
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index b44944c799f96..a38fe69228f47 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -192,6 +192,7 @@
"Opções do telefone"
"Bloquear tela"
"Desligar"
+ "Emergência"
"Relatório de bugs"
"Obter relatório de bugs"
"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 9184458633919..0462a532e87eb 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -192,6 +192,7 @@
"Opţiuni telefon"
"Blocaţi ecranul"
"Opriţi alimentarea"
+ "Urgență"
"Raport despre erori"
"Executaţi un raport despre erori"
"Acest raport va colecta informaţii despre starea actuală a dispozitivului, pentru a le trimite într-un e-mail. Aveți răbdare după pornirea raportului despre erori până când va fi gata de trimis."
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 30f27db7d2626..0dad0c616f86a 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -192,6 +192,7 @@
"Параметры телефона"
"Блокировка экрана"
"Отключить питание"
+ "Экстренный вызов"
"Отчет об ошибке"
"Отчет об ошибке"
"Информация о текущем состоянии вашего устройства будет собрана и отправлена по электронной почте. Подготовка отчета займет некоторое время."
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index 99413d4238738..ec818107eb96a 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -192,6 +192,7 @@
"දුරකථන විකල්ප"
"තිර අගුල"
"බලය අක්රිය කරන්න"
+ "හදිසි"
"දෝෂ වර්තාව"
"දෝෂ වාර්තාවක් ගන්න"
"ඊ-තැපැල් පණිවිඩයක් ලෙස යැවීමට මෙය ඔබගේ වත්මන් උපාංග තත්වය ගැන තොරතුරු එකතු කරනු ඇත. දෝෂ වාර්තාව ආරම්භ කර එය යැවීමට සූදානම් කරන තෙක් එයට කිසියම් කාලයක් ගතවනු ඇත; කරුණාකර ඉවසන්න."
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 873801b72df86..8fa50b472acfe 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -192,6 +192,7 @@
"Možnosti telefónu"
"Zámka obrazovky"
"Vypnúť"
+ "Tiesňové volanie"
"Hlásenie o chybách"
"Vytvoriť hlásenie o chybách"
"Zhromaždí informácie o aktuálnom stave zariadenia na odoslanie v e-mailovej správe. Chvíľu však potrvá, kým bude hlásenie o chybách pripravené na odoslanie. Prosíme vás preto o trpezlivosť."
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 5724abc34c6ab..28f7bdeb4d7b0 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -192,6 +192,7 @@
"Možnosti telefona"
"Zaklep zaslona"
"Izklopi"
+ "Klic v sili"
"Poročilo o napakah"
"Ustvari poročilo o napakah"
"S tem bodo zbrani podatki o trenutnem stanju naprave, ki bodo poslani v e-poštnem sporočilu. Izvedba poročila o napakah in priprava trajata nekaj časa, zato bodite potrpežljivi."
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 97659a266dd84..d445a1c055cf2 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -192,6 +192,7 @@
"Опције телефона"
"Закључај екран"
"Искључи"
+ "Хитни позив"
"Извештај о грешци"
"Направи извештај о грешци"
"Овим ће се прикупити информације о тренутном стању уређаја како би биле послате у поруци е-поште. Од започињања извештаја о грешци до тренутка за његово слање проћи ће неко време; будите стрпљиви."
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index caa0123f5af47..5c6763af13d1a 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -192,6 +192,7 @@
"Telefonalternativ"
"Skärmlås"
"Stäng av"
+ "Nödsituation"
"Felrapport"
"Skapa felrapport"
"Nu hämtas information om aktuell status för enheten, som sedan skickas i ett e-postmeddelade. Det tar en liten stund innan felrapporten är färdig och kan skickas, så vi ber dig ha tålamod."
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 8190fd14b8cb6..656c747d98d1f 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -192,6 +192,7 @@
"Chaguo za simu"
"Funga skrini"
"Zima"
+ "Dharura"
"Ripoti ya hitilafu"
"Chukua ripoti ya hitilafu"
"Hii itakusanya maelezo kuhusu hali ya kifaa chako kwa sasa, na itume kama barua pepe. Itachukua muda mfupi tangu ripoti ya hitilafu ianze kuzalishwa hadi iwe tayari kutumwa; vumilia."
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index 1b2123ce5c8e8..3238a75167c2f 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -192,6 +192,7 @@
"தொலைபேசி விருப்பங்கள்"
"திரைப் பூட்டு"
"முடக்கு"
+ "அவசர அழைப்பு"
"பிழை அறிக்கை"
"பிழை அறிக்கையை எடு"
"உங்கள் நடப்புச் சாதன நிலையை மின்னஞ்சல் செய்தியாக அனுப்ப, அது குறித்த தகவலை இது சேகரிக்கும். பிழை அறிக்கையைத் தொடங்குவதில் இருந்து, அது அனுப்புவதற்குத் தயாராகும் வரை, இதற்குச் சிறிது நேரம் ஆகும்; பொறுமையாகக் காத்திருக்கவும்."
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index 222944f63be5d..d01c90472bb61 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -192,6 +192,7 @@
"ఫోన్ ఎంపికలు"
"స్క్రీన్ లాక్"
"పవర్ ఆఫ్ చేయి"
+ "అత్యవసరం"
"బగ్ నివేదిక"
"బగ్ నివేదికను తీయి"
"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ నివేదికను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 3f7bee1619980..a49ec6ea65fe2 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -192,6 +192,7 @@
"ตัวเลือกโทรศัพท์"
"ล็อกหน้าจอ"
"ปิดเครื่อง"
+ "เหตุฉุกเฉิน"
"รายงานข้อบกพร่อง"
"ใช้รายงานข้อบกพร่อง"
"การดำเนินการนี้จะรวบรวมข้อมูลเกี่ยวกับสถานะปัจจุบันของอุปกรณ์ของคุณ โดยจะส่งไปในรูปแบบข้อความอีเมล อาจใช้เวลาสักครู่ตั้งแต่เริ่มการสร้างรายงานข้อบกพร่องจนกระทั่งเสร็จสมบูรณ์ โปรดอดทนรอ"
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index b9f8ce741f91c..17e3557c9b095 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -192,6 +192,7 @@
"Pagpipilian sa telepono"
"Pag-lock sa screen"
"I-off"
+ "Emergency"
"Ulat sa bug"
"Kunin ang ulat sa bug"
"Mangongolekta ito ng impormasyon tungkol sa kasalukuyang katayuan ng iyong device, na ipapadala bilang mensaheng e-mail. Gugugol ito ng kaunting oras mula sa pagsisimula sa ulat sa bug hanggang sa handa na itong maipadala; mangyaring maging mapagpasensya."
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 704a73da0a7f7..3a51934d3573e 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -192,6 +192,7 @@
"Telefon seçenekleri"
"Ekran kilidi"
"Kapat"
+ "Acil durum"
"Hata raporu"
"Hata raporu al"
"Bu rapor, e-posta iletisi olarak göndermek üzere mevcut cihazınızın durumuyla ilgili bilgi toplar. Hata raporu başlatıldıktan sonra hazır olması biraz zaman alabilir, lütfen sabırlı olun."
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index d5035035d80f8..dbecbf3cd2a76 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -192,6 +192,7 @@
"Параметри телеф."
"Заблок. екран"
"Вимкнути"
+ "Екстрений виклик"
"Звіт про помилки"
"Зробити звіт про помилки"
"Збиратиметься інформація про поточний стан вашого пристрою для подальшого надсилання електронною поштою. Від початку створення звіту про помилки до його повної готовності для надсилання потрібен певний час, тож будьте терплячими."
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index 0108aacc38014..1dddb66be86d5 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -192,6 +192,7 @@
"فون کے اختیارات"
"اسکرین لاک"
"پاور آف"
+ "ایمرجنسی"
"بگ کی اطلاع"
"بگ کی اطلاع لیں"
"ایک ای میل پیغام کے بطور بھیجنے کیلئے، یہ آپ کے موجودہ آلہ کی حالت کے بارے میں معلومات جمع کرے گا۔ بگ کی اطلاع شروع کرنے سے لے کر بھیجنے کیلئے تیار ہونے تک اس میں تھوڑا وقت لگے گا؛ براہ کرم صبر کریں۔"
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index f23d1759842ea..32ce31da0a405 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -192,6 +192,7 @@
"Telefon sozlamalari"
"Ekranni qulflash"
"O‘chirish"
+ "Favqulodda chaqiruv"
"Nosozlik haqida ma’lumot berish"
"Xatoliklar hisobotini olish"
"U e-pochta xabari sifatida yuborish uchun joriy qurilmangiz holati to‘g‘risidagi ma’lumotlarni to‘playdi. Xatoliklar hisobotini to‘plash boshlanganidan uni yuborishga tayyorlaguncha biroz vaqt ketadi; iltimos, sabrli bo‘ling."
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 328cdc6744ece..1aae694e04528 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -192,6 +192,7 @@
"Tùy chọn điện thoại"
"Khoá màn hình"
"Tắt nguồn"
+ "Khẩn cấp"
"Báo cáo lỗi"
"Nhận báo cáo lỗi"
"Báo cáo này sẽ thu thập thông tin về tình trạng thiết bị hiện tại của bạn, để gửi dưới dạng thông báo qua email. Sẽ mất một chút thời gian kể từ khi bắt đầu báo cáo lỗi cho tới khi báo cáo sẵn sàng để gửi; xin vui lòng kiên nhẫn."
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index fd30ce9937ac7..29b4676f0c9c0 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -192,6 +192,7 @@
"手机选项"
"屏幕锁定"
"关机"
+ "紧急呼救"
"错误报告"
"提交错误报告"
"这会收集有关当前设备状态的信息,并以电子邮件的形式进行发送。从开始生成错误报告到准备好发送需要一点时间,请耐心等待。"
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index a0bcaa4613e23..0c9d5c6ca320a 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -192,6 +192,7 @@
"手機選項"
"螢幕鎖定"
"關閉"
+ "緊急"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,並以電郵傳送給您。從開始建立錯誤報告到準備傳送需要一段時間,請耐心等候。"
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index c27c1015b1ba6..065545dc20d08 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -192,6 +192,7 @@
"電話選項"
"螢幕鎖定"
"關機"
+ "緊急電話"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,以便透過電子郵件傳送。從錯誤報告開始建立到準備傳送的這段過程可能需要一點時間,敬請耐心等候。"
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 4ef496c5b9f3b..4cb19d221488e 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -192,6 +192,7 @@
"Okukhethwa kukho kwefoni"
"Ukuvala isikrini"
"Vala amandla"
+ "Isimo esiphuthumayo"
"Umbiko wephutha"
"Thatha umbiko wesiphazamiso"
"Lokhu kuzoqoqa ulwazi mayelana nesimo samanje sedivayisi yakho, ukuthumela imilayezo ye-imeyili. Kuzothatha isikhathi esincane kusuka ekuqaleni umbiko wesiphazamiso uze ulungele ukuthunyelwa; sicela ubekezele."
From 13f51c683e8aee26e2d70d06346edebde61b0737 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 16:45:41 -0700
Subject: [PATCH 09/98] DO NOT MERGE - Added translations for emergency action
string
Bug: 30404490
Change-Id: Ic20d93005882bb71cef32a705443e427b0a9bd71
---
core/res/res/values-af/strings.xml | 1 +
core/res/res/values-am/strings.xml | 1 +
core/res/res/values-ar/strings.xml | 1 +
core/res/res/values-az-rAZ/strings.xml | 1 +
core/res/res/values-bg/strings.xml | 1 +
core/res/res/values-bn-rBD/strings.xml | 1 +
core/res/res/values-ca/strings.xml | 1 +
core/res/res/values-cs/strings.xml | 1 +
core/res/res/values-da/strings.xml | 1 +
core/res/res/values-de/strings.xml | 1 +
core/res/res/values-el/strings.xml | 1 +
core/res/res/values-en-rAU/strings.xml | 1 +
core/res/res/values-en-rGB/strings.xml | 1 +
core/res/res/values-en-rIN/strings.xml | 1 +
core/res/res/values-es-rUS/strings.xml | 1 +
core/res/res/values-es/strings.xml | 1 +
core/res/res/values-et-rEE/strings.xml | 1 +
core/res/res/values-eu-rES/strings.xml | 1 +
core/res/res/values-fa/strings.xml | 1 +
core/res/res/values-fi/strings.xml | 1 +
core/res/res/values-fr-rCA/strings.xml | 1 +
core/res/res/values-fr/strings.xml | 1 +
core/res/res/values-gl-rES/strings.xml | 1 +
core/res/res/values-gu-rIN/strings.xml | 1 +
core/res/res/values-hi/strings.xml | 1 +
core/res/res/values-hr/strings.xml | 1 +
core/res/res/values-hu/strings.xml | 1 +
core/res/res/values-hy-rAM/strings.xml | 1 +
core/res/res/values-in/strings.xml | 1 +
core/res/res/values-is-rIS/strings.xml | 1 +
core/res/res/values-it/strings.xml | 1 +
core/res/res/values-iw/strings.xml | 1 +
core/res/res/values-ja/strings.xml | 1 +
core/res/res/values-ka-rGE/strings.xml | 1 +
core/res/res/values-kk-rKZ/strings.xml | 1 +
core/res/res/values-km-rKH/strings.xml | 1 +
core/res/res/values-kn-rIN/strings.xml | 1 +
core/res/res/values-ko/strings.xml | 1 +
core/res/res/values-ky-rKG/strings.xml | 1 +
core/res/res/values-lo-rLA/strings.xml | 1 +
core/res/res/values-lt/strings.xml | 1 +
core/res/res/values-lv/strings.xml | 1 +
core/res/res/values-mk-rMK/strings.xml | 1 +
core/res/res/values-ml-rIN/strings.xml | 1 +
core/res/res/values-mn-rMN/strings.xml | 1 +
core/res/res/values-mr-rIN/strings.xml | 1 +
core/res/res/values-ms-rMY/strings.xml | 1 +
core/res/res/values-my-rMM/strings.xml | 1 +
core/res/res/values-nb/strings.xml | 1 +
core/res/res/values-ne-rNP/strings.xml | 1 +
core/res/res/values-nl/strings.xml | 1 +
core/res/res/values-pa-rIN/strings.xml | 1 +
core/res/res/values-pl/strings.xml | 1 +
core/res/res/values-pt-rBR/strings.xml | 1 +
core/res/res/values-pt-rPT/strings.xml | 1 +
core/res/res/values-pt/strings.xml | 1 +
core/res/res/values-ro/strings.xml | 1 +
core/res/res/values-ru/strings.xml | 1 +
core/res/res/values-si-rLK/strings.xml | 1 +
core/res/res/values-sk/strings.xml | 1 +
core/res/res/values-sl/strings.xml | 1 +
core/res/res/values-sq-rAL/strings.xml | 1 +
core/res/res/values-sr/strings.xml | 1 +
core/res/res/values-sv/strings.xml | 1 +
core/res/res/values-sw/strings.xml | 1 +
core/res/res/values-ta-rIN/strings.xml | 1 +
core/res/res/values-te-rIN/strings.xml | 1 +
core/res/res/values-th/strings.xml | 1 +
core/res/res/values-tl/strings.xml | 1 +
core/res/res/values-tr/strings.xml | 1 +
core/res/res/values-uk/strings.xml | 1 +
core/res/res/values-ur-rPK/strings.xml | 1 +
core/res/res/values-uz-rUZ/strings.xml | 1 +
core/res/res/values-vi/strings.xml | 1 +
core/res/res/values-zh-rCN/strings.xml | 1 +
core/res/res/values-zh-rHK/strings.xml | 1 +
core/res/res/values-zh-rTW/strings.xml | 1 +
core/res/res/values-zu/strings.xml | 1 +
78 files changed, 78 insertions(+)
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index f784ce5431991..b5cf2010d037c 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -208,6 +208,7 @@
"Foonopsies"
"Skermslot"
"Sit af"
+ "Noodgeval"
"Foutverslag"
"Neem foutverslag"
"Dit sal inligting oor die huidige toestand van jou toestel insamel om as \'n e-posboodskap te stuur. Dit sal \'n tydjie neem vandat die foutverslag begin is totdat dit reg is om gestuur te word; wees asseblief geduldig."
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 49fe30ddff69c..6cdf62e6a89be 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -208,6 +208,7 @@
"የስልክ አማራጮች"
"ማያ ቆልፍ"
"ኃይል አጥፋ"
+ "ድንገተኛ አደጋ"
"የሳንካ ሪፖርት"
"የሳንካ ሪፖርት ውሰድ"
"ይሄ እንደ የኢሜይል መልዕክት አድርጎ የሚልከውን ስለመሣሪያዎ የአሁኑ ሁኔታ መረጃ ይሰበስባል። የሳንካ ሪፖርቱን ከመጀመር ጀምሮ እስኪላክ ድረስ ትንሽ ጊዜ ይወስዳል፤ እባክዎ ይታገሱ።"
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 169a2296508c9..8d1c0ca612e7c 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -212,6 +212,7 @@
"خيارات الهاتف"
"تأمين الشاشة"
"إيقاف التشغيل"
+ "الطوارئ"
"تقرير الأخطاء"
"إعداد تقرير بالأخطاء"
"سيجمع هذا معلومات حول حالة جهازك الحالي لإرسالها كرسالة إلكترونية، ولكنه سيستغرق وقتًا قليلاً من بدء عرض تقرير بالأخطاء. وحتى يكون جاهزًا للإرسال، الرجاء الانتظار."
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml
index 275d4b9450ffe..e458218dd52e6 100644
--- a/core/res/res/values-az-rAZ/strings.xml
+++ b/core/res/res/values-az-rAZ/strings.xml
@@ -208,6 +208,7 @@
"Telefon seçimləri"
"Ekran kilidi"
"Söndür"
+ "Təcili"
"Baq hesabatı"
"Baqı xəbər verin"
"Bu, sizin hazırkı cihaz durumu haqqında məlumat toplayacaq ki, elektron məktub şəklində göndərsin. Baq raportuna başlamaq üçün bir az vaxt lazım ola bilər, bir az səbr edin."
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 455f4cf475a15..8b54d46908472 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -208,6 +208,7 @@
"Опции на телефона"
"Заключване на екрана"
"Изключване"
+ "Спешно обаждане"
"Сигнал за програмна грешка"
"Сигнал за програмна грешка"
"По този начин ще се събере информация за текущото състояние на устройството ви, която да се изпрати като имейл съобщение. След стартирането на процеса ще мине известно време, докато сигналът за програмна грешка бъде готов за подаване. Моля, имайте търпение."
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index aa339e30ee4e2..676ed4a274ffa 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -208,6 +208,7 @@
"ফোন বিকল্পগুলি"
"স্ক্রীণ লক"
"পাওয়ার বন্ধ করুন"
+ "জরুরী"
"ত্রুটির প্রতিবেদন"
"ত্রুটির প্রতিবেদন করুন"
"এটি একটি ই-মেল বার্তা পাঠানোর জন্য আপনার ডিভাইসের বর্তমান অবস্থা সম্পর্কে তথ্য সংগ্রহ করবে৷ ত্রুটির প্রতিবেদন শুরুর সময় থেকে এটি পাঠানোর জন্য প্রস্তুত হতে কিছুটা সময় নেবে; দয়া করে ধৈর্য রাখুন৷"
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 0fa7049c6f9e3..25c44067c2640 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -208,6 +208,7 @@
"Opcions del telèfon"
"Bloqueig de pantalla"
"Apaga"
+ "Emergències"
"Informe d\'error"
"Crea informe d\'errors"
"Es recopilarà informació sobre l\'estat actual del dispositiu i se t\'enviarà per correu electrònic. Passaran uns quants minuts des de l\'inici de l\'informe d\'errors fins al seu enviament, per la qual cosa et recomanem que tinguis paciència."
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 3d49f135df4bd..2e0fcc26672d7 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -210,6 +210,7 @@
"Možnosti telefonu"
"Zámek obrazovky"
"Vypnout"
+ "Stav nouze"
"Hlášení chyb"
"Vytvořit chybové hlášení"
"Shromažďuje informace o aktuálním stavu zařízení. Tyto informace je následně možné poslat v e-mailové zprávě, chvíli však potrvá, než bude hlášení o chybě připraveno k odeslání. Buďte prosím trpěliví."
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 28d699fcd327d..c2aaa2d0f9de1 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -208,6 +208,7 @@
"Indstillinger for telefon"
"Skærmlås"
"Sluk"
+ "Nødopkald"
"Fejlrapport"
"Lav fejlrapport"
"Der indsamles oplysninger om din enheds aktuelle status, der efterfølgende sendes i en e-mail. Der går lidt tid, fra fejlrapporten påbegyndes, til den er klar til at blive sendt. Tak for tålmodigheden."
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index e460a5d805364..059938f56a69e 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -208,6 +208,7 @@
"Telefonoptionen"
"Displaysperre"
"Ausschalten"
+ "Notfall"
"Fehlerbericht"
"Fehlerbericht abrufen"
"Bei diesem Fehlerbericht werden Daten zum aktuellen Status Ihres Geräts erfasst und als E-Mail versandt. Vom Start des Berichts bis zu seinem Versand kann es eine Weile dauern. Bitte haben Sie etwas Geduld."
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 748b22f3cf1bd..4af1ef705d153 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -208,6 +208,7 @@
"Επιλογές τηλεφώνου"
"Κλείδωμα οθόνης"
"Απενεργοποίηση"
+ "Κλήση έκτακτης ανάγκης"
"Αναφορά σφαλμάτων"
"Λήψη αναφοράς σφάλματος"
"Θα συλλέξει πληροφορίες σχετικά με την τρέχουσα κατάσταση της συσκευής σας και θα τις στείλει μέσω μηνύματος ηλεκτρονικού ταχυδρομείου. Απαιτείται λίγος χρόνος για τη σύνταξη της αναφοράς σφάλματος και την αποστολή της. Κάντε λίγη υπομονή."
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 8ab48590a05af..5a706789c9a86 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -208,6 +208,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 8ab48590a05af..5a706789c9a86 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -208,6 +208,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 8ab48590a05af..5a706789c9a86 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -208,6 +208,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 647b3012060db..0de95375ea3ca 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -208,6 +208,7 @@
"Opciones de dispositivo"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencias"
"Informe de errores"
"Iniciar informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo, que se enviará por correo. Pasarán unos minutos desde que se inicie el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 8d09cf063aa9d..11e69bdd8f4f3 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -208,6 +208,7 @@
"Opciones del teléfono"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencia"
"Informe de error"
"Crear informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo y se enviará por correo electrónico. Pasarán unos minutos desde que empiece a generarse el informe de errores hasta que se envíe."
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index 2822119be560c..110df36f7b55a 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -208,6 +208,7 @@
"Telefonivalikud"
"Ekraanilukk"
"Lülita välja"
+ "Hädaabi"
"Veaaruanne"
"Veaaruande võtmine"
"Nii kogutakse teavet teie seadme praeguse oleku kohta, et saata see meilisõnumina. Enne kui saate veaaruande ära saata, võtab selle loomine natuke aega; varuge kannatust."
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 4d8e62123a36f..b3d6ea8e66b62 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -208,6 +208,7 @@
"Telefonoaren aukerak"
"Pantailaren blokeoa"
"Itzali"
+ "Larrialdiak"
"Akatsen txostena"
"Sortu akatsen txostena"
"Gailuaren uneko egoerari buruzko informazioa bilduko da, mezu elektroniko gisa bidaltzeko. Minutu batzuk igaroko dira akatsen txostena sortzen hasten denetik bidaltzeko prest egon arte. Itxaron, mesedez."
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index f060200237f37..b25d44419a2a1 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -208,6 +208,7 @@
"گزینههای تلفن"
"قفل صفحه"
"خاموش کردن"
+ "اضطراری"
"گزارش اشکال"
"گرفتن گزارش اشکال"
"این گزارش اطلاعات مربوط به وضعیت دستگاه کنونی شما را جمعآوری میکند تا به صورت یک پیام ایمیل ارسال شود. از زمان شروع گزارش اشکال تا آماده شدن برای ارسال اندکی زمان میبرد؛ لطفاً شکیبا باشید."
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 6e6c3dd46cc10..d181b39dfd580 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -208,6 +208,7 @@
"Puhelimen asetukset"
"Näytön lukitus"
"Katkaise virta"
+ "Hätäpuhelu"
"Virheraportti"
"Luo virheraportti"
"Toiminto kerää tietoja laitteen tilasta ja lähettää ne sähköpostitse. Virheraportti on valmis lähetettäväksi hetken kuluttua - kiitos kärsivällisyydestäsi."
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 22d84cba3fc34..b938021f77bc2 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -208,6 +208,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgence"
"Rapport de bogue"
"Créer un rapport de bogue"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme de courriel. Merci de patienter pendant la préparation du rapport de bogue. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 085e23c1b88ec..240b10c98a28f 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -208,6 +208,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgences"
"Rapport de bug"
"Créer un rapport de bug"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme d\'e-mail. Merci de patienter pendant la préparation du rapport de bug. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index 6cd1a0dbfebef..61561747cea7f 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -208,6 +208,7 @@
"Opcións de teléfono"
"Bloqueo da pantalla"
"Apagar"
+ "Emerxencia"
"Informe de erros"
"Crear informe de erros"
"Este informe recompilará información acerca do estado actual do teu dispositivo para enviala en forma de mensaxe de correo electrónico. O informe de erros tardará un pouco en completarse desde o seu inicio ata que estea preparado para enviarse, polo que che recomendamos que teñas paciencia."
diff --git a/core/res/res/values-gu-rIN/strings.xml b/core/res/res/values-gu-rIN/strings.xml
index 1e5d07650cb55..978cfe32dcaee 100644
--- a/core/res/res/values-gu-rIN/strings.xml
+++ b/core/res/res/values-gu-rIN/strings.xml
@@ -208,6 +208,7 @@
"ફોન વિકલ્પો"
"સ્ક્રીન લૉક"
"પાવર બંધ"
+ "કટોકટી"
"બગ રિપોર્ટ"
"બગ રિપોર્ટ લો"
"આ, એક ઇ-મેઇલ સંદેશ તરીકે મોકલવા માટે, તમારા વર્તમાન ઉપકરણ સ્થિતિ વિશેની માહિતી એકત્રિત કરશે. એક બગ રિપોર્ટ પ્રારંભ કરીને તે મોકલવા માટે તૈયાર ન થઈ જાય ત્યાં સુધી તેમાં થોડો સમય લાગશે; કૃપા કરીને ધીરજ રાખો."
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 4b6a686929a7b..70dc846dfb3e5 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -208,6 +208,7 @@
"फ़ोन विकल्प"
"स्क्रीन लॉक"
"पावर बंद"
+ "आपातकाल"
"बग रिपोर्ट"
"बग रिपोर्ट प्राप्त करें"
"ईमेल संदेश के रूप में भेजने के लिए, इसके द्वारा आपके डिवाइस की वर्तमान स्थिति के बारे में जानकारी एकत्र की जाएगी. बग रिपोर्ट प्रारंभ करने से लेकर भेजने के लिए तैयार होने तक कुछ समय लगेगा; कृपया धैर्य रखें."
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 69b8577f9375d..68d6b4ea3c6a0 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -209,6 +209,7 @@
"Opcije telefona"
"Zaključavanje zaslona"
"Isključi"
+ "Hitno"
"Izvješće o bugovima"
"Izvješće o programskoj pogrešci"
"Time će se prikupiti podaci o trenutačnom stanju vašeg uređaja koje ćete nam poslati u e-poruci. Za pripremu izvješća o programskoj pogrešci potrebno je nešto vremena pa vas molimo za strpljenje."
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 1b45d1ce019c7..9234313065042 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -208,6 +208,7 @@
"Telefonbeállítások"
"Képernyő lezárása"
"Kikapcsolás"
+ "Vészhívás"
"Programhiba bejelentése"
"Hibajelentés készítése"
"Ezzel információt fog gyűjteni az eszköz jelenlegi állapotáról, amelyet a rendszer e-mailben fog elküldeni. Kérjük, legyen türelemmel, amíg a hibajelentés elkészül, és küldhető állapotba kerül."
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 92842b4c303d0..efe88c373aa5f 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -208,6 +208,7 @@
"Հեռախոսի ընտրանքներ"
"Էկրանի փական"
"Անջատել"
+ "Արտակարգ իրավիճակ"
"Վրիպակի զեկույց"
"Գրել սխալի զեկույց"
"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 02299b011bc64..5ed1a5afa4fd9 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -208,6 +208,7 @@
"Opsi telepon"
"Kunci layar"
"Matikan daya"
+ "Darurat"
"Laporan bug"
"Ambil laporan bug"
"Ini akan mengumpulkan informasi status perangkat Anda saat ini, untuk dikirimkan sebagai pesan email. Harap bersabar, mungkin perlu waktu untuk memulai laporan bug hingga siap dikirim."
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index e57400a2b765d..a828ed40c26f0 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -208,6 +208,7 @@
"Valkostir síma"
"Skjálás"
"Slökkva"
+ "Neyðarsímtal"
"Villutilkynning"
"Útbúa villutilkynningu"
"Þetta safnar upplýsingum um núverandi stöðu tækisins til að senda með tölvupósti. Það tekur smástund frá því villutilkynningin er ræst og þar til hún er tilbúin til sendingar – sýndu biðlund."
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 5722c6aa7122a..c2c7f75e3f453 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -208,6 +208,7 @@
"Opzioni telefono"
"Blocco schermo"
"Spegni"
+ "Emergenza"
"Segnalazione di bug"
"Apri segnalazione bug"
"Verranno raccolte informazioni sullo stato corrente del dispositivo che saranno inviate sotto forma di messaggio email. Passerà un po\' di tempo prima che la segnalazione di bug aperta sia pronta per essere inviata; ti preghiamo di avere pazienza."
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index aba54716e7b8b..2d4fe02264068 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -210,6 +210,7 @@
"אפשרויות טלפון"
"נעילת מסך"
"כיבוי"
+ "חירום"
"דיווח על באג"
"שלח דיווח על באג"
"פעולה זו תאסוף מידע על מצב המכשיר הנוכחי שלך על מנת לשלוח אותו כהודעת אימייל. היא תימשך זמן קצר מרגע פתיחת דיווח הבאג ועד לשליחת ההודעה בפועל. אנא המתן בסבלנות."
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 2ce3bad4a3e4a..60f08c249904b 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -208,6 +208,7 @@
"携帯電話オプション"
"画面ロック"
"電源を切る"
+ "緊急通報"
"バグレポート"
"バグレポートを取得"
"現在の端末の状態に関する情報が収集され、その内容がメールで送信されます。バグレポートが開始してから送信可能な状態となるまでには多少の時間がかかりますのでご了承ください。"
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index f77167903ece0..874251b7a4723 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -208,6 +208,7 @@
"ტელეფონის პარამეტრები"
"ეკრანის დაბლოკვა"
"კვების გამორთვა"
+ "საგანგებო სამსახურები"
"ხარვეზის შესახებ ანგარიში"
"შექმენით შეცდომის ანგარიში"
"იგი შეაგროვებს ინფორმაციას თქვენი მოწყობილობის ამჟამინდელი მდგომარეობის შესახებ, რათა ის ელფოსტის შეტყობინების სახით გააგზავნოს. ხარვეზის ანგარიშის მომზადებასა და შეტყობინების გაგზავნას გარკვეული დრო სჭირდება. გთხოვთ, მოითმინოთ."
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index 12200615445cd..41395c13e3645 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -208,6 +208,7 @@
"Телефон опциялары"
"Экранды бекіту"
"Өшіру"
+ "Төтенше жағдай"
"Вирус туралы хабарлау"
"Қате туралы есеп құру"
"Құрылғының қазіргі күйі туралы ақпаратты жинап, электрондық хабармен жібереді. Есеп әзір болғанша біраз уақыт кетеді, шыдай тұрыңыз."
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index 99de7b00e00e6..944704abfd3e1 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -208,6 +208,7 @@
"ជម្រើសទូរស័ព្ទ"
"ចាក់សោអេក្រង់"
"បិទ"
+ "អាសន្ន"
"របាយការណ៍កំហុស"
"យករបាយការណ៍កំហុស"
"វានឹងប្រមូលព័ត៌មានអំពីស្ថានភាពឧបករណ៍របស់អ្នក ដើម្បីផ្ញើជាសារអ៊ីមែល។ វានឹងចំណាយពេលតិចពីពេលចាប់ផ្ដើមរបាយការណ៍រហូតដល់ពេលវារួចរាល់ដើម្បីផ្ញើ សូមអត់ធ្មត់។"
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index e4807606cffe9..c434d504dcb89 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -208,6 +208,7 @@
"ಫೋನ್ ಆಯ್ಕೆಗಳು"
"ಪರದೆ ಲಾಕ್"
"ಪವರ್ ಆಫ್ ಮಾಡು"
+ "ತುರ್ತು"
"ದೋಷದ ವರದಿ"
"ದೋಷ ವರದಿ ರಚಿಸಿ"
"ನಿಮ್ಮ ಸಾಧನದ ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯ ಕುರಿತು ಮಾಹಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸಿಕೊಳ್ಳುವುದರ ಜೊತೆ ಇ-ಮೇಲ್ ರೂಪದಲ್ಲಿ ನಿಮಗೆ ರವಾನಿಸುತ್ತದೆ. ಇದು ದೋಷ ವರದಿಯನ್ನು ಪ್ರಾರಂಭಿಸಿದ ಸಮಯದಿಂದ ಅದನ್ನು ಕಳುಹಿಸುವವರೆಗೆ ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ; ದಯವಿಟ್ಟು ತಾಳ್ಮೆಯಿಂದಿರಿ."
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 360d7231cb9b9..3c9db48901b90 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -208,6 +208,7 @@
"휴대전화 옵션"
"화면 잠금"
"종료"
+ "긴급 전화"
"버그 신고"
"버그 신고"
"현재 기기 상태에 대한 정보를 수집하여 이메일 메시지로 전송합니다. 버그 신고를 시작하여 전송할 준비가 되려면 약간 시간이 걸립니다."
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 480660342dd50..05f699e504cf1 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -208,6 +208,7 @@
"Телефон мүмкүнчүлүктөрү"
"Экран кулпусу"
"Кубатын өчүрүү"
+ "Тез жардам"
"Ката тууралуу билдирүү"
"Ката тууралуу билдирүү түзүү"
"Бул сиздин түзмөгүңүздүн учурдагы абалын эмейл билдирүүсү катары жөнөтүш максатында маалымат чогултат. Ката тууралуу билдирүү түзүлүп башталып, жөнөтүлгөнгө чейин бир аз убакыт керек болот; сураныч, бир аз күтө туруңуз."
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index dada9ce75c6e6..08c8b61c38ba4 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -208,6 +208,7 @@
"ໂຕເລືອກໂທລະສັບ"
"ລັອກໜ້າຈໍ"
"ປິດ"
+ "ສຸກເສີນ"
"ລາຍງານຂໍ້ຜິດພາດ"
"ໃຊ້ລາຍງານຂໍ້ບົກພ່ອງ"
"ນີ້ຈະເປັນການເກັບກຳຂໍ້ມູນກ່ຽວກັບ ສະຖານະປັດຈຸບັນຂອງອຸປະກອນທ່ານ ເພື່ອສົ່ງເປັນຂໍ້ຄວາມທາງອີເມວ. ມັນຈະໃຊ້ເວລາໜ້ອຍນຶ່ງ ໃນການເລີ່ມຕົ້ນການລາຍງານຂໍ້ຜິດພາດ ຈົນກວ່າຈະພ້ອມທີ່ຈະສົ່ງໄດ້, ກະລຸນາລໍຖ້າ."
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index bdf0f3fa784e4..64295853816d1 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -210,6 +210,7 @@
"Telefono parinktys"
"Ekrano užraktas"
"Išjungiamas maitinimas"
+ "Skambutis pagalbos numeriu"
"Pranešimas apie riktą"
"Pranešti apie riktą"
"Bus surinkta informacija apie dabartinę įrenginio būseną ir išsiųsta el. pašto pranešimu. Šiek tiek užtruks, kol pranešimas apie riktą bus paruoštas siųsti; būkite kantrūs."
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 4939eb31593b8..ef1ad06afc466 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -209,6 +209,7 @@
"Tālruņa opcijas"
"Ekrāna bloķētājs"
"Strāvas padeve ir izslēgta."
+ "Ārkārtas"
"Kļūdu ziņojums"
"Kļūdu ziņojuma sagatavošana"
"Veicot šo darbību, tiks apkopota informācija par jūsu ierīces pašreizējo stāvokli un nosūtīta e-pasta ziņojuma veidā. Kļūdu ziņojuma pabeigšanai un nosūtīšanai var būt nepieciešams laiks. Lūdzu, esiet pacietīgs."
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index 95cf944e57eee..501e5f67acfb6 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -208,6 +208,7 @@
"Опции на телефон"
"Заклучи екран"
"Исклучи"
+ "Итен случај"
"Извештај за грешка"
"Земи извештај за грешки"
"Ова ќе собира информации за моменталната состојба на вашиот уред, за да ги испрати како порака по е-пошта. Тоа ќе одземе малку време почнувајќи од извештајот за грешки додека не се подготви за праќање; бидете трпеливи."
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index edb470bc26d91..feeeecad1f8b8 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -208,6 +208,7 @@
"ഫോൺ ഓപ്ഷനുകൾ"
"സ്ക്രീൻ ലോക്ക്"
"പവർ ഓഫാക്കുക"
+ "അടിയന്തിരാവശ്യം"
"ബഗ് റിപ്പോർട്ട്"
"ബഗ് റിപ്പോർട്ട് എടുക്കുക"
"ഒരു ഇമെയിൽ സന്ദേശമായി അയയ്ക്കുന്നതിന്, ഇത് നിങ്ങളുടെ നിലവിലെ ഉപകരണ നിലയെക്കുറിച്ചുള്ള വിവരങ്ങൾ ശേഖരിക്കും. ബഗ് റിപ്പോർട്ട് ആരംഭിക്കുന്നതിൽ നിന്ന് ഇത് അയയ്ക്കാനായി തയ്യാറാകുന്നതുവരെ അൽപ്പസമയമെടുക്കും; ക്ഷമയോടെ കാത്തിരിക്കുക."
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index bbae50695a962..4434454a979ae 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -208,6 +208,7 @@
"Утасны сонголтууд"
"Дэлгэцний түгжээ"
"Унтраах"
+ "Яаралтай тусламж"
"Алдаа мэдээллэх"
"Согог репорт авах"
"Энэ таны төхөөрөмжийн одоогийн статусын талаарх мэдээллийг цуглуулах ба имэйл мессеж болгон илгээнэ. Алдааны мэдэгдлээс эхэлж илгээхэд бэлэн болоход хэсэг хугацаа зарцуулагдана тэвчээртэй байна уу."
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index 99262b0083fe9..42b8b596b685e 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -208,6 +208,7 @@
"फोन पर्याय"
"स्क्रीन लॉक"
"बंद"
+ "आणीबाणी"
"दोष अहवाल"
"दोष अहवाल घ्या"
"ई-मेल संदेश म्हणून पाठविण्यासाठी, हे आपल्या वर्तमान डिव्हाइस स्थितीविषयी माहिती संकलित करेल. दोष अहवाल प्रारंभ करण्यापासून तो पाठविण्यापर्यंत थोडा वेळ लागेल; कृपया धीर धरा."
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index 01f5c468dbc70..b26495244b650 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -208,6 +208,7 @@
"Pilihan telefon"
"Kunci skrin"
"Matikan kuasa"
+ "Kecemasan"
"Laporan pepijat"
"Ambil laporan pepijat"
"Ini akan mengumpul maklumat tentang keadaan peranti semasa anda untuk dihantarkan sebagai mesej e-mel. Harap bersabar, mungkin perlu sedikit masa untuk memulakan laporan sehingga siap untuk dihantar."
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index 690a0ef59b057..b5e80ac38923a 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -208,6 +208,7 @@
"ဖုန်းဆိုင်ရာရွေးချယ်မှုများ"
"ဖုန်းမျက်နှာပြင်အား သော့ချရန်"
"ပါဝါပိတ်ရန်"
+ "အရေးပေါ်"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်း"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းအား ယူရန်"
"သင့်ရဲ့ လက်ရှိ စက်အခြေအနေ အချက်အလက်များကို အီးမေးလ် အနေဖြင့် ပေးပို့ရန် စုဆောင်းပါမည်။ အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းမှ ပေးပို့ရန် အသင့်ဖြစ်သည်အထိ အချိန် အနည်းငယ်ကြာမြင့်မှာ ဖြစ်သဖြင့် သည်းခံပြီး စောင့်ပါရန်"
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 5df9a82bbea08..1a28f3aa0c001 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -208,6 +208,7 @@
"Telefoninnstillinger"
"Lås skjermen"
"Slå av"
+ "Nødssituasjon"
"Feilrapport"
"Utfør feilrapport"
"Informasjon om tilstanden til enheten din samles inn og sendes som en e-post. Det tar litt tid fra du starter feilrapporten til e-posten er klar, så vær tålmodig."
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 3e8e5b66d1519..61765adb65f54 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -208,6 +208,7 @@
"फोन विकल्पहरू"
"स्क्रिन बन्द"
"बन्द गर्नुहोस्"
+ "आपतकालीन"
"बग रिपोर्ट"
"बग रिपोर्ट लिनुहोस्"
"एउटा इमेल सन्देशको रूपमा पठाउनलाई यसले तपाईँको हालैको उपकरणको अवस्थाको बारेमा सूचना जम्मा गर्ने छ। बग रिपोर्ट सुरु गरेदेखि पठाउन तयार नभएसम्म यसले केही समय लिन्छ; कृपया धैर्य गर्नुहोस्।"
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 27dd5dd7ef7c3..b07a5e4d6a183 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -208,6 +208,7 @@
"Telefoonopties"
"Schermvergrendeling"
"Uitschakelen"
+ "Noodgeval"
"Foutenrapport"
"Foutenrapport genereren"
"Hiermee worden gegevens over de huidige status van uw apparaat verzameld en als e-mail verzonden. Wanneer u een foutenrapport start, duurt het even voordat het kan worden verzonden. Even geduld alstublieft."
diff --git a/core/res/res/values-pa-rIN/strings.xml b/core/res/res/values-pa-rIN/strings.xml
index 5a9d2c1db7274..b48aca549d017 100644
--- a/core/res/res/values-pa-rIN/strings.xml
+++ b/core/res/res/values-pa-rIN/strings.xml
@@ -208,6 +208,7 @@
"ਫੋਨ ਚੋਣਾਂ"
"ਸਕ੍ਰੀਨ ਲੌਕ"
"ਪਾਵਰ ਬੰਦ"
+ "ਸੰਕਟਕਾਲ"
"ਬਗ ਰਿਪੋਰਟ"
"ਬਗ ਰਿਪੋਰਟ ਲਓ"
"ਇਹ ਇੱਕ ਈ-ਮੇਲ ਸੁਨੇਹਾ ਭੇਜਣ ਲਈ, ਤੁਹਾਡੀ ਵਰਤਮਾਨ ਡਿਵਾਈਸ ਬਾਰੇ ਜਾਣਕਾਰੀ ਇਕੱਤਰ ਕਰੇਗਾ। ਬਗ ਰਿਪੋਰਟ ਸ਼ੁਰੂ ਕਰਨ ਵਿੱਚ ਥੋੜ੍ਹਾ ਸਮਾਂ ਲੱਗੇਗਾ ਜਦੋਂ ਤੱਕ ਇਹ ਭੇਜੇ ਜਾਣ ਲਈ ਤਿਆਰ ਨਾ ਹੋਵੇ, ਕਿਰਪਾ ਕਰਕੇ ਧੀਰਜ ਰੱਖੋ।"
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 488ee3072d4ae..7cc26da87b2db 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -210,6 +210,7 @@
"Opcje telefonu"
"Blokada ekranu"
"Wyłącz"
+ "Alarmowe"
"Zgłoszenie błędu"
"Zgłoś błąd"
"Informacje o bieżącym stanie urządzenia zostaną zebrane i wysłane e-mailem. Przygotowanie zgłoszenia błędu do wysłania chwilę potrwa, więc zachowaj cierpliwość."
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index 4972ce97e8f8e..fd3f827110650 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -208,6 +208,7 @@
"Opções do telefone"
"Bloquear tela"
"Desligar"
+ "Emergência"
"Relatório de bugs"
"Obter relatório de bugs"
"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index ff41c14be627b..c2f6a151a92f9 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -208,6 +208,7 @@
"Opções do telefone"
"Bloqueio de ecrã"
"Desligar"
+ "Emergência"
"Relatório de erros"
"Criar relatório de erros"
"Será recolhida informação sobre o estado atual do seu dispositivo a enviar através de uma mensagem de email. Demorará algum tempo até que o relatório de erro esteja pronto para ser enviado. Aguarde um pouco."
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 4972ce97e8f8e..fd3f827110650 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -208,6 +208,7 @@
"Opções do telefone"
"Bloquear tela"
"Desligar"
+ "Emergência"
"Relatório de bugs"
"Obter relatório de bugs"
"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 5315a7d868fef..eaa6acf5bf528 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -209,6 +209,7 @@
"Opţiuni telefon"
"Blocați ecranul"
"Opriți alimentarea"
+ "Urgență"
"Raport despre erori"
"Executaţi un raport despre erori"
"Acest raport va colecta informaţii despre starea actuală a dispozitivului, pentru a le trimite într-un e-mail. Aveți răbdare după pornirea raportului despre erori până când va fi gata de trimis."
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index be9b3fc1797c4..7746a7dc64539 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -210,6 +210,7 @@
"Параметры телефона"
"Блокировка экрана"
"Отключить питание"
+ "Экстренный вызов"
"Отчет об ошибке"
"Отчет об ошибке"
"Информация о текущем состоянии вашего устройства будет собрана и отправлена по электронной почте. Подготовка отчета займет некоторое время."
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index 81e90d252d415..e719910ff1bf5 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -208,6 +208,7 @@
"දුරකථන විකල්ප"
"තිර අගුල"
"බලය අක්රිය කරන්න"
+ "හදිසි"
"දෝෂ වර්තාව"
"දෝෂ වාර්තාවක් ගන්න"
"ඊ-තැපැල් පණිවිඩයක් ලෙස යැවීමට මෙය ඔබගේ වත්මන් උපාංග තත්වය ගැන තොරතුරු එකතු කරනු ඇත. දෝෂ වාර්තාව ආරම්භ කර එය යැවීමට සූදානම් කරන තෙක් එයට කිසියම් කාලයක් ගතවනු ඇත; කරුණාකර ඉවසන්න."
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index cbff7d5d6b6a2..03093c5f598b7 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -210,6 +210,7 @@
"Možnosti telefónu"
"Zámka obrazovky"
"Vypnúť"
+ "Tiesňové volanie"
"Hlásenie o chybách"
"Vytvoriť hlásenie chyby"
"Týmto zhromaždíte informácie o aktuálnom stave zariadenia. Informácie je potom možné odoslať e-mailom, chvíľu však potrvá, kým bude hlásenie chyby pripravené na odoslanie. Prosíme vás preto o trpezlivosť."
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index ddeff80a238eb..ca46782879eb4 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -210,6 +210,7 @@
"Možnosti telefona"
"Zaklep zaslona"
"Izklopi"
+ "Klic v sili"
"Poročilo o napakah"
"Ustvari poročilo o napakah"
"S tem bodo zbrani podatki o trenutnem stanju naprave, ki bodo poslani v e-poštnem sporočilu. Izvedba poročila o napakah in priprava trajata nekaj časa, zato bodite potrpežljivi."
diff --git a/core/res/res/values-sq-rAL/strings.xml b/core/res/res/values-sq-rAL/strings.xml
index 508e88e02b8ca..e6b348bca9ee0 100644
--- a/core/res/res/values-sq-rAL/strings.xml
+++ b/core/res/res/values-sq-rAL/strings.xml
@@ -208,6 +208,7 @@
"Opsionet e telefonit"
"Kyçja e ekranit"
"Fik"
+ "Urgjenca"
"Raporti i defekteve në kod"
"Merr raportin e defekteve në kod"
"Ky funksion mundëson mbledhjen e informacioneve mbi gjendjen aktuale të pajisjes për ta dërguar si mesazh mail-i. Do të duhet pak kohë nga nisja e raportit të defekteve në kod. Faleminderit për durimin."
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index b283250985c4d..690f225cb2aff 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -209,6 +209,7 @@
"Опције телефона"
"Закључај екран"
"Искључи"
+ "Хитни позив"
"Извештај о грешци"
"Направи извештај о грешци"
"Овим ће се прикупити информације о тренутном стању уређаја како би биле послате у поруци е-поште. Од започињања извештаја о грешци до тренутка за његово слање проћи ће неко време; будите стрпљиви."
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index b293655998f6f..a6b1cae13888b 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -208,6 +208,7 @@
"Telefonalternativ"
"Skärmlås"
"Stäng av"
+ "Nödsituation"
"Felrapport"
"Skapa felrapport"
"Nu hämtas information om aktuell status för enheten, som sedan skickas i ett e-postmeddelade. Det tar en liten stund innan felrapporten är färdig och kan skickas, så vi ber dig ha tålamod."
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 3800c92dbd9ce..39e1b0c660802 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -210,6 +210,7 @@
"Chaguo za simu"
"Funga skrini"
"Zima"
+ "Dharura"
"Ripoti ya hitilafu"
"Chukua ripoti ya hitilafu"
"Hii itakusanya maelezo kuhusu hali ya kifaa chako kwa sasa, na itume kama barua pepe. Itachukua muda mfupi tangu ripoti ya hitilafu ianze kuzalishwa hadi iwe tayari kutumwa; vumilia."
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index ae9be638c0a7c..2efae6a9e6792 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -208,6 +208,7 @@
"தொலைபேசி விருப்பங்கள்"
"திரைப் பூட்டு"
"முடக்கு"
+ "அவசர அழைப்பு"
"பிழை அறிக்கை"
"பிழை அறிக்கையை எடு"
"உங்கள் நடப்புச் சாதன நிலையை மின்னஞ்சல் செய்தியாக அனுப்ப, அது குறித்த தகவலை இது சேகரிக்கும். பிழை அறிக்கையைத் தொடங்குவதில் இருந்து, அது அனுப்புவதற்குத் தயாராகும் வரை, இதற்குச் சிறிது நேரம் ஆகும்; பொறுமையாகக் காத்திருக்கவும்."
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index 7eca8eee401d4..2171911213f90 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -208,6 +208,7 @@
"ఫోన్ ఎంపికలు"
"స్క్రీన్ లాక్"
"పవర్ ఆఫ్ చేయి"
+ "అత్యవసరం"
"బగ్ నివేదిక"
"బగ్ నివేదికను సిద్ధం చేయి"
"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ నివేదికను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 549e75588d3f7..b35a4bb17565d 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -208,6 +208,7 @@
"ตัวเลือกโทรศัพท์"
"ล็อกหน้าจอ"
"ปิดเครื่อง"
+ "เหตุฉุกเฉิน"
"รายงานข้อบกพร่อง"
"ใช้รายงานข้อบกพร่อง"
"การดำเนินการนี้จะรวบรวมข้อมูลเกี่ยวกับสถานะปัจจุบันของอุปกรณ์ของคุณ โดยจะส่งไปในรูปแบบข้อความอีเมล อาจใช้เวลาสักครู่ตั้งแต่เริ่มการสร้างรายงานข้อบกพร่องจนกระทั่งเสร็จสมบูรณ์ โปรดอดทนรอ"
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 004b3f807ad30..395c1c0135c01 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -208,6 +208,7 @@
"Pagpipilian sa telepono"
"Pag-lock sa screen"
"I-off"
+ "Emergency"
"Ulat sa bug"
"Kunin ang ulat sa bug"
"Mangongolekta ito ng impormasyon tungkol sa kasalukuyang katayuan ng iyong device, na ipapadala bilang mensaheng e-mail. Gugugol ito ng kaunting oras mula sa pagsisimula ng ulat sa bug hanggang sa handa na itong maipadala; mangyaring magpasensya."
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 72cbf87c2bc65..caaa1f9371969 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -208,6 +208,7 @@
"Telefon seçenekleri"
"Ekran kilidi"
"Kapat"
+ "Acil durum"
"Hata raporu"
"Hata raporu al"
"Bu rapor, e-posta iletisi olarak göndermek üzere cihazınızın şu anki durumuyla ilgili bilgi toplar. Hata raporu başlatıldıktan sonra hazır olması biraz zaman alabilir, lütfen sabırlı olun."
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index ea3c941716001..c967a7e2ea472 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -210,6 +210,7 @@
"Параметри телеф."
"Заблок. екран"
"Вимкнути"
+ "Екстрений виклик"
"Звіт про помилки"
"Звіт про помилку"
"Інформація про поточний стан вашого пристрою буде зібрана й надіслана електронною поштою. Підготовка звіту триватиме певний час."
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index 76495e1ed8d85..de2105aca6f80 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -208,6 +208,7 @@
"فون کے اختیارات"
"اسکرین لاک"
"پاور آف"
+ "ایمرجنسی"
"بگ کی اطلاع"
"بگ کی اطلاع لیں"
"ایک ای میل پیغام کے بطور بھیجنے کیلئے، یہ آپ کے موجودہ آلہ کی حالت کے بارے میں معلومات جمع کرے گا۔ بگ کی اطلاع شروع کرنے سے لے کر بھیجنے کیلئے تیار ہونے تک اس میں تھوڑا وقت لگے گا؛ براہ کرم تحمل سے کام لیں۔"
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index 1d28eb1d5e07b..c6c620a56e849 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -208,6 +208,7 @@
"Telefon sozlamalari"
"Ekranni qulflash"
"O‘chirish"
+ "Favqulodda chaqiruv"
"Nosozlik haqida ma’lumot berish"
"Xatoliklar hisoboti"
"Qurilmangiz holati haqidagi ma’lumotlar to‘planib, e-pochta orqali yuboriladi. Hisobotni tayyorlash biroz vaqt olishi mumkin."
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index e4c5ee775a39a..6cf7a76aefec3 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -208,6 +208,7 @@
"Tùy chọn điện thoại"
"Khoá màn hình"
"Tắt nguồn"
+ "Khẩn cấp"
"Báo cáo lỗi"
"Nhận báo cáo lỗi"
"Báo cáo này sẽ thu thập thông tin về tình trạng thiết bị hiện tại của bạn, để gửi dưới dạng thông báo qua email. Sẽ mất một chút thời gian kể từ khi bắt đầu báo cáo lỗi cho tới khi báo cáo sẵn sàng để gửi; xin vui lòng kiên nhẫn."
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 3ffb555c0e992..fc1a250381e13 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -208,6 +208,7 @@
"手机选项"
"屏幕锁定"
"关机"
+ "紧急呼救"
"错误报告"
"提交错误报告"
"这会收集有关当前设备状态的信息,并以电子邮件的形式进行发送。从开始生成错误报告到准备好发送需要一点时间,请耐心等待。"
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index ffa6fb19a1d58..c96b8200494ca 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -208,6 +208,7 @@
"手機選項"
"螢幕鎖定"
"關閉"
+ "緊急"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,並以電郵傳送給您。從開始建立錯誤報告到準備傳送需要一段時間,請耐心等候。"
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f1413745a4c88..51c8a6e1d6a58 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -208,6 +208,7 @@
"電話選項"
"螢幕鎖定"
"關機"
+ "緊急電話"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,以便透過電子郵件傳送。從錯誤報告開始建立到準備傳送的這段過程可能需要一點時間,敬請耐心等候。"
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index f29e9f90e0ef2..c522499a4fcdc 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -208,6 +208,7 @@
"Okukhethwa kukho kwefoni"
"Ukuvala isikrini"
"Vala amandla"
+ "Isimo esiphuthumayo"
"Umbiko wephutha"
"Thatha umbiko wesiphazamiso"
"Lokhu kuzoqoqa ulwazi mayelana nesimo samanje sedivayisi yakho, ukuthumela imilayezo ye-imeyili. Kuzothatha isikhathi esincane kusuka ekuqaleni umbiko wesiphazamiso uze ulungele ukuthunyelwa; sicela ubekezele."
From 95e1865ef63e7958a40c0a67cac05a5748631eb2 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Tue, 11 Oct 2016 16:45:41 -0700
Subject: [PATCH 10/98] DO NOT MERGE - Added translations for emergency action
string
Bug: 30404490
Change-Id: Ic20d93005882bb71cef32a705443e427b0a9bd71
---
core/res/res/values-af/strings.xml | 1 +
core/res/res/values-am/strings.xml | 1 +
core/res/res/values-ar/strings.xml | 1 +
core/res/res/values-az-rAZ/strings.xml | 1 +
core/res/res/values-b+sr+Latn/strings.xml | 1 +
core/res/res/values-bg/strings.xml | 1 +
core/res/res/values-bn-rBD/strings.xml | 1 +
core/res/res/values-ca/strings.xml | 1 +
core/res/res/values-cs/strings.xml | 1 +
core/res/res/values-da/strings.xml | 1 +
core/res/res/values-de/strings.xml | 1 +
core/res/res/values-el/strings.xml | 1 +
core/res/res/values-en-rAU/strings.xml | 1 +
core/res/res/values-en-rGB/strings.xml | 1 +
core/res/res/values-en-rIN/strings.xml | 1 +
core/res/res/values-es-rUS/strings.xml | 1 +
core/res/res/values-es/strings.xml | 1 +
core/res/res/values-et-rEE/strings.xml | 1 +
core/res/res/values-eu-rES/strings.xml | 1 +
core/res/res/values-fa/strings.xml | 1 +
core/res/res/values-fi/strings.xml | 1 +
core/res/res/values-fr-rCA/strings.xml | 1 +
core/res/res/values-fr/strings.xml | 1 +
core/res/res/values-gl-rES/strings.xml | 1 +
core/res/res/values-gu-rIN/strings.xml | 1 +
core/res/res/values-hi/strings.xml | 1 +
core/res/res/values-hr/strings.xml | 1 +
core/res/res/values-hu/strings.xml | 1 +
core/res/res/values-hy-rAM/strings.xml | 1 +
core/res/res/values-in/strings.xml | 1 +
core/res/res/values-is-rIS/strings.xml | 1 +
core/res/res/values-it/strings.xml | 1 +
core/res/res/values-iw/strings.xml | 1 +
core/res/res/values-ja/strings.xml | 1 +
core/res/res/values-ka-rGE/strings.xml | 1 +
core/res/res/values-kk-rKZ/strings.xml | 1 +
core/res/res/values-km-rKH/strings.xml | 1 +
core/res/res/values-kn-rIN/strings.xml | 1 +
core/res/res/values-ko/strings.xml | 1 +
core/res/res/values-ky-rKG/strings.xml | 1 +
core/res/res/values-lo-rLA/strings.xml | 1 +
core/res/res/values-lt/strings.xml | 1 +
core/res/res/values-lv/strings.xml | 1 +
core/res/res/values-mk-rMK/strings.xml | 1 +
core/res/res/values-ml-rIN/strings.xml | 1 +
core/res/res/values-mn-rMN/strings.xml | 1 +
core/res/res/values-mr-rIN/strings.xml | 1 +
core/res/res/values-ms-rMY/strings.xml | 1 +
core/res/res/values-my-rMM/strings.xml | 1 +
core/res/res/values-nb/strings.xml | 1 +
core/res/res/values-ne-rNP/strings.xml | 1 +
core/res/res/values-nl/strings.xml | 1 +
core/res/res/values-pa-rIN/strings.xml | 1 +
core/res/res/values-pl/strings.xml | 1 +
core/res/res/values-pt-rBR/strings.xml | 1 +
core/res/res/values-pt-rPT/strings.xml | 1 +
core/res/res/values-pt/strings.xml | 1 +
core/res/res/values-ro/strings.xml | 1 +
core/res/res/values-ru/strings.xml | 1 +
core/res/res/values-si-rLK/strings.xml | 1 +
core/res/res/values-sk/strings.xml | 1 +
core/res/res/values-sl/strings.xml | 1 +
core/res/res/values-sq-rAL/strings.xml | 1 +
core/res/res/values-sr/strings.xml | 1 +
core/res/res/values-sv/strings.xml | 1 +
core/res/res/values-sw/strings.xml | 1 +
core/res/res/values-ta-rIN/strings.xml | 1 +
core/res/res/values-te-rIN/strings.xml | 1 +
core/res/res/values-th/strings.xml | 1 +
core/res/res/values-tl/strings.xml | 1 +
core/res/res/values-tr/strings.xml | 1 +
core/res/res/values-uk/strings.xml | 1 +
core/res/res/values-ur-rPK/strings.xml | 1 +
core/res/res/values-uz-rUZ/strings.xml | 1 +
core/res/res/values-vi/strings.xml | 1 +
core/res/res/values-zh-rCN/strings.xml | 1 +
core/res/res/values-zh-rHK/strings.xml | 1 +
core/res/res/values-zh-rTW/strings.xml | 1 +
core/res/res/values-zu/strings.xml | 1 +
79 files changed, 79 insertions(+)
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 9c16f7eb5848b..bb1aaadb56712 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -214,6 +214,7 @@
"Foonopsies"
"Skermslot"
"Sit af"
+ "Noodgeval"
"Foutverslag"
"Neem foutverslag"
"Dit sal inligting oor die huidige toestand van jou toestel insamel om as \'n e-posboodskap te stuur. Dit sal \'n tydjie neem vandat die foutverslag begin is totdat dit reg is om gestuur te word; wees asseblief geduldig."
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index a3c18acc684b1..7ec2cd2f45686 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -214,6 +214,7 @@
"የስልክ አማራጮች"
"ማያ ቆልፍ"
"ኃይል አጥፋ"
+ "ድንገተኛ አደጋ"
"የሳንካ ሪፖርት"
"የሳንካ ሪፖርት ውሰድ"
"ይሄ እንደ የኢሜይል መልዕክት አድርጎ የሚልከውን ስለመሣሪያዎ የአሁኑ ሁኔታ መረጃ ይሰበስባል። የሳንካ ሪፖርቱን ከመጀመር ጀምሮ እስኪላክ ድረስ ትንሽ ጊዜ ይወስዳል፤ እባክዎ ይታገሱ።"
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 2db0e15fd40dd..d7eee91ca4b9c 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -222,6 +222,7 @@
"خيارات الهاتف"
"تأمين الشاشة"
"إيقاف التشغيل"
+ "الطوارئ"
"تقرير الأخطاء"
"إعداد تقرير بالأخطاء"
"سيجمع هذا معلومات حول حالة جهازك الحالي لإرسالها كرسالة إلكترونية، ولكنه سيستغرق وقتًا قليلاً من بدء عرض تقرير بالأخطاء. وحتى يكون جاهزًا للإرسال، الرجاء الانتظار."
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml
index 7f55ba12ad1a1..6be13230b5bb1 100644
--- a/core/res/res/values-az-rAZ/strings.xml
+++ b/core/res/res/values-az-rAZ/strings.xml
@@ -214,6 +214,7 @@
"Telefon seçimləri"
"Ekran kilidi"
"Söndür"
+ "Təcili"
"Baq hesabatı"
"Baqı xəbər verin"
"Bu, sizin hazırkı cihaz durumu haqqında məlumat toplayacaq ki, elektron məktub şəklində göndərsin. Baq raportuna başlamaq üçün bir az vaxt lazım ola bilər, bir az səbr edin."
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index ec8f5f3e279d4..ffcbfb556cba4 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -216,6 +216,7 @@
"Opcije telefona"
"Zaključaj ekran"
"Isključi"
+ "Hitni poziv"
"Izveštaj o grešci"
"Napravi izveštaj o grešci"
"Ovim će se prikupiti informacije o trenutnom stanju uređaja kako bi bile poslate u poruci e-pošte. Od započinjanja izveštaja o grešci do trenutka za njegovo slanje proći će neko vreme; budite strpljivi."
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index a70d9dc099c7e..46b5df061c901 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -214,6 +214,7 @@
"Опции на телефона"
"Заключване на екрана"
"Изключване"
+ "Спешно обаждане"
"Сигнал за програмна грешка"
"Сигнал за програмна грешка"
"По този начин ще се събере информация за текущото състояние на устройството ви, която да се изпрати като имейл съобщение. След стартирането на процеса ще мине известно време, докато сигналът за програмна грешка бъде готов за подаване. Моля, имайте търпение."
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 2d88a1d7a33ad..33bce252fd4d5 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -214,6 +214,7 @@
"ফোন বিকল্পগুলি"
"স্ক্রীণ লক"
"পাওয়ার বন্ধ করুন"
+ "জরুরী"
"ত্রুটির প্রতিবেদন"
"ত্রুটির প্রতিবেদন করুন"
"এটি একটি ই-মেল বার্তা পাঠানোর জন্য আপনার ডিভাইসের বর্তমান অবস্থা সম্পর্কে তথ্য সংগ্রহ করবে৷ ত্রুটির প্রতিবেদন শুরুর সময় থেকে এটি পাঠানোর জন্য প্রস্তুত হতে কিছুটা সময় নেবে; দয়া করে ধৈর্য রাখুন৷"
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 977a398978633..d6921a1c92a12 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -214,6 +214,7 @@
"Opcions del telèfon"
"Bloqueig de pantalla"
"Apaga"
+ "Emergències"
"Informe d\'error"
"Crea informe d\'errors"
"Es recopilarà informació sobre l\'estat actual del dispositiu i se t\'enviarà per correu electrònic. Passaran uns quants minuts des de l\'inici de l\'informe d\'errors fins al seu enviament, per la qual cosa et recomanem que tinguis paciència."
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 4a142a2506f90..1a0b7bb5d1414 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -218,6 +218,7 @@
"Možnosti telefonu"
"Zámek obrazovky"
"Vypnout"
+ "Stav nouze"
"Hlášení chyb"
"Vytvořit chybové hlášení"
"Shromažďuje informace o aktuálním stavu zařízení. Tyto informace je následně možné poslat v e-mailové zprávě, chvíli však potrvá, než bude hlášení o chybě připraveno k odeslání. Buďte prosím trpěliví."
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 762c173e32386..f37764bf3d3a2 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -214,6 +214,7 @@
"Indstillinger for telefon"
"Skærmlås"
"Sluk"
+ "Nødopkald"
"Fejlrapport"
"Lav fejlrapport"
"Der indsamles oplysninger om din enheds aktuelle status, der efterfølgende sendes i en e-mail. Der går lidt tid, fra fejlrapporten påbegyndes, til den er klar til at blive sendt. Tak for tålmodigheden."
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index b163d35674969..61b14119d012f 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -214,6 +214,7 @@
"Telefonoptionen"
"Displaysperre"
"Ausschalten"
+ "Notfall"
"Fehlerbericht"
"Fehlerbericht abrufen"
"Bei diesem Fehlerbericht werden Daten zum aktuellen Status deines Geräts erfasst und als E-Mail versandt. Vom Start des Berichts bis zu seinem Versand kann es eine Weile dauern. Bitte habe etwas Geduld."
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 100ee8162e767..df3a23a8e235f 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -214,6 +214,7 @@
"Επιλογές τηλεφώνου"
"Κλείδωμα οθόνης"
"Απενεργοποίηση"
+ "Κλήση έκτακτης ανάγκης"
"Αναφορά σφαλμάτων"
"Λήψη αναφοράς σφάλματος"
"Θα συλλέξει πληροφορίες σχετικά με την τρέχουσα κατάσταση της συσκευής σας και θα τις στείλει μέσω μηνύματος ηλεκτρονικού ταχυδρομείου. Απαιτείται λίγος χρόνος για τη σύνταξη της αναφοράς σφάλματος και την αποστολή της. Κάντε λίγη υπομονή."
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 0522882ff7eb6..cf7f14a4ec24a 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -214,6 +214,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 0522882ff7eb6..cf7f14a4ec24a 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -214,6 +214,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 0522882ff7eb6..cf7f14a4ec24a 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -214,6 +214,7 @@
"Phone options"
"Screen lock"
"Power off"
+ "Emergency"
"Bug report"
"Take bug report"
"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 0786b1a3a2e94..2af1c7a3e7449 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -214,6 +214,7 @@
"Opciones de dispositivo"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencias"
"Informe de errores"
"Iniciar informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo, que se enviará por correo. Pasarán unos minutos desde que se inicie el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 1909e544a7bfa..d052e14e302df 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -214,6 +214,7 @@
"Opciones del teléfono"
"Bloqueo de pantalla"
"Apagar"
+ "Emergencia"
"Informe de error"
"Crear informe de errores"
"Se recopilará información sobre el estado actual de tu dispositivo y se enviará por correo electrónico. Pasarán unos minutos desde que empiece a generarse el informe de errores hasta que se envíe."
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index 14695e381a502..2bc2d0b9f9a11 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -214,6 +214,7 @@
"Telefonivalikud"
"Ekraanilukk"
"Lülita välja"
+ "Hädaabi"
"Veaaruanne"
"Veaaruande võtmine"
"Nii kogutakse teavet teie seadme praeguse oleku kohta, et saata see meilisõnumina. Enne kui saate veaaruande ära saata, võtab selle loomine natuke aega; varuge kannatust."
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 98adc8624b273..94f6b48d3f764 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -214,6 +214,7 @@
"Telefonoaren aukerak"
"Pantailaren blokeoa"
"Itzali"
+ "Larrialdiak"
"Akatsen txostena"
"Sortu akatsen txostena"
"Gailuaren uneko egoerari buruzko informazioa bilduko da, mezu elektroniko gisa bidaltzeko. Minutu batzuk igaroko dira akatsen txostena sortzen hasten denetik bidaltzeko prest egon arte. Itxaron, mesedez."
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 26684ac038d03..1a4065088db3f 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -214,6 +214,7 @@
"گزینههای تلفن"
"قفل صفحه"
"خاموش کردن"
+ "اضطراری"
"گزارش اشکال"
"گرفتن گزارش اشکال"
"این گزارش اطلاعات مربوط به وضعیت دستگاه کنونی شما را جمعآوری میکند تا به صورت یک پیام رایانامه ارسال شود. از زمان شروع گزارش اشکال تا آماده شدن برای ارسال اندکی زمان میبرد؛ لطفاً شکیبا باشید."
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index ac827a164ebe5..2b4baf9a2e5cc 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -214,6 +214,7 @@
"Puhelimen asetukset"
"Näytön lukitus"
"Katkaise virta"
+ "Hätäpuhelu"
"Virheraportti"
"Luo virheraportti"
"Toiminto kerää tietoja laitteen tilasta ja lähettää ne sähköpostitse. Virheraportti on valmis lähetettäväksi hetken kuluttua - kiitos kärsivällisyydestäsi."
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 57119dae338c9..b4d34ebc0415c 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -214,6 +214,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgence"
"Rapport de bogue"
"Créer un rapport de bogue"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme de courriel. Merci de patienter pendant la préparation du rapport de bogue. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b08999100cc36..39d8ebf3cd67a 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -214,6 +214,7 @@
"Options du téléphone"
"Verrouillage de l\'écran"
"Éteindre"
+ "Urgences"
"Rapport de bug"
"Créer un rapport de bug"
"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme d\'e-mail. Merci de patienter pendant la préparation du rapport de bug. Cette opération peut prendre quelques instants."
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index 23669d4dc09cb..a6024dc65b318 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -214,6 +214,7 @@
"Opcións de teléfono"
"Bloqueo da pantalla"
"Apagar"
+ "Emerxencia"
"Informe de erros"
"Crear informe de erros"
"Este informe recompilará información acerca do estado actual do teu dispositivo para enviala en forma de mensaxe de correo electrónico. O informe de erros tardará un pouco en completarse desde o seu inicio ata que estea preparado para enviarse, polo que che recomendamos que teñas paciencia."
diff --git a/core/res/res/values-gu-rIN/strings.xml b/core/res/res/values-gu-rIN/strings.xml
index 656061dd340d0..d8ccfc2091852 100644
--- a/core/res/res/values-gu-rIN/strings.xml
+++ b/core/res/res/values-gu-rIN/strings.xml
@@ -214,6 +214,7 @@
"ફોન વિકલ્પો"
"સ્ક્રીન લૉક"
"પાવર બંધ"
+ "કટોકટી"
"બગ રિપોર્ટ"
"બગ રિપોર્ટ લો"
"આ, એક ઇ-મેઇલ સંદેશ તરીકે મોકલવા માટે, તમારા વર્તમાન ઉપકરણ સ્થિતિ વિશેની માહિતી એકત્રિત કરશે. એક બગ રિપોર્ટ પ્રારંભ કરીને તે મોકલવા માટે તૈયાર ન થઈ જાય ત્યાં સુધી તેમાં થોડો સમય લાગશે; કૃપા કરીને ધીરજ રાખો."
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index b52ff253ad2c5..3bb5e0047543c 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -214,6 +214,7 @@
"फ़ोन विकल्प"
"स्क्रीन लॉक"
"पावर बंद"
+ "आपातकाल"
"बग रिपोर्ट"
"बग रिपोर्ट प्राप्त करें"
"ईमेल संदेश के रूप में भेजने के लिए, इसके द्वारा आपके डिवाइस की वर्तमान स्थिति के बारे में जानकारी एकत्र की जाएगी. बग रिपोर्ट प्रारंभ करने से लेकर भेजने के लिए तैयार होने तक कुछ समय लगेगा; कृपया धैर्य रखें."
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index b90f9dd3248fd..07d50dc68e327 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -216,6 +216,7 @@
"Opcije telefona"
"Zaključavanje zaslona"
"Isključi"
+ "Hitno"
"Izvješće o bugovima"
"Izvješće o programskoj pogrešci"
"Time će se prikupiti podaci o trenutačnom stanju vašeg uređaja koje ćete nam poslati u e-poruci. Za pripremu izvješća o programskoj pogrešci potrebno je nešto vremena pa vas molimo za strpljenje."
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 8187e438872e4..858604084a5c5 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -214,6 +214,7 @@
"Telefonbeállítások"
"Képernyő lezárása"
"Kikapcsolás"
+ "Vészhívás"
"Programhiba bejelentése"
"Hibajelentés készítése"
"Ezzel információt fog gyűjteni az eszköz jelenlegi állapotáról, amelyet a rendszer e-mailben fog elküldeni. Kérjük, legyen türelemmel, amíg a hibajelentés elkészül, és küldhető állapotba kerül."
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 58f3d8e9353d1..1efd2bf1e400f 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -214,6 +214,7 @@
"Հեռախոսի ընտրանքներ"
"Էկրանի փական"
"Անջատել"
+ "Արտակարգ իրավիճակ"
"Վրիպակի զեկույց"
"Գրել սխալի զեկույց"
"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index bd172604d4b12..3f98718710c27 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -214,6 +214,7 @@
"Opsi telepon"
"Kunci layar"
"Matikan daya"
+ "Darurat"
"Laporan bug"
"Ambil laporan bug"
"Ini akan mengumpulkan informasi status perangkat Anda saat ini, untuk dikirimkan sebagai pesan email. Harap bersabar, mungkin perlu waktu untuk memulai laporan bug hingga siap dikirim."
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index b575e791c666c..a0578b04b07ce 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -214,6 +214,7 @@
"Valkostir síma"
"Skjálás"
"Slökkva"
+ "Neyðarsímtal"
"Villutilkynning"
"Útbúa villutilkynningu"
"Þetta safnar upplýsingum um núverandi stöðu tækisins til að senda með tölvupósti. Það tekur smástund frá því villutilkynningin er ræst og þar til hún er tilbúin til sendingar – sýndu biðlund."
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index bfadb9df2b230..c0ea60d154521 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -214,6 +214,7 @@
"Opzioni telefono"
"Blocco schermo"
"Spegni"
+ "Emergenza"
"Segnalazione di bug"
"Apri segnalazione bug"
"Verranno raccolte informazioni sullo stato corrente del dispositivo che saranno inviate sotto forma di messaggio email. Passerà un po\' di tempo prima che la segnalazione di bug aperta sia pronta per essere inviata; ti preghiamo di avere pazienza."
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index c2ba6f30e1213..12b2860ff6929 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -218,6 +218,7 @@
"אפשרויות טלפון"
"נעילת מסך"
"כיבוי"
+ "חירום"
"דיווח על באג"
"שלח דיווח על באג"
"פעולה זו תאסוף מידע על מצב המכשיר הנוכחי שלך על מנת לשלוח אותו כהודעת אימייל. היא תימשך זמן קצר מרגע פתיחת דיווח הבאג ועד לשליחת ההודעה בפועל. אנא המתן בסבלנות."
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index c7c404e300b1f..c06d8f8f57531 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -214,6 +214,7 @@
"携帯電話オプション"
"画面ロック"
"電源を切る"
+ "緊急通報"
"バグレポート"
"バグレポートを取得"
"現在の端末の状態に関する情報が収集され、その内容がメールで送信されます。バグレポートが開始してから送信可能な状態となるまでには多少の時間がかかりますのでご了承ください。"
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 0d27ea59c9687..11dcebf1ac0e7 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -214,6 +214,7 @@
"ტელეფონის პარამეტრები"
"ეკრანის დაბლოკვა"
"კვების გამორთვა"
+ "საგანგებო სამსახურები"
"ხარვეზის შესახებ ანგარიში"
"შექმენით შეცდომის ანგარიში"
"იგი შეაგროვებს ინფორმაციას თქვენი მოწყობილობის ამჟამინდელი მდგომარეობის შესახებ, რათა ის ელფოსტის შეტყობინების სახით გააგზავნოს. ხარვეზის ანგარიშის მომზადებასა და შეტყობინების გაგზავნას გარკვეული დრო სჭირდება. გთხოვთ, მოითმინოთ."
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index d667d5df28ac6..62a8de6197449 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -214,6 +214,7 @@
"Телефон опциялары"
"Экранды құлыптау"
"Өшіру"
+ "Төтенше жағдай"
"Вирус туралы хабарлау"
"Қате туралы есеп құру"
"Құрылғының қазіргі күйі туралы ақпаратты жинап, электрондық хабармен жібереді. Есеп әзір болғанша біраз уақыт кетеді, шыдай тұрыңыз."
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index 0256ddc808bf0..53cef5f987411 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -214,6 +214,7 @@
"ជម្រើសទូរស័ព្ទ"
"ចាក់សោអេក្រង់"
"បិទ"
+ "អាសន្ន"
"របាយការណ៍កំហុស"
"យករបាយការណ៍កំហុស"
"វានឹងប្រមូលព័ត៌មានអំពីស្ថានភាពឧបករណ៍របស់អ្នក ដើម្បីផ្ញើជាសារអ៊ីមែល។ វានឹងចំណាយពេលតិចពីពេលចាប់ផ្ដើមរបាយការណ៍រហូតដល់ពេលវារួចរាល់ដើម្បីផ្ញើ សូមអត់ធ្មត់។"
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index c172e912743f6..2984afdac4e20 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -214,6 +214,7 @@
"ಫೋನ್ ಆಯ್ಕೆಗಳು"
"ಸ್ಕ್ರೀನ್ ಲಾಕ್"
"ಪವರ್ ಆಫ್ ಮಾಡು"
+ "ತುರ್ತು"
"ದೋಷದ ವರದಿ"
"ದೋಷ ವರದಿ ರಚಿಸಿ"
"ನಿಮ್ಮ ಸಾಧನದ ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯ ಕುರಿತು ಮಾಹಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸಿಕೊಳ್ಳುವುದರ ಜೊತೆ ಇ-ಮೇಲ್ ರೂಪದಲ್ಲಿ ನಿಮಗೆ ರವಾನಿಸುತ್ತದೆ. ಇದು ದೋಷ ವರದಿಯನ್ನು ಪ್ರಾರಂಭಿಸಿದ ಸಮಯದಿಂದ ಅದನ್ನು ಕಳುಹಿಸುವವರೆಗೆ ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ; ದಯವಿಟ್ಟು ತಾಳ್ಮೆಯಿಂದಿರಿ."
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 254adc8276e6e..97afc56081580 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -214,6 +214,7 @@
"휴대전화 옵션"
"화면 잠금"
"종료"
+ "긴급 전화"
"버그 신고"
"버그 신고"
"현재 기기 상태에 대한 정보를 수집하여 이메일 메시지로 전송합니다. 버그 신고를 시작하여 전송할 준비가 되려면 약간 시간이 걸립니다."
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 50340d4d3b755..6ffd5f6672da3 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -214,6 +214,7 @@
"Телефон мүмкүнчүлүктөрү"
"Экран кулпусу"
"Кубатын өчүрүү"
+ "Тез жардам"
"Ката тууралуу билдирүү"
"Ката тууралуу билдирүү түзүү"
"Бул сиздин түзмөгүңүздүн учурдагы абалын эмейл билдирүүсү катары жөнөтүш максатында маалымат чогултат. Ката тууралуу билдирүү түзүлүп башталып, жөнөтүлгөнгө чейин бир аз убакыт керек болот; сураныч, бир аз күтө туруңуз."
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index 1ef76222c2ba3..0f6eabc485854 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -214,6 +214,7 @@
"ໂຕເລືອກໂທລະສັບ"
"ລັອກໜ້າຈໍ"
"ປິດ"
+ "ສຸກເສີນ"
"ລາຍງານຂໍ້ຜິດພາດ"
"ໃຊ້ລາຍງານຂໍ້ບົກພ່ອງ"
"ນີ້ຈະເປັນການເກັບກຳຂໍ້ມູນກ່ຽວກັບ ສະຖານະປັດຈຸບັນຂອງອຸປະກອນທ່ານ ເພື່ອສົ່ງເປັນຂໍ້ຄວາມທາງອີເມວ. ມັນຈະໃຊ້ເວລາໜ້ອຍນຶ່ງ ໃນການເລີ່ມຕົ້ນການລາຍງານຂໍ້ຜິດພາດ ຈົນກວ່າຈະພ້ອມທີ່ຈະສົ່ງໄດ້, ກະລຸນາລໍຖ້າ."
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 80ff67eaf3a96..80cd4529142f7 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -218,6 +218,7 @@
"Telefono parinktys"
"Ekrano užraktas"
"Išjungiamas maitinimas"
+ "Skambutis pagalbos numeriu"
"Pranešimas apie riktą"
"Pranešti apie riktą"
"Bus surinkta informacija apie dabartinę įrenginio būseną ir išsiųsta el. pašto pranešimu. Šiek tiek užtruks, kol pranešimas apie riktą bus paruoštas siųsti; būkite kantrūs."
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 210d05b41fccc..1fd282eea65c9 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -216,6 +216,7 @@
"Tālruņa opcijas"
"Ekrāna bloķētājs"
"Strāvas padeve ir izslēgta."
+ "Ārkārtas"
"Kļūdu ziņojums"
"Kļūdu ziņojuma sagatavošana"
"Veicot šo darbību, tiks apkopota informācija par jūsu ierīces pašreizējo stāvokli un nosūtīta e-pasta ziņojuma veidā. Kļūdu ziņojuma pabeigšanai un nosūtīšanai var būt nepieciešams laiks. Lūdzu, esiet pacietīgs."
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index a24ad5711e110..a9db0f7f2932b 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -214,6 +214,7 @@
"Опции на телефон"
"Заклучи екран"
"Исклучи"
+ "Итен случај"
"Извештај за грешка"
"Земи извештај за грешки"
"Ова ќе собира информации за моменталната состојба на вашиот уред, за да ги испрати како порака по е-пошта. Тоа ќе одземе малку време почнувајќи од извештајот за грешки додека не се подготви за праќање; бидете трпеливи."
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index f91db2d1a495d..6d77ebb66b959 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -214,6 +214,7 @@
"ഫോൺ ഓപ്ഷനുകൾ"
"സ്ക്രീൻ ലോക്ക്"
"പവർ ഓഫാക്കുക"
+ "അടിയന്തിരാവശ്യം"
"ബഗ് റിപ്പോർട്ട്"
"ബഗ് റിപ്പോർട്ട് എടുക്കുക"
"ഒരു ഇമെയിൽ സന്ദേശമായി അയയ്ക്കുന്നതിന്, ഇത് നിങ്ങളുടെ നിലവിലെ ഉപകരണ നിലയെക്കുറിച്ചുള്ള വിവരങ്ങൾ ശേഖരിക്കും. ബഗ് റിപ്പോർട്ട് ആരംഭിക്കുന്നതിൽ നിന്ന് ഇത് അയയ്ക്കാനായി തയ്യാറാകുന്നതുവരെ അൽപ്പസമയമെടുക്കും; ക്ഷമയോടെ കാത്തിരിക്കുക."
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index f54a485768df2..4f579f8b28f6d 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -214,6 +214,7 @@
"Утасны сонголтууд"
"Дэлгэцний түгжээ"
"Унтраах"
+ "Яаралтай тусламж"
"Алдаа мэдээллэх"
"Согог репорт авах"
"Энэ таны төхөөрөмжийн одоогийн статусын талаарх мэдээллийг цуглуулах ба имэйл мессеж болгон илгээнэ. Алдааны мэдэгдлээс эхэлж илгээхэд бэлэн болоход хэсэг хугацаа зарцуулагдана тэвчээртэй байна уу."
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index c7d219133d8a5..e4121bf109c12 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -214,6 +214,7 @@
"फोन पर्याय"
"स्क्रीन लॉक"
"बंद"
+ "आणीबाणी"
"दोष अहवाल"
"दोष अहवाल घ्या"
"ई-मेल संदेश म्हणून पाठविण्यासाठी, हे आपल्या वर्तमान डिव्हाइस स्थितीविषयी माहिती संकलित करेल. दोष अहवाल प्रारंभ करण्यापासून तो पाठविण्यापर्यंत थोडा वेळ लागेल; कृपया धीर धरा."
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index c4123ab539edd..d0ca602c4f288 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -214,6 +214,7 @@
"Pilihan telefon"
"Kunci skrin"
"Matikan kuasa"
+ "Kecemasan"
"Laporan pepijat"
"Ambil laporan pepijat"
"Ini akan mengumpul maklumat tentang keadaan peranti semasa anda untuk dihantarkan sebagai mesej e-mel. Harap bersabar, mungkin perlu sedikit masa untuk memulakan laporan sehingga siap untuk dihantar."
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index 5dbf5174bafa3..59b741039567c 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -214,6 +214,7 @@
"ဖုန်းဆိုင်ရာရွေးချယ်မှုများ"
"ဖုန်းမျက်နှာပြင်အား သော့ချရန်"
"ပါဝါပိတ်ရန်"
+ "အရေးပေါ်"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်း"
"အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းအား ယူရန်"
"သင့်ရဲ့ လက်ရှိ စက်အခြေအနေ အချက်အလက်များကို အီးမေးလ် အနေဖြင့် ပေးပို့ရန် စုဆောင်းပါမည်။ အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းမှ ပေးပို့ရန် အသင့်ဖြစ်သည်အထိ အချိန် အနည်းငယ်ကြာမြင့်မှာ ဖြစ်သဖြင့် သည်းခံပြီး စောင့်ပါရန်"
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index d17d69eb07fca..bb73233d6b16f 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -214,6 +214,7 @@
"Telefoninnstillinger"
"Lås skjermen"
"Slå av"
+ "Nødssituasjon"
"Feilrapport"
"Utfør feilrapport"
"Informasjon om tilstanden til enheten din samles inn og sendes som en e-post. Det tar litt tid fra du starter feilrapporten til e-posten er klar, så vær tålmodig."
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 138c67f3bab94..74db0f164c861 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -214,6 +214,7 @@
"फोन विकल्पहरू"
"स्क्रिन बन्द"
"बन्द गर्नुहोस्"
+ "आपतकालीन"
"बग रिपोर्ट"
"बग रिपोर्ट लिनुहोस्"
"एउटा इमेल सन्देशको रूपमा पठाउनलाई यसले तपाईँको हालैको उपकरणको अवस्थाको बारेमा सूचना जम्मा गर्ने छ। बग रिपोर्ट सुरु गरेदेखि पठाउन तयार नभएसम्म यसले केही समय लिन्छ; कृपया धैर्य गर्नुहोस्।"
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index c8a804bdedf0f..f0be632da2da3 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -214,6 +214,7 @@
"Telefoonopties"
"Schermvergrendeling"
"Uitschakelen"
+ "Noodgeval"
"Foutenrapport"
"Foutenrapport genereren"
"Hiermee worden gegevens over de huidige status van je apparaat verzameld en als e-mail verzonden. Wanneer u een foutenrapport start, duurt het even voordat het kan worden verzonden. Even geduld alstublieft."
diff --git a/core/res/res/values-pa-rIN/strings.xml b/core/res/res/values-pa-rIN/strings.xml
index a4e5b89d30bbb..3e03487049d3d 100644
--- a/core/res/res/values-pa-rIN/strings.xml
+++ b/core/res/res/values-pa-rIN/strings.xml
@@ -214,6 +214,7 @@
"ਫੋਨ ਚੋਣਾਂ"
"ਸਕ੍ਰੀਨ ਲੌਕ"
"ਪਾਵਰ ਬੰਦ"
+ "ਸੰਕਟਕਾਲ"
"ਬਗ ਰਿਪੋਰਟ"
"ਬਗ ਰਿਪੋਰਟ ਲਓ"
"ਇਹ ਇੱਕ ਈ-ਮੇਲ ਸੁਨੇਹਾ ਭੇਜਣ ਲਈ, ਤੁਹਾਡੀ ਵਰਤਮਾਨ ਡੀਵਾਈਸ ਬਾਰੇ ਜਾਣਕਾਰੀ ਇਕੱਤਰ ਕਰੇਗਾ। ਬਗ ਰਿਪੋਰਟ ਸ਼ੁਰੂ ਕਰਨ ਵਿੱਚ ਥੋੜ੍ਹਾ ਸਮਾਂ ਲੱਗੇਗਾ ਜਦੋਂ ਤੱਕ ਇਹ ਭੇਜੇ ਜਾਣ ਲਈ ਤਿਆਰ ਨਾ ਹੋਵੇ, ਕਿਰਪਾ ਕਰਕੇ ਧੀਰਜ ਰੱਖੋ।"
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index ade4bdc679402..d2ea263adde64 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -218,6 +218,7 @@
"Opcje telefonu"
"Blokada ekranu"
"Wyłącz"
+ "Alarmowe"
"Zgłoszenie błędu"
"Zgłoś błąd"
"Informacje o bieżącym stanie urządzenia zostaną zebrane i wysłane e-mailem. Przygotowanie zgłoszenia błędu do wysłania chwilę potrwa, więc zachowaj cierpliwość."
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index c05931ec394af..98fe172002af7 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -214,6 +214,7 @@
"Opções do telefone"
"Bloquear tela"
"Desligar"
+ "Emergência"
"Relatório de bugs"
"Obter relatório de bugs"
"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 398193e311b6c..01ac4e114cb69 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -214,6 +214,7 @@
"Opções do telefone"
"Bloqueio de ecrã"
"Desligar"
+ "Emergência"
"Relatório de erros"
"Criar relatório de erros"
"Será recolhida informação sobre o estado atual do seu dispositivo a enviar através de uma mensagem de email. Demorará algum tempo até que o relatório de erro esteja pronto para ser enviado. Aguarde um pouco."
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index c05931ec394af..98fe172002af7 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -214,6 +214,7 @@
"Opções do telefone"
"Bloquear tela"
"Desligar"
+ "Emergência"
"Relatório de bugs"
"Obter relatório de bugs"
"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index c61b41a7b8013..4181014fda167 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -216,6 +216,7 @@
"Opțiuni telefon"
"Blocați ecranul"
"Opriți alimentarea"
+ "Urgență"
"Raport despre erori"
"Executați un raport despre erori"
"Acest raport va colecta informații despre starea actuală a dispozitivului, pentru a le trimite într-un e-mail. Aveți răbdare după pornirea raportului despre erori până când va fi gata de trimis."
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 54fb905f5043b..ab54097a79fe7 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -218,6 +218,7 @@
"Параметры телефона"
"Блокировка экрана"
"Отключить питание"
+ "Экстренный вызов"
"Отчет об ошибке"
"Отчет об ошибке"
"Информация о текущем состоянии вашего устройства будет собрана и отправлена по электронной почте. Подготовка отчета займет некоторое время."
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index f5878cee23f83..18fd240c2ad02 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -214,6 +214,7 @@
"දුරකථන විකල්ප"
"තිර අගුල"
"බලය අක්රිය කරන්න"
+ "හදිසි"
"දෝෂ වර්තාව"
"දෝෂ වාර්තාවක් ගන්න"
"ඊ-තැපැල් පණිවිඩයක් ලෙස යැවීමට මෙය ඔබගේ වත්මන් උපාංග තත්වය ගැන තොරතුරු එකතු කරනු ඇත. දෝෂ වාර්තාව ආරම්භ කර එය යැවීමට සූදානම් කරන තෙක් එයට කිසියම් කාලයක් ගතවනු ඇත; කරුණාකර ඉවසන්න."
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 2cb7ecd02a12e..f1a1174a634dc 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -218,6 +218,7 @@
"Možnosti telefónu"
"Zámka obrazovky"
"Vypnúť"
+ "Tiesňové volanie"
"Hlásenie o chybách"
"Vytvoriť hlásenie chyby"
"Týmto zhromaždíte informácie o aktuálnom stave zariadenia. Informácie je potom možné odoslať e-mailom, chvíľu však potrvá, kým bude hlásenie chyby pripravené na odoslanie. Prosíme vás preto o trpezlivosť."
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 9ece9eba333a4..08ce1ce4da887 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -218,6 +218,7 @@
"Možnosti telefona"
"Zaklep zaslona"
"Izklopi"
+ "Klic v sili"
"Poročilo o napakah"
"Ustvari poročilo o napakah"
"S tem bodo zbrani podatki o trenutnem stanju naprave, ki bodo poslani v e-poštnem sporočilu. Izvedba poročila o napakah in priprava trajata nekaj časa, zato bodite potrpežljivi."
diff --git a/core/res/res/values-sq-rAL/strings.xml b/core/res/res/values-sq-rAL/strings.xml
index 9dcd8e6cc0c88..4bd5678879373 100644
--- a/core/res/res/values-sq-rAL/strings.xml
+++ b/core/res/res/values-sq-rAL/strings.xml
@@ -214,6 +214,7 @@
"Opsionet e telefonit"
"Kyçja e ekranit"
"Fik"
+ "Urgjenca"
"Raporti i defekteve në kod"
"Merr raportin e defekteve në kod"
"Ky funksion mundëson mbledhjen e informacioneve mbi gjendjen aktuale të pajisjes për ta dërguar si mesazh mail-i. Do të duhet pak kohë nga nisja e raportit të defekteve në kod. Faleminderit për durimin."
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 4eb13f5ab4b0f..3a68c842bcba7 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -216,6 +216,7 @@
"Опције телефона"
"Закључај екран"
"Искључи"
+ "Хитни позив"
"Извештај о грешци"
"Направи извештај о грешци"
"Овим ће се прикупити информације о тренутном стању уређаја како би биле послате у поруци е-поште. Од започињања извештаја о грешци до тренутка за његово слање проћи ће неко време; будите стрпљиви."
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 21016d6d30fc5..a92975685c00c 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -214,6 +214,7 @@
"Telefonalternativ"
"Skärmlås"
"Stäng av"
+ "Nödsituation"
"Felrapport"
"Skapa felrapport"
"Nu hämtas information om aktuell status för enheten, som sedan skickas i ett e-postmeddelade. Det tar en liten stund innan felrapporten är färdig och kan skickas, så vi ber dig ha tålamod."
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 8d9b151fd2433..327ffed52b2db 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -212,6 +212,7 @@
"Chaguo za simu"
"Funga skrini"
"Zima"
+ "Dharura"
"Ripoti ya hitilafu"
"Chukua ripoti ya hitilafu"
"Hii itakusanya maelezo kuhusu hali ya kifaa chako kwa sasa, na itume kama barua pepe. Itachukua muda mfupi tangu ripoti ya hitilafu ianze kuzalishwa hadi iwe tayari kutumwa; vumilia."
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index d2df81264fc8c..abf64e4e94c5f 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -214,6 +214,7 @@
"தொலைபேசி விருப்பங்கள்"
"திரைப் பூட்டு"
"முடக்கு"
+ "அவசர அழைப்பு"
"பிழை அறிக்கை"
"பிழை அறிக்கையை எடு"
"உங்கள் நடப்புச் சாதன நிலையை மின்னஞ்சல் செய்தியாக அனுப்ப, அது குறித்த தகவலை இது சேகரிக்கும். பிழை அறிக்கையைத் தொடங்குவதில் இருந்து, அது அனுப்புவதற்குத் தயாராகும் வரை, இதற்குச் சிறிது நேரம் ஆகும்; பொறுமையாகக் காத்திருக்கவும்."
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index 1cfab6e687704..aff7d0e4b0edc 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -214,6 +214,7 @@
"ఫోన్ ఎంపికలు"
"స్క్రీన్ లాక్"
"పవర్ ఆఫ్ చేయి"
+ "అత్యవసరం"
"బగ్ నివేదిక"
"బగ్ నివేదికను సిద్ధం చేయి"
"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ నివేదికను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 581bb8135a51b..e470e86ff4319 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -214,6 +214,7 @@
"ตัวเลือกโทรศัพท์"
"ล็อกหน้าจอ"
"ปิดเครื่อง"
+ "เหตุฉุกเฉิน"
"รายงานข้อบกพร่อง"
"ใช้รายงานข้อบกพร่อง"
"การดำเนินการนี้จะรวบรวมข้อมูลเกี่ยวกับสถานะปัจจุบันของอุปกรณ์ของคุณ โดยจะส่งไปในรูปแบบข้อความอีเมล อาจใช้เวลาสักครู่ตั้งแต่เริ่มการสร้างรายงานข้อบกพร่องจนกระทั่งเสร็จสมบูรณ์ โปรดอดทนรอ"
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index df4dd9b8d5f0a..4bc1ace8423b9 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -214,6 +214,7 @@
"Pagpipilian sa telepono"
"Pag-lock sa screen"
"I-off"
+ "Emergency"
"Ulat sa bug"
"Kunin ang ulat sa bug"
"Mangongolekta ito ng impormasyon tungkol sa kasalukuyang katayuan ng iyong device, na ipapadala bilang mensaheng e-mail. Gugugol ito ng kaunting oras mula sa pagsisimula ng ulat sa bug hanggang sa handa na itong maipadala; mangyaring magpasensya."
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index a1f6f6491515e..4a3d219c9b7a6 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -214,6 +214,7 @@
"Telefon seçenekleri"
"Ekran kilidi"
"Kapat"
+ "Acil durum"
"Hata raporu"
"Hata raporu al"
"Bu rapor, e-posta iletisi olarak göndermek üzere cihazınızın şu anki durumuyla ilgili bilgi toplar. Hata raporu başlatıldıktan sonra hazır olması biraz zaman alabilir, lütfen sabırlı olun."
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index c8b37545dd01f..b53c1b6c12437 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -218,6 +218,7 @@
"Параметри телеф."
"Заблок. екран"
"Вимкнути"
+ "Екстрений виклик"
"Звіт про помилки"
"Звіт про помилку"
"Інформація про поточний стан вашого пристрою буде зібрана й надіслана електронною поштою. Підготовка звіту триватиме певний час."
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index 91a8c06e3a081..4e5f58501b520 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -214,6 +214,7 @@
"فون کے اختیارات"
"اسکرین لاک"
"پاور آف"
+ "ایمرجنسی"
"بگ کی اطلاع"
"بگ کی اطلاع لیں"
"ایک ای میل پیغام کے بطور بھیجنے کیلئے، یہ آپ کے موجودہ آلہ کی حالت کے بارے میں معلومات جمع کرے گا۔ بگ کی اطلاع شروع کرنے سے لے کر بھیجنے کیلئے تیار ہونے تک اس میں تھوڑا وقت لگے گا؛ براہ کرم تحمل سے کام لیں۔"
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index ed190a4e37b94..3493fcdb4c46b 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -214,6 +214,7 @@
"Telefon sozlamalari"
"Ekran qulfi"
"O‘chirish"
+ "Favqulodda chaqiruv"
"Nosozlik haqida ma’lumot berish"
"Xatoliklar hisoboti"
"Qurilmangiz holati haqidagi ma’lumotlar to‘planib, e-pochta orqali yuboriladi. Hisobotni tayyorlash biroz vaqt olishi mumkin."
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 3b86a379f8ce3..505d685f01073 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -214,6 +214,7 @@
"Tùy chọn điện thoại"
"Khoá màn hình"
"Tắt nguồn"
+ "Khẩn cấp"
"Báo cáo lỗi"
"Nhận báo cáo lỗi"
"Báo cáo này sẽ thu thập thông tin về tình trạng thiết bị hiện tại của bạn, để gửi dưới dạng thông báo qua email. Sẽ mất một chút thời gian kể từ khi bắt đầu báo cáo lỗi cho tới khi báo cáo sẵn sàng để gửi; xin vui lòng kiên nhẫn."
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index d7490c57f2e0d..0472726d5a0b7 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -214,6 +214,7 @@
"手机选项"
"屏幕锁定"
"关机"
+ "紧急呼救"
"错误报告"
"提交错误报告"
"这会收集有关当前设备状态的信息,并以电子邮件的形式进行发送。从开始生成错误报告到准备好发送需要一点时间,请耐心等待。"
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 6c896b2534ef2..a313caad3f75c 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -214,6 +214,7 @@
"手機選項"
"螢幕鎖定"
"關閉"
+ "緊急"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,並以電郵傳送給您。從開始建立錯誤報告到準備傳送需要一段時間,請耐心等候。"
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f3691cd741989..c669d4bfc5bf0 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -214,6 +214,7 @@
"電話選項"
"螢幕鎖定"
"關機"
+ "緊急電話"
"錯誤報告"
"取得錯誤報告"
"這會收集您目前裝置狀態的相關資訊,以便透過電子郵件傳送。從錯誤報告開始建立到準備傳送的這段過程可能需要一點時間,敬請耐心等候。"
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index a2f5c13bb1b0c..80d24fd44bf93 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -214,6 +214,7 @@
"Okukhethwa kukho kwefoni"
"Ukuvala isikrini"
"Vala amandla"
+ "Isimo esiphuthumayo"
"Umbiko wephutha"
"Thatha umbiko wesiphazamiso"
"Lokhu kuzoqoqa ulwazi mayelana nesimo samanje sedivayisi yakho, ukuthumela imilayezo ye-imeyili. Kuzothatha isikhathi esincane kusuka ekuqaleni umbiko wesiphazamiso uze ulungele ukuthunyelwa; sicela ubekezele."
From 89aa6fb4d87b5a279150f15ad1f9bcfa03e3a261 Mon Sep 17 00:00:00 2001
From: Hugo Benichi
Date: Tue, 11 Oct 2016 11:39:39 +0900
Subject: [PATCH 11/98] DhcpClient: guard against failure to parse packets
DhcpPacket.decodeFullPacket() is not exception safe and can throw
various runtime exceptions when trying to parse malicious or malformed
packets.
This patch adds a generic catch-all-exception in DhcpClient to avoid
propagating the exception and killing the framework process on reception
of such malformed packets.
Bug: 31850211
Change-Id: I2e723a792ff067ada2834da875700d4df16c5159
---
services/net/java/android/net/dhcp/DhcpClient.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/services/net/java/android/net/dhcp/DhcpClient.java b/services/net/java/android/net/dhcp/DhcpClient.java
index 9ee9cf4fbcc62..87e4edc5ef1db 100644
--- a/services/net/java/android/net/dhcp/DhcpClient.java
+++ b/services/net/java/android/net/dhcp/DhcpClient.java
@@ -43,6 +43,7 @@ import android.os.SystemClock;
import android.system.ErrnoException;
import android.system.Os;
import android.system.PacketSocketAddress;
+import android.util.EventLog;
import android.util.Log;
import android.util.TimeUtils;
@@ -359,6 +360,14 @@ public class DhcpClient extends BaseDhcpStateMachine {
if (!stopped) {
Log.e(TAG, "Read error", e);
}
+ } catch (Exception e) {
+ // SafetyNet logging for b/31850211
+ int snetTagId = 0x534e4554;
+ String bugId = "31850211";
+ int uid = -1;
+ String data = e.getClass().getName();
+ EventLog.writeEvent(snetTagId, bugId, uid, data);
+ Log.e(TAG, "Failed to parse DHCP packet", e);
}
}
maybeLog("Receive thread stopped");
From 9748d76be90a90c112874fc7ce46e5ca279488eb Mon Sep 17 00:00:00 2001
From: George French
Date: Wed, 7 Sep 2016 09:59:32 -0700
Subject: [PATCH 12/98] docs: Update startService() & bindService()
documentation (Proj13)
Updated Update startService() and bindService() docs to mention that they
no longer support implicit intent. And mentioned that the Intellegent
job scheduling is now the preferred method for launching services.
We also performed a copy edit, implementing Google styles.
Bug: 18333456
Change-Id: I2b2ec666be870aea15045d30fbc822256d1b9a81
---
.../google/play/billing/billing_integrate.jd | 267 ++++-----
docs/html/guide/components/bound-services.jd | 276 +++++-----
docs/html/guide/components/fundamentals.jd | 316 ++++++-----
docs/html/guide/components/intents-filters.jd | 292 +++++-----
docs/html/guide/components/services.jd | 517 +++++++++---------
docs/html/training/articles/security-tips.jd | 470 ++++++++--------
.../html/training/location/display-address.jd | 130 ++---
.../training/run-background-service/index.jd | 14 +-
8 files changed, 1204 insertions(+), 1078 deletions(-)
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index 5d6b3a8f2e3ff..506a44006bdba 100755
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -9,18 +9,18 @@ page.tags="inapp, billing, iap"
In this document
- Adding the AIDL file
- - Updating Your Manifest
+ - Updating your manifest
- Creating a ServiceConnection
- - Making In-app Billing Requests
+
- Making In-app Billing requests
- - Querying Items Available for Purchase
-
-
- Purchasing an Item
- - Querying Purchased Items
- - Consuming a Purchase
- - Implementing Subscriptions
+ - Querying items available for purchase
-
+
- Purchasing an item
+ - Querying purchased items
+ - Consuming a purchase
+ - Implementing subscriptions
- - Securing Your App
+
- Securing your app
Reference
@@ -42,7 +42,7 @@ page.tags="inapp, billing, iap"
In-app Billing on Google Play provides a straightforward, simple interface
for sending In-app Billing requests and managing In-app Billing transactions
using Google Play. The information below covers the basics of how to make
- calls from your application to the In-app Billing service using the Version 3
+ calls from your application to the In-app Billing service using the In-app Billing Version 3
API.
@@ -51,26 +51,25 @@ page.tags="inapp, billing, iap"
your application, see the Selling In-app Products
training class. The training class provides a complete sample In-app Billing
- application, including convenience classes to handle key tasks related to
- setting up your connection, sending billing requests and processing responses
+ application, including convenience classes to handle key tasks that are related to
+ setting up your connection, sending billing requests, processing responses
from Google Play, and managing background threading so that you can make
In-app Billing calls from your main activity.
- Before you start, be sure that you read the In-app Billing
- Overview to familiarize yourself with concepts that will make it easier
+ Overview to familiarize yourself with concepts that make it easier
for you to implement In-app Billing.
-To implement In-app Billing in your application, you need to do the
-following:
+Complete these steps to implement In-app Billing in your application:
- Add the In-app Billing library to your project.
- Update your {@code AndroidManifest.xml} file.
- - Create a {@code ServiceConnection} and bind it to
+
- Create a {@code ServiceConnection} and bind it to the
{@code IInAppBillingService}.
- Send In-app Billing requests from your application to
{@code IInAppBillingService}.
@@ -79,55 +78,56 @@ following:
Adding the AIDL file to your project
-{@code IInAppBillingService.aidl} is an Android Interface Definition
+
The {@code IInAppBillingService.aidl} is an Android Interface Definition
Language (AIDL) file that defines the interface to the In-app Billing Version
-3 service. You will use this interface to make billing requests by invoking IPC
+3 service. You can use this interface to make billing requests by invoking IPC
method calls.
-To get the AIDL file:
+
+Complete these steps to get the AIDL file:
- Open the Android SDK Manager.
- In the SDK Manager, expand the {@code Extras} section.
- Select Google Play Billing Library.
- Click Install packages to complete the download.
-The {@code IInAppBillingService.aidl} file will be installed to {@code /extras/google/play_billing/}.
+The {@code IInAppBillingService.aidl} file will be installed to {@code <sdk>/extras/google/play_billing/}.
-To add the AIDL to your project:
+Complete these steps to add the AIDL to your project:
- - First, download the Google Play Billing Library to your Android project:
+
- Download the Google Play Billing Library to your Android project:
- Select Tools > Android > SDK Manager.
- Under Appearance & Behavior > System Settings > Android SDK,
select the SDK Tools tab to select and download Google Play Billing
Library.
- - Next, copy the {@code IInAppBillingService.aidl} file to your project.
+
- Copy the {@code IInAppBillingService.aidl} file to your project.
- - If you are using Android Studio:
+
- If you are using Android Studio, complete these steps to copy the file:
- Navigate to {@code src/main} in the Project tool window.
- - Select File > New > Directory and enter {@code aidl} in the
- New Directory window, then select OK.
+
- Select File > New > Directory, enter {@code aidl} in the
+ New Directory window, and select OK.
-
- Select File > New > Package and enter
- {@code com.android.vending.billing} in the New Package window, then select
+
- Select File > New > Package, enter
+ {@code com.android.vending.billing} in the New Package window, and select
OK.
- Using your operating system file explorer, navigate to
- {@code /extras/google/play_billing/}, copy the
+ {@code <sdk>/extras/google/play_billing/}, copy the
{@code IInAppBillingService.aidl} file, and paste it into the
{@code com.android.vending.billing} package in your project.
- - If you are developing in a non-Android Studio environment: Create the
- following directory {@code /src/com/android/vending/billing} and copy the
- {@code IInAppBillingService.aidl} file into this directory. Put the AIDL
- file into your project and use the Gradle tool to build your project so that
- the
IInAppBillingService.java file gets generated.
+ - If you are developing in a non-Android Studio environment, create the
+ following directory: {@code /src/com/android/vending/billing}. Copy the
+ {@code IInAppBillingService.aidl} file into this directory. Place the AIDL
+ file in your project and use the Gradle tool to build your project so that
+ the
IInAppBillingService.java file is generated.
@@ -137,16 +137,16 @@ method calls.
-Updating Your App's Manifest
+Updating your app's manifest
In-app billing relies on the Google Play application, which handles all
- communication between your application and the Google Play server. To use the
+ of the communication between your application and the Google Play server. To use the
Google Play application, your application must request the proper permission.
You can do this by adding the {@code com.android.vending.BILLING} permission
to your AndroidManifest.xml file. If your application does not declare the
In-app Billing permission, but attempts to send billing requests, Google Play
- will refuse the requests and respond with an error.
+ refuses the requests and responds with an error.
@@ -182,7 +182,7 @@ method calls.
onServiceDisconnected} and {@link
android.content.ServiceConnection#onServiceConnected onServiceConnected}
methods to get a reference to the {@code IInAppBillingService} instance after
- a connection has been established.
+ a connection is established.
@@ -208,20 +208,25 @@ ServiceConnection mServiceConn = new ServiceConnection() {
bindService} method. Pass the method an {@link android.content.Intent} that
references the In-app Billing service and an instance of the {@link
android.content.ServiceConnection} that you created, and explicitly set the
- Intent's target package name to com.android.vending — the
+ Intent's target package name to com.android.vending—the
package name of Google Play app.
Caution: To protect the security of billing transactions,
- always make sure to explicitly set the intent's target package name to
+ always explicitly set the intent's target package name to
com.android.vending, using {@link
- android.content.Intent#setPackage(java.lang.String) setPackage()} as shown in
- the example below. Setting the package name explicitly ensures that
+ android.content.Intent#setPackage(java.lang.String) setPackage()}.
+ Setting the package name explicitly ensures that
only the Google Play app can handle billing requests from your app,
preventing other apps from intercepting those requests.
+
+ The following code sample demonstrates how to set the intent's target package
+ to protect the security of transactions:
+
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -233,6 +238,13 @@ public void onCreate(Bundle savedInstanceState) {
}
+Caution: To ensure that your app is secure, always use an
+explicit intent when starting a {@link android.app.Service} and do not declare intent filters for
+your services. Using an implicit intent to start a service is a security hazard because you cannot
+be certain of the service that will respond to the intent, and the user cannot see which service
+starts. Beginning with Android 5.0 (API level 21), the system throws an exception if you call
+{@link android.content.Context#bindService bindService()} with an implicit intent.
+
You can now use the mService reference to communicate with the Google Play
service.
@@ -242,10 +254,14 @@ public void onCreate(Bundle savedInstanceState) {
Important: Remember to unbind from the In-app Billing
service when you are done with your {@link android.app.Activity}. If you
don’t unbind, the open service connection could cause your device’s
- performance to degrade. This example shows how to perform the unbind
+ performance to degrade.
+
+
+
+ This example shows how to perform the unbind
operation on a service connection to In-app Billing called {@code
mServiceConn} by overriding the activity’s {@link
- android.app.Activity#onDestroy onDestroy} method.
+ android.app.Activity#onDestroy onDestroy} method:
@@ -264,29 +280,29 @@ public void onDestroy() {
"{@docRoot}training/in-app-billing/preparing-iab-app.html">Selling In-app
Products training class and associated sample.
-Making In-app Billing Requests
+Making In-app Billing requests
- Once your application is connected to Google Play, you can initiate purchase
+ After your application is connected to Google Play, you can initiate purchase
requests for in-app products. Google Play provides a checkout interface for
- users to enter their payment method, so your application does not need to
+ users to enter their payment method, so your application doesn't need to
handle payment transactions directly. When an item is purchased, Google Play
recognizes that the user has ownership of that item and prevents the user
from purchasing another item with the same product ID until it is consumed.
- You can control how the item is consumed in your application, and notify
+ You can control how the item is consumed in your application and notify
Google Play to make the item available for purchase again. You can also query
- Google Play to quickly retrieve the list of purchases that were made by the
- user. This is useful, for example, when you want to restore the user's
+ Google Play to quickly retrieve the list of purchases that the
+ user made. This is useful, for example, when you want to restore the user's
purchases when your user launches your app.
-Querying for Items Available for Purchase
+Querying for items available for purchase
In your application, you can query the item details from Google Play using
the In-app Billing Version 3 API. To pass a request to the In-app Billing
- service, first create a {@link android.os.Bundle} that contains a String
+ service, create a {@link android.os.Bundle} that contains a String
{@link java.util.ArrayList} of product IDs with key "ITEM_ID_LIST", where
- each string is a product ID for an purchasable item.
+ each string is a product ID for an purchasable item. Here is an example:
@@ -299,9 +315,9 @@ querySkus.putStringArrayList(“ITEM_ID_LIST”, skuList);
To retrieve this information from Google Play, call the {@code getSkuDetails}
- method on the In-app Billing Version 3 API, and pass the method the In-app
+ method on the In-app Billing Version 3 API and pass the In-app
Billing API version (“3”), the package name of your calling app, the purchase
- type (“inapp”), and the {@link android.os.Bundle} that you created.
+ type (“inapp”), and the {@link android.os.Bundle} that you created, into the method:
@@ -310,35 +326,35 @@ Bundle skuDetails = mService.getSkuDetails(3,
- If the request is successful, the returned {@link android.os.Bundle}has a
+ If the request is successful, the returned {@link android.os.Bundle} has a
response code of {@code BILLING_RESPONSE_RESULT_OK} (0).
- Warning: Do not call the {@code getSkuDetails} method on the
- main thread. Calling this method triggers a network request which could block
+ Warning: Don't call the {@code getSkuDetails} method on the
+ main thread. Calling this method triggers a network request that could block
your main thread. Instead, create a separate thread and call the {@code
- getSkuDetails} method from inside that thread.
+ getSkuDetails} method from inside of that thread.
- To see all the possible response codes from Google Play, see In-app
Billing Reference.
The query results are stored in a String ArrayList with key {@code
- DETAILS_LIST}. The purchase information is stored in the String in JSON
- format. To see the types of product detail information that are returned, see
+ DETAILS_LIST}. The purchase information is stored within the String in JSON
+ format. To view the types of product detail information that are returned, see
In-app
Billing Reference.
- In this example, you are retrieving the prices for your in-app items from the
- skuDetails {@link android.os.Bundle} returned from the previous code snippet.
+ In this example shows how to retrieve the prices for your in-app items from the
+ skuDetails {@link android.os.Bundle} that is returned from the previous code snippet:
@@ -357,15 +373,15 @@ if (response == 0) {
}
-Purchasing an Item
+Purchasing an item
To start a purchase request from your app, call the {@code getBuyIntent}
- method on the In-app Billing service. Pass in to the method the In-app
+ method on the In-app Billing service. Pass the In-app
Billing API version (“3”), the package name of your calling app, the product
ID for the item to purchase, the purchase type (“inapp” or "subs"), and a
- {@code developerPayload} String. The {@code developerPayload} String is used
+ {@code developerPayload} String into the method. The {@code developerPayload} String is used
to specify any additional arguments that you want Google Play to send back
- along with the purchase information.
+ along with the purchase information. Here is an example:
@@ -377,10 +393,13 @@ Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(),
If the request is successful, the returned {@link android.os.Bundle} has a
response code of {@code BILLING_RESPONSE_RESULT_OK} (0) and a {@link
android.app.PendingIntent} that you can use to start the purchase flow. To
- see all the possible response codes from Google Play, see In-app
- Billing Reference. Next, extract a {@link android.app.PendingIntent} from
- the response {@link android.os.Bundle} with key {@code BUY_INTENT}.
+ Billing Reference.
+
+
+ The next step is to extract a {@link android.app.PendingIntent} from
+ the response {@link android.os.Bundle} with key {@code BUY_INTENT}, as shown here:
@@ -390,8 +409,8 @@ PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
To complete the purchase transaction, call the {@link
android.app.Activity#startIntentSenderForResult startIntentSenderForResult}
- method and use the {@link android.app.PendingIntent} that you created. In
- this example, you are using an arbitrary value of 1001 for the request code.
+ method and use the {@link android.app.PendingIntent} that you created. This
+ example uses an arbitrary value of 1001 for the request code:
@@ -404,9 +423,9 @@ startIntentSenderForResult(pendingIntent.getIntentSender(),
Google Play sends a response to your {@link android.app.PendingIntent} to the
{@link android.app.Activity#onActivityResult onActivityResult} method of your
application. The {@link android.app.Activity#onActivityResult
- onActivityResult} method will have a result code of {@code
- Activity.RESULT_OK} (1) or {@code Activity.RESULT_CANCELED} (0). To see the
- types of order information that is returned in the response {@link
+ onActivityResult} method has a result code of {@code
+ Activity.RESULT_OK} (1) or {@code Activity.RESULT_CANCELED} (0). To view the
+ types of order information that are returned in the response {@link
android.content.Intent}, see In-app
Billing Reference.
@@ -415,7 +434,7 @@ startIntentSenderForResult(pendingIntent.getIntentSender(),
The purchase data for the order is a String in JSON format that is mapped to
the {@code INAPP_PURCHASE_DATA} key in the response {@link
- android.content.Intent}, for example:
+ android.content.Intent}. Here is an example:
@@ -436,13 +455,13 @@ startIntentSenderForResult(pendingIntent.getIntentSender(),
long. Pass this entire token to other methods, such as when you consume the
purchase, as described in Consume
- a Purchase. Do not abbreviate or truncate this token; you must save and
+ a Purchase. Don't abbreviate or truncate this token; you must save and
return the entire token.
- Continuing from the previous example, you get the response code, purchase
- data, and signature from the response {@link android.content.Intent}.
+ Continuing from the previous example, you receive the response code, purchase
+ data, and signature from the response {@link android.content.Intent}:
@@ -472,23 +491,23 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Security Recommendation: When you send a purchase request,
create a String token that uniquely identifies this purchase request and
- include this token in the {@code developerPayload}.You can use a randomly
- generated string as the token. When you receive the purchase response from
- Google Play, make sure to check the returned data signature, the {@code
+ include this token in the {@code developerPayload}. You can use a randomly-generated
+ string as the token. When you receive the purchase response from
+ Google Play, ensure that you check the returned data signature, the {@code
orderId}, and the {@code developerPayload} String. For added security, you
- should perform the checking on your own secure server. Make sure to verify
+ should perform the checking on your own secure server. Verify
that the {@code orderId} is a unique value that you have not previously
- processed, and the {@code developerPayload} String matches the token that you
+ processed and that the {@code developerPayload} String matches the token that you
sent previously with the purchase request.
-Querying for Purchased Items
+Querying for purchased items
- To retrieve information about purchases made by a user from your app, call
+ To retrieve information about purchases that are made by a user from your app, call
the {@code getPurchases} method on the In-app Billing Version 3 service. Pass
- in to the method the In-app Billing API version (“3”), the package name of
- your calling app, and the purchase type (“inapp” or "subs").
+ the In-app Billing API version (“3”), the package name of
+ your calling app, and the purchase type (“inapp” or "subs") into the method. Here is an example:
@@ -507,18 +526,18 @@ Bundle ownedItems = mService.getPurchases(3, getPackageName(), "inapp", null);
To improve performance, the In-app Billing service returns only up to 700
products that are owned by the user when {@code getPurchase} is first called.
If the user owns a large number of products, Google Play includes a String
- token mapped to the key {@code INAPP_CONTINUATION_TOKEN} in the response
+ token that is mapped to the key {@code INAPP_CONTINUATION_TOKEN} in the response
{@link android.os.Bundle} to indicate that more products can be retrieved.
- Your application can then make a subsequent {@code getPurchases} call, and
+ Your application can then make a subsequent {@code getPurchases} call and
pass in this token as an argument. Google Play continues to return a
continuation token in the response {@link android.os.Bundle} until all
- products that are owned by the user has been sent to your app.
+ of the products that are owned by the user are sent to your app.
-For more information about the data returned by {@code getPurchases}, see
+
For more information about the data that is returned by {@code getPurchases}, see
In-app Billing Reference. The following example shows how you can
- retrieve this data from the response.
+ retrieve this data from the response:
@@ -548,26 +567,26 @@ if (response == 0) {
-Consuming a Purchase
+Consuming a purchase
You can use the In-app Billing Version 3 API to track the ownership of
purchased in-app products in Google Play. Once an in-app product is
- purchased, it is considered to be "owned" and cannot be purchased from Google
+ purchased, it is considered to be owned and cannot be purchased from Google
Play. You must send a consumption request for the in-app product before
Google Play makes it available for purchase again.
-
+
Important: Managed in-app products are consumable, but
subscriptions are not.
- How you use the consumption mechanism in your app is up to you. Typically,
- you would implement consumption for in-app products with temporary benefits
+ The way that you use the consumption mechanism in your app is up to you. Typically,
+ you implement consumption for in-app products with temporary benefits
that users may want to purchase multiple times (for example, in-game currency
- or equipment). You would typically not want to implement consumption for
+ or equipment). You typically don't want to implement consumption for
in-app products that are purchased once and provide a permanent effect (for
example, a premium upgrade).
@@ -576,21 +595,21 @@ if (response == 0) {
To record a purchase consumption, send the {@code consumePurchase} method to
the In-app Billing service and pass in the {@code purchaseToken} String value
that identifies the purchase to be removed. The {@code purchaseToken} is part
- of the data returned in the {@code INAPP_PURCHASE_DATA} String by the Google
- Play service following a successful purchase request. In this example, you
- are recording the consumption of a product that is identified with the {@code
- purchaseToken} in the {@code token} variable.
+ of the data that is returned in the {@code INAPP_PURCHASE_DATA} String by the Google
+ Play service following a successful purchase request. This example
+ records the consumption of a product that is identified with the {@code
+ purchaseToken} in the {@code token} variable:
int response = mService.consumePurchase(3, getPackageName(), token);
-
- Warning: Do not call the {@code consumePurchase} method on
- the main thread. Calling this method triggers a network request which could
+
+ Warning: Don't call the {@code consumePurchase} method on
+ the main thread. Calling this method triggers a network request that could
block your main thread. Instead, create a separate thread and call the {@code
- consumePurchase} method from inside that thread.
+ consumePurchase} method from inside of that thread.
@@ -600,20 +619,20 @@ int response = mService.consumePurchase(3, getPackageName(), token);
purchased.
-
- Security Recommendation: You must send a consumption request
+
+ Security Recommendation: Send a consumption request
before provisioning the benefit of the consumable in-app purchase to the
- user. Make sure that you have received a successful consumption response from
+ user. Ensure that you receive a successful consumption response from
Google Play before you provision the item.
-Implementing Subscriptions
+Implementing subscriptions
Launching a purchase flow for a subscription is similar to launching the
purchase flow for a product, with the exception that the product type must be set
to "subs". The purchase result is delivered to your Activity's
{@link android.app.Activity#onActivityResult onActivityResult} method, exactly
-as in the case of in-app products.
+as in the case of in-app products. Here is an example:
Bundle bundle = mService.getBuyIntent(3, "com.example.myapp",
@@ -629,18 +648,18 @@ if (bundle.getInt(RESPONSE_CODE) == BILLING_RESPONSE_RESULT_OK) {
To query for active subscriptions, use the {@code getPurchases} method, again
-with the product type parameter set to "subs".
+with the product type parameter set to "subs":
Bundle activeSubs = mService.getPurchases(3, "com.example.myapp",
"subs", continueToken);
-The call returns a {@code Bundle} with all the active subscriptions owned by
-the user. Once a subscription expires without renewal, it will no longer appear
+
The call returns a {@code Bundle} with all of the active subscriptions that are owned by
+the user. When a subscription expires without renewal, it no longer appears
in the returned {@code Bundle}.
-Securing Your Application
+Securing your application
To help ensure the integrity of the transaction information that is sent to
your application, Google Play signs the JSON string that contains the response
@@ -648,21 +667,21 @@ data for a purchase order. Google Play uses the private key that is associated
with your application in the Developer Console to create this signature. The
Developer Console generates an RSA key pair for each application.
-
Note:To find the public key portion of this key
-pair, open your application's details in the Developer Console, then click on
-Services & APIs, and look at the field titled
+
Note: To find the public key portion of this key
+pair, open your application's details in the Developer Console, click
+Services & APIs, and review the field titled
Your License Key for This Application.
-The Base64-encoded RSA public key generated by Google Play is in binary
+
The Base64-encoded RSA public key that is generated by Google Play is in binary
encoded, X.509 subjectPublicKeyInfo DER SEQUENCE format. It is the same public
key that is used with Google Play licensing.
-When your application receives this signed response you can
+
When your application receives this signed response, you can
use the public key portion of your RSA key pair to verify the signature.
-By performing signature verification you can detect responses that have
+By performing signature verification, you can detect any responses that have
been tampered with or that have been spoofed. You can perform this signature
verification step in your application; however, if your application connects
-to a secure remote server then we recommend that you perform the signature
+to a secure remote server, Google recommends that you perform the signature
verification on that server.
For more information about best practices for security and design, see
In this document
- - The Basics
- - Creating a Bound Service
+
- The basics
+ - Creating a bound service
- Extending the Binder class
- Using a Messenger
- - Binding to a Service
+
- Binding to a service
- Additional notes
- - Managing the Lifecycle of a Bound Service
+ - Managing the lifecycle of a bound service
Key classes
@@ -32,9 +32,13 @@ parent.link=services.html
Samples
- - {@code
+
-
+ {@code
RemoteService}
- - {@code
+
-
+ {@code
LocalService}
@@ -45,19 +49,23 @@ parent.link=services.html
-A bound service is the server in a client-server interface. A bound service allows components
-(such as activities) to bind to the service, send requests, receive responses, and even perform
+
A bound service is the server in a client-server interface. It allows components
+(such as activities) to bind to the service, send requests, receive responses, and perform
interprocess communication (IPC). A bound service typically lives only while it serves another
application component and does not run in the background indefinitely.
-This document shows you how to create a bound service, including how to bind
-to the service from other application components. However, you should also refer to the Services document for additional
-information about services in general, such as how to deliver notifications from a service, set
-the service to run in the foreground, and more.
+Note: If your app targets Android 5.0 (API level 21) or later,
+it's recommended that you use the {@link android.app.job.JobScheduler} to execute background
+ services. For more information about {@link android.app.job.JobScheduler}, see its
+ {@link android.app.job.JobScheduler API-reference documentation}.
+This document describes how to create a bound service, including how to bind
+to the service from other application components. For additional information about services in
+ general, such as how to deliver notifications from a service and set the service to run
+ in the foreground, refer to the
+ Services document.
-The Basics
+The basics
A bound service is an implementation of the {@link android.app.Service} class that allows
other applications to bind to it and interact with it. To provide binding for a
@@ -67,57 +75,61 @@ clients can use to interact with the service.
-
Binding to a Started Service
+
Binding to a started service
As discussed in the Services
-document, you can create a service that is both started and bound. That is, the service can be
-started by calling {@link android.content.Context#startService startService()}, which allows the
-service to run indefinitely, and also allow a client to bind to the service by calling {@link
+document, you can create a service that is both started and bound. That is, you can start a
+ service by calling {@link android.content.Context#startService startService()}, which allows the
+service to run indefinitely, and you can also allow a client to bind to the service by
+ calling {@link
android.content.Context#bindService bindService()}.
If you do allow your service to be started and bound, then when the service has been
-started, the system does not destroy the service when all clients unbind. Instead, you must
-explicitly stop the service, by calling {@link android.app.Service#stopSelf stopSelf()} or {@link
+started, the system does not destroy the service when all clients unbind.
+ Instead, you must
+explicitly stop the service by calling {@link android.app.Service#stopSelf stopSelf()} or {@link
android.content.Context#stopService stopService()}.
-
Although you should usually implement either {@link android.app.Service#onBind onBind()}
-or {@link android.app.Service#onStartCommand onStartCommand()}, it's sometimes necessary to
+
Although you usually implement either {@link android.app.Service#onBind onBind()}
+or {@link android.app.Service#onStartCommand onStartCommand()}, it's sometimes
+ necessary to
implement both. For example, a music player might find it useful to allow its service to run
indefinitely and also provide binding. This way, an activity can start the service to play some
music and the music continues to play even if the user leaves the application. Then, when the user
-returns to the application, the activity can bind to the service to regain control of playback.
+returns to the application, the activity can bind to the service to regain control of
+ playback.
-
Be sure to read the section about Managing the Lifecycle of a Bound
-Service, for more information about the service lifecycle when adding binding to a
-started service.
+
For more information about the service lifecycle when adding binding to a started service,
+ see Managing the lifecycle of a bound Service.
-A client can bind to the service by calling {@link android.content.Context#bindService
+
A client can bind to a service by calling {@link android.content.Context#bindService
bindService()}. When it does, it must provide an implementation of {@link
android.content.ServiceConnection}, which monitors the connection with the service. The {@link
-android.content.Context#bindService bindService()} method returns immediately without a value, but
+android.content.Context#bindService bindService()} method returns immediately without a
+ value, but
when the Android system creates the connection between the
client and service, it calls {@link
android.content.ServiceConnection#onServiceConnected onServiceConnected()} on the {@link
android.content.ServiceConnection}, to deliver the {@link android.os.IBinder} that
the client can use to communicate with the service.
-Multiple clients can connect to the service at once. However, the system calls your service's
-{@link android.app.Service#onBind onBind()} method to retrieve the {@link android.os.IBinder} only
+
Multiple clients can connect to a service simultaneously. However, the system calls your service's
+{@link android.app.Service#onBind onBind()} method to retrieve the
+ {@link android.os.IBinder} only
when the first client binds. The system then delivers the same {@link android.os.IBinder} to any
-additional clients that bind, without calling {@link android.app.Service#onBind onBind()} again.
+additional clients that bind, without calling {@link android.app.Service#onBind onBind()}
+ again.
-When the last client unbinds from the service, the system destroys the service (unless the
-service was also started by {@link android.content.Context#startService startService()}).
+When the last client unbinds from the service, the system destroys the service, unless the
+service was also started by {@link android.content.Context#startService startService()}.
-When you implement your bound service, the most important part is defining the interface
-that your {@link android.app.Service#onBind onBind()} callback method returns. There are a few
-different ways you can define your service's {@link android.os.IBinder} interface and the following
-section discusses each technique.
+The most important part of your bound service implementation is defining the interface
+that your {@link android.app.Service#onBind onBind()} callback method returns. The following
+section discusses several different ways that you can define your service's
+ {@link android.os.IBinder} interface.
-
-
-Creating a Bound Service
+Creating a bound service
When creating a service that provides binding, you must provide an {@link android.os.IBinder}
that provides the programming interface that clients can use to interact with the service. There
@@ -125,12 +137,14 @@ are three ways you can define the interface:
- Extending the Binder class
- - If your service is private to your own application and runs in the same process as the client
-(which is common), you should create your interface by extending the {@link android.os.Binder} class
+
- If your service is private to your own application and runs in the same process
+ as the client
+(which is common), you should create your interface by extending the {@link android.os.Binder}
+ class
and returning an instance of it from
{@link android.app.Service#onBind onBind()}. The client receives the {@link android.os.Binder} and
can use it to directly access public methods available in either the {@link android.os.Binder}
-implementation or even the {@link android.app.Service}.
+implementation or the {@link android.app.Service}.
This is the preferred technique when your service is merely a background worker for your own
application. The only reason you would not create your interface this way is because
your service is used by other applications or across separate processes.
@@ -143,20 +157,20 @@ android.os.Message} objects. This {@link android.os.Handler}
is the basis for a {@link android.os.Messenger} that can then share an {@link android.os.IBinder}
with the client, allowing the client to send commands to the service using {@link
android.os.Message} objects. Additionally, the client can define a {@link android.os.Messenger} of
-its own so the service can send messages back.
+its own, so the service can send messages back.
This is the simplest way to perform interprocess communication (IPC), because the {@link
android.os.Messenger} queues all requests into a single thread so that you don't have to design
your service to be thread-safe.
- - Using AIDL
- - AIDL (Android Interface Definition Language) performs all the work to decompose objects into
-primitives that the operating system can understand and marshall them across processes to perform
+
- Using AIDL
+ - Android Interface Definition Language (AIDL) decomposes objects into
+primitives that the operating system can understand and marshals them across processes to perform
IPC. The previous technique, using a {@link android.os.Messenger}, is actually based on AIDL as
its underlying structure. As mentioned above, the {@link android.os.Messenger} creates a queue of
all the client requests in a single thread, so the service receives requests one at a time. If,
however, you want your service to handle multiple requests simultaneously, then you can use AIDL
-directly. In this case, your service must be capable of multi-threading and be built thread-safe.
+directly. In this case, your service must be thread-safe and capable of multi-threading.
To use AIDL directly, you must
create an {@code .aidl} file that defines the programming interface. The Android SDK tools use
this file to generate an abstract class that implements the interface and handles IPC, which you
@@ -164,19 +178,18 @@ can then extend within your service.
- Note: Most applications should not use AIDL to
+
Note: Most applications shouldn't use AIDL to
create a bound service, because it may require multithreading capabilities and
-can result in a more complicated implementation. As such, AIDL is not suitable for most applications
+can result in a more complicated implementation. As such, AIDL is not suitable for
+ most applications
and this document does not discuss how to use it for your service. If you're certain that you need
to use AIDL directly, see the AIDL
document.
-
-
-
Extending the Binder class
-If your service is used only by the local application and does not need to work across processes,
+
If your service is used only by the local application and does not need to
+ work across processes,
then you can implement your own {@link android.os.Binder} class that provides your client direct
access to public methods in the service.
@@ -187,13 +200,14 @@ background.
Here's how to set it up:
- - In your service, create an instance of {@link android.os.Binder} that either:
+
- In your service, create an instance of {@link android.os.Binder} that does
+ one of the following:
- - contains public methods that the client can call
- - returns the current {@link android.app.Service} instance, which has public methods the
-client can call
- - or, returns an instance of another class hosted by the service with public methods the
-client can call
+ - Contains public methods that the client can call.
+ - Returns the current {@link android.app.Service} instance, which has public methods the
+client can call.
+ - Returns an instance of another class hosted by the service with public methods the
+client can call.
- Return this instance of {@link android.os.Binder} from the {@link
android.app.Service#onBind onBind()} callback method.
@@ -202,12 +216,13 @@ android.content.ServiceConnection#onServiceConnected onServiceConnected()} callb
make calls to the bound service using the methods provided.
-Note: The reason the service and client must be in the same
-application is so the client can cast the returned object and properly call its APIs. The service
+
Note: The service and client must be in the same
+application so that the client can cast the returned object and properly call its APIs.
+ The service
and client must also be in the same process, because this technique does not perform any
-marshalling across processes.
+marshaling across processes.
-For example, here's a service that provides clients access to methods in the service through
+
For example, here's a service that provides clients with access to methods in the service through
a {@link android.os.Binder} implementation:
@@ -316,32 +331,30 @@ section provides more information about this process of binding to the service.<
Note: In the example above, the
{@link android.app.Activity#onStop onStop()} method unbinds the client from the service. Clients
should unbind from services at appropriate times, as discussed in
-Additional Notes.
+Additional notes.
For more sample code, see the {@code
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html">
+{@code
LocalService.java} class and the {@code
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LocalServiceActivities.html">
+{@code
LocalServiceActivities.java} class in ApiDemos.
-
-
-
-
Using a Messenger
Compared to AIDL
When you need to perform IPC, using a {@link android.os.Messenger} for your interface is
-simpler than implementing it with AIDL, because {@link android.os.Messenger} queues
-all calls to the service, whereas, a pure AIDL interface sends simultaneous requests to the
+simpler than using AIDL, because {@link android.os.Messenger} queues
+all calls to the service. A pure AIDL interface sends simultaneous requests to the
service, which must then handle multi-threading.
For most applications, the service doesn't need to perform multi-threading, so using a {@link
android.os.Messenger} allows the service to handle one call at a time. If it's important
-that your service be multi-threaded, then you should use AIDL to define your interface.
@@ -352,10 +365,11 @@ you to perform interprocess communication (IPC) without the need to use AIDL.Here's a summary of how to use a {@link android.os.Messenger}:
-
+
- The service implements a {@link android.os.Handler} that receives a callback for each
call from a client.
- - The {@link android.os.Handler} is used to create a {@link android.os.Messenger} object
+
- The service uses the {@link android.os.Handler} to create a {@link android.os.Messenger}
+ object
(which is a reference to the {@link android.os.Handler}).
- The {@link android.os.Messenger} creates an {@link android.os.IBinder} that the service
returns to clients from {@link android.app.Service#onBind onBind()}.
@@ -365,11 +379,12 @@ returns to clients from {@link android.app.Service#onBind onBind()}.
- The service receives each {@link android.os.Message} in its {@link
android.os.Handler}—specifically, in the {@link android.os.Handler#handleMessage
handleMessage()} method.
-
+
-In this way, there are no "methods" for the client to call on the service. Instead, the
-client delivers "messages" ({@link android.os.Message} objects) that the service receives in
+
In this way, there are no methods for the client to call on the service. Instead, the
+client delivers messages ({@link android.os.Message} objects) that the service
+ receives in
its {@link android.os.Handler}.
Here's a simple example service that uses a {@link android.os.Messenger} interface:
@@ -488,41 +503,42 @@ public class ActivityMessenger extends Activity {
}
-Notice that this example does not show how the service can respond to the client. If you want the
-service to respond, then you need to also create a {@link android.os.Messenger} in the client. Then
-when the client receives the {@link android.content.ServiceConnection#onServiceConnected
+
Notice that this example does not show how the service can respond to the client.
+ If you want the
+service to respond, you need to also create a {@link android.os.Messenger} in the client.
+When the client receives the {@link android.content.ServiceConnection#onServiceConnected
onServiceConnected()} callback, it sends a {@link android.os.Message} to the service that includes
the client's {@link android.os.Messenger} in the {@link android.os.Message#replyTo} parameter
of the {@link android.os.Messenger#send send()} method.
You can see an example of how to provide two-way messaging in the {@code
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/MessengerService.html">
+{@code
MessengerService.java} (service) and {@code
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.html">
+{@code
MessengerServiceActivities.java} (client) samples.
-
-
-
-
-Binding to a Service
+Binding to a service
Application components (clients) can bind to a service by calling
{@link android.content.Context#bindService bindService()}. The Android
system then calls the service's {@link android.app.Service#onBind
-onBind()} method, which returns an {@link android.os.IBinder} for interacting with the service.
+onBind()} method, which returns an {@link android.os.IBinder} for interacting with
+ the service.
-The binding is asynchronous. {@link android.content.Context#bindService
-bindService()} returns immediately and does not return the {@link android.os.IBinder} to
-the client. To receive the {@link android.os.IBinder}, the client must create an instance of {@link
+
The binding is asynchronous, and {@link android.content.Context#bindService
+bindService()} returns immediately without not returning the {@link android.os.IBinder} to
+the client. To receive the {@link android.os.IBinder}, the client must create an
+ instance of {@link
android.content.ServiceConnection} and pass it to {@link android.content.Context#bindService
bindService()}. The {@link android.content.ServiceConnection} includes a callback method that the
system calls to deliver the {@link android.os.IBinder}.
Note: Only activities, services, and content providers can bind
-to a service—you cannot bind to a service from a broadcast receiver.
+to a service—you can't bind to a service from a broadcast receiver.
-So, to bind to a service from your client, you must:
+To bind to a service from your client, follow these steps:
- Implement {@link android.content.ServiceConnection}.
Your implementation must override two callback methods:
@@ -533,7 +549,8 @@ the service's {@link android.app.Service#onBind onBind()} method.
- {@link android.content.ServiceConnection#onServiceDisconnected
onServiceDisconnected()}
- The Android system calls this when the connection to the service is unexpectedly
-lost, such as when the service has crashed or has been killed. This is not called when the
+lost, such as when the service has crashed or has been killed. This is not
+ called when the
client unbinds.
@@ -548,12 +565,12 @@ android.content.Context#unbindService unbindService()}.
If your client is still bound to a service when your app destroys the client, destruction
causes the client to unbind. It is better practice to unbind the client as soon as it is done
interacting with the service. Doing so allows the idle service to shut down. For more information
-about appropriate times to bind and unbind, see Additional Notes.
+about appropriate times to bind and unbind, see Additional notes.
-For example, the following snippet connects the client to the service created above by
+
The following example connects the client to the service created above by
extending the Binder class, so all it must do is cast the returned
{@link android.os.IBinder} to the {@code LocalService} class and request the {@code
LocalService} instance:
@@ -579,8 +596,9 @@ private ServiceConnection mConnection = new ServiceConnection() {
};
-With this {@link android.content.ServiceConnection}, the client can bind to a service by passing
-it to {@link android.content.Context#bindService bindService()}. For example:
+With this {@link android.content.ServiceConnection}, the client can bind to a service
+ by passing
+it to {@link android.content.Context#bindService bindService()}, as shown in the following example:
Intent intent = new Intent(this, LocalService.class);
@@ -589,11 +607,21 @@ bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
- The first parameter of {@link android.content.Context#bindService bindService()} is an
-{@link android.content.Intent} that explicitly names the service to bind (thought the intent
-could be implicit).
+{@link android.content.Intent} that explicitly names the service to bind.
+Caution: If you use an intent to bind to a
+ {@link android.app.Service}, ensure that your app is secure by using an explicit
+intent. Using an implicit intent to start a service is a
+security hazard because you can't be certain what service will respond to the intent,
+and the user can't see which service starts. Beginning with Android 5.0 (API level 21),
+ the system
+throws an exception if you call {@link android.content.Context#bindService bindService()}
+with an implicit intent.
+
+
- The second parameter is the {@link android.content.ServiceConnection} object.
- The third parameter is a flag indicating options for the binding. It should usually be {@link
-android.content.Context#BIND_AUTO_CREATE} in order to create the service if its not already alive.
+android.content.Context#BIND_AUTO_CREATE} in order to create the service if it's not already
+ alive.
Other possible values are {@link android.content.Context#BIND_DEBUG_UNBIND}
and {@link android.content.Context#BIND_NOT_FOREGROUND}, or {@code 0} for none.
@@ -606,10 +634,11 @@ and {@link android.content.Context#BIND_NOT_FOREGROUND}, or {@code 0} for none.<
You should always trap {@link android.os.DeadObjectException} exceptions, which are thrown
when the connection has broken. This is the only exception thrown by remote methods.
Objects are reference counted across processes.
- You should usually pair the binding and unbinding during
-matching bring-up and tear-down moments of the client's lifecycle. For example:
+ You usually pair the binding and unbinding during
+matching bring-up and tear-down moments of the client's lifecycle, as described in the
+ following examples:
- - If you only need to interact with the service while your activity is visible, you
+
- If you need to interact with the service only while your activity is visible, you
should bind during {@link android.app.Activity#onStart onStart()} and unbind during {@link
android.app.Activity#onStop onStop()}.
- If you want your activity to receive responses even while it is stopped in the
@@ -619,33 +648,34 @@ activity needs to use the service the entire time it's running (even in the back
the service is in another process, then you increase the weight of the process and it becomes
more likely that the system will kill it.
- Note: You should usually not bind and unbind
+
Note: You don't usually bind and unbind
during your activity's {@link android.app.Activity#onResume onResume()} and {@link
-android.app.Activity#onPause onPause()}, because these callbacks occur at every lifecycle transition
+android.app.Activity#onPause onPause()}, because these callbacks occur at every
+ lifecycle transition
and you should keep the processing that occurs at these transitions to a minimum. Also, if
-multiple activities in your application bind to the same service and there is a transition between
-two of those activities, the service may be destroyed and recreated as the current activity unbinds
-(during pause) before the next one binds (during resume). (This activity transition for how
+multiple activities in your application bind to the same service and there is a
+ transition between
+two of those activities, the service may be destroyed and recreated as the current
+ activity unbinds
+(during pause) before the next one binds (during resume). This activity transition for how
activities coordinate their lifecycles is described in the Activities
-document.)
+document.
For more sample code, showing how to bind to a service, see the {@code
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/RemoteService.html">
+{@code
RemoteService.java} class in ApiDemos.
-
-
-
-
-Managing the Lifecycle of a Bound Service
+Managing the lifecycle of a bound service
When a service is unbound from all clients, the Android system destroys it (unless it was also
started with {@link android.app.Service#onStartCommand onStartCommand()}). As such, you don't have
to manage the lifecycle of your service if it's purely a bound
-service—the Android system manages it for you based on whether it is bound to any clients.
+service—the Android system manages it for you based on whether it is bound to
+ any clients.
However, if you choose to implement the {@link android.app.Service#onStartCommand
onStartCommand()} callback method, then you must explicitly stop the service, because the
@@ -660,17 +690,11 @@ your {@link android.app.Service#onUnbind onUnbind()} method, you can optionally
onRebind()} the next time a client binds to the service. {@link android.app.Service#onRebind
onRebind()} returns void, but the client still receives the {@link android.os.IBinder} in its
{@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback.
-Below, figure 1 illustrates the logic for this kind of lifecycle.
-
+The following figure illustrates the logic for this kind of lifecycle.
Figure 1. The lifecycle for a service that is started
and also allows binding.
-
For more information about the lifecycle of a started service, see the Services document.
-
-
-
-
diff --git a/docs/html/guide/components/fundamentals.jd b/docs/html/guide/components/fundamentals.jd
index ed3ba7dc22499..eaa82c8fe25e8 100644
--- a/docs/html/guide/components/fundamentals.jd
+++ b/docs/html/guide/components/fundamentals.jd
@@ -6,28 +6,29 @@ page.title=Application Fundamentals
In this document
-- App Components
+
- App components
- Activating components
-- The Manifest File
+
- The manifest file
- Declaring components
- Declaring app requirements
-- App Resources
+- App resources
Android apps are written in the Java programming language. The Android SDK tools compile
-your code—along with any data and resource files—into an APK: an Android package,
+your code along with any data and resource files into an APK, an Android package,
which is an archive file with an {@code .apk} suffix. One APK file contains all the contents
of an Android app and is the file that Android-powered devices use to install the app.
-Once installed on a device, each Android app lives in its own security sandbox:
+Each Android app lives in its own security sandbox, protected by
+ the following Android security features:
- The Android operating system is a multi-user Linux system in which each app is a
@@ -40,54 +41,61 @@ app so that only the user ID assigned to that app can access them.
- Each process has its own virtual machine (VM), so an app's code runs in isolation from
other apps.
-- By default, every app runs in its own Linux process. Android starts the process when any
-of the app's components need to be executed, then shuts down the process when it's no longer
+
- By default, every app runs in its own Linux process. The Android system starts
+ the process when any
+of the app's components need to be executed, and then shuts down the process
+ when it's no longer
needed or when the system must recover memory for other apps.
-In this way, the Android system implements the principle of least privilege. That is,
+
The Android system implements the principle of least privilege. That is,
each app, by default, has access only to the components that it requires to do its work and
no more. This creates a very secure environment in which an app cannot access parts of
-the system for which it is not given permission.
-
-However, there are ways for an app to share data with other apps and for an
+the system for which it is not given permission. However, there are ways for an app to share
+ data with other apps and for an
app to access system services:
- It's possible to arrange for two apps to share the same Linux user ID, in which case
they are able to access each other's files. To conserve system resources, apps with the
-same user ID can also arrange to run in the same Linux process and share the same VM (the
-apps must also be signed with the same certificate).
+same user ID can also arrange to run in the same Linux process and share the same VM. The
+apps must also be signed with the same certificate.
An app can request permission to access device data such as the user's
-contacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. The user has
+contacts, SMS messages, the mountable storage (SD card), camera, and Bluetooth. The user has
to explicitly grant these permissions. For more information, see
Working with System Permissions.
-That covers the basics regarding how an Android app exists within the system. The rest of
-this document introduces you to:
+The rest of this document introduces the following concepts:
- The core framework components that define your app.
- - The manifest file in which you declare components and required device features for your
+
- The manifest file in which you declare the components and the required device
+ features for your
app.
- - Resources that are separate from the app code and allow your app to
+
- Resources that are separate from the app code and that allow your app to
gracefully optimize its behavior for a variety of device configurations.
-App Components
+App components
App components are the essential building blocks of an Android app. Each
component is a different point through which the system can enter your app. Not all
-components are actual entry points for the user and some depend on each other, but each one exists
-as its own entity and plays a specific role—each one is a unique building block that
-helps define your app's overall behavior.
+components are actual entry points for the user and some depend on each other,
+ but each one exists
+as its own entity and plays a specific role.
-There are four different types of app components. Each type serves a distinct purpose
-and has a distinct lifecycle that defines how the component is created and destroyed.
-
-Here are the four types of app components:
+There are four different types of app components:
+
+- Activities.
+- Services.
+- Content providers.
+- Broadcast receivers.
+
+Each type serves a distinct purpose
+and has a distinct lifecycle that defines how the component is created and destroyed.
+ The following sections describe the four types of app components.
@@ -98,11 +106,12 @@ an email app might have one activity that shows a list of new
emails, another activity to compose an email, and another activity for reading emails. Although
the activities work together to form a cohesive user experience in the email app, each one
is independent of the others. As such, a different app can start any one of these
-activities (if the email app allows it). For example, a camera app can start the
-activity in the email app that composes new mail, in order for the user to share a picture.
+activities if the email app allows it. For example, a camera app can start the
+activity in the email app that composes new mail to allow the user to share a picture.
-An activity is implemented as a subclass of {@link android.app.Activity} and you can learn more
-about it in the Activities
+
An activity is implemented as a subclass of {@link android.app.Activity}. You can learn more
+about {@link android.app.Activity} in the
+ Activities
developer guide.
@@ -111,13 +120,16 @@ developer guide.
- A service is a component that runs in the background to perform long-running
operations or to perform work for remote processes. A service
-does not provide a user interface. For example, a service might play music in the background while
+does not provide a user interface. For example, a service might play music in the
+ background while
the user is in a different app, or it might fetch data over the network without
-blocking user interaction with an activity. Another component, such as an activity, can start the
+blocking user interaction with an activity. Another component, such as an activity,
+ can start the
service and let it run or bind to it in order to interact with it.
-
A service is implemented as a subclass of {@link android.app.Service} and you can learn more
-about it in the Services developer
+
A service is implemented as a subclass of {@link android.app.Service}. You can learn more
+about {@link android.app.Service} in the
+Services developer
guide.
@@ -125,12 +137,14 @@ guide.
- Content providers
- A content provider manages a shared set of app data. You can store the data in
-the file system, an SQLite database, on the web, or any other persistent storage location your
-app can access. Through the content provider, other apps can query or even modify
-the data (if the content provider allows it). For example, the Android system provides a content
+the file system, in a SQLite database, on the web, or on any other persistent storage
+ location that your
+app can access. Through the content provider, other apps can query or modify
+the data if the content provider allows it. For example, the Android system provides a content
provider that manages the user's contact information. As such, any app with the proper
-permissions can query part of the content provider (such as {@link
-android.provider.ContactsContract.Data}) to read and write information about a particular person.
+permissions can query part of the content provider, such as {@link
+android.provider.ContactsContract.Data}, to read and write information about
+ a particular person.
Content providers are also useful for reading and writing data that is private to your
app and not shared. For example, the
- Broadcast receivers
- A broadcast receiver is a component that responds to system-wide broadcast
-announcements. Many broadcasts originate from the system—for example, a broadcast announcing
+announcements. Many broadcasts originate from the system—for example,
+ a broadcast announcing
that the screen has turned off, the battery is low, or a picture was captured.
Apps can also initiate broadcasts—for example, to let other apps know that
-some data has been downloaded to the device and is available for them to use. Although broadcast
+some data has been downloaded to the device and is available for them to use.
+ Although broadcast
receivers don't display a user interface, they may create a status bar notification
to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is
-just a "gateway" to other components and is intended to do a very minimal amount of work. For
-instance, it might initiate a service to perform some work based on the event.
+just a gateway to other components and is intended to do a very minimal amount of work.
+ For instance, it might initiate a service to perform some work based on the event.
A broadcast receiver is implemented as a subclass of {@link android.content.BroadcastReceiver}
and each broadcast is delivered as an {@link android.content.Intent} object. For more information,
@@ -170,52 +186,59 @@ see the {@link android.content.BroadcastReceiver} class.
A unique aspect of the Android system design is that any app can start another
app’s component. For example, if you want the user to capture a
photo with the device camera, there's probably another app that does that and your
-app can use it, instead of developing an activity to capture a photo yourself. You don't
+app can use it instead of developing an activity to capture a photo yourself. You don't
need to incorporate or even link to the code from the camera app.
Instead, you can simply start the activity in the camera app that captures a
photo. When complete, the photo is even returned to your app so you can use it. To the user,
it seems as if the camera is actually a part of your app.
-When the system starts a component, it starts the process for that app (if it's not
-already running) and instantiates the classes needed for the component. For example, if your
+
When the system starts a component, it starts the process for that app if it's not
+already running and instantiates the classes needed for the component. For example, if your
app starts the activity in the camera app that captures a photo, that activity
runs in the process that belongs to the camera app, not in your app's process.
Therefore, unlike apps on most other systems, Android apps don't have a single entry
-point (there's no {@code main()} function, for example).
+point (there's no {@code main()} function).
Because the system runs each app in a separate process with file permissions that
restrict access to other apps, your app cannot directly activate a component from
-another app. The Android system, however, can. So, to activate a component in
-another app, you must deliver a message to the system that specifies your intent to
+another app. However, the Android system can. To activate a component in
+another app, deliver a message to the system that specifies your intent to
start a particular component. The system then activates the component for you.
-Activating Components
+Activating components
Three of the four component types—activities, services, and
broadcast receivers—are activated by an asynchronous message called an intent.
-Intents bind individual components to each other at runtime (you can think of them
-as the messengers that request an action from other components), whether the component belongs
+Intents bind individual components to each other at runtime. You can think of them
+as the messengers that request an action from other components, whether the component belongs
to your app or another.
-An intent is created with an {@link android.content.Intent} object, which defines a message to
-activate either a specific component or a specific type of component—an intent
-can be either explicit or implicit, respectively.
+Note: If your app targets Android 5.0 (API level 21) or later,
+ use the {@link android.app.job.JobScheduler} to execute background
+ services. For more information about using this class, see the
+ {@link android.app.job.JobScheduler} reference documentation.
-For activities and services, an intent defines the action to perform (for example, to "view" or
-"send" something) and may specify the URI of the data to act on (among other things that the
-component being started might need to know). For example, an intent might convey a request for an
+
An intent is created with an {@link android.content.Intent} object, which defines a message to
+activate either a specific component (explicit intent) or a specific type of component
+ (implicit intent).
+
+For activities and services, an intent defines the action to perform (for example, to
+ view or
+send something) and may specify the URI of the data to act on, among other things that the
+component being started might need to know. For example, an intent might convey a request for an
activity to show an image or to open a web page. In some cases, you can start an
-activity to receive a result, in which case, the activity also returns
-the result in an {@link android.content.Intent} (for example, you can issue an intent to let
-the user pick a personal contact and have it returned to you—the return intent includes a
-URI pointing to the chosen contact).
+activity to receive a result, in which case the activity also returns
+the result in an {@link android.content.Intent}. For example, you can issue an intent to let
+the user pick a personal contact and have it returned to you. The return intent includes a
+URI pointing to the chosen contact.
For broadcast receivers, the intent simply defines the
-announcement being broadcast (for example, a broadcast to indicate the device battery is low
-includes only a known action string that indicates "battery is low").
+announcement being broadcast. For example, a broadcast to indicate the device battery is low
+includes only a known action string that indicates battery is low.
-The other component type, content provider, is not activated by intents. Rather, it is
+
Unlike activities, services, and broadcast receivers, content providers are not activated
+ by intents. Rather, they are
activated when targeted by a request from a {@link android.content.ContentResolver}. The content
resolver handles all direct transactions with the content provider so that the component that's
performing transactions with the provider doesn't need to and instead calls methods on the {@link
@@ -224,15 +247,19 @@ provider and the component requesting information (for security).
There are separate methods for activating each type of component:
- - You can start an activity (or give it something new to do) by
+
- You can start an activity or give it something new to do by
passing an {@link android.content.Intent} to {@link android.content.Context#startActivity
startActivity()} or {@link android.app.Activity#startActivityForResult startActivityForResult()}
(when you want the activity to return a result).
- - You can start a service (or give new instructions to an ongoing service) by
+
+
+
- With Android 5.0 (API level 21) and later, you can start a service with
+ {@link android.app.job.JobScheduler}. For earlier Android versions, you can start
+ a service (or give new instructions to an ongoing service) by
passing an {@link android.content.Intent} to {@link android.content.Context#startService
-startService()}. Or you can bind to the service by passing an {@link android.content.Intent} to
-{@link android.content.Context#bindService bindService()}.
- - You can initiate a broadcast by passing an {@link android.content.Intent} to methods like
+startService()}. You can bind to the service by passing an {@link android.content.Intent} to
+{@link android.content.Context#bindService bindService()}.
+ - You can initiate a broadcast by passing an {@link android.content.Intent} to methods such as
{@link android.content.Context#sendBroadcast(Intent) sendBroadcast()}, {@link
android.content.Context#sendOrderedBroadcast(Intent, String) sendOrderedBroadcast()}, or {@link
android.content.Context#sendStickyBroadcast sendStickyBroadcast()}.
@@ -242,35 +269,35 @@ android.content.ContentProvider#query query()} on a {@link android.content.Conte
For more information about using intents, see the Intents and
-Intent Filters document. More information about activating specific components is also provided
-in the following documents: Activities, Services, {@link
-android.content.BroadcastReceiver} and Content Providers.
+Intent Filters document.
+ The following documents provide more information about activating specifc components:
+ Activities,
+ Services
+ {@link android.content.BroadcastReceiver}, and
+ Content Providers.
-
-The Manifest File
+The manifest file
Before the Android system can start an app component, the system must know that the
-component exists by reading the app's {@code AndroidManifest.xml} file (the "manifest"
-file). Your app must declare all its components in this file, which must be at the root of
-the app project directory.
+component exists by reading the app's manifest file, {@code AndroidManifest.xml}.
+ Your app must declare all its components in this file, which must be at the root of the
+ app project directory.
The manifest does a number of things in addition to declaring the app's components,
-such as:
+such as the following:
- - Identify any user permissions the app requires, such as Internet access or
+
- Identifies any user permissions the app requires, such as Internet access or
read-access to the user's contacts.
- - Declare the minimum API Level
+
- Declares the minimum
+ API Level
required by the app, based on which APIs the app uses.
- - Declare hardware and software features used or required by the app, such as a camera,
+
- Declares hardware and software features used or required by the app, such as a camera,
bluetooth services, or a multitouch screen.
- - API libraries the app needs to be linked against (other than the Android framework
+
- Declares API libraries the app needs to be linked against (other than the Android framework
APIs), such as the Google Maps
-library.
- - And more
+href="http://code.google.com/android/add-ons/google-apis/maps-overview.html">
+Google Maps library.
+
@@ -301,47 +328,59 @@ the {@code android:name} attribute specifies the fully qualified class name of t
android.app.Activity} subclass and the {@code android:label} attribute specifies a string
to use as the user-visible label for the activity.
-You must declare all app components this way:
+You must declare all app components using the following elements:
<activity> elements
-for activities
+for activities.
<service> elements for
-services
+services.
<receiver> elements
-for broadcast receivers
+for broadcast receivers.
<provider> elements
-for content providers
+for content providers.
Activities, services, and content providers that you include in your source but do not declare
in the manifest are not visible to the system and, consequently, can never run. However,
broadcast
-receivers can be either declared in the manifest or created dynamically in code (as
-{@link android.content.BroadcastReceiver} objects) and registered with the system by calling
+receivers can be either declared in the manifest or created dynamically in code as
+{@link android.content.BroadcastReceiver} objects and registered with the system by calling
{@link android.content.Context#registerReceiver registerReceiver()}.
For more about how to structure the manifest file for your app, see The AndroidManifest.xml File
documentation.
-
-
Declaring component capabilities
-As discussed above, in Activating Components, you can use an
-{@link android.content.Intent} to start activities, services, and broadcast receivers. You can do so
-by explicitly naming the target component (using the component class name) in the intent. However,
-the real power of intents lies in the concept of implicit intents. An implicit intent
-simply describes the type of action to perform (and, optionally, the data upon which you’d like to
-perform the action) and allows the system to find a component on the device that can perform the
-action and start it. If there are multiple components that can perform the action described by the
-intent, then the user selects which one to use.
+As discussed above, in Activating components, you can use an
+{@link android.content.Intent} to start activities, services, and broadcast receivers.
-
The way the system identifies the components that can respond to an intent is by comparing the
+
+
+You can use an {@link android.content.Intent}
+ by explicitly naming the target component (using the component class name) in the intent.
+ You can also use an implicit intent, which
+describes the type of action to perform and, optionally, the data upon which you’d like to
+perform the action. The implicit intent allows the system to find a component on the device
+ that can perform the
+action and start it. If there are multiple components that can perform the action described by the
+intent, the user selects which one to use.
+
+Caution: If you use an intent to start a
+ {@link android.app.Service}, ensure that your app is secure by using an
+ explicit
+intent. Using an implicit intent to start a service is a
+security hazard because you cannot be certain what service will respond to the intent,
+and the user cannot see which service starts. Beginning with Android 5.0 (API level 21), the system
+throws an exception if you call {@link android.content.Context#bindService bindService()}
+with an implicit intent. Do not declare intent filters for your services.
+
+The system identifies the components that can respond to an intent by comparing the
intent received to the intent filters provided in the manifest file of other apps on
the device.
@@ -351,8 +390,9 @@ from other apps. You can declare an intent filter for your component by
adding an {@code
} element as a child of the component's declaration element.
-For example, if you've built an email app with an activity for composing a new email, you can
-declare an intent filter to respond to "send" intents (in order to send a new email) like this:
+For example, if you build an email app with an activity for composing a new email, you can
+declare an intent filter to respond to "send" intents (in order to send a new email),
+ as shown in the following example:
<manifest ... >
...
@@ -368,8 +408,9 @@ declare an intent filter to respond to "send" intents (in order to send a new em
</manifest>
-Then, if another app creates an intent with the {@link
-android.content.Intent#ACTION_SEND} action and passes it to {@link android.app.Activity#startActivity
+
If another app creates an intent with the {@link
+android.content.Intent#ACTION_SEND} action and passes it to
+ {@link android.app.Activity#startActivity
startActivity()}, the system may start your activity so the user can draft and send an
email.
@@ -382,7 +423,7 @@ href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filter
Declaring app requirements
There are a variety of devices powered by Android and not all of them provide the
-same features and capabilities. In order to prevent your app from being installed on devices
+same features and capabilities. To prevent your app from being installed on devices
that lack features needed by your app, it's important that you clearly define a profile for
the types of devices your app supports by declaring device and software requirements in your
manifest file. Most of these declarations are informational only and the system does not read
@@ -391,7 +432,7 @@ for users when they search for apps from their device.
For example, if your app requires a camera and uses APIs introduced in Android 2.1 (API Level 7),
-you should declare these as requirements in your manifest file like this:
+you must declare these as requirements in your manifest file as shown in the following example:
<manifest ... >
@@ -402,10 +443,10 @@ you should declare these as requirements in your manifest file like this:
</manifest>
-Now, devices that do not have a camera and have an
-Android version lower than 2.1 cannot install your app from Google Play.
-
-However, you can also declare that your app uses the camera, but does not
+
With the declarations shown in the example, devices that do not have a
+ camera and have an
+Android version lower than 2.1 cannot install your app from Google Play.
+ However, you can declare that your app uses the camera, but does not
require it. In that case, your app must set the {@code required}
attribute to {@code "false"} and check at runtime whether
@@ -417,15 +458,15 @@ document.
-App Resources
+App resources
An Android app is composed of more than just code—it requires resources that are
separate from the source code, such as images, audio files, and anything relating to the visual
-presentation of the app. For example, you should define animations, menus, styles, colors,
+presentation of the app. For example, you can define animations, menus, styles, colors,
and the layout of activity user interfaces with XML files. Using app resources makes it easy
-to update various characteristics of your app without modifying code and—by providing
-sets of alternative resources—enables you to optimize your app for a variety of
-device configurations (such as different languages and screen sizes).
+to update various characteristics of your app without modifying code. Providing
+sets of alternative resources enables you to optimize your app for a variety of
+device configurations, such as different languages and screen sizes.
For every resource that you include in your Android project, the SDK build tools define a unique
integer ID, which you can use to reference the resource from your app code or from
@@ -435,20 +476,22 @@ named {@code R.drawable.logo}, which you can use to reference the image and inse
user interface.
One of the most important aspects of providing resources separate from your source code
-is the ability for you to provide alternative resources for different device
-configurations. For example, by defining UI strings in XML, you can translate the strings into other
-languages and save those strings in separate files. Then, based on a language qualifier
+is the ability to provide alternative resources for different device
+configurations. For example, by defining UI strings in XML, you can translate
+ the strings into other
+languages and save those strings in separate files. Then Android applies the
+ appropriate language strings
+to your UI based on a language qualifier
that you append to the resource directory's name (such as {@code res/values-fr/} for French string
-values) and the user's language setting, the Android system applies the appropriate language strings
-to your UI.
+values) and the user's language setting.
Android supports many different qualifiers for your alternative resources. The
qualifier is a short string that you include in the name of your resource directories in order to
-define the device configuration for which those resources should be used. As another
-example, you should often create different layouts for your activities, depending on the
-device's screen orientation and size. For example, when the device screen is in portrait
+define the device configuration for which those resources should be used. For
+example, you should create different layouts for your activities, depending on the
+device's screen orientation and size. When the device screen is in portrait
orientation (tall), you might want a layout with buttons to be vertical, but when the screen is in
-landscape orientation (wide), the buttons should be aligned horizontally. To change the layout
+landscape orientation (wide), the buttons could be aligned horizontally. To change the layout
depending on the orientation, you can define two different layouts and apply the appropriate
qualifier to each layout's directory name. Then, the system automatically applies the appropriate
layout depending on the current device orientation.
@@ -465,15 +508,15 @@ create alternative resources for different device configurations, read
- Intents and Intent Filters
- - Information about how to use the {@link android.content.Intent} APIs to
+
- How to use the {@link android.content.Intent} APIs to
activate app components, such as activities and services, and how to make your app components
available for use by other apps.
- Activities
- - Information about how to create an instance of the {@link android.app.Activity} class,
+
- How to create an instance of the {@link android.app.Activity} class,
which provides a distinct screen in your application with a user interface.
- Providing Resources
- - Information about how Android apps are structured to separate app resources from the
+
- How Android apps are structured to separate app resources from the
app code, including how you can provide alternative resources for specific device
configurations.
@@ -484,14 +527,13 @@ href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resou
- Device Compatibility
- - Information about Android works on different types of devices and an introduction
+
- How Android works on different types of devices and an introduction
to how you can optimize your app for each device or restrict your app's availability
to different devices.
- System Permissions
- - Information about how Android restricts app access to certain APIs with a permission
+
- How Android restricts app access to certain APIs with a permission
system that requires the user's consent for your app to use those APIs.
-
diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index d1d8c78fae3f3..8f41bc3d36756 100644
--- a/docs/html/guide/components/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
@@ -7,21 +7,21 @@ page.tags="IntentFilter"
In this document
- - Intent Types
- - Building an Intent
+
- Intent types
+ - Building an intent
- Example explicit intent
- Example implicit intent
- Forcing an app chooser
- - Receiving an Implicit Intent
+
- Receiving an implicit intent
- Example filters
- - Using a Pending Intent
- - Intent Resolution
+
- Using a pending intent
+ - Intent resolution
- Action test
- Category test
@@ -46,13 +46,14 @@ page.tags="IntentFilter"
An {@link android.content.Intent} is a messaging object you can use to request an action
from another app component.
Although intents facilitate communication between components in several ways, there are three
-fundamental use-cases:
+fundamental use cases:
-- To start an activity:
+
- Starting an activity
An {@link android.app.Activity} represents a single screen in an app. You can start a new
instance of an {@link android.app.Activity} by passing an {@link android.content.Intent}
-to {@link android.content.Context#startActivity startActivity()}. The {@link android.content.Intent}
+to {@link android.content.Context#startActivity startActivity()}.
+ The {@link android.content.Intent}
describes the activity to start and carries any necessary data.
If you want to receive a result from the activity when it finishes,
@@ -63,10 +64,16 @@ android.app.Activity#onActivityResult onActivityResult()} callback.
For more information, see the Activities guide.
-- To start a service:
+
- Starting a service
A {@link android.app.Service} is a component that performs operations in the background
-without a user interface. You can start a service to perform a one-time operation
-(such as download a file) by passing an {@link android.content.Intent}
+without a user interface. With Android 5.0 (API level 21) and later, you can start a service
+ with {@link android.app.job.JobScheduler}. For more information
+ about {@link android.app.job.JobScheduler}, see its
+ {@link android.app.job.JobScheduler API-reference documentation}.
+For versions earlier than Android 5.0 (API level 21), you can start a service by using
+methods of the {@link android.app.Service} class. You can start a service
+ to perform a one-time operation
+(such as downloading a file) by passing an {@link android.content.Intent}
to {@link android.content.Context#startService startService()}. The {@link android.content.Intent}
describes the service to start and carries any necessary data.
@@ -75,7 +82,7 @@ from another component by passing an {@link android.content.Intent} to {@link
android.content.Context#bindService bindService()}. For more information, see the Services guide.
-- To deliver a broadcast:
+
- Delivering a broadcast
A broadcast is a message that any app can receive. The system delivers various
broadcasts for system events, such as when the system boots up or the device starts charging.
You can deliver a broadcast to other apps by passing an {@link android.content.Intent}
@@ -89,7 +96,7 @@ android.content.Context#sendStickyBroadcast sendStickyBroadcast()}.
-Intent Types
+Intent types
There are two types of intents:
@@ -97,7 +104,7 @@ android.content.Context#sendStickyBroadcast sendStickyBroadcast()}.
- Explicit intents specify the component to start by name (the
fully-qualified class name). You'll typically use an explicit intent to start a component in
your own app, because you know the class name of the activity or service you want to start. For
-example, start a new activity in response to a user action or start a service to download
+example, you can start a new activity in response to a user action or start a service to download
a file in the background.
- Implicit intents do not name a specific component, but instead declare a general action
@@ -106,12 +113,13 @@ show the user a location on a map, you can use an implicit intent to request tha
app show a specified location on a map.
-When you create an explicit intent to start an activity or service, the system immediately
+
Figure 1 shows how an intent is delivered to start an activity. When you create an
+ explicit intent to start an activity or service, the system immediately
starts the app component specified in the {@link android.content.Intent} object.

-
Figure 1. Illustration of how an implicit intent is
+
Figure 1. How an implicit intent is
delivered through the system to start another activity: [1] Activity A creates an
{@link android.content.Intent} with an action description and passes it to {@link
android.content.Context#startActivity startActivity()}. [2] The Android System searches all
@@ -135,11 +143,12 @@ you make it possible for other apps to directly start your activity with a certa
Likewise, if you do not declare any intent filters for an activity, then it can be started
only with an explicit intent.
-
Caution: To ensure your app is secure, always use an explicit
+
Caution: To ensure that your app is secure, always
+ use an explicit
intent when starting a {@link android.app.Service} and do not
declare intent filters for your services. Using an implicit intent to start a service is a
-security hazard because you cannot be certain what service will respond to the intent,
-and the user cannot see which service starts. Beginning with Android 5.0 (API level 21), the system
+security hazard because you can't be certain what service will respond to the intent,
+and the user can't see which service starts. Beginning with Android 5.0 (API level 21), the system
throws an exception if you call {@link android.content.Context#bindService bindService()}
with an implicit intent.
@@ -147,7 +156,7 @@ with an implicit intent.
-
Building an Intent
+
Building an intent
An {@link android.content.Intent} object carries information that the Android system uses
to determine which component to start (such as the exact component name or component
@@ -163,22 +172,23 @@ order to properly perform the action (such as the action to take and the data to
- The name of the component to start.
This is optional, but it's the critical piece of information that makes an intent
-explicit, meaning that the intent should be delivered only to the app component
-defined by the component name. Without a component name, the intent is implicit and the
+explicit, meaning that the intent should be delivered only to the app component
+defined by the component name. Without a component name, the intent is implicit and the
system decides which component should receive the intent based on the other intent information
-(such as the action, data, and category—described below). So if you need to start a specific
+(such as the action, data, and category—described below). If you need to start a specific
component in your app, you should specify the component name.
-Note: When starting a {@link android.app.Service}, you should
-always specify the component name. Otherwise, you cannot be certain what service
+
Note: When starting a {@link android.app.Service},
+ always specify the component name. Otherwise, you cannot be certain what service
will respond to the intent, and the user cannot see which service starts.
This field of the {@link android.content.Intent} is a
{@link android.content.ComponentName} object, which you can specify using a fully
-qualified class name of the target component, including the package name of the app. For example,
+qualified class name of the target component, including the package name of the app, for example,
{@code com.example.ExampleActivity}. You can set the component name with {@link
android.content.Intent#setComponent setComponent()}, {@link android.content.Intent#setClass
-setClass()}, {@link android.content.Intent#setClassName(String, String) setClassName()}, or with the
+setClass()}, {@link android.content.Intent#setClassName(String, String) setClassName()},
+ or with the
{@link android.content.Intent} constructor.
@@ -188,10 +198,10 @@ setClass()}, {@link android.content.Intent#setClassName(String, String) setClass
In the case of a broadcast intent, this is the action that took place and is being reported.
The action largely determines how the rest of the intent is structured—particularly
-what is contained in the data and extras.
+the information that is contained in the data and extras.
You can specify your own actions for use by intents within your app (or for use by other
-apps to invoke components in your app), but you should usually use action constants
+apps to invoke components in your app), but you usually specify action constants
defined by the {@link android.content.Intent} class or other framework classes. Here are some
common actions for starting an activity:
@@ -203,7 +213,7 @@ common actions for starting an activity:
view in a map app.
- {@link android.content.Intent#ACTION_SEND}
-
- Also known as the "share" intent, you should use this in an intent with {@link
+
- Also known as the share intent, you should use this in an intent with {@link
android.content.Context#startActivity startActivity()} when you have some data that the user can
share through another app, such as an email app or social sharing app.
@@ -217,12 +227,13 @@ that open specific screens in the system's Settings app.
setAction()} or with an {@link android.content.Intent} constructor.
If you define your own actions, be sure to include your app's package name
-as a prefix. For example:
+as a prefix, as shown in the following example:
static final String ACTION_TIMETRAVEL = "com.example.action.TIMETRAVEL";
- Data
-
- The URI (a {@link android.net.Uri} object) that references the data to be acted on and/or the
+
- The URI (a {@link android.net.Uri} object) that references the data to
+ be acted on and/or the
MIME type of that data. The type of data supplied is generally dictated by the intent's action. For
example, if the action is {@link android.content.Intent#ACTION_EDIT}, the data should contain the
URI of the document to edit.
@@ -231,10 +242,11 @@ URI of the document to edit.
it's often important to specify the type of data (its MIME type) in addition to its URI.
For example, an activity that's able to display images probably won't be able
to play an audio file, even though the URI formats could be similar.
-So specifying the MIME type of your data helps the Android
+Specifying the MIME type of your data helps the Android
system find the best component to receive your intent.
However, the MIME type can sometimes be inferred from the URI—particularly when the data is a
-{@code content:} URI, which indicates the data is located on the device and controlled by a
+{@code content:} URI. A {@code content:} URI indicates the data is located on the device
+ and controlled by a
{@link android.content.ContentProvider}, which makes the data MIME type visible to the system.
To set only the data URI, call {@link android.content.Intent#setData setData()}.
@@ -243,7 +255,7 @@ can set both explicitly with {@link
android.content.Intent#setDataAndType setDataAndType()}.
Caution: If you want to set both the URI and MIME type,
-do not call {@link android.content.Intent#setData setData()} and
+don't call {@link android.content.Intent#setData setData()} and
{@link android.content.Intent#setType setType()} because they each nullify the value of the other.
Always use {@link android.content.Intent#setDataAndType setDataAndType()} to set both
URI and MIME type.
@@ -258,7 +270,7 @@ Here are some common categories:
- {@link android.content.Intent#CATEGORY_BROWSABLE}
- The target activity allows itself to be started by a web browser to display data
- referenced by a link—such as an image or an e-mail message.
+ referenced by a link, such as an image or an e-mail message.
- {@link android.content.Intent#CATEGORY_LAUNCHER}
- The activity is the initial activity of a task and is listed in
@@ -276,14 +288,14 @@ categories.
These properties listed above (component name, action, data, and category) represent the
defining characteristics of an intent. By reading these properties, the Android system
-is able to resolve which app component it should start.
-
-However, an intent can carry additional information that does not affect
-how it is resolved to an app component. An intent can also supply:
+is able to resolve which app component it should start. However, an intent can carry
+ additional information that does not affect
+how it is resolved to an app component. An intent can also supply the following information:
- Extras
-- Key-value pairs that carry additional information required to accomplish the requested action.
+
- Key-value pairs that carry additional information required to accomplish
+ the requested action.
Just as some actions use particular kinds of data URIs, some actions also use particular extras.
You can add extra data with various {@link android.content.Intent#putExtra putExtra()} methods,
@@ -293,21 +305,22 @@ the {@link android.os.Bundle} in the {@link android.content.Intent} with {@link
android.content.Intent#putExtras putExtras()}.
For example, when creating an intent to send an email with
-{@link android.content.Intent#ACTION_SEND}, you can specify the "to" recipient with the
-{@link android.content.Intent#EXTRA_EMAIL} key, and specify the "subject" with the
+{@link android.content.Intent#ACTION_SEND}, you can specify the to recipient with the
+{@link android.content.Intent#EXTRA_EMAIL} key, and specify the subject with the
{@link android.content.Intent#EXTRA_SUBJECT} key.
The {@link android.content.Intent} class specifies many {@code EXTRA_*} constants
for standardized data types. If you need to declare your own extra keys (for intents that
your app receives), be sure to include your app's package name
-as a prefix. For example:
+as a prefix, as shown in the following example:
static final String EXTRA_GIGAWATTS = "com.example.EXTRA_GIGAWATTS";
- Flags
-- Flags defined in the {@link android.content.Intent} class that function as metadata for the
+
- Flags are defined in the {@link android.content.Intent} class that function as metadata for the
intent. The flags may instruct the Android system how to launch an activity (for example, which
-task the activity should belong
+task
+ the activity should belong
to) and how to treat it after it's launched (for example, whether it belongs in the list of recent
activities).
@@ -354,7 +367,8 @@ this intent explicitly starts the {@code DownloadService} class in the app.
to perform the action. Using an implicit intent is useful when your app cannot perform the
action, but other apps probably can and you'd like the user to pick which app to use.
-
For example, if you have content you want the user to share with other people, create an intent
+
For example, if you have content that you want the user to share with other people,
+ create an intent
with the {@link android.content.Intent#ACTION_SEND} action
and add extras that specify the content to share. When you call
{@link android.content.Context#startActivity startActivity()} with that intent, the user can
@@ -362,13 +376,15 @@ pick an app through which to share the content.
Caution: It's possible that a user won't have any
apps that handle the implicit intent you send to {@link android.content.Context#startActivity
-startActivity()}. If that happens, the call will fail and your app will crash. To verify
+startActivity()}. If that happens, the call fails and your app crashes. To verify
that an activity will receive the intent, call {@link android.content.Intent#resolveActivity
resolveActivity()} on your {@link android.content.Intent} object. If the result is non-null,
-then there is at least one app that can handle the intent and it's safe to call
+ there is at least one app that can handle the intent and it's safe to call
{@link android.content.Context#startActivity startActivity()}. If the result is null,
-you should not use the intent and, if possible, you should disable the feature that issues
-the intent.
+ do not use the intent and, if possible, you should disable the feature that issues
+the intent. The following example shows how to verify that the intent resolves
+to an activity. This example doesn't use a URI, but the intent's data type
+is declared to specify the content carried by the extras.
@@ -384,8 +400,7 @@ if (sendIntent.resolveActivity(getPackageManager()) != null) {
}
-Note: In this case, a URI is not used, but the intent's data type
-is declared to specify the content carried by the extras.
+
When {@link android.content.Context#startActivity startActivity()} is called, the system
@@ -393,7 +408,7 @@ examines all of the installed apps to determine which ones can handle this kind
intent with the {@link android.content.Intent#ACTION_SEND} action and that carries "text/plain"
data). If there's only one app that can handle it, that app opens immediately and is given the
intent. If multiple activities accept the intent, the system
-displays a dialog so the user can pick which app to use..
+displays a dialog such as the one shown in Figure 2, so the user can pick which app to use.
@@ -405,23 +420,26 @@ displays a dialog so the user can pick which app to use..
When there is more than one app that responds to your implicit intent,
the user can select which app to use and make that app the default choice for the
-action. This is nice when performing an action for which the user
-probably wants to use the same app from now on, such as when opening a web page (users
-often prefer just one web browser) .
+action. The ability to select a default is helpful when performing an action for which the user
+probably wants to use the same app every time, such as when opening a web page (users
+often prefer just one web browser).
However, if multiple apps can respond to the intent and the user might want to use a different
app each time, you should explicitly show a chooser dialog. The chooser dialog asks the
-user to select which app to use for the action every time (the user cannot select a default app for
+user to select which app to use for the action (the user cannot select a default app for
the action). For example, when your app performs "share" with the {@link
android.content.Intent#ACTION_SEND} action, users may want to share using a different app depending
-on their current situation, so you should always use the chooser dialog, as shown in figure 2.
+on their current situation, so you should always use the chooser dialog, as shown in Figure 2.
To show the chooser, create an {@link android.content.Intent} using {@link
android.content.Intent#createChooser createChooser()} and pass it to {@link
-android.app.Activity#startActivity startActivity()}. For example:
+android.app.Activity#startActivity startActivity()}, as shown in the following example.
+ This example displays a dialog with a list of apps that respond to the intent passed to the {@link
+android.content.Intent#createChooser createChooser()} method and uses the supplied text as the
+dialog title.
Intent sendIntent = new Intent(Intent.ACTION_SEND);
@@ -439,26 +457,16 @@ if (sendIntent.resolveActivity(getPackageManager()) != null) {
}
-
This displays a dialog with a list of apps that respond to the intent passed to the {@link
-android.content.Intent#createChooser createChooser()} method and uses the supplied text as the
-dialog title.
-
-
-
-
-
-
-
-
Receiving an Implicit Intent
+
Receiving an implicit intent
To advertise which implicit intents your app can receive, declare one or more intent filters for
each of your app components with an {@code }
+"{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}
element in your manifest file.
Each intent filter specifies the type of intents it accepts based on the intent's action,
-data, and category. The system will deliver an implicit intent to your app component only if the
+data, and category. The system delivers an implicit intent to your app component only if the
intent can pass through one of your intent filters.
Note: An explicit intent is always delivered to its target,
@@ -471,28 +479,28 @@ it inspects the {@link android.content.Intent} and decides how to behave based o
in the {@link android.content.Intent} (such as to show the editor controls or not).
Each intent filter is defined by an {@code }
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}
element in the app's manifest file, nested in the corresponding app component (such
-as an {@code }
+as an {@code <activity>}
element). Inside the {@code },
+href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>},
you can specify the type of intents to accept using one or more
of these three elements:
-- {@code }
+- {@code <action>}
- Declares the intent action accepted, in the {@code name} attribute. The value
must be the literal string value of an action, not the class constant.
-- {@code }
+- {@code <data>}
- Declares the type of data accepted, using one or more attributes that specify various
aspects of the data URI (
scheme, host, port,
- path, etc.) and MIME type.
-- {@code }
+ path) and MIME type.
+- {@code <category>}
- Declares the intent category accepted, in the {@code name} attribute. The value
must be the literal string value of an action, not the class constant.
-
Note: In order to receive implicit intents, you
- must include the
+
Note: To receive implicit intents, you
+ must include the
{@link android.content.Intent#CATEGORY_DEFAULT} category in the intent filter. The methods
{@link android.app.Activity#startActivity startActivity()} and
{@link android.app.Activity#startActivityForResult startActivityForResult()} treat all intents
@@ -515,12 +523,12 @@ of these three elements:
</activity>
-It's okay to create a filter that includes more than one instance of
-{@code },
-{@code }, or
-{@code }.
-If you do, you simply need to be certain that the component can handle any and all combinations
-of those filter elements.
+You can create a filter that includes more than one instance of
+{@code <action>},
+{@code <data>}, or
+{@code <category>}.
+If you do, you need to be certain that the component can handle any and all
+combinations of those filter elements.
When you want to handle multiple kinds of intents, but only in specific combinations of
action, data, and category type, then you need to create multiple intent filters.
@@ -569,8 +577,8 @@ is running.
Example filters
-To better understand some of the intent filter behaviors, look at the following snippet
-from the manifest file of a social-sharing app.
+To demonstrate some of the intent filter behaviors, here is an example
+from the manifest file of a social-sharing app:
<activity android:name="MainActivity">
@@ -607,9 +615,9 @@ opens when the user initially launches the app with the launcher icon:
indicates this is the main entry point and does not expect any intent data.
- The {@link android.content.Intent#CATEGORY_LAUNCHER} category indicates that this activity's
icon should be placed in the system's app launcher. If the {@code } element
+ href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>} element
does not specify an icon with {@code icon}, then the system uses the icon from the {@code }
+ href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}
element.
These two must be paired together in order for the activity to appear in the app launcher.
@@ -620,7 +628,7 @@ they can also enter {@code ShareActivity} directly from another app that issues
intent matching one of the two intent filters.
Note: The MIME type,
-{@code
+{@code
application/vnd.google.panorama360+jpg}, is a special data type that specifies
panoramic photos, which you can handle with the Google
@@ -638,7 +646,7 @@ panorama APIs.
-Using a Pending Intent
+Using a pending intent
A {@link android.app.PendingIntent} object is a wrapper around an {@link
android.content.Intent} object. The primary purpose of a {@link android.app.PendingIntent}
@@ -646,25 +654,25 @@ is to grant permission to a foreign application
to use the contained {@link android.content.Intent} as if it were executed from your
app's own process.
-Major use cases for a pending intent include:
+Major use cases for a pending intent include the following:
- - Declare an intent to be executed when the user performs an action with your Declaring an intent to be executed when the user performs an action with your Notification
(the Android system's {@link android.app.NotificationManager}
executes the {@link android.content.Intent}).
-
- Declare an intent to be executed when the user performs an action with your
+
- Declaring an intent to be executed when the user performs an action with your
App Widget
(the Home screen app executes the {@link android.content.Intent}).
-
- Declare an intent to be executed at a specified time in the future (the Android
+
- Declaring an intent to be executed at a specified future time (the Android
system's {@link android.app.AlarmManager} executes the {@link android.content.Intent}).
-Because each {@link android.content.Intent} object is designed to be handled by a specific
+
Just as each {@link android.content.Intent} object is designed to be handled by a specific
type of app component (either an {@link android.app.Activity}, a {@link android.app.Service}, or
a {@link android.content.BroadcastReceiver}), so too must a {@link android.app.PendingIntent} be
-created with the same consideration. When using a pending intent, your app will not
+created with the same consideration. When using a pending intent, your app doesn't
execute the intent with a call such as {@link android.content.Context#startActivity
-startActivity()}. You must instead declare the intended component type when you create the
+startActivity()}. Instead, you must declare the intended component type when you create the
{@link android.app.PendingIntent} by calling the respective creator method:
@@ -677,14 +685,14 @@ startActivity()}. You must instead declare the intended component type when you
Unless your app is receiving pending intents from other apps,
-the above methods to create a {@link android.app.PendingIntent} are the only
-{@link android.app.PendingIntent} methods you'll probably ever need.
+the above methods to create a {@link android.app.PendingIntent} are probably the only
+{@link android.app.PendingIntent} methods you'll ever need.
Each method takes the current app {@link android.content.Context}, the
{@link android.content.Intent} you want to wrap, and one or more flags that specify
how the intent should be used (such as whether the intent can be used more than once).
-More information about using pending intents is provided with the documentation for each
+
For more information about using pending intents, see the documentation for each
of the respective use cases, such as in the Notifications
and App Widgets API guides.
@@ -695,27 +703,27 @@ and App Widgets API g
-Intent Resolution
+Intent resolution
When the system receives an implicit intent to start an activity, it searches for the
-best activity for the intent by comparing the intent to intent filters based on three aspects:
+best activity for the intent by comparing the it to intent filters based on three aspects:
- - The intent action
-
- The intent data (both URI and data type)
-
- The intent category
+
- Action.
+
- Data (both URI and data type).
+
- Category.
-The following sections describe how intents are matched to the appropriate component(s)
-in terms of how the intent filter is declared in an app's manifest file.
+The following sections describe how intents are matched to the appropriate components
+according to the intent filter declaration in an app's manifest file.
Action test
To specify accepted intent actions, an intent filter can declare zero or more
{@code
-} elements. For example:
+<action>} elements, as shown in the following example:
<intent-filter>
@@ -725,13 +733,13 @@ in terms of how the intent filter is declared in an app's manifest file.
</intent-filter>
-To get through this filter, the action specified in the {@link android.content.Intent}
+
To pass this filter, the action specified in the {@link android.content.Intent}
must match one of the actions listed in the filter.
If the filter does not list any actions, there is nothing for an
intent to match, so all intents fail the test. However, if an {@link android.content.Intent}
-does not specify an action, it will pass the test (as long as the filter
-contains at least one action).
+does not specify an action, it passes the test as long as the filter
+contains at least one action.
@@ -739,7 +747,7 @@ contains at least one action).
To specify accepted intent categories, an intent filter can declare zero or more
{@code
-} elements. For example:
+} elements, as shown in the following example:
<intent-filter>
@@ -752,17 +760,17 @@ contains at least one action).
For an intent to pass the category test, every category in the {@link android.content.Intent}
must match a category in the filter. The reverse is not necessary—the intent filter may
declare more categories than are specified in the {@link android.content.Intent} and the
-{@link android.content.Intent} will still pass. Therefore, an intent with no categories should
-always pass this test, regardless of what categories are declared in the filter.
+{@link android.content.Intent} still passes. Therefore, an intent with no categories
+always passes this test, regardless of what categories are declared in the filter.
Note:
-Android automatically applies the the {@link android.content.Intent#CATEGORY_DEFAULT} category
+Android automatically applies the {@link android.content.Intent#CATEGORY_DEFAULT} category
to all implicit intents passed to {@link
android.content.Context#startActivity startActivity()} and {@link
android.app.Activity#startActivityForResult startActivityForResult()}.
-So if you want your activity to receive implicit intents, it must
-include a category for {@code "android.intent.category.DEFAULT"} in its intent filters (as
-shown in the previous {@code } example.
+If you want your activity to receive implicit intents, it must
+include a category for {@code "android.intent.category.DEFAULT"} in its intent filters, as
+shown in the previous {@code <intent-filter>} example.
@@ -770,7 +778,7 @@ shown in the previous {@code } example.
To specify accepted intent data, an intent filter can declare zero or more
{@code
-} elements. For example:
+<data>} elements, as shown in the following example:
<intent-filter>
@@ -781,15 +789,16 @@ shown in the previous {@code } example.
Each <data>
-element can specify a URI structure and a data type (MIME media type). There are separate
-attributes — {@code scheme}, {@code host}, {@code port},
-and {@code path} — for each part of the URI:
+element can specify a URI structure and a data type (MIME media type).
+ Each part of the URI is a separate
+attribute: {@code scheme}, {@code host}, {@code port},
+and {@code path}:
-{@code ://:/}
+{@code <scheme>://<host>:<port>/<path>}
-For example:
+The following example shows possible values for these attributes:
{@code content://com.example.project:200/folder/subfolder/etc}
@@ -799,7 +808,7 @@ the port is {@code 200}, and the path is {@code folder/subfolder/etc}.
Each of these attributes is optional in a {@code } element,
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>} element,
but there are linear dependencies:
- If a scheme is not specified, the host is ignored.
@@ -842,17 +851,17 @@ type matches a type listed in the filter. It passes the URI part of the test
either if its URI matches a URI in the filter or if it has a {@code content:}
or {@code file:} URI and the filter does not specify a URI. In other words,
a component is presumed to support {@code content:} and {@code file:} data if
-its filter lists only a MIME type.
+its filter lists only a MIME type.
This last rule, rule (d), reflects the expectation
that components are able to get local data from a file or content provider.
-Therefore, their filters can list just a data type and do not need to explicitly
+Therefore, their filters can list just a data type and don't need to explicitly
name the {@code content:} and {@code file:} schemes.
-This is a typical case. A {@code } element
-like the following, for example, tells Android that the component can get image data from a content
+The following example shows a typical case in which a {@code <data>} element
+ tells Android that the component can get image data from a content
provider and display it:
@@ -863,14 +872,15 @@ provider and display it:
</intent-filter>
-Because most available data is dispensed by content providers, filters that
-specify a data type but not a URI are perhaps the most common.
+Filters that
+specify a data type but not a URI are perhaps the most common because most available
+ data is dispensed by content providers.
-Another common configuration is filters with a scheme and a data type. For
+Another common configuration is a filter with a scheme and a data type. For
example, a {@code }
+href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}
element like the following tells Android that
the component can retrieve video data from the network in order to perform the action:
@@ -894,7 +904,7 @@ by finding all the activities with intent filters that specify the
Your application can use intent matching in a similar way.
The {@link android.content.pm.PackageManager} has a set of {@code query...()}
-methods that return all components that can accept a particular intent, and
+methods that return all components that can accept a particular intent and
a similar series of {@code resolve...()} methods that determine the best
component to respond to an intent. For example,
{@link android.content.pm.PackageManager#queryIntentActivities
@@ -907,7 +917,3 @@ can respond. There's a similar method,
{@link android.content.pm.PackageManager#queryBroadcastReceivers
queryBroadcastReceivers()}, for broadcast receivers.
-
-
-
-
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index e646a17a18a72..a7ed7186e1fbc 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -5,11 +5,11 @@ page.title=Services
In this document
-- The Basics
+- The basics
- Declaring a service in the manifest
-- Creating a Started Service
+
- Creating a started service
- Extending the IntentService class
- Extending the Service class
@@ -17,10 +17,10 @@ page.title=Services
- Stopping a service
-- Creating a Bound Service
-- Sending Notifications to the User
-- Running a Service in the Foreground
-- Managing the Lifecycle of a Service
+
- Creating a bound service
+- Sending notifications to the user
+- Running a service in the foreground
+- Managing the lifecycle of a service
- Implementing the lifecycle callbacks
@@ -48,70 +48,80 @@ page.title=Services
-
A {@link android.app.Service} is an application component that can perform
-long-running operations in the background and does not provide a user interface. Another
-application component can start a service and it will continue to run in the background even if the
+long-running operations in the background, and it does not provide a user interface. Another
+application component can start a service, and it continues to run in the background even if the
user switches to another application. Additionally, a component can bind to a service to
-interact with it and even perform interprocess communication (IPC). For example, a service might
+interact with it and even perform interprocess communication (IPC). For example, a service can
handle network transactions, play music, perform file I/O, or interact with a content provider, all
from the background.
-A service can essentially take two forms:
+These are the three different types of services:
+ - Scheduled
+ - A service is scheduled when an API such as the {@link android.app.job.JobScheduler},
+ introduced in Android 5.0 (API level 21), launches the service. You can use the
+ {@link android.app.job.JobScheduler} by registering jobs and specifying their requirements for
+ network and timing. The system then gracefully schedules the jobs for execution at the
+ appropriate times. The {@link android.app.job.JobScheduler} provides many methods to define
+ service-execution conditions.
+
Note: If your app targets Android 5.0 (API level 21), Google
+ recommends that you use the {@link android.app.job.JobScheduler} to execute background
+ services. For more information about using this class, see the
+ {@link android.app.job.JobScheduler} reference documentation.
- Started
- - A service is "started" when an application component (such as an activity) starts it by
-calling {@link android.content.Context#startService startService()}. Once started, a service
-can run in the background indefinitely, even if the component that started it is destroyed. Usually,
-a started service performs a single operation and does not return a result to the caller.
-For example, it might download or upload a file over the network. When the operation is done, the
-service should stop itself.
+ - A service is started when an application component (such as an activity)
+ calls {@link android.content.Context#startService startService()}. After it's started, a
+ service can run in the background indefinitely, even if the component that started it is
+ destroyed. Usually, a started service performs a single operation and does not return a result to
+ the caller. For example, it can download or upload a file over the network. When the operation is
+ complete, the service should stop itself.
- Bound
- - A service is "bound" when an application component binds to it by calling {@link
-android.content.Context#bindService bindService()}. A bound service offers a client-server
-interface that allows components to interact with the service, send requests, get results, and even
-do so across processes with interprocess communication (IPC). A bound service runs only as long as
-another application component is bound to it. Multiple components can bind to the service at once,
-but when all of them unbind, the service is destroyed.
+ - A service is bound when an application component binds to it by calling {@link
+ android.content.Context#bindService bindService()}. A bound service offers a client-server
+ interface that allows components to interact with the service, send requests, receive results,
+ and even do so across processes with interprocess communication (IPC). A bound service runs only
+ as long as another application component is bound to it. Multiple components can bind to the
+ service at once, but when all of them unbind, the service is destroyed.
-Although this documentation generally discusses these two types of services separately, your
-service can work both ways—it can be started (to run indefinitely) and also allow binding.
-It's simply a matter of whether you implement a couple callback methods: {@link
+
Although this documentation generally discusses started and bound services separately,
+your service can work both ways—it can be started (to run indefinitely) and also allow
+binding. It's simply a matter of whether you implement a couple of callback methods: {@link
android.app.Service#onStartCommand onStartCommand()} to allow components to start it and {@link
android.app.Service#onBind onBind()} to allow binding.
Regardless of whether your application is started, bound, or both, any application component
-can use the service (even from a separate application), in the same way that any component can use
+can use the service (even from a separate application) in the same way that any component can use
an activity—by starting it with an {@link android.content.Intent}. However, you can declare
-the service as private, in the manifest file, and block access from other applications. This is
-discussed more in the section about Declaring the service in the
+the service as private in the manifest file and block access from other applications.
+This is discussed more in the section about Declaring the service in the
manifest.
Caution: A service runs in the
-main thread of its hosting process—the service does not create its own thread
-and does not run in a separate process (unless you specify otherwise). This means
-that, if your service is going to do any CPU intensive work or blocking operations (such as MP3
-playback or networking), you should create a new thread within the service to do that work. By using
-a separate thread, you will reduce the risk of Application Not Responding (ANR) errors and the
-application's main thread can remain dedicated to user interaction with your activities.
+main thread of its hosting process; the service does not create its own
+thread and does not run in a separate process unless you specify otherwise. If
+your service is going to perform any CPU-intensive work or blocking operations, such as MP3
+playback or networking, you should create a new thread within the service to complete that work.
+By using a separate thread, you can reduce the risk of Application Not Responding (ANR) errors,
+and the application's main thread can remain dedicated to user interaction with your
+activities.
-
-The Basics
+The basics
Should you use a service or a thread?
-
A service is simply a component that can run in the background even when the user is not
-interacting with your application. Thus, you should create a service only if that is what you
+
A service is simply a component that can run in the background, even when the user is not
+interacting with your application, so you should create a service only if that is what you
need.
-
If you need to perform work outside your main thread, but only while the user is interacting
-with your application, then you should probably instead create a new thread and not a service. For
-example, if you want to play some music, but only while your activity is running, you might create
+
If you must perform work outside of your main thread, but only while the user is interacting
+with your application, you should instead create a new thread. For example, if you want to
+play some music, but only while your activity is running, you might create
a thread in {@link android.app.Activity#onCreate onCreate()}, start running it in {@link
-android.app.Activity#onStart onStart()}, then stop it in {@link android.app.Activity#onStop
-onStop()}. Also consider using {@link android.os.AsyncTask} or {@link android.os.HandlerThread},
+android.app.Activity#onStart onStart()}, and stop it in {@link android.app.Activity#onStop
+onStop()}. Also consider using {@link android.os.AsyncTask} or {@link android.os.HandlerThread}
instead of the traditional {@link java.lang.Thread} class. See the Processes and
Threading document for more information about threads.
@@ -121,78 +131,81 @@ blocking operations.
-To create a service, you must create a subclass of {@link android.app.Service} (or one
-of its existing subclasses). In your implementation, you need to override some callback methods that
-handle key aspects of the service lifecycle and provide a mechanism for components to bind to
-the service, if appropriate. The most important callback methods you should override are:
+To create a service, you must create a subclass of {@link android.app.Service} or use one
+of its existing subclasses. In your implementation, you must override some callback methods that
+handle key aspects of the service lifecycle and provide a mechanism that allows the components to
+bind to the service, if appropriate. These are the most important callback methods that you should
+override:
- {@link android.app.Service#onStartCommand onStartCommand()}
- - The system calls this method when another component, such as an activity,
-requests that the service be started, by calling {@link android.content.Context#startService
-startService()}. Once this method executes, the service is started and can run in the
+
- The system invokes this method by calling {@link android.content.Context#startService
+startService()} when another component (such as an activity) requests that the service be started.
+When this method executes, the service is started and can run in the
background indefinitely. If you implement this, it is your responsibility to stop the service when
-its work is done, by calling {@link android.app.Service#stopSelf stopSelf()} or {@link
-android.content.Context#stopService stopService()}. (If you only want to provide binding, you don't
-need to implement this method.)
+its work is complete by calling {@link android.app.Service#stopSelf stopSelf()} or {@link
+android.content.Context#stopService stopService()}. If you only want to provide binding, you don't
+need to implement this method.
- {@link android.app.Service#onBind onBind()}
- - The system calls this method when another component wants to bind with the
-service (such as to perform RPC), by calling {@link android.content.Context#bindService
-bindService()}. In your implementation of this method, you must provide an interface that clients
-use to communicate with the service, by returning an {@link android.os.IBinder}. You must always
-implement this method, but if you don't want to allow binding, then you should return null.
+ - The system invokes this method by calling {@link android.content.Context#bindService
+bindService()} when another component wants to bind with the service (such as to perform RPC).
+In your implementation of this method, you must provide an interface that clients
+use to communicate with the service by returning an {@link android.os.IBinder}. You must always
+implement this method; however, if you don't want to allow binding, you should return
+null.
- {@link android.app.Service#onCreate()}
- - The system calls this method when the service is first created, to perform one-time setup
-procedures (before it calls either {@link android.app.Service#onStartCommand onStartCommand()} or
+
- The system invokes this method to perform one-time setup procedures when the service is
+initially created (before it calls either
+{@link android.app.Service#onStartCommand onStartCommand()} or
{@link android.app.Service#onBind onBind()}). If the service is already running, this method is not
called.
- {@link android.app.Service#onDestroy()}
- - The system calls this method when the service is no longer used and is being destroyed.
+
- The system invokes this method when the service is no longer used and is being destroyed.
Your service should implement this to clean up any resources such as threads, registered
-listeners, receivers, etc. This is the last call the service receives.
+listeners, or receivers. This is the last call that the service receives.
If a component starts the service by calling {@link
android.content.Context#startService startService()} (which results in a call to {@link
-android.app.Service#onStartCommand onStartCommand()}), then the service
-remains running until it stops itself with {@link android.app.Service#stopSelf()} or another
+android.app.Service#onStartCommand onStartCommand()}), the service
+continues to run until it stops itself with {@link android.app.Service#stopSelf()} or another
component stops it by calling {@link android.content.Context#stopService stopService()}.
If a component calls
-{@link android.content.Context#bindService bindService()} to create the service (and {@link
-android.app.Service#onStartCommand onStartCommand()} is not called), then the service runs
-only as long as the component is bound to it. Once the service is unbound from all clients, the
-system destroys it.
+{@link android.content.Context#bindService bindService()} to create the service and {@link
+android.app.Service#onStartCommand onStartCommand()} is not called, the service runs
+only as long as the component is bound to it. After the service is unbound from all of its clients,
+the system destroys it.
-The Android system will force-stop a service only when memory is low and it must recover system
+
The Android system force-stops a service only when memory is low and it must recover system
resources for the activity that has user focus. If the service is bound to an activity that has user
-focus, then it's less likely to be killed, and if the service is declared to run in the foreground (discussed later), then it will almost never be killed.
-Otherwise, if the service was started and is long-running, then the system will lower its position
-in the list of background tasks over time and the service will become highly susceptible to
-killing—if your service is started, then you must design it to gracefully handle restarts
+focus, it's less likely to be killed; if the service is declared to run in the foreground, it's rarely killed.
+If the service is started and is long-running, the system lowers its position
+in the list of background tasks over time, and the service becomes highly susceptible to
+killing—if your service is started, you must design it to gracefully handle restarts
by the system. If the system kills your service, it restarts it as soon as resources become
-available again (though this also depends on the value you return from {@link
-android.app.Service#onStartCommand onStartCommand()}, as discussed later). For more information
+available, but this also depends on the value that you return from {@link
+android.app.Service#onStartCommand onStartCommand()}. For more information
about when the system might destroy a service, see the Processes and Threading
document.
-In the following sections, you'll see how you can create each type of service and how to use
-it from other application components.
-
-
+In the following sections, you'll see how you can create the
+{@link android.content.Context#startService startService()} and
+{@link android.content.Context#bindService bindService()} service methods, as well as how to use
+them from other application components.
Declaring a service in the manifest
-Like activities (and other components), you must declare all services in your application's
-manifest file.
+You must declare all services in your application's
+manifest file, just as you do for activities and other components.
To declare your service, add a {@code } element
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>} element
as a child of the {@code }
-element. For example:
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}
+element. Here is an example:
<manifest ... >
@@ -205,48 +218,44 @@ element. For example:
See the {@code } element
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>} element
reference for more information about declaring your service in the manifest.
-There are other attributes you can include in the {@code } element to
-define properties such as permissions required to start the service and the process in
+
There are other attributes that you can include in the {@code <service>} element to
+define properties such as the permissions that are required to start the service and the process in
which the service should run. The {@code android:name}
-attribute is the only required attribute—it specifies the class name of the service. Once
-you publish your application, you should not change this name, because if you do, you risk breaking
+attribute is the only required attribute—it specifies the class name of the service. After
+you publish your application, leave this name unchanged to avoid the risk of breaking
code due to dependence on explicit intents to start or bind the service (read the blog post, Things
That Cannot Change).
-
To ensure your app is secure, always use an explicit intent when starting or binding
-your {@link android.app.Service} and do not declare intent filters for the service. If
-it's critical that you allow for some amount of ambiguity as to which service starts, you can
-supply intent filters for your services and exclude the component name from the {@link
-android.content.Intent}, but you then must set the package for the intent with {@link
-android.content.Intent#setPackage setPackage()}, which provides sufficient disambiguation for the
-target service.
+Caution: To ensure that your app is secure, always use an
+explicit intent when starting a {@link android.app.Service} and do not declare intent filters for
+your services. Using an implicit intent to start a service is a security hazard because you cannot
+be certain of the service that will respond to the intent, and the user cannot see which service
+starts. Beginning with Android 5.0 (API level 21), the system throws an exception if you call
+{@link android.content.Context#bindService bindService()} with an implicit intent.
-Additionally, you can ensure that your service is available to only your app by
+
You can ensure that your service is available to only your app by
including the {@code android:exported}
-attribute and setting it to {@code "false"}. This effectively stops other apps from starting your
+attribute and setting it to {@code false}. This effectively stops other apps from starting your
service, even when using an explicit intent.
-
-
-
-Creating a Started Service
+Creating a started service
A started service is one that another component starts by calling {@link
-android.content.Context#startService startService()}, resulting in a call to the service's
+android.content.Context#startService startService()}, which results in a call to the service's
{@link android.app.Service#onStartCommand onStartCommand()} method.
When a service is started, it has a lifecycle that's independent of the
-component that started it and the service can run in the background indefinitely, even if
+component that started it. The service can run in the background indefinitely, even if
the component that started it is destroyed. As such, the service should stop itself when its job
-is done by calling {@link android.app.Service#stopSelf stopSelf()}, or another component can stop it
-by calling {@link android.content.Context#stopService stopService()}.
+is complete by calling {@link android.app.Service#stopSelf stopSelf()}, or another component can
+stop it by calling {@link android.content.Context#stopService stopService()}.
An application component such as an activity can start the service by calling {@link
android.content.Context#startService startService()} and passing an {@link android.content.Intent}
@@ -254,65 +263,65 @@ that specifies the service and includes any data for the service to use. The ser
this {@link android.content.Intent} in the {@link android.app.Service#onStartCommand
onStartCommand()} method.
-For instance, suppose an activity needs to save some data to an online database. The activity can
-start a companion service and deliver it the data to save by passing an intent to {@link
+
For instance, suppose an activity needs to save some data to an online database. The activity
+can start a companion service and deliver it the data to save by passing an intent to {@link
android.content.Context#startService startService()}. The service receives the intent in {@link
-android.app.Service#onStartCommand onStartCommand()}, connects to the Internet and performs the
-database transaction. When the transaction is done, the service stops itself and it is
+android.app.Service#onStartCommand onStartCommand()}, connects to the Internet, and performs the
+database transaction. When the transaction is complete, the service stops itself and is
destroyed.
Caution: A service runs in the same process as the application
-in which it is declared and in the main thread of that application, by default. So, if your service
+in which it is declared and in the main thread of that application by default. If your service
performs intensive or blocking operations while the user interacts with an activity from the same
-application, the service will slow down activity performance. To avoid impacting application
-performance, you should start a new thread inside the service.
+application, the service slows down activity performance. To avoid impacting application
+performance, start a new thread inside the service.
Traditionally, there are two classes you can extend to create a started service:
+
- {@link android.app.Service}
- - This is the base class for all services. When you extend this class, it's important that
-you create a new thread in which to do all the service's work, because the service uses your
-application's main thread, by default, which could slow the performance of any activity your
+
- This is the base class for all services. When you extend this class, it's important to
+create a new thread in which the service can complete all of its work; the service uses your
+application's main thread by default, which can slow the performance of any activity that your
application is running.
- {@link android.app.IntentService}
- - This is a subclass of {@link android.app.Service} that uses a worker thread to handle all
-start requests, one at a time. This is the best option if you don't require that your service
-handle multiple requests simultaneously. All you need to do is implement {@link
+
- This is a subclass of {@link android.app.Service} that uses a worker thread to handle all of
+the start requests, one at a time. This is the best option if you don't require that your service
+handle multiple requests simultaneously. Implement {@link
android.app.IntentService#onHandleIntent onHandleIntent()}, which receives the intent for each
-start request so you can do the background work.
+start request so that you can complete the background work.
The following sections describe how you can implement your service using either one for these
classes.
-
Extending the IntentService class
-Because most started services don't need to handle multiple requests simultaneously
-(which can actually be a dangerous multi-threading scenario), it's probably best if you
+
Because most of the started services don't need to handle multiple requests simultaneously
+(which can actually be a dangerous multi-threading scenario), it's best that you
implement your service using the {@link android.app.IntentService} class.
-The {@link android.app.IntentService} does the following:
+The {@link android.app.IntentService} class does the following:
- - Creates a default worker thread that executes all intents delivered to {@link
-android.app.Service#onStartCommand onStartCommand()} separate from your application's main
+
- It creates a default worker thread that executes all of the intents that are delivered to
+{@link android.app.Service#onStartCommand onStartCommand()}, separate from your application's main
thread.
- Creates a work queue that passes one intent at a time to your {@link
android.app.IntentService#onHandleIntent onHandleIntent()} implementation, so you never have to
worry about multi-threading.
- - Stops the service after all start requests have been handled, so you never have to call
+
- Stops the service after all of the start requests are handled, so you never have to call
{@link android.app.Service#stopSelf}.
- - Provides default implementation of {@link android.app.IntentService#onBind onBind()} that
-returns null.
+ - Provides a default implementation of {@link android.app.IntentService#onBind onBind()}
+ that returns null.
- Provides a default implementation of {@link android.app.IntentService#onStartCommand
onStartCommand()} that sends the intent to the work queue and then to your {@link
android.app.IntentService#onHandleIntent onHandleIntent()} implementation.
-All this adds up to the fact that all you need to do is implement {@link
-android.app.IntentService#onHandleIntent onHandleIntent()} to do the work provided by the
-client. (Though, you also need to provide a small constructor for the service.)
+To complete the work that is provided by the client, implement {@link
+android.app.IntentService#onHandleIntent onHandleIntent()}.
+However, you also need to provide a small constructor for the service.
Here's an example implementation of {@link android.app.IntentService}:
@@ -352,12 +361,12 @@ android.app.IntentService#onHandleIntent onHandleIntent()}.
If you decide to also override other callback methods, such as {@link
android.app.IntentService#onCreate onCreate()}, {@link
android.app.IntentService#onStartCommand onStartCommand()}, or {@link
-android.app.IntentService#onDestroy onDestroy()}, be sure to call the super implementation, so
+android.app.IntentService#onDestroy onDestroy()}, be sure to call the super implementation so
that the {@link android.app.IntentService} can properly handle the life of the worker thread.
For example, {@link android.app.IntentService#onStartCommand onStartCommand()} must return
-the default implementation (which is how the intent gets delivered to {@link
-android.app.IntentService#onHandleIntent onHandleIntent()}):
+the default implementation, which is how the intent is delivered to {@link
+android.app.IntentService#onHandleIntent onHandleIntent()}:
@Override
@@ -369,22 +378,21 @@ public int onStartCommand(Intent intent, int flags, int startId) {
Besides {@link android.app.IntentService#onHandleIntent onHandleIntent()}, the only method
from which you don't need to call the super class is {@link android.app.IntentService#onBind
-onBind()} (but you only need to implement that if your service allows binding).
+onBind()}. You need to implement this only if your service allows binding.
In the next section, you'll see how the same kind of service is implemented when extending
-the base {@link android.app.Service} class, which is a lot more code, but which might be
+the base {@link android.app.Service} class, which uses more code, but might be
appropriate if you need to handle simultaneous start requests.
-
Extending the Service class
-As you saw in the previous section, using {@link android.app.IntentService} makes your
+
Using {@link android.app.IntentService} makes your
implementation of a started service very simple. If, however, you require your service to
-perform multi-threading (instead of processing start requests through a work queue), then you
+perform multi-threading (instead of processing start requests through a work queue), you
can extend the {@link android.app.Service} class to handle each intent.
-For comparison, the following example code is an implementation of the {@link
-android.app.Service} class that performs the exact same work as the example above using {@link
+
For comparison, the following example code shows an implementation of the {@link
+android.app.Service} class that performs the same work as the previous example using {@link
android.app.IntentService}. That is, for each start request, it uses a worker thread to perform the
job and processes only one request at a time.
@@ -460,20 +468,20 @@ public class HelloService extends Service {
However, because you handle each call to {@link android.app.Service#onStartCommand
onStartCommand()} yourself, you can perform multiple requests simultaneously. That's not what
-this example does, but if that's what you want, then you can create a new thread for each
-request and run them right away (instead of waiting for the previous request to finish).
+this example does, but if that's what you want, you can create a new thread for each
+request and run them right away instead of waiting for the previous request to finish.
Notice that the {@link android.app.Service#onStartCommand onStartCommand()} method must return an
integer. The integer is a value that describes how the system should continue the service in the
-event that the system kills it (as discussed above, the default implementation for {@link
-android.app.IntentService} handles this for you, though you are able to modify it). The return value
+event that the system kills it. The default implementation for {@link
+android.app.IntentService} handles this for you, but you are able to modify it. The return value
from {@link android.app.Service#onStartCommand onStartCommand()} must be one of the following
constants:
- {@link android.app.Service#START_NOT_STICKY}
- If the system kills the service after {@link android.app.Service#onStartCommand
-onStartCommand()} returns, do not recreate the service, unless there are pending
+onStartCommand()} returns, do not recreate the service unless there are pending
intents to deliver. This is the safest option to avoid running your service when not necessary
and when your application can simply restart any unfinished jobs.
- {@link android.app.Service#START_STICKY}
@@ -481,9 +489,9 @@ and when your application can simply restart any unfinished jobs.
onStartCommand()} returns, recreate the service and call {@link
android.app.Service#onStartCommand onStartCommand()}, but do not redeliver the last intent.
Instead, the system calls {@link android.app.Service#onStartCommand onStartCommand()} with a
-null intent, unless there were pending intents to start the service, in which case,
+null intent unless there are pending intents to start the service. In that case,
those intents are delivered. This is suitable for media players (or similar services) that are not
-executing commands, but running indefinitely and waiting for a job.
+executing commands but are running indefinitely and waiting for a job.
- {@link android.app.Service#START_REDELIVER_INTENT}
- If the system kills the service after {@link android.app.Service#onStartCommand
onStartCommand()} returns, recreate the service and call {@link
@@ -494,35 +502,35 @@ actively performing a job that should be immediately resumed, such as downloadin
For more details about these return values, see the linked reference documentation for each
constant.
-
-
-Starting a Service
+Starting a service
You can start a service from an activity or other application component by passing an
{@link android.content.Intent} (specifying the service to start) to {@link
android.content.Context#startService startService()}. The Android system calls the service's {@link
android.app.Service#onStartCommand onStartCommand()} method and passes it the {@link
-android.content.Intent}. (You should never call {@link android.app.Service#onStartCommand
-onStartCommand()} directly.)
+android.content.Intent}.
+
+Note: Never call
+{@link android.app.Service#onStartCommand onStartCommand()} directly.
For example, an activity can start the example service in the previous section ({@code
HelloService}) using an explicit intent with {@link android.content.Context#startService
-startService()}:
+startService()}, as shown here:
Intent intent = new Intent(this, HelloService.class);
startService(intent);
-The {@link android.content.Context#startService startService()} method returns immediately and
+
The {@link android.content.Context#startService startService()} method returns immediately, and
the Android system calls the service's {@link android.app.Service#onStartCommand
onStartCommand()} method. If the service is not already running, the system first calls {@link
-android.app.Service#onCreate onCreate()}, then calls {@link android.app.Service#onStartCommand
-onStartCommand()}.
+android.app.Service#onCreate onCreate()}, and then it calls
+{@link android.app.Service#onStartCommand onStartCommand()}.
-If the service does not also provide binding, the intent delivered with {@link
+
If the service does not also provide binding, the intent that is delivered with {@link
android.content.Context#startService startService()} is the only mode of communication between the
-application component and the service. However, if you want the service to send a result back, then
+application component and the service. However, if you want the service to send a result back,
the client that starts the service can create a {@link android.app.PendingIntent} for a broadcast
(with {@link android.app.PendingIntent#getBroadcast getBroadcast()}) and deliver it to the service
in the {@link android.content.Intent} that starts the service. The service can then use the
@@ -533,109 +541,102 @@ broadcast to deliver a result.
the service (with {@link android.app.Service#stopSelf stopSelf()} or {@link
android.content.Context#stopService stopService()}) is required to stop it.
-
Stopping a service
A started service must manage its own lifecycle. That is, the system does not stop or
destroy the service unless it must recover system memory and the service
-continues to run after {@link android.app.Service#onStartCommand onStartCommand()} returns. So,
-the service must stop itself by calling {@link android.app.Service#stopSelf stopSelf()} or another
+continues to run after {@link android.app.Service#onStartCommand onStartCommand()} returns. The
+service must stop itself by calling {@link android.app.Service#stopSelf stopSelf()}, or another
component can stop it by calling {@link android.content.Context#stopService stopService()}.
Once requested to stop with {@link android.app.Service#stopSelf stopSelf()} or {@link
android.content.Context#stopService stopService()}, the system destroys the service as soon as
possible.
-However, if your service handles multiple requests to {@link
-android.app.Service#onStartCommand onStartCommand()} concurrently, then you shouldn't stop the
-service when you're done processing a start request, because you might have since received a new
+
If your service handles multiple requests to {@link
+android.app.Service#onStartCommand onStartCommand()} concurrently, you shouldn't stop the
+service when you're done processing a start request, as you might have received a new
start request (stopping at the end of the first request would terminate the second one). To avoid
this problem, you can use {@link android.app.Service#stopSelf(int)} to ensure that your request to
stop the service is always based on the most recent start request. That is, when you call {@link
android.app.Service#stopSelf(int)}, you pass the ID of the start request (the startId
delivered to {@link android.app.Service#onStartCommand onStartCommand()}) to which your stop request
-corresponds. Then if the service received a new start request before you were able to call {@link
-android.app.Service#stopSelf(int)}, then the ID will not match and the service will not stop.
+corresponds. Then, if the service receives a new start request before you are able to call {@link
+android.app.Service#stopSelf(int)}, the ID does not match and the service does not stop.
-Caution: It's important that your application stops its services
-when it's done working, to avoid wasting system resources and consuming battery power. If necessary,
-other components can stop the service by calling {@link
+
Caution: To avoid wasting system resources and consuming
+battery power, ensure that your application stops its services when it's done working.
+If necessary, other components can stop the service by calling {@link
android.content.Context#stopService stopService()}. Even if you enable binding for the service,
-you must always stop the service yourself if it ever received a call to {@link
+you must always stop the service yourself if it ever receives a call to {@link
android.app.Service#onStartCommand onStartCommand()}.
For more information about the lifecycle of a service, see the section below about Managing the Lifecycle of a Service.
-
-
-Creating a Bound Service
+Creating a bound service
A bound service is one that allows application components to bind to it by calling {@link
-android.content.Context#bindService bindService()} in order to create a long-standing connection
-(and generally does not allow components to start it by calling {@link
-android.content.Context#startService startService()}).
+android.content.Context#bindService bindService()} to create a long-standing connection.
+It generally doesn't allow components to start it by calling {@link
+android.content.Context#startService startService()}.
-You should create a bound service when you want to interact with the service from activities
+
Create a bound service when you want to interact with the service from activities
and other components in your application or to expose some of your application's functionality to
-other applications, through interprocess communication (IPC).
+other applications through interprocess communication (IPC).
-To create a bound service, you must implement the {@link
+
To create a bound service, implement the {@link
android.app.Service#onBind onBind()} callback method to return an {@link android.os.IBinder} that
defines the interface for communication with the service. Other application components can then call
{@link android.content.Context#bindService bindService()} to retrieve the interface and
begin calling methods on the service. The service lives only to serve the application component that
-is bound to it, so when there are no components bound to the service, the system destroys it
-(you do not need to stop a bound service in the way you must when the service is started
-through {@link android.app.Service#onStartCommand onStartCommand()}).
+is bound to it, so when there are no components bound to the service, the system destroys it.
+You do not need to stop a bound service in the same way that you must when the service is
+started through {@link android.app.Service#onStartCommand onStartCommand()}.
-To create a bound service, the first thing you must do is define the interface that specifies
-how a client can communicate with the service. This interface between the service
+
To create a bound service, you must define the interface that specifies how a client can
+communicate with the service. This interface between the service
and a client must be an implementation of {@link android.os.IBinder} and is what your service must
return from the {@link android.app.Service#onBind
-onBind()} callback method. Once the client receives the {@link android.os.IBinder}, it can begin
+onBind()} callback method. After the client receives the {@link android.os.IBinder}, it can begin
interacting with the service through that interface.
-Multiple clients can bind to the service at once. When a client is done interacting with the
-service, it calls {@link android.content.Context#unbindService unbindService()} to unbind. Once
-there are no clients bound to the service, the system destroys the service.
+Multiple clients can bind to the service simultaneously. When a client is done interacting with
+the service, it calls {@link android.content.Context#unbindService unbindService()} to unbind.
+When there are no clients bound to the service, the system destroys the service.
-There are multiple ways to implement a bound service and the implementation is more
-complicated than a started service, so the bound service discussion appears in a separate
-document about There are multiple ways to implement a bound service, and the implementation is more
+complicated than a started service. For these reasons, the bound service discussion appears in a
+separate document about Bound Services.
+Sending notifications to the user
-
-Sending Notifications to the User
-
-Once running, a service can notify the user of events using When a service is running, it can notify the user of events using Toast Notifications or Status Bar Notifications.
-A toast notification is a message that appears on the surface of the current window for a
-moment then disappears, while a status bar notification provides an icon in the status bar with a
+
A toast notification is a message that appears on the surface of the current window for only a
+moment before disappearing. A status bar notification provides an icon in the status bar with a
message, which the user can select in order to take an action (such as start an activity).
-Usually, a status bar notification is the best technique when some background work has completed
-(such as a file completed
-downloading) and the user can now act on it. When the user selects the notification from the
-expanded view, the notification can start an activity (such as to view the downloaded file).
+Usually, a status bar notification is the best technique to use when background work such as
+a file download has completed, and the user can now act on it. When the user
+selects the notification from the expanded view, the notification can start an activity
+(such as to display the downloaded file).
See the Toast Notifications or Status Bar Notifications
developer guides for more information.
+Running a service in the foreground
-
-Running a Service in the Foreground
-
-A foreground service is a service that's considered to be something the
-user is actively aware of and thus not a candidate for the system to kill when low on memory. A
+
A foreground service is a service that the
+user is actively aware of and is not a candidate for the system to kill when low on memory. A
foreground service must provide a notification for the status bar, which is placed under the
-"Ongoing" heading, which means that the notification cannot be dismissed unless the service is
-either stopped or removed from the foreground.
+Ongoing heading. This means that the notification cannot be dismissed unless the service
+is either stopped or removed from the foreground.
For example, a music player that plays music from a service should be set to run in the
foreground, because the user is explicitly aware
@@ -643,9 +644,9 @@ of its operation. The notification in the status bar might indicate the current
the user to launch an activity to interact with the music player.
To request that your service run in the foreground, call {@link
-android.app.Service#startForeground startForeground()}. This method takes two parameters: an integer
-that uniquely identifies the notification and the {@link
-android.app.Notification} for the status bar. For example:
+android.app.Service#startForeground startForeground()}. This method takes two parameters: an
+integer that uniquely identifies the notification and the {@link
+android.app.Notification} for the status bar. Here is an example:
Notification notification = new Notification(R.drawable.icon, getText(R.string.ticker_text),
@@ -657,30 +658,27 @@ notification.setLatestEventInfo(this, getText(R.string.notification_title),
startForeground(ONGOING_NOTIFICATION_ID, notification);
-Caution: The integer ID you give to {@link
+
Caution: The integer ID that you give to {@link
android.app.Service#startForeground startForeground()} must not be 0.
-
To remove the service from the foreground, call {@link
-android.app.Service#stopForeground stopForeground()}. This method takes a boolean, indicating
+android.app.Service#stopForeground stopForeground()}. This method takes a boolean, which indicates
whether to remove the status bar notification as well. This method does not stop the
-service. However, if you stop the service while it's still running in the foreground, then the
+service. However, if you stop the service while it's still running in the foreground, the
notification is also removed.
For more information about notifications, see Creating Status Bar
Notifications.
+Managing the lifecycle of a service
+The lifecycle of a service is much simpler than that of an activity. However, it's even more
+important that you pay close attention to how your service is created and destroyed because a
+service can run in the background without the user being aware.
-Managing the Lifecycle of a Service
-
-The lifecycle of a service is much simpler than that of an activity. However, it's even more important
-that you pay close attention to how your service is created and destroyed, because a service
-can run in the background without the user being aware.
-
-The service lifecycle—from when it's created to when it's destroyed—can follow two
-different paths:
+The service lifecycle—from when it's created to when it's destroyed—can follow
+either of these two paths:
- A started service
@@ -689,27 +687,26 @@ android.content.Context#startService startService()}. The service then runs inde
stop itself by calling {@link
android.app.Service#stopSelf() stopSelf()}. Another component can also stop the
service by calling {@link android.content.Context#stopService
-stopService()}. When the service is stopped, the system destroys it..
+stopService()}. When the service is stopped, the system destroys it.
- A bound service
The service is created when another component (a client) calls {@link
android.content.Context#bindService bindService()}. The client then communicates with the service
through an {@link android.os.IBinder} interface. The client can close the connection by calling
{@link android.content.Context#unbindService unbindService()}. Multiple clients can bind to
-the same service and when all of them unbind, the system destroys the service. (The service
-does not need to stop itself.)
+the same service and when all of them unbind, the system destroys the service. The service
+does not need to stop itself.
-These two paths are not entirely separate. That is, you can bind to a service that was already
-started with {@link android.content.Context#startService startService()}. For example, a background
-music service could be started by calling {@link android.content.Context#startService
+
These two paths are not entirely separate. You can bind to a service that is already
+started with {@link android.content.Context#startService startService()}. For example, you can
+start a background music service by calling {@link android.content.Context#startService
startService()} with an {@link android.content.Intent} that identifies the music to play. Later,
possibly when the user wants to exercise some control over the player or get information about the
current song, an activity can bind to the service by calling {@link
-android.content.Context#bindService bindService()}. In cases like this, {@link
+android.content.Context#bindService bindService()}. In cases such as this, {@link
android.content.Context#stopService stopService()} or {@link android.app.Service#stopSelf
-stopSelf()} does not actually stop the service until all clients unbind.
-
+stopSelf()} doesn't actually stop the service until all of the clients unbind.
Implementing the lifecycle callbacks
@@ -763,20 +760,30 @@ shows the lifecycle when the service is created with {@link android.content.Cont
startService()} and the diagram on the right shows the lifecycle when the service is created
with {@link android.content.Context#bindService bindService()}.
-By implementing these methods, you can monitor two nested loops of the service's lifecycle:
+Figure 2 illustrates the typical callback methods for a service. Although the figure separates
+services that are created by {@link android.content.Context#startService startService()} from those
+created by {@link android.content.Context#bindService bindService()}, keep
+in mind that any service, no matter how it's started, can potentially allow clients to bind to it.
+A service that was initially started with {@link android.app.Service#onStartCommand
+onStartCommand()} (by a client calling {@link android.content.Context#startService startService()})
+can still receive a call to {@link android.app.Service#onBind onBind()} (when a client calls
+{@link android.content.Context#bindService bindService()}).
+
+By implementing these methods, you can monitor these two nested loops of the service's
+lifecycle:
-- The entire lifetime of a service happens between the time {@link
-android.app.Service#onCreate onCreate()} is called and the time {@link
+
- The entire lifetime of a service occurs between the time that {@link
+android.app.Service#onCreate onCreate()} is called and the time that {@link
android.app.Service#onDestroy} returns. Like an activity, a service does its initial setup in
{@link android.app.Service#onCreate onCreate()} and releases all remaining resources in {@link
-android.app.Service#onDestroy onDestroy()}. For example, a
-music playback service could create the thread where the music will be played in {@link
-android.app.Service#onCreate onCreate()}, then stop the thread in {@link
+android.app.Service#onDestroy onDestroy()}. For example, a
+music playback service can create the thread where the music is played in {@link
+android.app.Service#onCreate onCreate()}, and then it can stop the thread in {@link
android.app.Service#onDestroy onDestroy()}.
-
The {@link android.app.Service#onCreate onCreate()} and {@link android.app.Service#onDestroy
-onDestroy()} methods are called for all services, whether
+
Note: The {@link android.app.Service#onCreate onCreate()}
+and {@link android.app.Service#onDestroy onDestroy()} methods are called for all services, whether
they're created by {@link android.content.Context#startService startService()} or {@link
android.content.Context#bindService bindService()}.
@@ -784,8 +791,8 @@ android.content.Context#bindService bindService()}.
android.app.Service#onStartCommand onStartCommand()} or {@link android.app.Service#onBind onBind()}.
Each method is handed the {@link
android.content.Intent} that was passed to either {@link android.content.Context#startService
-startService()} or {@link android.content.Context#bindService bindService()}, respectively.
-If the service is started, the active lifetime ends the same time that the entire lifetime
+startService()} or {@link android.content.Context#bindService bindService()}.
+
If the service is started, the active lifetime ends at the same time that the entire lifetime
ends (the service is still active even after {@link android.app.Service#onStartCommand
onStartCommand()} returns). If the service is bound, the active lifetime ends when {@link
android.app.Service#onUnbind onUnbind()} returns.
@@ -795,26 +802,16 @@ android.app.Service#onUnbind onUnbind()} returns.
Note: Although a started service is stopped by a call to
either {@link android.app.Service#stopSelf stopSelf()} or {@link
android.content.Context#stopService stopService()}, there is not a respective callback for the
-service (there's no {@code onStop()} callback). So, unless the service is bound to a client,
+service (there's no {@code onStop()} callback). Unless the service is bound to a client,
the system destroys it when the service is stopped—{@link
android.app.Service#onDestroy onDestroy()} is the only callback received.
-Figure 2 illustrates the typical callback methods for a service. Although the figure separates
-services that are created by {@link android.content.Context#startService startService()} from those
-created by {@link android.content.Context#bindService bindService()}, keep
-in mind that any service, no matter how it's started, can potentially allow clients to bind to it.
-So, a service that was initially started with {@link android.app.Service#onStartCommand
-onStartCommand()} (by a client calling {@link android.content.Context#startService startService()})
-can still receive a call to {@link android.app.Service#onBind onBind()} (when a client calls
-{@link android.content.Context#bindService bindService()}).
-
For more information about creating a service that provides binding, see the Bound Services document,
which includes more information about the {@link android.app.Service#onRebind onRebind()}
callback method in the section about Managing the Lifecycle of
-a Bound Service.
-
+href="{@docRoot}guide/components/bound-services.html#Lifecycle">Managing the lifecycle of
+a bound service.
Unless you specify otherwise, most of the operations you do in an app run in the foreground on
- a special thread called the UI thread. This can cause problems, because long-running operations
- will interfere with the responsiveness of your user interface. This annoys your users, and can
+ a special thread called the UI thread. Long-running foreground operations can cause problems
+ and interfere with the responsiveness of your user interface, which annoys your users and can
even cause system errors. To avoid this, the Android framework offers several classes that
- help you off-load operations onto a separate thread running in the background. The most useful
- of these is {@link android.app.IntentService}.
+ help you off-load operations onto a separate thread that runs in the background. The most
+ useful of these is {@link android.app.IntentService}.
This class describes how to implement an {@link android.app.IntentService}, send it work
requests, and report its results to other components.
+
+Note: If your app targets Android 5.0 (API level 21),
+ you should use {@link android.app.job.JobScheduler} to execute background
+ services. For more information about this class,
+ see the {@link android.app.job.JobScheduler} reference documentation.
+
Lessons
-
From 4e82fe51207bbd8ceaec356b4215e338ec63a31e Mon Sep 17 00:00:00 2001
From: Lifu Tang
Date: Mon, 24 Oct 2016 13:33:47 -0700
Subject: [PATCH 13/98] Fix GNSS status delivery to the callbacks
Bug: 32357457
Change-Id: I8f2b8dae5472cb81313417e85c092dca0aae5bd9
---
.../android/location/LocationManager.java | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 2b3ed8748a20b..da0e515cda4be 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -1465,7 +1465,7 @@ public class LocationManager {
mGpsNmeaListener = null;
mNmeaBuffer = null;
mOldGnssCallback = null;
- mGnssCallback = new GnssStatus.Callback() {
+ mGnssCallback = mGpsListener != null ? new GnssStatus.Callback() {
@Override
public void onStarted() {
mGpsListener.onGpsStatusChanged(GpsStatus.GPS_EVENT_STARTED);
@@ -1485,7 +1485,7 @@ public class LocationManager {
public void onSatelliteStatusChanged(GnssStatus status) {
mGpsListener.onGpsStatusChanged(GpsStatus.GPS_EVENT_SATELLITE_STATUS);
}
- };
+ } : null;
mOldGnssNmeaListener = null;
mGnssNmeaListener = null;
}
@@ -1502,12 +1502,12 @@ public class LocationManager {
mOldGnssCallback = null;
mGnssCallback = null;
mOldGnssNmeaListener = null;
- mGnssNmeaListener = new OnNmeaMessageListener() {
+ mGnssNmeaListener = mGpsNmeaListener != null ? new OnNmeaMessageListener() {
@Override
public void onNmeaMessage(String nmea, long timestamp) {
mGpsNmeaListener.onNmeaReceived(timestamp, nmea);
}
- };
+ } : null;
}
GnssStatusListenerTransport(GnssStatusCallback callback) {
@@ -1516,7 +1516,7 @@ public class LocationManager {
GnssStatusListenerTransport(GnssStatusCallback callback, Handler handler) {
mOldGnssCallback = callback;
- mGnssCallback = new GnssStatus.Callback() {
+ mGnssCallback = mOldGnssCallback != null ? new GnssStatus.Callback() {
@Override
public void onStarted() {
mOldGnssCallback.onStarted();
@@ -1536,7 +1536,7 @@ public class LocationManager {
public void onSatelliteStatusChanged(GnssStatus status) {
mOldGnssCallback.onSatelliteStatusChanged(status);
}
- };
+ } : null;
mGnssHandler = new GnssHandler(handler);
mOldGnssNmeaListener = null;
mGnssNmeaListener = null;
@@ -1569,12 +1569,12 @@ public class LocationManager {
mOldGnssCallback = null;
mGnssHandler = new GnssHandler(handler);
mOldGnssNmeaListener = listener;
- mGnssNmeaListener = new OnNmeaMessageListener() {
+ mGnssNmeaListener = mOldGnssNmeaListener != null ? new OnNmeaMessageListener() {
@Override
public void onNmeaMessage(String message, long timestamp) {
mOldGnssNmeaListener.onNmeaReceived(timestamp, message);
}
- };
+ } : null;
mGpsListener = null;
mGpsNmeaListener = null;
mNmeaBuffer = new ArrayList();
@@ -1597,7 +1597,7 @@ public class LocationManager {
@Override
public void onGnssStarted() {
- if (mGpsListener != null) {
+ if (mGnssCallback != null) {
Message msg = Message.obtain();
msg.what = GpsStatus.GPS_EVENT_STARTED;
mGnssHandler.sendMessage(msg);
@@ -1606,7 +1606,7 @@ public class LocationManager {
@Override
public void onGnssStopped() {
- if (mGpsListener != null) {
+ if (mGnssCallback != null) {
Message msg = Message.obtain();
msg.what = GpsStatus.GPS_EVENT_STOPPED;
mGnssHandler.sendMessage(msg);
@@ -1615,7 +1615,7 @@ public class LocationManager {
@Override
public void onFirstFix(int ttff) {
- if (mGpsListener != null) {
+ if (mGnssCallback != null) {
mTimeToFirstFix = ttff;
Message msg = Message.obtain();
msg.what = GpsStatus.GPS_EVENT_FIRST_FIX;
From ec50931d884e0b8f13a5f3050d786275817a2d92 Mon Sep 17 00:00:00 2001
From: Jorim Jaggi
Date: Mon, 24 Oct 2016 15:40:06 -0700
Subject: [PATCH 14/98] Make sure to call dismissKeyguard after setOccluded
If we call it before, SystemUI will not dismiss the Keyguard as
it is still occluded in that state.
Change-Id: I15cf9cc43b9a2b747bfd224a6dfbd769eee19d69
Fixes: 32202560
---
.../server/policy/PhoneWindowManager.java | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index f027b941454d8..74e720f360ac7 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5293,18 +5293,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
} else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) {
mKeyguardHidden = false;
- boolean willDismiss = false;
+ boolean dismissKeyguard = false;
+ final boolean trusted = mKeyguardDelegate.isTrusted();
if (mDismissKeyguard == DISMISS_KEYGUARD_START) {
- final boolean trusted = mKeyguardDelegate.isTrusted();
- willDismiss = trusted && mKeyguardOccluded && mKeyguardDelegate != null
- && mKeyguardDelegate.isShowing();
+ final boolean willDismiss = trusted && mKeyguardOccluded
+ && mKeyguardDelegate != null && mKeyguardDelegate.isShowing();
if (willDismiss) {
mCurrentlyDismissingKeyguard = true;
}
-
- // Only launch the next keyguard unlock window once per window.
- mHandler.post(() -> mKeyguardDelegate.dismiss(
- trusted /* allowWhileOccluded */));
+ dismissKeyguard = true;
}
// If we are currently dismissing Keyguard, there is no need to unocclude it.
@@ -5315,6 +5312,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| FINISH_LAYOUT_REDO_WALLPAPER;
}
}
+
+ if (dismissKeyguard) {
+ // Only launch the next keyguard unlock window once per window.
+ mHandler.post(() -> mKeyguardDelegate.dismiss(
+ trusted /* allowWhileOccluded */));
+ }
} else {
mWinDismissingKeyguard = null;
mSecureDismissingKeyguard = false;
From 6d512da8e7eba518cd1a588193e5e6801f00e476 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 24 Oct 2016 15:55:26 -0700
Subject: [PATCH 15/98] Import translations. DO NOT MERGE
Change-Id: I2be2e9036cfae41141574a37a69d76491eb1cb6a
Auto-generated-cl: translation import
---
core/res/res/values-fr/strings.xml | 2 +-
core/res/res/values-hy-rAM/strings.xml | 4 ++--
core/res/res/values-ja/strings.xml | 8 ++++----
core/res/res/values-ko/strings.xml | 2 +-
core/res/res/values-zh-rCN/strings.xml | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 0d40354fad8c1..9da228e40d01d 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1570,7 +1570,7 @@
"Supprimé par votre administrateur"
"Pour améliorer l\'autonomie de la batterie, l\'économiseur de batterie réduit les performances et désactive le vibreur, les services de localisation et la plupart des données en arrière-plan. Les messageries électroniques ou autres applications utilisant la synchronisation pourraient ne pas se mettre à jour, sauf si vous les ouvrez.\n\nL\'économiseur de batterie s\'éteint automatiquement lorsque l\'appareil est en charge."
"Pour réduire la consommation des données, l\'économiseur de données empêche certaines applications d\'envoyer ou de recevoir des données en arrière-plan. Ainsi, une application que vous utilisez actuellement peut accéder à des données, mais moins souvent. Par exemple, il se peut que les images ne s\'affichent pas tant que vous n\'appuyez pas dessus."
- "Activer sauvegarde données ?"
+ "Activer l\'économiseur de données ?"
"Activer"
- Pendant %1$d minute (jusqu\'à %2$s)
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index b90ca75777834..160efff177e38 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -214,7 +214,7 @@
"Հեռախոսի ընտրանքներ"
"Էկրանի փական"
"Անջատել"
- "Արտակարգ իրավիճակ"
+ "Շտապ կանչ"
"Վրիպակի զեկույց"
"Գրել սխալի զեկույց"
"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"
@@ -674,7 +674,7 @@
"Ապակողպելու կամ շտապ կանչ անելու համար սեղմեք «Ընտրացանկ»"
"Ապակողպելու համար սեղմեք Ցանկը:"
"Հավաքեք սխեման` ապակողպելու համար"
- "Արտակարգ իրավիճակ"
+ "Շտապ կանչ"
"Վերադառնալ զանգին"
"Ճիշտ է:"
"Կրկին փորձեք"
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index fadc62c83103c..5550900543e40 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -512,8 +512,8 @@
"携帯通信会社のSMSサービスのトップレベルインターフェースにバインドすることを所有者に許可します。通常のアプリでは不要です。"
"携帯通信会社のサービスへのバインド"
"携帯通信会社のサービスにバインドすることを所有者に許可します。通常のアプリでは不要です。"
- "[通知を非表示]へのアクセス"
- "[通知を非表示]の設定の読み取りと書き込みをアプリに許可します。"
+ "マナーモードへのアクセス"
+ "マナーモード設定の読み取りと書き込みをアプリに許可します。"
"パスワードルールの設定"
"画面ロックのパスワードとPINの長さと使用できる文字を制御します。"
"画面ロック解除試行の監視"
@@ -1607,10 +1607,10 @@
"%1$sまで"
"%1$s(次のアラーム)まで"
"ユーザーがOFFにするまで"
- "[通知を非表示]をOFFにするまで"
+ "マナーモードを OFF にするまで"
"%1$s/%2$s"
"折りたたむ"
- "通知を非表示"
+ "マナーモード"
"ダウンタイム"
"平日の夜"
"週末"
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 82901e0fa72b4..b23a96637c578 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -260,7 +260,7 @@
"전화"
"통화 상태를 관리하거나 전화를 걸 수 있도록"
"신체 센서"
- "생체 신호에 관한 센서 데이터에 접근할 수 있도록"
+ "생체 신호에 관한 센서 데이터에 액세스"
"창 콘텐츠 가져오기"
"상호작용 중인 창의 콘텐츠를 검사합니다."
"터치하여 탐색 사용"
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index a29f78edde53e..98ae54c4e5050 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -195,7 +195,7 @@
"振铃器开启"
"Android 系统更新"
"正在准备更新…"
- "正在处理更新文件包…"
+ "正在处理更新软件包…"
"正在重新启动…"
"恢复出厂设置"
"正在重新启动…"
From b3a6a7afe42b4a84a2d18efb11a22a7d85035b7d Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 24 Oct 2016 16:04:03 -0700
Subject: [PATCH 16/98] Import translations. DO NOT MERGE
Change-Id: I836ffcc309753e1688f29b62f6a3dc757c8be0b5
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-ja/strings.xml | 20 ++++++++++----------
packages/SystemUI/res/values-ko/strings.xml | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index a6f521b5bc0c2..8d51fe635aa7e 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -197,13 +197,13 @@
"機内モードがONです。"
"機内モードをOFFにしました。"
"機内モードをONにしました。"
- "[通知を非表示]はONで、優先する通知のみです。"
- "[通知を非表示]はONで、サイレントです。"
- "[通知を非表示]はONで、アラームのみです。"
- "通知を非表示"
- "[通知を非表示]はOFFです。"
- "[通知を非表示]をOFFにしました。"
- "[通知を非表示]をONにしました。"
+ "マナーモードは ON で、優先する通知のみ許可します。"
+ "マナーモードは ON で、サイレント モードです。"
+ "マナーモードは ON で、アラームのみ許可します。"
+ "マナーモード"
+ "マナーモードは OFF です。"
+ "マナーモードを OFF にしました。"
+ "マナーモードを ON にしました。"
"Bluetooth"
"BluetoothがOFFです。"
"BluetoothがONです。"
@@ -264,7 +264,7 @@
"デザートケース"
"スクリーン セーバー"
"イーサネット"
- "通知を非表示"
+ "マナーモード"
"優先する通知のみ"
"アラームのみ"
"サイレント"
@@ -572,9 +572,9 @@
"YouTube"
"カレンダー"
"音量調節を表示"
- "通知の非表示"
+ "マナーモード"
"音量ボタンのショートカット"
- "音量上げボタンで [通知を非表示] を OFF にする"
+ "音量上げボタンでマナーモードを OFF にする"
"電池"
"時計"
"ヘッドセット"
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 2090404491d13..b3f121c359b5b 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -467,7 +467,7 @@
"충전 중이 아닌 경우 상태 표시줄 아이콘 내에 배터리 잔량 비율 표시"
"빠른 설정"
"상태 표시줄"
- "개요"
+ "최근 사용"
"데모 모드"
"데모 모드 사용"
"데모 모드 표시"
From 8dd88f649b0cee33588a154a942195c0920d59a1 Mon Sep 17 00:00:00 2001
From: Matthew Bouyack
Date: Mon, 24 Oct 2016 14:01:26 -0700
Subject: [PATCH 17/98] Avoid redundant setMatrix calls from
setMatrixInTransaction This matches the behavior of setPositionInTransaction
and setSizeInTransaction.
By eliminating calls to setMatrix, we avoid triggering redundant
SurfaceFlinger invalidates. This is particularly noteworthy on Android
Wear where we must update the minute hand every 60 seconds, but want the
device to spend as much time sleeping as possible.
See b/31489482
Change-Id: I424bb9f60c3033921fa04e7abcfc552500114f1f
---
.../server/wm/WindowSurfaceController.java | 22 ++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/wm/WindowSurfaceController.java b/services/core/java/com/android/server/wm/WindowSurfaceController.java
index f5ed9d1b86502..961f742f3e27f 100644
--- a/services/core/java/com/android/server/wm/WindowSurfaceController.java
+++ b/services/core/java/com/android/server/wm/WindowSurfaceController.java
@@ -57,6 +57,12 @@ class WindowSurfaceController {
private float mSurfaceW = 0;
private float mSurfaceH = 0;
+ // Initialize to the identity matrix.
+ private float mLastDsdx = 1;
+ private float mLastDtdx = 0;
+ private float mLastDsdy = 0;
+ private float mLastDtdy = 1;
+
private float mSurfaceAlpha = 0;
private int mSurfaceLayer = 0;
@@ -266,6 +272,17 @@ class WindowSurfaceController {
void setMatrixInTransaction(float dsdx, float dtdx, float dsdy, float dtdy,
boolean recoveringMemory) {
+ final boolean matrixChanged = mLastDsdx != dsdx || mLastDtdx != dtdx ||
+ mLastDsdy != dsdy || mLastDtdy != dtdy;
+ if (!matrixChanged) {
+ return;
+ }
+
+ mLastDsdx = dsdx;
+ mLastDtdx = dtdx;
+ mLastDsdy = dsdy;
+ mLastDtdy = dtdy;
+
try {
if (SHOW_TRANSACTIONS) logSurface(
"MATRIX [" + dsdx + "," + dtdx + "," + dsdy + "," + dtdy + "]", null);
@@ -281,7 +298,6 @@ class WindowSurfaceController {
mAnimator.reclaimSomeSurfaceMemory("matrix", true);
}
}
- return;
}
boolean setSizeInTransaction(int width, int height, boolean recoveringMemory) {
@@ -318,6 +334,10 @@ class WindowSurfaceController {
mSurfaceControl.setAlpha(alpha);
mSurfaceLayer = layer;
mSurfaceControl.setLayer(layer);
+ mLastDsdx = dsdx;
+ mLastDtdx = dtdx;
+ mLastDsdy = dsdy;
+ mLastDtdy = dtdy;
mSurfaceControl.setMatrix(
dsdx, dtdx, dsdy, dtdy);
From 9ac3087a906857c084b61d98dd4287936c574856 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 24 Oct 2016 21:06:04 -0700
Subject: [PATCH 18/98] Import translations. DO NOT MERGE
Change-Id: I8fe6b5f09b7c3daf9c630b5c36d02199248c11b3
Auto-generated-cl: translation import
---
core/res/res/values-fr/strings.xml | 2 +-
core/res/res/values-hy-rAM/strings.xml | 4 ++--
core/res/res/values-ja/strings.xml | 8 ++++----
core/res/res/values-ko/strings.xml | 2 +-
core/res/res/values-zh-rCN/strings.xml | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 0d40354fad8c1..9da228e40d01d 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1570,7 +1570,7 @@
"Supprimé par votre administrateur"
"Pour améliorer l\'autonomie de la batterie, l\'économiseur de batterie réduit les performances et désactive le vibreur, les services de localisation et la plupart des données en arrière-plan. Les messageries électroniques ou autres applications utilisant la synchronisation pourraient ne pas se mettre à jour, sauf si vous les ouvrez.\n\nL\'économiseur de batterie s\'éteint automatiquement lorsque l\'appareil est en charge."
"Pour réduire la consommation des données, l\'économiseur de données empêche certaines applications d\'envoyer ou de recevoir des données en arrière-plan. Ainsi, une application que vous utilisez actuellement peut accéder à des données, mais moins souvent. Par exemple, il se peut que les images ne s\'affichent pas tant que vous n\'appuyez pas dessus."
- "Activer sauvegarde données ?"
+ "Activer l\'économiseur de données ?"
"Activer"
- Pendant %1$d minute (jusqu\'à %2$s)
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index b90ca75777834..160efff177e38 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -214,7 +214,7 @@
"Հեռախոսի ընտրանքներ"
"Էկրանի փական"
"Անջատել"
- "Արտակարգ իրավիճակ"
+ "Շտապ կանչ"
"Վրիպակի զեկույց"
"Գրել սխալի զեկույց"
"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"
@@ -674,7 +674,7 @@
"Ապակողպելու կամ շտապ կանչ անելու համար սեղմեք «Ընտրացանկ»"
"Ապակողպելու համար սեղմեք Ցանկը:"
"Հավաքեք սխեման` ապակողպելու համար"
- "Արտակարգ իրավիճակ"
+ "Շտապ կանչ"
"Վերադառնալ զանգին"
"Ճիշտ է:"
"Կրկին փորձեք"
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index fadc62c83103c..5550900543e40 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -512,8 +512,8 @@
"携帯通信会社のSMSサービスのトップレベルインターフェースにバインドすることを所有者に許可します。通常のアプリでは不要です。"
"携帯通信会社のサービスへのバインド"
"携帯通信会社のサービスにバインドすることを所有者に許可します。通常のアプリでは不要です。"
- "[通知を非表示]へのアクセス"
- "[通知を非表示]の設定の読み取りと書き込みをアプリに許可します。"
+ "マナーモードへのアクセス"
+ "マナーモード設定の読み取りと書き込みをアプリに許可します。"
"パスワードルールの設定"
"画面ロックのパスワードとPINの長さと使用できる文字を制御します。"
"画面ロック解除試行の監視"
@@ -1607,10 +1607,10 @@
"%1$sまで"
"%1$s(次のアラーム)まで"
"ユーザーがOFFにするまで"
- "[通知を非表示]をOFFにするまで"
+ "マナーモードを OFF にするまで"
"%1$s/%2$s"
"折りたたむ"
- "通知を非表示"
+ "マナーモード"
"ダウンタイム"
"平日の夜"
"週末"
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 82901e0fa72b4..b23a96637c578 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -260,7 +260,7 @@
"전화"
"통화 상태를 관리하거나 전화를 걸 수 있도록"
"신체 센서"
- "생체 신호에 관한 센서 데이터에 접근할 수 있도록"
+ "생체 신호에 관한 센서 데이터에 액세스"
"창 콘텐츠 가져오기"
"상호작용 중인 창의 콘텐츠를 검사합니다."
"터치하여 탐색 사용"
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index a29f78edde53e..98ae54c4e5050 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -195,7 +195,7 @@
"振铃器开启"
"Android 系统更新"
"正在准备更新…"
- "正在处理更新文件包…"
+ "正在处理更新软件包…"
"正在重新启动…"
"恢复出厂设置"
"正在重新启动…"
From 8bea919d373b3a8c0eedcc33e05fc6a4e4e4ffde Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 24 Oct 2016 21:24:44 -0700
Subject: [PATCH 19/98] Import translations. DO NOT MERGE
Change-Id: I9b8b5245f61dbab513ee5de6ff9c71b2bd41f3ab
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-ja/strings.xml | 20 ++++++++++----------
packages/SystemUI/res/values-ko/strings.xml | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index a6f521b5bc0c2..8d51fe635aa7e 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -197,13 +197,13 @@
"機内モードがONです。"
"機内モードをOFFにしました。"
"機内モードをONにしました。"
- "[通知を非表示]はONで、優先する通知のみです。"
- "[通知を非表示]はONで、サイレントです。"
- "[通知を非表示]はONで、アラームのみです。"
- "通知を非表示"
- "[通知を非表示]はOFFです。"
- "[通知を非表示]をOFFにしました。"
- "[通知を非表示]をONにしました。"
+ "マナーモードは ON で、優先する通知のみ許可します。"
+ "マナーモードは ON で、サイレント モードです。"
+ "マナーモードは ON で、アラームのみ許可します。"
+ "マナーモード"
+ "マナーモードは OFF です。"
+ "マナーモードを OFF にしました。"
+ "マナーモードを ON にしました。"
"Bluetooth"
"BluetoothがOFFです。"
"BluetoothがONです。"
@@ -264,7 +264,7 @@
"デザートケース"
"スクリーン セーバー"
"イーサネット"
- "通知を非表示"
+ "マナーモード"
"優先する通知のみ"
"アラームのみ"
"サイレント"
@@ -572,9 +572,9 @@
"YouTube"
"カレンダー"
"音量調節を表示"
- "通知の非表示"
+ "マナーモード"
"音量ボタンのショートカット"
- "音量上げボタンで [通知を非表示] を OFF にする"
+ "音量上げボタンでマナーモードを OFF にする"
"電池"
"時計"
"ヘッドセット"
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 2090404491d13..b3f121c359b5b 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -467,7 +467,7 @@
"충전 중이 아닌 경우 상태 표시줄 아이콘 내에 배터리 잔량 비율 표시"
"빠른 설정"
"상태 표시줄"
- "개요"
+ "최근 사용"
"데모 모드"
"데모 모드 사용"
"데모 모드 표시"
From afbf16f90882e25c4701e942f39ecd4bb09390da Mon Sep 17 00:00:00 2001
From: Cheryl Potter
Date: Mon, 24 Oct 2016 21:29:23 -0700
Subject: [PATCH 20/98] docs: change gpu debugger redirect b/31781348
Change-Id: I7e374dcec975ba45b03f1cde656a438f986c5093
---
docs/html/_redirects.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index 6185dab16e22f..7daf85c6acfe9 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -1237,7 +1237,7 @@ redirects:
- from: /r/studio-ui/run-with-work-profile.html
to: /studio/run/index.html?utm_source=android-studio#ir-work-profile
- from: /r/studio-ui/am-gpu-debugger.html
- to: /studio/profile/am-gpu.html?utm_source=android-studio
+ to: /studio/debug/am-gpu-debugger.html?utm_source=android-studio
- from: /r/studio-ui/theme-editor.html
to: /studio/write/theme-editor.html?utm_source=android-studio
- from: /r/studio-ui/translations-editor.html
From cb60c7a87ec7f8bf8431a81b7438f02556e96c0a Mon Sep 17 00:00:00 2001
From: Adrian Roos
Date: Fri, 21 Oct 2016 14:49:17 -0700
Subject: [PATCH 21/98] Ambient: If user turned off ambient, keep it off after
split
The split ambient settings default to on - which is a bad experience
if the user explicitly turned it off before the split.
Change-Id: I346a53b0dc9cdf578c238113f4f33056ba0f3aea
Merged-In: I986d35a1a28e97f4c8d7d3d47ed5658e1836a44f
Fixes: 32332195
Test: Flash angler to NYC, disable ambient, upgrade to NYC-MR1, check if "Lift to check phone" is still off.
---
.../providers/settings/SettingsProvider.java | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index e66e963c01794..fec33a270868d 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2102,7 +2102,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 131;
+ private static final int SETTINGS_VERSION = 132;
private final int mUserId;
@@ -2417,6 +2417,21 @@ public class SettingsProvider extends ContentProvider {
}
if (currentVersion == 130) {
+ // Split Ambient settings
+ final SettingsState secureSettings = getSecureSettingsLocked(userId);
+ boolean dozeExplicitlyDisabled = "0".equals(secureSettings.
+ getSettingLocked(Settings.Secure.DOZE_ENABLED).getValue());
+
+ if (dozeExplicitlyDisabled) {
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_PICK_UP,
+ "0", SettingsState.SYSTEM_PACKAGE_NAME);
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+ "0", SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ currentVersion = 131;
+ }
+
+ if (currentVersion == 131) {
// Initialize new multi-press timeout to default value
final SettingsState systemSecureSettings = getSecureSettingsLocked(userId);
final String oldValue = systemSecureSettings.getSettingLocked(
@@ -2429,7 +2444,7 @@ public class SettingsProvider extends ContentProvider {
SettingsState.SYSTEM_PACKAGE_NAME);
}
- currentVersion = 131;
+ currentVersion = 132;
}
if (currentVersion != newVersion) {
From 21984eeaf76bd72de7dc1ba614e25bea84910887 Mon Sep 17 00:00:00 2001
From: Adrian Roos
Date: Fri, 21 Oct 2016 14:49:17 -0700
Subject: [PATCH 22/98] Ambient: If user turned off ambient, keep it off after
split
The split ambient settings default to on - which is a bad experience
if the user explicitly turned it off before the split.
Change-Id: Id80d62727952f63b363f87c19b5befbde8ab5c31
Merged-In: I986d35a1a28e97f4c8d7d3d47ed5658e1836a44f
Merged-In: I346a53b0dc9cdf578c238113f4f33056ba0f3aea
Fixes: 32332195
Test: Flash angler to NYC, disable ambient, upgrade to NYC-MR1, check if "Lift to check phone" is still off.
---
.../providers/settings/SettingsProvider.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index a43c398f04ad9..d7518950df2f7 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2102,7 +2102,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 130;
+ private static final int SETTINGS_VERSION = 131;
private final int mUserId;
@@ -2416,6 +2416,21 @@ public class SettingsProvider extends ContentProvider {
currentVersion = 130;
}
+ if (currentVersion == 130) {
+ // Split Ambient settings
+ final SettingsState secureSettings = getSecureSettingsLocked(userId);
+ boolean dozeExplicitlyDisabled = "0".equals(secureSettings.
+ getSettingLocked(Settings.Secure.DOZE_ENABLED).getValue());
+
+ if (dozeExplicitlyDisabled) {
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_PICK_UP,
+ "0", SettingsState.SYSTEM_PACKAGE_NAME);
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+ "0", SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ currentVersion = 131;
+ }
+
if (currentVersion != newVersion) {
Slog.wtf("SettingsProvider", "warning: upgrading settings database to version "
+ newVersion + " left it at "
From 82b9aff0a9c9d5c9c4f986b7e2fac258b890cc79 Mon Sep 17 00:00:00 2001
From: Julius D'souza
Date: Mon, 24 Oct 2016 19:26:45 -0700
Subject: [PATCH 23/98] DO NOT MERGE: Add initial ambient light sensor rate
Bug: 32153559
Change-Id: Ic54bded46f88991290ed1e4d2574f865b6f598ec
---
core/res/res/values/config.xml | 6 +++
core/res/res/values/symbols.xml | 1 +
.../AutomaticBrightnessController.java | 45 +++++++++++++++----
.../display/DisplayPowerController.java | 4 +-
4 files changed, 47 insertions(+), 9 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d33504de65427..f8c463ce9ba28 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1056,6 +1056,12 @@
4000
8000
+
+ 0
+
250
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e7d4b2b3fa886..ecce83368266e 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1736,6 +1736,7 @@
+
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index a1e3d62c12bc9..bdd041a317c99 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -86,8 +86,14 @@ class AutomaticBrightnessController {
private final int mScreenBrightnessRangeMaximum;
private final float mDozeScaleFactor;
- // Light sensor event rate in milliseconds.
- private final int mLightSensorRate;
+ // Initial light sensor event rate in milliseconds.
+ private final int mInitialLightSensorRate;
+
+ // Steady-state light sensor event rate in milliseconds.
+ private final int mNormalLightSensorRate;
+
+ // The current light sensor event rate in milliseconds.
+ private int mCurrentLightSensorRate;
// Stability requirements in milliseconds for accepting a new brightness level. This is used
// for debouncing the light sensor. Different constants are used to debounce the light sensor
@@ -188,7 +194,7 @@ class AutomaticBrightnessController {
public AutomaticBrightnessController(Callbacks callbacks, Looper looper,
SensorManager sensorManager, Spline autoBrightnessSpline, int lightSensorWarmUpTime,
int brightnessMin, int brightnessMax, float dozeScaleFactor,
- int lightSensorRate, long brighteningLightDebounceConfig,
+ int lightSensorRate, int initialLightSensorRate, long brighteningLightDebounceConfig,
long darkeningLightDebounceConfig, boolean resetAmbientLuxAfterWarmUpConfig,
int ambientLightHorizon, float autoBrightnessAdjustmentMaxGamma,
LuxLevels luxLevels) {
@@ -200,7 +206,9 @@ class AutomaticBrightnessController {
mScreenBrightnessRangeMaximum = brightnessMax;
mLightSensorWarmUpTimeConfig = lightSensorWarmUpTime;
mDozeScaleFactor = dozeScaleFactor;
- mLightSensorRate = lightSensorRate;
+ mNormalLightSensorRate = lightSensorRate;
+ mInitialLightSensorRate = initialLightSensorRate;
+ mCurrentLightSensorRate = mNormalLightSensorRate;
mBrighteningLightDebounceConfig = brighteningLightDebounceConfig;
mDarkeningLightDebounceConfig = darkeningLightDebounceConfig;
mResetAmbientLuxAfterWarmUpConfig = resetAmbientLuxAfterWarmUpConfig;
@@ -211,9 +219,9 @@ class AutomaticBrightnessController {
mHandler = new AutomaticBrightnessHandler(looper);
mAmbientLightRingBuffer =
- new AmbientLightRingBuffer(mLightSensorRate, mAmbientLightHorizon);
+ new AmbientLightRingBuffer(mNormalLightSensorRate, mAmbientLightHorizon);
mInitialHorizonAmbientLightRingBuffer =
- new AmbientLightRingBuffer(mLightSensorRate, mAmbientLightHorizon);
+ new AmbientLightRingBuffer(mNormalLightSensorRate, mAmbientLightHorizon);
if (!DEBUG_PRETEND_LIGHT_SENSOR_ABSENT) {
mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
@@ -313,13 +321,16 @@ class AutomaticBrightnessController {
mAmbientLuxValid = !mResetAmbientLuxAfterWarmUpConfig;
mLightSensorEnableTime = SystemClock.uptimeMillis();
mSensorManager.registerListener(mLightSensorListener, mLightSensor,
- mLightSensorRate * 1000, mHandler);
+ mCurrentLightSensorRate * 1000, mHandler);
return true;
}
} else {
if (mLightSensorEnabled) {
mLightSensorEnabled = false;
mRecentLightSamples = 0;
+ if (mInitialLightSensorRate > 0) {
+ mCurrentLightSensorRate = mInitialLightSensorRate;
+ }
mHandler.removeMessages(MSG_UPDATE_AMBIENT_LUX);
mSensorManager.unregisterListener(mLightSensorListener);
}
@@ -330,6 +341,10 @@ class AutomaticBrightnessController {
private void handleLightSensorEvent(long time, float lux) {
mHandler.removeMessages(MSG_UPDATE_AMBIENT_LUX);
+ if (mAmbientLightRingBuffer.size() == 0) {
+ // switch to using the steady-state sample rate after grabbing the initial light sample
+ adjustLightSensorRate(mNormalLightSensorRate);
+ }
applyLightSensorMeasurement(time, lux);
updateAmbientLux(time);
if (mActiveDozeLightSensor) {
@@ -354,6 +369,20 @@ class AutomaticBrightnessController {
mLastObservedLuxTime = time;
}
+ private void adjustLightSensorRate(int lightSensorRate) {
+ // if the light sensor rate changed, update the sensor listener
+ if (lightSensorRate != mCurrentLightSensorRate) {
+ if (DEBUG) {
+ Slog.d(TAG, "adjustLightSensorRate: previousRate=" + mCurrentLightSensorRate
+ + ", currentRate=" + lightSensorRate);
+ }
+ mCurrentLightSensorRate = lightSensorRate;
+ mSensorManager.unregisterListener(mLightSensorListener);
+ mSensorManager.registerListener(mLightSensorListener, mLightSensor,
+ lightSensorRate * 1000, mHandler);
+ }
+ }
+
private boolean setScreenAutoBrightnessAdjustment(float adjustment) {
if (adjustment != mScreenAutoBrightnessAdjustment) {
mScreenAutoBrightnessAdjustment = adjustment;
@@ -489,7 +518,7 @@ class AutomaticBrightnessController {
// should be enough time to decide whether we should actually transition to the new
// weighted ambient lux or not.
nextTransitionTime =
- nextTransitionTime > time ? nextTransitionTime : time + mLightSensorRate;
+ nextTransitionTime > time ? nextTransitionTime : time + mNormalLightSensorRate;
if (DEBUG) {
Slog.d(TAG, "updateAmbientLux: Scheduling ambient lux update for "
+ nextTransitionTime + TimeUtils.formatUptime(nextTransitionTime));
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index fa144575a4f28..3207a868afaca 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -313,6 +313,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
int lightSensorRate = resources.getInteger(
com.android.internal.R.integer.config_autoBrightnessLightSensorRate);
+ int initialLightSensorRate = resources.getInteger(
+ com.android.internal.R.integer.config_autoBrightnessInitialLightSensorRate);
long brighteningLightDebounce = resources.getInteger(
com.android.internal.R.integer.config_autoBrightnessBrighteningLightDebounce);
long darkeningLightDebounce = resources.getInteger(
@@ -378,7 +380,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
handler.getLooper(), sensorManager, screenAutoBrightnessSpline,
lightSensorWarmUpTimeConfig, screenBrightnessRangeMinimum,
mScreenBrightnessRangeMaximum, dozeScaleFactor, lightSensorRate,
- brighteningLightDebounce, darkeningLightDebounce,
+ initialLightSensorRate, brighteningLightDebounce, darkeningLightDebounce,
autoBrightnessResetAmbientLuxAfterWarmUp, ambientLightHorizon,
autoBrightnessAdjustmentMaxGamma, luxLevels);
}
From 80e6d8873b79ced40e79fcba0bf793ea6528d20c Mon Sep 17 00:00:00 2001
From: Thomas Buhot
Date: Fri, 4 Dec 2015 12:18:03 +0100
Subject: [PATCH 24/98] DO NOT MERGE ANYWHERE libhwui: make setSurface
asynchronous
from AOSP: https://android-review.googlesource.com/#/c/183305/
On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.
With this optimization the launch time of any application
is improved (for example settings by 20 to 40 ms).
Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08
Signed-off-by: Thomas Buhot
Signed-off-by: Zhiquan Liu
---
core/java/android/view/ThreadedRenderer.java | 5 +++--
core/jni/android_view_ThreadedRenderer.cpp | 6 +++---
libs/hwui/renderthread/CanvasContext.cpp | 5 ++---
libs/hwui/renderthread/CanvasContext.h | 2 +-
libs/hwui/renderthread/RenderProxy.cpp | 7 ++++---
libs/hwui/renderthread/RenderProxy.h | 2 +-
6 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index f6119e2898f00..db147ab51263f 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -145,9 +145,10 @@ public class ThreadedRenderer extends HardwareRenderer {
@Override
boolean initialize(Surface surface) throws OutOfResourcesException {
+ boolean status = !mInitialized;
mInitialized = true;
updateEnabledState(surface);
- boolean status = nInitialize(mNativeProxy, surface);
+ nInitialize(mNativeProxy, surface);
return status;
}
@@ -503,7 +504,7 @@ public class ThreadedRenderer extends HardwareRenderer {
private static native boolean nLoadSystemProperties(long nativeProxy);
private static native void nSetName(long nativeProxy, String name);
- private static native boolean nInitialize(long nativeProxy, Surface window);
+ private static native void nInitialize(long nativeProxy, Surface window);
private static native void nUpdateSurface(long nativeProxy, Surface window);
private static native boolean nPauseSurface(long nativeProxy, Surface window);
private static native void nSetup(long nativeProxy, int width, int height,
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 47132f40be21b..7400ef04bbcda 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -262,11 +262,11 @@ static void android_view_ThreadedRenderer_setName(JNIEnv* env, jobject clazz,
env->ReleaseStringUTFChars(jname, name);
}
-static jboolean android_view_ThreadedRenderer_initialize(JNIEnv* env, jobject clazz,
+static void android_view_ThreadedRenderer_initialize(JNIEnv* env, jobject clazz,
jlong proxyPtr, jobject jsurface) {
RenderProxy* proxy = reinterpret_cast(proxyPtr);
sp window = android_view_Surface_getNativeWindow(env, jsurface);
- return proxy->initialize(window);
+ proxy->initialize(window);
}
static void android_view_ThreadedRenderer_updateSurface(JNIEnv* env, jobject clazz,
@@ -461,7 +461,7 @@ static JNINativeMethod gMethods[] = {
{ "nDeleteProxy", "(J)V", (void*) android_view_ThreadedRenderer_deleteProxy },
{ "nLoadSystemProperties", "(J)Z", (void*) android_view_ThreadedRenderer_loadSystemProperties },
{ "nSetName", "(JLjava/lang/String;)V", (void*) android_view_ThreadedRenderer_setName },
- { "nInitialize", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_initialize },
+ { "nInitialize", "(JLandroid/view/Surface;)V", (void*) android_view_ThreadedRenderer_initialize },
{ "nUpdateSurface", "(JLandroid/view/Surface;)V", (void*) android_view_ThreadedRenderer_updateSurface },
{ "nPauseSurface", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_pauseSurface },
{ "nSetup", "(JIIFII)V", (void*) android_view_ThreadedRenderer_setup },
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 4cf8b152ed40f..57e5832ff752c 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -110,12 +110,11 @@ void CanvasContext::setSwapBehavior(SwapBehavior swapBehavior) {
mSwapBehavior = swapBehavior;
}
-bool CanvasContext::initialize(ANativeWindow* window) {
+void CanvasContext::initialize(ANativeWindow* window) {
setSurface(window);
- if (mCanvas) return false;
+ if (mCanvas) return;
mCanvas = new OpenGLRenderer(mRenderThread.renderState());
mCanvas->initProperties();
- return true;
}
void CanvasContext::updateSurface(ANativeWindow* window) {
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index f2fa9cdcbefdd..1e6f830dbeb26 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -67,7 +67,7 @@ public:
// Won't take effect until next EGLSurface creation
void setSwapBehavior(SwapBehavior swapBehavior);
- bool initialize(ANativeWindow* window);
+ void initialize(ANativeWindow* window);
void updateSurface(ANativeWindow* window);
bool pauseSurface(ANativeWindow* window);
bool hasSurface() { return mNativeWindow.get(); }
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 6d9acd429279a..30f0073fd1f0e 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -140,14 +140,15 @@ void RenderProxy::setName(const char* name) {
}
CREATE_BRIDGE2(initialize, CanvasContext* context, ANativeWindow* window) {
- return (void*) args->context->initialize(args->window);
+ args->context->initialize(args->window);
+ return nullptr;
}
-bool RenderProxy::initialize(const sp& window) {
+void RenderProxy::initialize(const sp& window) {
SETUP_TASK(initialize);
args->context = mContext;
args->window = window.get();
- return (bool) postAndWait(task);
+ post(task);
}
CREATE_BRIDGE2(updateSurface, CanvasContext* context, ANativeWindow* window) {
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index 5febbe0ab26c5..db03b29f134b4 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -67,7 +67,7 @@ public:
ANDROID_API bool loadSystemProperties();
ANDROID_API void setName(const char* name);
- ANDROID_API bool initialize(const sp& window);
+ ANDROID_API void initialize(const sp& window);
ANDROID_API void updateSurface(const sp& window);
ANDROID_API bool pauseSurface(const sp& window);
ANDROID_API void setup(int width, int height, float lightRadius,
From 1b5d5bd11971e9ff59d97bce498a5d9c8540353a Mon Sep 17 00:00:00 2001
From: Shuo Gao
Date: Tue, 1 Mar 2016 13:32:03 +0800
Subject: [PATCH 25/98] DO NOT MERGE ANYWHERE Enable shader cache for
applications that shared UID with multiple packages
from AOSP: https://android-review.googlesource.com/#/c/209490/
Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.
Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao
Signed-off-by: Zhiquan Liu
---
core/java/android/app/ActivityThread.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index fd88a0549a101..4369a476d3b63 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4409,9 +4409,7 @@ public final class ActivityThread {
int uid = Process.myUid();
String[] packages = getPackageManager().getPackagesForUid(uid);
- // If there are several packages in this application we won't
- // initialize the graphics disk caches
- if (packages != null && packages.length == 1) {
+ if (packages != null) {
HardwareRenderer.setupDiskCache(cacheDir);
RenderScriptCacheDir.setupDiskCache(cacheDir);
}
From bff09ae3c8d11f9cc742ca1b600208059627e19e Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Wed, 26 Oct 2016 10:47:09 -0700
Subject: [PATCH 26/98] Import translations. DO NOT MERGE
Change-Id: I4b30fe6cf3449cc773ff6ce0e7a896b30248d2ec
Auto-generated-cl: translation import
---
core/res/res/values-nb/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 691da31748c68..de65113c86c5a 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1328,7 +1328,7 @@
"USB-stasjon"
"%s USB-stasjon"
"USB-lagring"
- "Rediger"
+ "Endre"
"Varsel om databruk"
"Trykk for å se bruken og innstillingene."
"Datagrensen for 2G-3G er nådd"
From 644a22437fd6f7908bff0456a3b0557962d6f972 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Wed, 26 Oct 2016 10:55:33 -0700
Subject: [PATCH 27/98] Import translations. DO NOT MERGE
Change-Id: I70ad8db1fffca628251fbeaf6ef98882529a8210
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-da/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 7de602a2f1f09..d2bb10f27f133 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -479,7 +479,7 @@
"Du vil ikke kunne høre din næste alarm %1$s"
"kl. %1$s"
"på %1$s"
- "Hurtigindstillinger %s."
+ "Hurtige indstillinger %s."
"Hotspot"
"Arbejdsprofil"
"Sjovt for nogle, men ikke for alle"
From e2c85890ac3941525288e08962b33d30618de801 Mon Sep 17 00:00:00 2001
From: Svetoslav Ganov
Date: Tue, 25 Oct 2016 20:47:15 -0700
Subject: [PATCH 28/98] [DO NOT MERGE] Don't accidentally delete renamed
packages
Apps on the system image can change their package by declaring
their old one in the manifest. If a package is renamed it is
internally referred by its old name.
The reconciliation code was using the new package name for
renamed packages and was concluding the apk is orphaned thus
deleting it. This puts the package in a bad state where the app
is gone and the version on the system partition is disabled.
Also Play was showing an update for a renamed system app as
an install while it is an update because of the same reason,
it was using the new package name while the app is internally
referred by the old one.
The fix for both above is to internally normalize the package
name by using the old one if the package was renamed or the
package name as is.
Test: With the fix put the old calculator on the system image
and booted, then put the renamed calculator and booted, updated
calculator from play and rebooted - calculator keeps working.
Also did the above steps without the patch to put calculator
in a bad state and flashed the system with the patch which
fixed the broken calculator app.
bug:32321269
Change-Id: I98bfc05c399edfc9854ebcce44182fefa55ceeff
---
.../server/pm/PackageManagerService.java | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c360c901d4850..5fd9c58964d0f 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -2161,6 +2161,18 @@ public class PackageManagerService extends IPackageManager.Stub {
mFirstBoot = !mSettings.readLPw(sUserManager.getUsers(false));
+ // Clean up orphaned packages for which the code path doesn't exist
+ // and they are an update to a system app - caused by bug/32321269
+ final int packageSettingCount = mSettings.mPackages.size();
+ for (int i = packageSettingCount - 1; i >= 0; i--) {
+ PackageSetting ps = mSettings.mPackages.valueAt(i);
+ if (!isExternal(ps) && (ps.codePath == null || !ps.codePath.exists())
+ && mSettings.getDisabledSystemPkgLPr(ps.name) != null) {
+ mSettings.mPackages.removeAt(i);
+ mSettings.enableSystemPackageLPw(ps.name);
+ }
+ }
+
if (mFirstBoot) {
requestCopyPreoptedFiles();
}
@@ -3115,8 +3127,12 @@ public class PackageManagerService extends IPackageManager.Stub {
flags = updateFlagsForPackage(flags, userId, packageName);
enforceCrossUserPermission(Binder.getCallingUid(), userId,
false /* requireFullPermission */, false /* checkShell */, "get package info");
+
// reader
synchronized (mPackages) {
+ // Normalize package name to hanlde renamed packages
+ packageName = normalizePackageNameLPr(packageName);
+
final boolean matchFactoryOnly = (flags & MATCH_FACTORY_ONLY) != 0;
PackageParser.Package p = null;
if (matchFactoryOnly) {
@@ -3317,8 +3333,12 @@ public class PackageManagerService extends IPackageManager.Stub {
flags = updateFlagsForApplication(flags, userId, packageName);
enforceCrossUserPermission(Binder.getCallingUid(), userId,
false /* requireFullPermission */, false /* checkShell */, "get application info");
+
// writer
synchronized (mPackages) {
+ // Normalize package name to hanlde renamed packages
+ packageName = normalizePackageNameLPr(packageName);
+
PackageParser.Package p = mPackages.get(packageName);
if (DEBUG_PACKAGE_INFO) Log.v(
TAG, "getApplicationInfo " + packageName
@@ -3340,6 +3360,11 @@ public class PackageManagerService extends IPackageManager.Stub {
return null;
}
+ private String normalizePackageNameLPr(String packageName) {
+ String normalizedPackageName = mSettings.mRenamedPackages.get(packageName);
+ return normalizedPackageName != null ? normalizedPackageName : packageName;
+ }
+
@Override
public void freeStorageAndNotify(final String volumeUuid, final long freeStorageSize,
final IPackageDataObserver observer) {
@@ -19691,6 +19716,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
private void assertPackageKnown(String volumeUuid, String packageName)
throws PackageManagerException {
synchronized (mPackages) {
+ // Normalize package name to handle renamed packages
+ packageName = normalizePackageNameLPr(packageName);
+
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps == null) {
throw new PackageManagerException("Package " + packageName + " is unknown");
@@ -19705,6 +19733,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
private void assertPackageKnownAndInstalled(String volumeUuid, String packageName, int userId)
throws PackageManagerException {
synchronized (mPackages) {
+ // Normalize package name to handle renamed packages
+ packageName = normalizePackageNameLPr(packageName);
+
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps == null) {
throw new PackageManagerException("Package " + packageName + " is unknown");
From 63d2e41d1b25cbbde242d315d7cfc2cbc1678957 Mon Sep 17 00:00:00 2001
From: Alain Vongsouvanh
Date: Wed, 26 Oct 2016 13:01:49 -0700
Subject: [PATCH 29/98] Properly set the center of the circular mask.
The new circular mask did not take into account devices with a chin,
setting the center of the circular mask higher than it should be.
BUG: 32418552
Change-Id: Ia45e197492a57341ad7db620b1d3fcc4820eabf0
---
.../core/java/com/android/server/wm/CircularDisplayMask.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/wm/CircularDisplayMask.java b/services/core/java/com/android/server/wm/CircularDisplayMask.java
index 0a9b33404b37a..c57dfb676a7e0 100644
--- a/services/core/java/com/android/server/wm/CircularDisplayMask.java
+++ b/services/core/java/com/android/server/wm/CircularDisplayMask.java
@@ -242,7 +242,7 @@ class CircularDisplayMask {
}
double cx = (maskWidth - 1.0) / 2.0;
- double cy = (maskHeight - 1.0) / 2.0;
+ double cy = (maskHeight - 1.0 + mScreenOffset) / 2.0;
double radius = maskWidth / 2.0;
int[] pixels = new int[maskWidth * maskHeight];
From a80d745c656f1e09aa9331002f613883220ca029 Mon Sep 17 00:00:00 2001
From: Marie Janssen
Date: Tue, 25 Oct 2016 10:47:51 -0700
Subject: [PATCH 30/98] Bluetooth: prevent enabling BLE in airplane mode
Enabling BLE in airplane mode puts BluetoothManagerService in an
unexpected state which causes Bluetooth to be on when airplane mode
is disabled.
Also fixes a bug where a crash of a BLE client would trigger a restart
into ON mode.
Test: SL4A BleBackgroundScanTest:test_airplane_mode_disables_ble
Bug: 32140251
Bug: 32140271
Bug: 32369494
Change-Id: Ie65157e65c3a1ca914f567a7a0c631175d1e5835
(cherry picked from commit bd93b7b3dc6141cef6236cf0ca7dcc5acf5bfeed)
---
.../java/android/bluetooth/BluetoothAdapter.java | 16 +++++-----------
.../android/server/BluetoothManagerService.java | 10 ++++++++--
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 6be5a9725dca5..50c8e275ff86e 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -765,19 +765,13 @@ public final class BluetoothAdapter {
public boolean enableBLE() {
if (!isBleScanAlwaysAvailable()) return false;
- if (isLeEnabled() == true) {
- if (DBG) Log.d(TAG, "enableBLE(): BT is already enabled..!");
- try {
- mManagerService.updateBleAppCount(mToken, true);
- } catch (RemoteException e) {
- Log.e(TAG, "", e);
- }
- return true;
- }
-
try {
- if (DBG) Log.d(TAG, "Calling enableBLE");
mManagerService.updateBleAppCount(mToken, true);
+ if (isLeEnabled()) {
+ if (DBG) Log.d(TAG, "enableBLE(): Bluetooth already enabled");
+ return true;
+ }
+ if (DBG) Log.d(TAG, "enableBLE(): Calling enable");
return mManagerService.enable();
} catch (RemoteException e) {
Log.e(TAG, "", e);
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 6757fcce43ce4..52be811fad175 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -217,6 +217,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
mBluetoothLock.readLock().lock();
if (mBluetooth != null) {
mBluetooth.onBrEdrDown();
+ mEnable = false;
mEnableExternal = false;
}
} catch (RemoteException e) {
@@ -449,14 +450,16 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
class ClientDeathRecipient implements IBinder.DeathRecipient {
public void binderDied() {
- if (DBG) Slog.d(TAG, "Binder is dead - unregister Ble App");
+ if (DBG) Slog.d(TAG, "Binder is dead - unregister Ble App");
if (mBleAppCount > 0) --mBleAppCount;
if (mBleAppCount == 0) {
if (DBG) Slog.d(TAG, "Disabling LE only mode after application crash");
try {
mBluetoothLock.readLock().lock();
- if (mBluetooth != null) {
+ if (mBluetooth != null &&
+ mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
+ mEnable = false;
mBluetooth.onBrEdrDown();
}
} catch (RemoteException e) {
@@ -473,6 +476,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
@Override
public boolean isBleScanAlwaysAvailable() {
+ if (isAirplaneModeOn() && !mEnable) {
+ return false;
+ }
try {
return (Settings.Global.getInt(mContentResolver,
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE)) != 0;
From f930e5b99b36f9a2e474f7b93deda28becdc364a Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Wed, 26 Oct 2016 16:01:01 -0700
Subject: [PATCH 31/98] Update progress bar and progress dialog to match UX
specs for watch.
Due to the smaller screens of watch, the progress bar default sizes
have been reduced according to UX specs. Layout of progress dialog
has been updated to match UX specs as well.
Bug: 29352154
Change-Id: Ie3f42f5d6cb5cc14d422cb96cbb8dbfaf3deaca8
---
.../res/layout-watch/progress_dialog_material.xml | 5 +++--
core/res/res/values-watch/dimens_material.xml | 5 +++++
core/res/res/values/dimens_material.xml | 5 +++++
core/res/res/values/styles_material.xml | 12 ++++++++++++
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/core/res/res/layout-watch/progress_dialog_material.xml b/core/res/res/layout-watch/progress_dialog_material.xml
index 228f72454c0a6..96bda1d0c285b 100644
--- a/core/res/res/layout-watch/progress_dialog_material.xml
+++ b/core/res/res/layout-watch/progress_dialog_material.xml
@@ -32,14 +32,15 @@
+ android:layout_marginEnd="8dp" />
diff --git a/core/res/res/values-watch/dimens_material.xml b/core/res/res/values-watch/dimens_material.xml
index b48cde62158ab..3c4904ccf07d1 100644
--- a/core/res/res/values-watch/dimens_material.xml
+++ b/core/res/res/values-watch/dimens_material.xml
@@ -39,4 +39,9 @@
1dip
1dip
+
+
+ 16dip
+ 32dip
+ 64dip
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index ae3116584e5de..30e7b31377128 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -193,4 +193,9 @@
16dip
16dip
+
+
+ 16dip
+ 48dp
+ 76dp
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index 22bdf7e9616a3..a1e12d281c951 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -739,6 +739,10 @@ please see styles_device_defaults.xml.
@@ -752,6 +756,10 @@ please see styles_device_defaults.xml.
@@ -759,6 +767,10 @@ please see styles_device_defaults.xml.
From 7765d7320d8435a0e814d9f10039c7866f9d76a2 Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Wed, 26 Oct 2016 16:58:49 -0600
Subject: [PATCH 32/98] Only bind to RESOLVE_EPHEMERAL_PACKAGE once.
We never unbind, so we only ever need one bind request; creating more
bind requests just wastes resources.
Test: builds
Bug: 32446301
Change-Id: I7d6c4a93b8f5bb8d9aed7a5041b193e19a2d65fc
---
.../android/server/pm/EphemeralResolverConnection.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
index 68b465aaf816b..a6a377419a6a3 100644
--- a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
+++ b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
@@ -56,6 +56,7 @@ final class EphemeralResolverConnection {
/** Intent used to bind to the service */
private final Intent mIntent;
+ private volatile boolean mBindRequested;
private IEphemeralResolver mRemoteInstance;
public EphemeralResolverConnection(Context context, ComponentName componentName) {
@@ -111,8 +112,11 @@ final class EphemeralResolverConnection {
return;
}
- mContext.bindServiceAsUser(mIntent, mServiceConnection,
- Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE, UserHandle.SYSTEM);
+ if (!mBindRequested) {
+ mBindRequested = true;
+ mContext.bindServiceAsUser(mIntent, mServiceConnection,
+ Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE, UserHandle.SYSTEM);
+ }
final long startMillis = SystemClock.uptimeMillis();
while (true) {
From 1377e2b985988293afdaf6d2c1f28b76c5077b33 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Wed, 26 Oct 2016 16:21:49 -0700
Subject: [PATCH 33/98] Import translations. DO NOT MERGE
Change-Id: Ia5f9329d6be981207e939150ed924eaac5bd2180
Auto-generated-cl: translation import
---
core/res/res/values-kn-rIN/strings.xml | 10 +++++-----
core/res/res/values-nb/strings.xml | 2 +-
core/res/res/values-sv/strings.xml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 7cb97a7c56b78..6cffa0d32ad99 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -958,9 +958,9 @@
"%1$s ಚಾಲನೆಯಲ್ಲಿದೆ"
"ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ ಅಥವಾ ಅಪ್ಲಿಕೇಶನ್ ನಿಲ್ಲಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."
"ಸರಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಸರಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಗಮನಿಸಿ"
"ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ..."
"ಆನ್ ಮಾಡು"
@@ -1118,7 +1118,7 @@
"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ ""ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗಬಹುದು""."
"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗುತ್ತದೆ."
"ಕಳುಹಿಸು"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ನನ್ನ ಆಯ್ಕೆಯನ್ನು ನೆನಪಿಡು"
"ನೀವು ಇದನ್ನು ನಂತರದಲ್ಲಿ ಸೆಟ್ಟಿಂಗ್ಗಳು > ಅಪ್ಲಿಕೇಶನ್ಗಳಲ್ಲಿ ಬದಲಾಯಿಸಬಹುದು"
"ಯಾವಾಗಲೂ ಅನುಮತಿಸು"
@@ -1303,7 +1303,7 @@
"ಹಿಂದಿನ ತಿಂಗಳು"
"ಮುಂದಿನ ತಿಂಗಳು"
"Alt"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಅಳಿಸು"
"ಮುಗಿದಿದೆ"
"ಮೋಡ್ ಬದಲಾವಣೆ"
@@ -1672,7 +1672,7 @@
"ಸಾಧನ ಮರುಹೊಂದಿಸಲಾಗುತ್ತಿದೆ..."
"ಸಾಧನವನ್ನು ಮರುಹೊಂದಿಸುವುದೇ?"
"ನೀವು ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಕಳೆದುಕೊಳ್ಳುತ್ತೀರಿ ಮತ್ತು %1$s ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಡೆಮೋ ಮತ್ತೆ ಪ್ರಾರಂಭವಾಗುತ್ತದೆ..."
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಈಗಲೇ ಮರುಹೊಂದಿಸು"
"ನಿರ್ಬಂಧಗಳು ಇಲ್ಲದೆಯೇ ಈ ಸಾಧನವನ್ನು ಬಳಸಲು ಫ್ಯಾಕ್ಟರಿ ಮರುಹೊಂದಿಸಿ"
"ಇನ್ನಷ್ಟು ತಿಳಿಯಲು ಸ್ಪರ್ಶಿಸಿ."
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 691da31748c68..de65113c86c5a 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1328,7 +1328,7 @@
"USB-stasjon"
"%s USB-stasjon"
"USB-lagring"
- "Rediger"
+ "Endre"
"Varsel om databruk"
"Trykk for å se bruken og innstillingene."
"Datagrensen for 2G-3G er nådd"
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index d43282db76868..1351f169a1305 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -667,7 +667,7 @@
"Ange lösenord för att låsa upp"
"Ange PIN-kod för att låsa upp"
"Fel PIN-kod."
- "Tryck på Menu och sedan på 0 om du vill låsa upp."
+ "Tryck på Menu och sedan på 0 för att låsa upp."
"Nödsamtalsnummer"
"Ingen tjänst"
"Skärmen har låsts."
From d1b89172709988f7a92d8c7a5d2976138174ea7a Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Wed, 26 Oct 2016 16:42:29 -0700
Subject: [PATCH 34/98] Import translations. DO NOT MERGE
Change-Id: Ie1a7cb9598cadefe20558f959a3bdfa1589e7652
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-da/strings.xml | 2 +-
packages/SystemUI/res/values-kn-rIN/strings.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 7de602a2f1f09..d2bb10f27f133 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -479,7 +479,7 @@
"Du vil ikke kunne høre din næste alarm %1$s"
"kl. %1$s"
"på %1$s"
- "Hurtigindstillinger %s."
+ "Hurtige indstillinger %s."
"Hotspot"
"Arbejdsprofil"
"Sjovt for nogle, men ikke for alle"
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 8d9b2dd546b51..18ef8f185a514 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -96,7 +96,7 @@
"ಧ್ವನಿ ಸಹಾಯಕವನ್ನು ತೆರೆ"
"ಕ್ಯಾಮರಾ ತೆರೆಯಿರಿ"
"ಹೊಸ ಕಾರ್ಯ ವಿನ್ಯಾಸವನ್ನು ಆಯ್ಕೆಮಾಡಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಹೊಂದಾಣಿಕೆಯ ಝೂಮ್ ಬಟನ್."
"ಚಿಕ್ಕ ಪರದೆಯಿಂದ ದೊಡ್ಡ ಪರದೆಗೆ ಝೂಮ್ ಮಾಡು."
"ಬ್ಲೂಟೂತ್ ಸಂಪರ್ಕಗೊಂಡಿದೆ."
From c541a19fbaa02ae8c3fff858c92958150ff2ccdd Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Wed, 26 Oct 2016 20:12:01 -0700
Subject: [PATCH 35/98] Import translations. DO NOT MERGE
Change-Id: I637b457c6e9a20345cd5dbe599c4dce15ca9040c
Auto-generated-cl: translation import
---
packages/SettingsLib/res/values-kn-rIN/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SettingsLib/res/values-kn-rIN/strings.xml b/packages/SettingsLib/res/values-kn-rIN/strings.xml
index ce10d356a2d38..03da75390e496 100644
--- a/packages/SettingsLib/res/values-kn-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-kn-rIN/strings.xml
@@ -72,7 +72,7 @@
"ಇನ್ಪುಟ್ಗಾಗಿ ಬಳಸು"
"ಜೋಡಿ"
"ಜೋಡಿ ಮಾಡು"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಸಂಪರ್ಕಪಡಿಸಿದಾಗ, ಜೋಡಿಸುವಿಕೆಯು ನಿಮ್ಮ ಸಂಪರ್ಕಗಳು ಮತ್ತು ಕರೆ ಇತಿಹಾಸಕ್ಕೆ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸುತ್ತದೆ."
"%1$s ಜೊತೆಗೆ ಜೋಡಣೆ ಮಾಡಲಾಗಲಿಲ್ಲ."
"ತಪ್ಪಾಗಿರುವ ಪಿನ್ ಅಥವಾ ಪಾಸ್ಕೀ ಕಾರಣದಿಂದಾಗಿ %1$s ಜೊತೆಗೆ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ."
From b87a491de63069fb903c95727f57511c7e4eeaa0 Mon Sep 17 00:00:00 2001
From: Fyodor Kupolov
Date: Wed, 26 Oct 2016 18:36:57 -0700
Subject: [PATCH 36/98] [DO NOT MERGE] Only setSize if -s arg is specified
Calculate size of installed APKs only when INSTALL_EXTERNAL flag is set.
calculateInstalledSize is expensive and may take up to 20% of total
installation time.
Bug: 32180551
Bug: 29932779
Change-Id: I173d2b38820cc86cbfacecd1bacef57369d10af7
---
cmds/pm/src/com/android/commands/pm/Pm.java | 24 ++++++++++++-------
.../server/pm/PackageManagerShellCommand.java | 23 +++++++++++-------
2 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index 5f83d191a7315..1b4eda804312a 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -367,18 +367,24 @@ public final class Pm {
private int runInstall() throws RemoteException {
final InstallParams params = makeInstallParams();
final String inPath = nextArg();
+ boolean installExternal =
+ (params.sessionParams.installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
if (params.sessionParams.sizeBytes < 0 && inPath != null) {
File file = new File(inPath);
if (file.isFile()) {
- try {
- ApkLite baseApk = PackageParser.parseApkLite(file, 0);
- PackageLite pkgLite = new PackageLite(null, baseApk, null, null, null);
- params.sessionParams.setSize(
- PackageHelper.calculateInstalledSize(pkgLite, false,
- params.sessionParams.abiOverride));
- } catch (PackageParserException | IOException e) {
- System.err.println("Error: Failed to parse APK file : " + e);
- return 1;
+ if (installExternal) {
+ try {
+ ApkLite baseApk = PackageParser.parseApkLite(file, 0);
+ PackageLite pkgLite = new PackageLite(null, baseApk, null, null, null);
+ params.sessionParams.setSize(
+ PackageHelper.calculateInstalledSize(pkgLite, false,
+ params.sessionParams.abiOverride));
+ } catch (PackageParserException | IOException e) {
+ System.err.println("Error: Failed to parse APK file : " + e);
+ return 1;
+ }
+ } else {
+ params.sessionParams.setSize(file.length());
}
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index e18d4e011d974..3bfa6b8803159 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -143,17 +143,24 @@ class PackageManagerShellCommand extends ShellCommand {
final PrintWriter pw = getOutPrintWriter();
final InstallParams params = makeInstallParams();
final String inPath = getNextArg();
+ boolean installExternal =
+ (params.sessionParams.installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
if (params.sessionParams.sizeBytes < 0 && inPath != null) {
File file = new File(inPath);
if (file.isFile()) {
- try {
- ApkLite baseApk = PackageParser.parseApkLite(file, 0);
- PackageLite pkgLite = new PackageLite(null, baseApk, null, null, null);
- params.sessionParams.setSize(
- PackageHelper.calculateInstalledSize(pkgLite,false, params.sessionParams.abiOverride));
- } catch (PackageParserException | IOException e) {
- pw.println("Error: Failed to parse APK file : " + e);
- return 1;
+ if (installExternal) {
+ try {
+ ApkLite baseApk = PackageParser.parseApkLite(file, 0);
+ PackageLite pkgLite = new PackageLite(null, baseApk, null, null, null);
+ params.sessionParams.setSize(
+ PackageHelper.calculateInstalledSize(pkgLite, false,
+ params.sessionParams.abiOverride));
+ } catch (PackageParserException | IOException e) {
+ pw.println("Error: Failed to parse APK file : " + e);
+ return 1;
+ }
+ } else {
+ params.sessionParams.setSize(file.length());
}
}
}
From 8500f26d51e2ba0de7b6cd18bec5f85e5ca40e1d Mon Sep 17 00:00:00 2001
From: Vinod Krishnan
Date: Wed, 26 Oct 2016 15:12:25 -0700
Subject: [PATCH 37/98] DO NOT MERGE Wear Fwk: Disable Animations for A11y
- When Accessibility is turned on, Android Wear devices become unusable.
Add an option to disable animations, will be disabled in an overlay.
Bug: 24985771
Change-Id: If5fc44705d56579b305abd48a0d820f306b9be10
---
core/java/android/provider/Settings.java | 11 +++++++
.../SettingsProvider/res/values/defaults.xml | 3 ++
.../providers/settings/DatabaseHelper.java | 3 ++
.../server/wm/WindowManagerService.java | 33 ++++++++++++++++---
4 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 3f1789bf9d884..ee2596bd2b9fd 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -5163,6 +5163,16 @@ public final class Settings {
public static final String ACCESSIBILITY_SOFT_KEYBOARD_MODE =
"accessibility_soft_keyboard_mode";
+ /**
+ * Should we disable all animations when accessibility is turned on. On low-power devices
+ * like Android Wear, the performance makes the device unusable. Turning off animations
+ * is a partial fix.
+ *
+ * @hide
+ */
+ public static final String ACCESSIBILITY_DISABLE_ANIMATIONS =
+ "accessibility_disable_animations";
+
/**
* Default soft keyboard behavior.
*
@@ -6441,6 +6451,7 @@ public final class Settings {
ACCESSIBILITY_CAPTIONING_TYPEFACE,
ACCESSIBILITY_CAPTIONING_FONT_SCALE,
ACCESSIBILITY_CAPTIONING_WINDOW_COLOR,
+ ACCESSIBILITY_DISABLE_ANIMATIONS,
TTS_USE_DEFAULTS,
TTS_DEFAULT_RATE,
TTS_DEFAULT_PITCH,
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index a536874b750b6..c459571616d81 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -220,4 +220,7 @@
false
+
+
+ false
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index d55bb4f44aa5f..07bcce67c87ec 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2484,6 +2484,9 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL,
R.string.def_accessibility_screen_reader_url);
+ loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_DISABLE_ANIMATIONS,
+ R.bool.def_accessibility_disable_animations);
+
if (SystemProperties.getBoolean("ro.lockscreen.disable.default", false) == true) {
loadSetting(stmt, Settings.System.LOCKSCREEN_DISABLED, "1");
} else {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index ca2610af3f661..5dad9c4e3ce88 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -350,11 +350,13 @@ public class WindowManagerService extends IWindowManager.Stub
// Enums for animation scale update types.
@Retention(RetentionPolicy.SOURCE)
- @IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE})
+ @IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE,
+ ACCESSIBILITY_CHANGED})
private @interface UpdateAnimationScaleMode {};
private static final int WINDOW_ANIMATION_SCALE = 0;
private static final int TRANSITION_ANIMATION_SCALE = 1;
private static final int ANIMATION_DURATION_SCALE = 2;
+ private static final int ACCESSIBILITY_CHANGED = 3;
final private KeyguardDisableHandler mKeyguardDisableHandler;
@@ -669,6 +671,8 @@ public class WindowManagerService extends IWindowManager.Stub
Settings.Global.getUriFor(Settings.Global.TRANSITION_ANIMATION_SCALE);
private final Uri mAnimationDurationScaleUri =
Settings.Global.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE);
+ private final Uri mAccessibilityEnabledUri =
+ Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_ENABLED);
public SettingsObserver() {
super(new Handler());
@@ -681,6 +685,8 @@ public class WindowManagerService extends IWindowManager.Stub
UserHandle.USER_ALL);
resolver.registerContentObserver(mAnimationDurationScaleUri, false, this,
UserHandle.USER_ALL);
+ resolver.registerContentObserver(mAccessibilityEnabledUri, false, this,
+ UserHandle.USER_ALL);
}
@Override
@@ -700,6 +706,9 @@ public class WindowManagerService extends IWindowManager.Stub
mode = TRANSITION_ANIMATION_SCALE;
} else if (mAnimationDurationScaleUri.equals(uri)) {
mode = ANIMATION_DURATION_SCALE;
+ } else if (mAccessibilityEnabledUri.equals(uri)) {
+ // Change all of them.
+ mode = ACCESSIBILITY_CHANGED;
} else {
// Ignoring unrecognized content changes
return;
@@ -998,13 +1007,12 @@ public class WindowManagerService extends IWindowManager.Stub
public void onLowPowerModeChanged(boolean enabled) {
synchronized (mWindowMap) {
if (mAnimationsDisabled != enabled && !mAllowAnimationsInLowPowerMode) {
- mAnimationsDisabled = enabled;
- dispatchNewAnimatorScaleLocked(null);
+ setShouldAnimationsDisabled(enabled);
}
}
}
});
- mAnimationsDisabled = mPowerManagerInternal.getLowPowerModeEnabled();
+ setShouldAnimationsDisabled(mPowerManagerInternal.getLowPowerModeEnabled());
mScreenFrozenLock = mPowerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, "SCREEN_FROZEN");
mScreenFrozenLock.setReferenceCounted(false);
@@ -1087,6 +1095,18 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
+ private void setShouldAnimationsDisabled(boolean isLowPowerEnabled) {
+ boolean accessibilityEnabled = Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_ENABLED, 0) == 1;
+ boolean disableAnimationsWhenAccessibility = Settings.Secure.getInt(
+ mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISABLE_ANIMATIONS, 0) == 1;
+
+ mAnimationsDisabled = isLowPowerEnabled ||
+ (accessibilityEnabled && disableAnimationsWhenAccessibility);
+ dispatchNewAnimatorScaleLocked(null);
+ }
+
private void placeWindowAfter(WindowState pos, WindowState window) {
final WindowList windows = pos.getWindowList();
final int i = windows.indexOf(pos);
@@ -8590,6 +8610,11 @@ public class WindowManagerService extends IWindowManager.Stub
dispatchNewAnimatorScaleLocked(null);
break;
}
+ case ACCESSIBILITY_CHANGED: {
+ setShouldAnimationsDisabled(
+ mPowerManagerInternal.getLowPowerModeEnabled());
+ }
+ break;
}
break;
}
From 9071db1d370573bad80f127898e34066f56c4e64 Mon Sep 17 00:00:00 2001
From: Damien Bargiacchi
Date: Fri, 28 Oct 2016 17:38:22 -0700
Subject: [PATCH 38/98] Allow boot clock to be toggled between 12 and 24 hour
format
Bug: 32461548
Change-Id: I414192e6d9f3ae44267f4a360e35647f18c420b4
---
cmds/bootanimation/BootAnimation.cpp | 16 ++++++++++++----
cmds/bootanimation/BootAnimation.h | 1 +
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 2fa1ee6b38698..a893ec8b862b2 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -74,6 +74,7 @@ static const char LAST_TIME_CHANGED_FILE_NAME[] = "last_time_change";
static const char LAST_TIME_CHANGED_FILE_PATH[] = "/data/system/time/last_time_change";
static const char ACCURATE_TIME_FLAG_FILE_NAME[] = "time_is_accurate";
static const char ACCURATE_TIME_FLAG_FILE_PATH[] = "/data/system/time/time_is_accurate";
+static const char TIME_FORMAT_12_HOUR_FLAG_FILE_PATH[] = "/data/system/time/time_format_12_hour";
// Java timestamp format. Don't show the clock if the date is before 2000-01-01 00:00:00.
static const long long ACCURATE_TIME_EPOCH = 946684800000;
static constexpr char FONT_BEGIN_CHAR = ' ';
@@ -99,7 +100,7 @@ static const std::vector PLAY_SOUND_BOOTREASON_BLACKLIST {
// ---------------------------------------------------------------------------
BootAnimation::BootAnimation() : Thread(false), mClockEnabled(true), mTimeIsAccurate(false),
- mTimeCheckThread(NULL) {
+ mTimeFormat12Hour(false), mTimeCheckThread(NULL) {
mSession = new SurfaceComposerClient();
// If the system has already booted, the animation is not being used for a boot.
@@ -589,9 +590,10 @@ void BootAnimation::drawText(const char* str, const Font& font, bool bold, int*
glBindTexture(GL_TEXTURE_2D, 0);
}
-// We render 24 hour time.
+// We render 12 or 24 hour time.
void BootAnimation::drawClock(const Font& font, const int xPos, const int yPos) {
- static constexpr char TIME_FORMAT[] = "%H:%M";
+ static constexpr char TIME_FORMAT_12[] = "%l:%M";
+ static constexpr char TIME_FORMAT_24[] = "%H:%M";
static constexpr int TIME_LENGTH = 6;
time_t rawtime;
@@ -599,7 +601,8 @@ void BootAnimation::drawClock(const Font& font, const int xPos, const int yPos)
struct tm* timeInfo = localtime(&rawtime);
char timeBuff[TIME_LENGTH];
- size_t length = strftime(timeBuff, TIME_LENGTH, TIME_FORMAT, timeInfo);
+ const char* timeFormat = mTimeFormat12Hour ? TIME_FORMAT_12 : TIME_FORMAT_24;
+ size_t length = strftime(timeBuff, TIME_LENGTH, timeFormat, timeInfo);
if (length != TIME_LENGTH - 1) {
ALOGE("Couldn't format time; abandoning boot animation clock");
@@ -1061,6 +1064,11 @@ bool BootAnimation::updateIsTimeAccurate() {
}
struct stat statResult;
+
+ if(stat(TIME_FORMAT_12_HOUR_FLAG_FILE_PATH, &statResult) == 0) {
+ mTimeFormat12Hour = true;
+ }
+
if(stat(ACCURATE_TIME_FLAG_FILE_PATH, &statResult) == 0) {
mTimeIsAccurate = true;
return true;
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 42759f1acf0dc..7a2e4c28f7676 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -152,6 +152,7 @@ private:
sp mFlingerSurface;
bool mClockEnabled;
bool mTimeIsAccurate;
+ bool mTimeFormat12Hour;
bool mSystemBoot;
String8 mZipFileName;
SortedVector mLoadedFiles;
From 51772647350eef283bc7cffceecd09ecfd393769 Mon Sep 17 00:00:00 2001
From: Aga Madurska
Date: Mon, 31 Oct 2016 10:33:27 +0000
Subject: [PATCH 39/98] Update colors for the round scroll bar.
Bug:32536003
Change-Id: I35503c089bc918493aab3288580f81d7b780d671
---
core/java/android/view/RoundScrollbarRenderer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/java/android/view/RoundScrollbarRenderer.java b/core/java/android/view/RoundScrollbarRenderer.java
index b77be8c00e697..694232f9dfd5c 100644
--- a/core/java/android/view/RoundScrollbarRenderer.java
+++ b/core/java/android/view/RoundScrollbarRenderer.java
@@ -31,8 +31,8 @@ class RoundScrollbarRenderer {
private static final int MAX_SCROLLBAR_ANGLE_SWIPE = 16;
private static final int MIN_SCROLLBAR_ANGLE_SWIPE = 6;
private static final float WIDTH_PERCENTAGE = 0.02f;
- private static final int DEFAULT_THUMB_COLOR = 0xFF757575;
- private static final int DEFAULT_TRACK_COLOR = 0x21FFFFFF;
+ private static final int DEFAULT_THUMB_COLOR = 0x4CFFFFFF;
+ private static final int DEFAULT_TRACK_COLOR = 0x26FFFFFF;
private final Paint mThumbPaint = new Paint();
private final Paint mTrackPaint = new Paint();
From 104f8053370f9e01ac2e8e23bc31d128e5fcc00b Mon Sep 17 00:00:00 2001
From: Makoto Onuki
Date: Fri, 28 Oct 2016 11:20:20 -0700
Subject: [PATCH 40/98] App Shortcut: Clarify which attributes must be
resources
Test: javadoc only -- m -j32 offline-sdk-docs
Bug 32495737
Change-Id: I4c3884172761b128d07f1c2948ab7ccc53951a7e
---
.../android/content/pm/ShortcutManager.java | 21 +++++++++++++++----
docs/html/guide/topics/ui/settings.jd | 4 +++-
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index a93870ece823a..f7c4d592b3a92 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -193,7 +193,11 @@ import java.util.List;
* The following list includes descriptions for the different attributes within a static shortcut:
*
* - {@code android:shortcutId}
- * - Mandatory shortcut ID
+ * - Mandatory shortcut ID.
+ *
+ * This must be a string literal.
+ * A resource string, such as @string/foo, cannot be used.
+ *
*
* - {@code android:enabled}
* - Default is {@code true}. Can be set to {@code false} in order
@@ -206,15 +210,24 @@ import java.util.List;
*
*
- {@code android:shortcutShortLabel}
* - Mandatory shortcut short label.
- * See {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.
+ * See {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.
+ *
+ * This must be a resource string, such as @string/shortcut_label.
+ *
*
* - {@code android:shortcutLongLabel}
* - Shortcut long label.
- * See {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.
+ * See {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.
+ *
+ * This must be a resource string, such as @string/shortcut_long_label.
+ *
*
* - {@code android:shortcutDisabledMessage}
*
- When {@code android:enabled} is set to
- * {@code false}, this attribute is used to display a custom disabled message.
+ * {@code false}, this attribute is used to display a custom disabled message.
+ *
+ * This must be a resource string, such as @string/shortcut_disabled_message.
+ *
*
*
- {@code intent}
*
- Intent to launch when the user selects the shortcut.
diff --git a/docs/html/guide/topics/ui/settings.jd b/docs/html/guide/topics/ui/settings.jd
index 619fd268aef90..b51e6d97ae0a1 100644
--- a/docs/html/guide/topics/ui/settings.jd
+++ b/docs/html/guide/topics/ui/settings.jd
@@ -390,7 +390,9 @@ setComponent()} method.
- The package part of the component name, as per the {@link
android.content.Intent#setComponent setComponent()} method.
-
+
Note: You must use string literals as the values for these
+intent attributes. You cannot use resource strings, such as @string/foo, to define the attributes.
+
Creating a Preference Activity
From 8b38d083c42e2706e1ff5a1410fa61d1f5dea3f5 Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Mon, 31 Oct 2016 14:33:49 -0600
Subject: [PATCH 41/98] Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.
To use the device under a different user, switch users and then
eject/remount the device.
Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
---
.../com/android/externalstorage/ExternalStorageProvider.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 3ef9b8e1b8c4e..10e5dcc916789 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -161,7 +161,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume);
title = mStorageManager.getBestVolumeDescription(privateVol);
}
- } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC
+ && volume.getMountUserId() == userId) {
rootId = volume.getFsUuid();
title = mStorageManager.getBestVolumeDescription(volume);
} else {
From 6566fbe99bcd34a8d842299e835dc1b65d674436 Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Mon, 31 Oct 2016 14:33:49 -0600
Subject: [PATCH 42/98] Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.
To use the device under a different user, switch users and then
eject/remount the device.
Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
---
.../com/android/externalstorage/ExternalStorageProvider.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 62f33bf490a85..740042c2e1bdf 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -161,7 +161,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume);
title = mStorageManager.getBestVolumeDescription(privateVol);
}
- } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC
+ && volume.getMountUserId() == userId) {
rootId = volume.getFsUuid();
title = mStorageManager.getBestVolumeDescription(volume);
} else {
From 580135c1b8c58a3d8834531a1df1029a18f343a4 Mon Sep 17 00:00:00 2001
From: Nimrod Gileadi
Date: Mon, 31 Oct 2016 20:42:19 +0000
Subject: [PATCH 43/98] Increment a MetricsLogger counter on back press.
For Wear, we want to know how often users press the side button, which
is mapped to a back key press. The number of times the back button is
pressed is probably a useful metric for the rest of Android.
The counter string, "key_back_down" is not yet declared in
go/tron-counters, but we should get the framework change in ASAP.
Bug: 32396371
Change-Id: Ia102318cd5ca4d077ce404944084806198c334f7
---
.../core/java/com/android/server/policy/PhoneWindowManager.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 915b882d46a59..b2f6cd2fd9000 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -1042,6 +1042,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
private void interceptBackKeyDown() {
+ MetricsLogger.count(mContext, "key_back_down", 1);
// Reset back key state for long press
mBackKeyHandled = false;
From 5ac1b67317ad3ef57bc23e02bbde5f799412bc7e Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 31 Oct 2016 14:59:45 -0700
Subject: [PATCH 44/98] Import translations. DO NOT MERGE
Change-Id: Ie85b9335611ca2c49a71797d54ed80ee711cf423
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-kn-rIN/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 8d9b2dd546b51..18ef8f185a514 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -96,7 +96,7 @@
"ಧ್ವನಿ ಸಹಾಯಕವನ್ನು ತೆರೆ"
"ಕ್ಯಾಮರಾ ತೆರೆಯಿರಿ"
"ಹೊಸ ಕಾರ್ಯ ವಿನ್ಯಾಸವನ್ನು ಆಯ್ಕೆಮಾಡಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಹೊಂದಾಣಿಕೆಯ ಝೂಮ್ ಬಟನ್."
"ಚಿಕ್ಕ ಪರದೆಯಿಂದ ದೊಡ್ಡ ಪರದೆಗೆ ಝೂಮ್ ಮಾಡು."
"ಬ್ಲೂಟೂತ್ ಸಂಪರ್ಕಗೊಂಡಿದೆ."
From ac2898228edea493c76287338adf6dd8ca21303a Mon Sep 17 00:00:00 2001
From: Makoto Onuki
Date: Mon, 31 Oct 2016 15:32:17 -0700
Subject: [PATCH 45/98] Always scan the Settings app for updated shortcuts.
The setting apps' version code is 25 for both DR and MR1, so the
shortcut manager will not notice when it's changed.
Let's just always scan this app.
Bug 32554059
Change-Id: Ia05363b30a5eeb989dc4c44cf5dbd71cde96de96
---
.../java/com/android/server/pm/ShortcutPackage.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index d558b07a7a70c..38d69ed287e1c 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -635,7 +635,11 @@ class ShortcutPackage extends ShortcutPackageItem {
return false; // Shouldn't happen.
}
- if (!isNewApp && !forceRescan) {
+ // Always scan the settings app, since its version code is the same for DR and MR1.
+ // TODO Fix it properly: b/32554059
+ final boolean isSettings = "com.android.settings".equals(getPackageName());
+
+ if (!isNewApp && !forceRescan && !isSettings) {
// Return if the package hasn't changed, ie:
// - version code hasn't change
// - lastUpdateTime hasn't change
@@ -652,6 +656,11 @@ class ShortcutPackage extends ShortcutPackageItem {
return false;
}
}
+ if (isSettings) {
+ if (ShortcutService.DEBUG) {
+ Slog.d(TAG, "Always scan settings.");
+ }
+ }
} finally {
s.logDurationStat(Stats.PACKAGE_UPDATE_CHECK, start);
}
From 5c0af8876468869f21baa204c498f0c975553bf3 Mon Sep 17 00:00:00 2001
From: Chet Haase
Date: Thu, 13 Oct 2016 15:49:09 -0700
Subject: [PATCH 46/98] Clean up InputConnection.commitContent() javadocs DO
NOT MERGE
Test: docs only, no test apart from verifying that it builds
Bug: #32158219 clean up InputConnection.commitContent() javadocs
Change-Id: I9b438d6b14aa8bc868fe41f7e0fe22b0e83800fb
---
.../view/inputmethod/InputConnection.java | 27 ++++++++++---------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index 8023201bc2840..71c1d624976b8 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -860,32 +860,35 @@ public interface InputConnection {
android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION; // 0x00000001
/**
- * Called by the input method to commit a content such as PNG image to the editor.
+ * Called by the input method to commit content such as a PNG image to the editor.
*
- * In order to avoid variety of compatibility issues, this focuses on a simple use case,
- * where we expect editors and IMEs work cooperatively as follows:
+ * In order to avoid a variety of compatibility issues, this focuses on a simple use case,
+ * where editors and IMEs are expected to work cooperatively as follows:
*
- * - Editor must keep {@link EditorInfo#contentMimeTypes} to be {@code null} if it does
+ *
- Editor must keep {@link EditorInfo#contentMimeTypes} equal to {@code null} if it does
* not support this method at all.
* - Editor can ignore this request when the MIME type specified in
- * {@code inputContentInfo} does not match to any of {@link EditorInfo#contentMimeTypes}.
+ * {@code inputContentInfo} does not match any of {@link EditorInfo#contentMimeTypes}.
*
- * - Editor can ignore the cursor position when inserting the provided context.
+ * - Editor can ignore the cursor position when inserting the provided content.
* - Editor can return {@code true} asynchronously, even before it starts loading the
* content.
- * - Editor should provide a way to delete the content inserted by this method, or revert
- * the effect caused by this method.
+ * - Editor should provide a way to delete the content inserted by this method or to
+ * revert the effect caused by this method.
* - IME should not call this method when there is any composing text, in case calling
- * this method causes focus change.
+ * this method causes a focus change.
* - IME should grant a permission for the editor to read the content. See
* {@link EditorInfo#packageName} about how to obtain the package name of the editor.
*
*
* @param inputContentInfo Content to be inserted.
- * @param flags {@code 0} or {@link #INPUT_CONTENT_GRANT_READ_URI_PERMISSION}.
+ * @param flags {@link #INPUT_CONTENT_GRANT_READ_URI_PERMISSION} if the content provider
+ * allows {@link android.R.styleable#AndroidManifestProvider_grantUriPermissions
+ * grantUriPermissions} or {@code 0} if the application does not need to call
+ * {@link InputContentInfo#requestPermission()}.
* @param opts optional bundle data. This can be {@code null}.
- * @return {@code true} if this request is accepted by the application, no matter if the request
- * is already handled or still being handled in background.
+ * @return {@code true} if this request is accepted by the application, whether the request
+ * is already handled or still being handled in background, {@code false} otherwise.
*/
public boolean commitContent(@NonNull InputContentInfo inputContentInfo, int flags,
@Nullable Bundle opts);
From 9be72645f61d060e0d405a07e08a882b814a6d82 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 31 Oct 2016 22:57:11 -0700
Subject: [PATCH 47/98] Import translations. DO NOT MERGE
Change-Id: I4fcdd721174d9228394afa5ad39de02a3fb309a5
Auto-generated-cl: translation import
---
packages/SettingsLib/res/values-fr-rCA/strings.xml | 2 +-
packages/SettingsLib/res/values-nl/strings.xml | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 25384434313c8..732d515498edc 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -91,7 +91,7 @@
"Point d\'accès Wi-Fi mobile"
"Via Bluetooth"
"Partage de connexion"
- "Partage de connexion et point d\'accès mobile"
+ "Partage de connexion"
"Toutes les applis profess."
"Invité"
"Inconnu"
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index feb78df79078f..2c22ee9f32e2f 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -132,10 +132,10 @@
- "Normaal"
- "Snel"
- "Sneller"
- - "Zeer snel"
- - "Vlug"
- - "Zeer vlug"
- - "Snelst"
+ - "Nog sneller"
+ - "Heel erg snel"
+ - "Snelst"
+ - "Allerallersnelst"
"Profiel kiezen"
"Persoonlijk"
From e065f7c5a9ad4e47f5490793401445660af37624 Mon Sep 17 00:00:00 2001
From: Mark Renouf
Date: Tue, 1 Nov 2016 11:48:24 -0400
Subject: [PATCH 48/98] Workaround for javac compilation issue of lambda code
Since ag/32554459 some Robolectric tests are compiling
framework code with javac. For reasons unclear so far this
code fails to compile with javac:
> ShortcutService.java:408: error: variable ri might not have been initialized
https://android-build.googleplex.com/builds/submitted/3416256/angelfish-userdebug/latest/logs
Removing the lambda expressions corrects the issue.
BUG: 32554459
Change-Id: I189c8ef02dc93b46ef6418c1ff14f2312097898a
---
.../com/android/server/pm/ShortcutService.java | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 13f558e3dd133..500af0ca73d3b 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -238,10 +238,19 @@ public class ShortcutService extends IShortcutService.Stub {
private static List EMPTY_RESOLVE_INFO = new ArrayList<>(0);
- private static Predicate ACTIVITY_NOT_EXPORTED =
- ri -> !ri.activityInfo.exported;
+ // Temporarily reverted to anonymous inner class form due to: b/32554459
+ private static Predicate ACTIVITY_NOT_EXPORTED = new Predicate() {
+ public boolean test(ResolveInfo ri) {
+ return !ri.activityInfo.exported;
+ }
+ };
- private static Predicate PACKAGE_NOT_INSTALLED = pi -> !isInstalled(pi);
+ // Temporarily reverted to anonymous inner class form due to: b/32554459
+ private static Predicate PACKAGE_NOT_INSTALLED = new Predicate() {
+ public boolean test(PackageInfo pi) {
+ return !isInstalled(pi);
+ }
+ };
private final Handler mHandler;
From 456158ffc29864e02b2f66481fe6b0efcfdacba0 Mon Sep 17 00:00:00 2001
From: Phil Weaver
Date: Tue, 1 Nov 2016 09:55:24 -0700
Subject: [PATCH 49/98] Don't invalidate list data during layout.
When a FastScroller is enabled, we were invalidating the
list data during layout, which left the UI in a bad state.
Long-presses didn't work properly, and TalkBack touches
were impossible to perform.
Bug: 31160338
Test: Manually tested long pressing, and verified
that TalkBack now works with the TestActivity in ag/1567328.
Change-Id: Iecd2d597259748a3ecbf5573950e565a0e9faa42
---
core/java/android/widget/AbsListView.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 7b45d8cb05b09..2a2c5ee525399 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2160,7 +2160,6 @@ public abstract class AbsListView extends AdapterView implements Te
}
layoutChildren();
- mInLayout = false;
mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR;
@@ -2168,6 +2167,7 @@ public abstract class AbsListView extends AdapterView implements Te
if (mFastScroll != null) {
mFastScroll.onItemCountChanged(getChildCount(), mItemCount);
}
+ mInLayout = false;
}
/**
@@ -2697,6 +2697,9 @@ public abstract class AbsListView extends AdapterView implements Te
* fail to relayout them properly to accommodate for new bounds.
*/
void handleBoundsChange() {
+ if (mInLayout) {
+ return;
+ }
final int childCount = getChildCount();
if (childCount > 0) {
mDataChanged = true;
From 6c8e3bb43dbb400c7ac1da1375628ab8d4d820cd Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Tue, 1 Nov 2016 15:19:09 -0700
Subject: [PATCH 50/98] Tweak AlertDialog and Preference layout for nonround
watches.
Update the title layouts of AlertDialog and Preference for
nonround watches with proper padding.
Bug: 31271003
Change-Id: I9305c1f52297ee6658de2e84295509d5f06f8aaf
---
.../alert_dialog_title_material.xml | 7 +++----
.../alert_dialog_title_material.xml | 3 +--
.../res/layout-watch/alert_dialog_material.xml | 3 +--
.../preference_list_fragment_material.xml | 2 +-
.../select_dialog_multichoice_material.xml | 2 +-
.../select_dialog_singlechoice_material.xml | 2 +-
.../values-notround-watch/dimens_material.xml | 16 ++++++++++------
.../res/values-round-watch/config_material.xml | 3 ---
.../res/values-round-watch/dimens_material.xml | 4 ++++
.../dimens.xml} | 14 +++++---------
core/res/res/values-watch/styles_material.xml | 2 +-
core/res/res/values/dimens_material.xml | 1 +
12 files changed, 29 insertions(+), 30 deletions(-)
rename core/res/res/{values-notround-watch/config_material.xml => values-watch/dimens.xml} (58%)
diff --git a/core/res/res/layout-notround-watch/alert_dialog_title_material.xml b/core/res/res/layout-notround-watch/alert_dialog_title_material.xml
index 0ab56f95efbe3..08eecef1da95a 100644
--- a/core/res/res/layout-notround-watch/alert_dialog_title_material.xml
+++ b/core/res/res/layout-notround-watch/alert_dialog_title_material.xml
@@ -18,14 +18,14 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingTop="?attr/dialogPreferredPadding"
+ android:paddingBottom="8dp"
android:orientation="vertical"
- android:gravity="top|center_horizontal"
- android:minHeight="@dimen/alert_dialog_title_height">
+ android:gravity="center_horizontal|top">
diff --git a/core/res/res/layout-round-watch/alert_dialog_title_material.xml b/core/res/res/layout-round-watch/alert_dialog_title_material.xml
index aefe28f7f3594..dac1e324be81d 100644
--- a/core/res/res/layout-round-watch/alert_dialog_title_material.xml
+++ b/core/res/res/layout-round-watch/alert_dialog_title_material.xml
@@ -18,6 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingBottom="8dp"
android:orientation="vertical"
android:gravity="top|center_horizontal">
diff --git a/core/res/res/layout-watch/alert_dialog_material.xml b/core/res/res/layout-watch/alert_dialog_material.xml
index 2fe13de2120af..960b927a0e64f 100644
--- a/core/res/res/layout-watch/alert_dialog_material.xml
+++ b/core/res/res/layout-watch/alert_dialog_material.xml
@@ -50,7 +50,7 @@
diff --git a/core/res/res/layout-watch/preference_list_fragment_material.xml b/core/res/res/layout-watch/preference_list_fragment_material.xml
index ae8f203a7ce61..22e66d5139361 100644
--- a/core/res/res/layout-watch/preference_list_fragment_material.xml
+++ b/core/res/res/layout-watch/preference_list_fragment_material.xml
@@ -44,7 +44,7 @@
android:paddingEnd="@dimen/dialog_padding_material"
android:paddingBottom="8dp"
android:textAppearance="@style/TextAppearance.Material.Title"
- android:gravity="center" />
+ android:gravity="center_horizontal|top" />
diff --git a/core/res/res/layout/select_dialog_multichoice_material.xml b/core/res/res/layout/select_dialog_multichoice_material.xml
index 36e8e57b29880..731fe16196345 100644
--- a/core/res/res/layout/select_dialog_multichoice_material.xml
+++ b/core/res/res/layout/select_dialog_multichoice_material.xml
@@ -26,5 +26,5 @@
android:paddingStart="@dimen/select_dialog_padding_start_material"
android:paddingEnd="?attr/dialogPreferredPadding"
android:drawableStart="?attr/listChoiceIndicatorMultiple"
- android:drawablePadding="20dp"
+ android:drawablePadding="@dimen/select_dialog_drawable_padding_start_material"
android:ellipsize="marquee" />
diff --git a/core/res/res/layout/select_dialog_singlechoice_material.xml b/core/res/res/layout/select_dialog_singlechoice_material.xml
index 995272ad80efc..77b693058e82d 100644
--- a/core/res/res/layout/select_dialog_singlechoice_material.xml
+++ b/core/res/res/layout/select_dialog_singlechoice_material.xml
@@ -26,5 +26,5 @@
android:paddingStart="@dimen/select_dialog_padding_start_material"
android:paddingEnd="?attr/dialogPreferredPadding"
android:drawableStart="?attr/listChoiceIndicatorSingle"
- android:drawablePadding="20dp"
+ android:drawablePadding="@dimen/select_dialog_drawable_padding_start_material"
android:ellipsize="marquee" />
diff --git a/core/res/res/values-notround-watch/dimens_material.xml b/core/res/res/values-notround-watch/dimens_material.xml
index 9cacb117cf7ba..9fdf55b8a31db 100644
--- a/core/res/res/values-notround-watch/dimens_material.xml
+++ b/core/res/res/values-notround-watch/dimens_material.xml
@@ -15,12 +15,16 @@
-->
8dp
- 0dp
+ 8dp
- 16dp
- 16dp
- 16dp
+ 8dp
+ 8dp
+ 8dp
- 8dp
- 8dp
+ 0dp
+ 0dp
+
+
+ 8dp
+ 8dp
diff --git a/core/res/res/values-round-watch/config_material.xml b/core/res/res/values-round-watch/config_material.xml
index 11798709f148b..ae4a6eedf4fdf 100644
--- a/core/res/res/values-round-watch/config_material.xml
+++ b/core/res/res/values-round-watch/config_material.xml
@@ -20,9 +20,6 @@
false
-
- 0x00000031
-
@dimen/screen_percentage_15
diff --git a/core/res/res/values-round-watch/dimens_material.xml b/core/res/res/values-round-watch/dimens_material.xml
index f2de4e013a788..c8f27b1724e36 100644
--- a/core/res/res/values-round-watch/dimens_material.xml
+++ b/core/res/res/values-round-watch/dimens_material.xml
@@ -23,4 +23,8 @@
@dimen/screen_percentage_15
@dimen/screen_percentage_15
+
+
+ @dimen/screen_percentage_15
+ 8dp
diff --git a/core/res/res/values-notround-watch/config_material.xml b/core/res/res/values-watch/dimens.xml
similarity index 58%
rename from core/res/res/values-notround-watch/config_material.xml
rename to core/res/res/values-watch/dimens.xml
index a99674f3f0604..4c8b39ca92a7b 100644
--- a/core/res/res/values-notround-watch/config_material.xml
+++ b/core/res/res/values-watch/dimens.xml
@@ -13,13 +13,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
- 0x00800033
+
+
+ 0dp
+
+ 0dp
diff --git a/core/res/res/values-watch/styles_material.xml b/core/res/res/values-watch/styles_material.xml
index af4207ed4e6f5..0053c12d9d84d 100644
--- a/core/res/res/values-watch/styles_material.xml
+++ b/core/res/res/values-watch/styles_material.xml
@@ -98,7 +98,7 @@ please see styles_device_defaults.xml.
- @empty
- false
- @style/TextAppearance.Material.DialogWindowTitle
- - @integer/config_dialogTextGravity
+ - center_horizontal|top
- end
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index 30e7b31377128..ebe577c737581 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -129,6 +129,7 @@
20dp
+ 20dp
2dp
2dp
From 866ded50bb9ccba3e1245dcb2e7f780a413735c0 Mon Sep 17 00:00:00 2001
From: Phil Weaver
Date: Tue, 1 Nov 2016 23:38:44 +0000
Subject: [PATCH 51/98] Revert "Don't invalidate list data during layout."
This reverts commit 456158ffc29864e02b2f66481fe6b0efcfdacba0.
Change-Id: I7a61dc34dfc81ee650ca0883fe99c0f5dc08ba75
---
core/java/android/widget/AbsListView.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 2a2c5ee525399..7b45d8cb05b09 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2160,6 +2160,7 @@ public abstract class AbsListView extends AdapterView implements Te
}
layoutChildren();
+ mInLayout = false;
mOverscrollMax = (b - t) / OVERSCROLL_LIMIT_DIVISOR;
@@ -2167,7 +2168,6 @@ public abstract class AbsListView extends AdapterView implements Te
if (mFastScroll != null) {
mFastScroll.onItemCountChanged(getChildCount(), mItemCount);
}
- mInLayout = false;
}
/**
@@ -2697,9 +2697,6 @@ public abstract class AbsListView extends AdapterView implements Te
* fail to relayout them properly to accommodate for new bounds.
*/
void handleBoundsChange() {
- if (mInLayout) {
- return;
- }
final int childCount = getChildCount();
if (childCount > 0) {
mDataChanged = true;
From 7d24dd64488eece73d06bef06e841f9fb273c35e Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Tue, 1 Nov 2016 17:45:25 -0700
Subject: [PATCH 52/98] Import translations. DO NOT MERGE
Change-Id: I22df3420e521f99e68d025264954a102f14990df
Auto-generated-cl: translation import
---
packages/SettingsLib/res/values-fr-rCA/strings.xml | 2 +-
packages/SettingsLib/res/values-nl/strings.xml | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 25384434313c8..732d515498edc 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -91,7 +91,7 @@
"Point d\'accès Wi-Fi mobile"
"Via Bluetooth"
"Partage de connexion"
- "Partage de connexion et point d\'accès mobile"
+ "Partage de connexion"
"Toutes les applis profess."
"Invité"
"Inconnu"
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index feb78df79078f..2c22ee9f32e2f 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -132,10 +132,10 @@
- "Normaal"
- "Snel"
- "Sneller"
- - "Zeer snel"
- - "Vlug"
- - "Zeer vlug"
- - "Snelst"
+ - "Nog sneller"
+ - "Heel erg snel"
+ - "Snelst"
+ - "Allerallersnelst"
"Profiel kiezen"
"Persoonlijk"
From 6fb3b777452b9f2008f3b15c44e2b4d050ea7c9e Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Tue, 1 Nov 2016 19:34:21 -0700
Subject: [PATCH 53/98] Import translations. DO NOT MERGE
Change-Id: I5b2c1dbb250552bbd446e51b38be6b9508d2bf0c
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-kn-rIN/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 8d9b2dd546b51..18ef8f185a514 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -96,7 +96,7 @@
"ಧ್ವನಿ ಸಹಾಯಕವನ್ನು ತೆರೆ"
"ಕ್ಯಾಮರಾ ತೆರೆಯಿರಿ"
"ಹೊಸ ಕಾರ್ಯ ವಿನ್ಯಾಸವನ್ನು ಆಯ್ಕೆಮಾಡಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಹೊಂದಾಣಿಕೆಯ ಝೂಮ್ ಬಟನ್."
"ಚಿಕ್ಕ ಪರದೆಯಿಂದ ದೊಡ್ಡ ಪರದೆಗೆ ಝೂಮ್ ಮಾಡು."
"ಬ್ಲೂಟೂತ್ ಸಂಪರ್ಕಗೊಂಡಿದೆ."
From 3a062a67fa5954584c754d2cf0bb326841432e3e Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Wed, 2 Nov 2016 15:26:01 -0600
Subject: [PATCH 54/98] Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.
To use the device under a different user, switch users and then
eject/remount the device.
Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
---
.../android/externalstorage/ExternalStorageProvider.java | 3 ++-
services/core/java/com/android/server/MountService.java | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 393771a9b4477..d837988163385 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -134,7 +134,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume);
title = mStorageManager.getBestVolumeDescription(privateVol);
}
- } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC
+ && volume.getMountUserId() == userId) {
rootId = volume.getFsUuid();
title = mStorageManager.getBestVolumeDescription(volume);
} else {
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index d10a457747a30..91a38e93afcea 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -168,6 +168,11 @@ class MountService extends IMountService.Stub
}
}
+ @Override
+ public void onSwitchUser(int userHandle) {
+ mMountService.mCurrentUserId = userHandle;
+ }
+
@Override
public void onStartUser(int userHandle) {
mMountService.onStartUser(userHandle);
@@ -307,6 +312,8 @@ class MountService extends IMountService.Stub
@GuardedBy("mLock")
private String mMoveTargetUuid;
+ private volatile int mCurrentUserId = UserHandle.USER_OWNER;
+
private VolumeInfo findVolumeByIdOrThrow(String id) {
synchronized (mLock) {
final VolumeInfo vol = mVolumes.get(id);
@@ -1183,7 +1190,7 @@ class MountService extends IMountService.Stub
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}
- vol.mountUserId = UserHandle.USER_OWNER;
+ vol.mountUserId = mCurrentUserId;
mHandler.obtainMessage(H_VOLUME_MOUNT, vol).sendToTarget();
} else if (vol.type == VolumeInfo.TYPE_PRIVATE) {
From 6b0079d3bc970d48e71cf9211d178e447f7f8a7c Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Wed, 2 Nov 2016 15:26:01 -0600
Subject: [PATCH 55/98] Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.
To use the device under a different user, switch users and then
eject/remount the device.
Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
---
.../android/externalstorage/ExternalStorageProvider.java | 3 ++-
services/core/java/com/android/server/MountService.java | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 18335b6586a83..d41d0e5b089b8 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -135,7 +135,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume);
title = mStorageManager.getBestVolumeDescription(privateVol);
}
- } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC
+ && volume.getMountUserId() == userId) {
rootId = volume.getFsUuid();
title = mStorageManager.getBestVolumeDescription(volume);
} else {
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 5e674145da34e..6c33cff693bdc 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -168,6 +168,11 @@ class MountService extends IMountService.Stub
}
}
+ @Override
+ public void onSwitchUser(int userHandle) {
+ mMountService.mCurrentUserId = userHandle;
+ }
+
@Override
public void onStartUser(int userHandle) {
mMountService.onStartUser(userHandle);
@@ -307,6 +312,8 @@ class MountService extends IMountService.Stub
@GuardedBy("mLock")
private String mMoveTargetUuid;
+ private volatile int mCurrentUserId = UserHandle.USER_OWNER;
+
private VolumeInfo findVolumeByIdOrThrow(String id) {
synchronized (mLock) {
final VolumeInfo vol = mVolumes.get(id);
@@ -1189,7 +1196,7 @@ class MountService extends IMountService.Stub
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}
- vol.mountUserId = UserHandle.USER_OWNER;
+ vol.mountUserId = mCurrentUserId;
mHandler.obtainMessage(H_VOLUME_MOUNT, vol).sendToTarget();
} else if (vol.type == VolumeInfo.TYPE_PRIVATE) {
From def2123f562569a725e6e04a8f33f2461111fdc3 Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
Date: Wed, 2 Nov 2016 15:26:01 -0600
Subject: [PATCH 56/98] Public volumes belong to a single user.
When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.
To use the device under a different user, switch users and then
eject/remount the device.
Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
---
.../android/externalstorage/ExternalStorageProvider.java | 3 ++-
services/core/java/com/android/server/MountService.java | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 18335b6586a83..d41d0e5b089b8 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -135,7 +135,8 @@ public class ExternalStorageProvider extends DocumentsProvider {
final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume);
title = mStorageManager.getBestVolumeDescription(privateVol);
}
- } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC
+ && volume.getMountUserId() == userId) {
rootId = volume.getFsUuid();
title = mStorageManager.getBestVolumeDescription(volume);
} else {
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 5e674145da34e..6c33cff693bdc 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -168,6 +168,11 @@ class MountService extends IMountService.Stub
}
}
+ @Override
+ public void onSwitchUser(int userHandle) {
+ mMountService.mCurrentUserId = userHandle;
+ }
+
@Override
public void onStartUser(int userHandle) {
mMountService.onStartUser(userHandle);
@@ -307,6 +312,8 @@ class MountService extends IMountService.Stub
@GuardedBy("mLock")
private String mMoveTargetUuid;
+ private volatile int mCurrentUserId = UserHandle.USER_OWNER;
+
private VolumeInfo findVolumeByIdOrThrow(String id) {
synchronized (mLock) {
final VolumeInfo vol = mVolumes.get(id);
@@ -1189,7 +1196,7 @@ class MountService extends IMountService.Stub
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}
- vol.mountUserId = UserHandle.USER_OWNER;
+ vol.mountUserId = mCurrentUserId;
mHandler.obtainMessage(H_VOLUME_MOUNT, vol).sendToTarget();
} else if (vol.type == VolumeInfo.TYPE_PRIVATE) {
From 1cb6777e51f910c67f592344044f68e902cc7582 Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Thu, 3 Nov 2016 01:09:08 -0700
Subject: [PATCH 57/98] Disable multiwindow support for watch devices by
default.
Bug: 30120559
Change-Id: I458eac557e38fd32533a98cca7cbbabc5fa08b09
---
core/res/res/values-watch/config.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml
index 7c05b7a8e3627..d13d154688253 100644
--- a/core/res/res/values-watch/config.xml
+++ b/core/res/res/values-watch/config.xml
@@ -62,4 +62,7 @@
ListView/GridView are notably absent since this is their default anyway.
Set to true for watch devices. -->
true
+
+
+ false
From 040b4826c2707a21a2143f98cbd691b2961412b8 Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Thu, 3 Nov 2016 01:04:24 -0700
Subject: [PATCH 58/98] DO NOT MERGE ANYWHERE Add supports-multiwindow command
to am.
The supports-multiwindow command allows the ability to
check if the device has multiwindow support in the shell.
Bug: 30120559
Change-Id: I466e28d8a794fa457826a6526ef9ef660cd3856c
---
cmds/am/src/com/android/commands/am/Am.java | 22 +++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index d6c00589e7c2a..c460b048a3b7b 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -48,7 +48,9 @@ import android.content.pm.InstrumentationInfo;
import android.content.pm.ParceledListSlice;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
+import android.content.res.AssetManager;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Binder;
import android.os.Build;
@@ -64,6 +66,7 @@ import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AndroidException;
import android.util.ArrayMap;
+import android.util.DisplayMetrics;
import android.view.IWindowManager;
import com.android.internal.os.BaseCommand;
@@ -361,6 +364,8 @@ public class Am extends BaseCommand {
"am send-trim-memory: send a memory trim event to a .\n" +
"\n" +
"am get-current-user: returns id of the current foreground user.\n" +
+ "\n" +
+ "am supports-multiwindow: returns true if the device supports multiwindow.\n" +
"\n"
);
Intent.printIntentArgsHelp(pw, "");
@@ -458,6 +463,8 @@ public class Am extends BaseCommand {
runSendTrimMemory();
} else if (op.equals("get-current-user")) {
runGetCurrentUser();
+ } else if (op.equals("supports-multiwindow")) {
+ runSupportsMultiwindow();
} else {
showError("Error: unknown command '" + op + "'");
}
@@ -2534,6 +2541,21 @@ public class Am extends BaseCommand {
System.out.println(currentUser.id);
}
+ private void runSupportsMultiwindow() throws Exception {
+ // system resources does not contain all the device configuration, construct it manually.
+ Configuration config = mAm.getConfiguration();
+ if (config == null) {
+ throw new AndroidException("Activity manager has no configuration");
+ }
+
+ final DisplayMetrics metrics = new DisplayMetrics();
+ metrics.setToDefaults();
+
+ Resources res = new Resources(AssetManager.getSystem(), metrics, config);
+
+ System.out.println(res.getBoolean(com.android.internal.R.bool.config_supportsMultiWindow));
+ }
+
/**
* Open the given file for sending into the system process. This verifies
* with SELinux that the system will have access to the file.
From eb2e45369a92548e34b664d466d0578f966f7cef Mon Sep 17 00:00:00 2001
From: Greg Plesur
Date: Wed, 2 Nov 2016 17:10:27 -0400
Subject: [PATCH 59/98] New Wear devices need to update their
DISABLE_LOCKSCREEN_KEY.
Previous versions of Wear forced this flag to "true."
BUG: 32591969
Change-Id: I9619eee5df5f67e92818ef0b7b45ddd2299449f1
---
.../com/android/server/LockSettingsService.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index a91e2053c01d1..ae5ed6b8d7fd3 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -584,6 +584,20 @@ public class LockSettingsService extends ILockSettings.Stub {
Slog.e(TAG, "Unable to remove tied profile key", e);
}
}
+
+ boolean isWatch = mContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_WATCH);
+ // Wear used to set DISABLE_LOCKSCREEN to 'true', but because Wear now allows accounts
+ // and device management the lockscreen must be re-enabled now for users that upgrade.
+ if (isWatch && getString("migrated_wear_lockscreen_disabled", null, 0) == null) {
+ final int userCount = users.size();
+ for (int i = 0; i < userCount; i++) {
+ int id = users.get(i).id;
+ setBoolean(LockPatternUtils.DISABLE_LOCKSCREEN_KEY, false, id);
+ }
+ setString("migrated_wear_lockscreen_disabled", "true", 0);
+ Slog.i(TAG, "Migrated lockscreen_disabled for Wear devices");
+ }
} catch (RemoteException re) {
Slog.e(TAG, "Unable to migrate old data", re);
}
From ef945b670617e3913661f3da83e5fbaa01721eb4 Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Thu, 3 Nov 2016 01:04:24 -0700
Subject: [PATCH 60/98] DO NOT MERGE ANYWHERE Add supports-multiwindow command
to am.
The supports-multiwindow command allows the ability to
check if the device has multiwindow support in the shell.
Bug: 30120559
Change-Id: I466e28d8a794fa457826a6526ef9ef660cd3856c
---
cmds/am/src/com/android/commands/am/Am.java | 22 +++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index d6c00589e7c2a..c460b048a3b7b 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -48,7 +48,9 @@ import android.content.pm.InstrumentationInfo;
import android.content.pm.ParceledListSlice;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
+import android.content.res.AssetManager;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Binder;
import android.os.Build;
@@ -64,6 +66,7 @@ import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AndroidException;
import android.util.ArrayMap;
+import android.util.DisplayMetrics;
import android.view.IWindowManager;
import com.android.internal.os.BaseCommand;
@@ -361,6 +364,8 @@ public class Am extends BaseCommand {
"am send-trim-memory: send a memory trim event to a .\n" +
"\n" +
"am get-current-user: returns id of the current foreground user.\n" +
+ "\n" +
+ "am supports-multiwindow: returns true if the device supports multiwindow.\n" +
"\n"
);
Intent.printIntentArgsHelp(pw, "");
@@ -458,6 +463,8 @@ public class Am extends BaseCommand {
runSendTrimMemory();
} else if (op.equals("get-current-user")) {
runGetCurrentUser();
+ } else if (op.equals("supports-multiwindow")) {
+ runSupportsMultiwindow();
} else {
showError("Error: unknown command '" + op + "'");
}
@@ -2534,6 +2541,21 @@ public class Am extends BaseCommand {
System.out.println(currentUser.id);
}
+ private void runSupportsMultiwindow() throws Exception {
+ // system resources does not contain all the device configuration, construct it manually.
+ Configuration config = mAm.getConfiguration();
+ if (config == null) {
+ throw new AndroidException("Activity manager has no configuration");
+ }
+
+ final DisplayMetrics metrics = new DisplayMetrics();
+ metrics.setToDefaults();
+
+ Resources res = new Resources(AssetManager.getSystem(), metrics, config);
+
+ System.out.println(res.getBoolean(com.android.internal.R.bool.config_supportsMultiWindow));
+ }
+
/**
* Open the given file for sending into the system process. This verifies
* with SELinux that the system will have access to the file.
From 34fb70ab88408b629350a80f6f68648a95db62bf Mon Sep 17 00:00:00 2001
From: Greg Plesur
Date: Tue, 1 Nov 2016 12:33:15 -0400
Subject: [PATCH 61/98] If the current device is a watch, fix
DeviceOwner/ProfileOwner logic.
In this case, don't require the device to have gone through the
Setup Wizard before disqualifying DO/PO if there's an incompatible
account on the device.
BUG: 32438704,32438210
Change-Id: I6858db13c8df6e95d01d18a903f4343f70370e8b
---
.../devicepolicy/DevicePolicyManagerService.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 37144950e97d6..96331e83dd312 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -6144,6 +6144,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return hasUserSetupCompleted(UserHandle.getCallingUserId());
}
+ // This checks only if the Setup Wizard has run. Since Wear devices pair before
+ // completing Setup Wizard, and pairing involves transferring user data, calling
+ // logic may want to check mIsWatch or mPaired in addition to hasUserSetupCompleted().
private boolean hasUserSetupCompleted(int userHandle) {
if (!mHasFeature) {
return true;
@@ -6388,7 +6391,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
int callingUid = mInjector.binderGetCallingUid();
if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID) {
- if (hasUserSetupCompleted(userHandle)
+ if ((mIsWatch || hasUserSetupCompleted(userHandle))
&& hasIncompatibleAccountsLocked(userHandle, owner)) {
throw new IllegalStateException("Not allowed to set the profile owner because "
+ "there are already some accounts on the profile");
@@ -6396,7 +6399,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return;
}
enforceCanManageProfileAndDeviceOwners();
- if (hasUserSetupCompleted(userHandle) && !isCallerWithSystemUid()) {
+ if ((mIsWatch || hasUserSetupCompleted(userHandle)) && !isCallerWithSystemUid()) {
throw new IllegalStateException("Cannot set the profile owner on a user which is "
+ "already set-up");
}
@@ -8633,6 +8636,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
if (hasUserSetupCompleted(callingUserId)) {
return false;
}
+ if (mIsWatch && hasPaired(UserHandle.USER_SYSTEM)) {
+ return false;
+ }
return true;
} else if (DevicePolicyManager.ACTION_PROVISION_MANAGED_SHAREABLE_DEVICE.equals(action)) {
if (!mInjector.userManagerIsSplitSystemUser()) {
@@ -8664,7 +8670,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
if (isAdb) {
// if shell command runs after user setup completed check device status. Otherwise, OK.
- if (hasUserSetupCompleted(UserHandle.USER_SYSTEM)) {
+ if (mIsWatch || hasUserSetupCompleted(UserHandle.USER_SYSTEM)) {
if (!mInjector.userManagerIsSplitSystemUser()) {
if (mUserManager.getUserCount() > 1) {
return CODE_NONSYSTEM_USER_EXISTS;
From 2585033100755e8ce6cd43db15a7cfd67e7264a3 Mon Sep 17 00:00:00 2001
From: Phil Weaver
Date: Thu, 3 Nov 2016 15:28:03 -0700
Subject: [PATCH 62/98] Add check for null manger for a11y recents action
Bug: 31986988
Test: Ran A11y cts
Change-Id: Ia6a1e1b921d8b0008edbcf1f1a8d1d3d0eb969c6
(cherry picked from commit 3cdd6c7654ff688b2dbd638e388bc56db7a020e2)
---
.../AccessibilityService.java | 3 ++-
.../AccessibilityManagerService.java | 23 +++++++++++--------
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java
index 163e7d2661b91..b311c218de30f 100644
--- a/core/java/android/accessibilityservice/AccessibilityService.java
+++ b/core/java/android/accessibilityservice/AccessibilityService.java
@@ -334,7 +334,8 @@ public abstract class AccessibilityService extends Service {
public static final int GLOBAL_ACTION_HOME = 2;
/**
- * Action to toggle showing the overview of recent apps
+ * Action to toggle showing the overview of recent apps. Will fail on platforms that don't
+ * show recent apps.
*/
public static final int GLOBAL_ACTION_RECENTS = 3;
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index e00178f8ea411..58bb5f3793127 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -2891,8 +2891,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
sendDownAndUpKeyEvents(KeyEvent.KEYCODE_HOME);
} return true;
case AccessibilityService.GLOBAL_ACTION_RECENTS: {
- openRecents();
- } return true;
+ return openRecents();
+ }
case AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS: {
expandNotifications();
} return true;
@@ -3385,14 +3385,19 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
Binder.restoreCallingIdentity(token);
}
- private void openRecents() {
+ private boolean openRecents() {
final long token = Binder.clearCallingIdentity();
-
- StatusBarManagerInternal statusBarService = LocalServices.getService(
- StatusBarManagerInternal.class);
- statusBarService.toggleRecentApps();
-
- Binder.restoreCallingIdentity(token);
+ try {
+ StatusBarManagerInternal statusBarService = LocalServices.getService(
+ StatusBarManagerInternal.class);
+ if (statusBarService == null) {
+ return false;
+ }
+ statusBarService.toggleRecentApps();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ return true;
}
private void showGlobalActions() {
From ad302b60f4c3814de6dc9380753540c42620f4fb Mon Sep 17 00:00:00 2001
From: Hemal Patel
Date: Mon, 3 Oct 2016 18:27:18 -0700
Subject: [PATCH 63/98] Docs: Revised the Drawable example
Revised the Drawable example with VectorDrawable-friendly example
Bug: 18009084
Change-Id: Ia6d0ad46a352601c7032244b17d28b9dd690de1d
---
.../topics/resources/providing-resources.jd | 23 +++++++++++--------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 80a989a57e284..99aeb4379eeba 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -905,20 +905,25 @@ PNG file and two small XML files that point to it. (An example XML file is shown
Drawable
-To create an alias to an existing drawable, use the {@code } element.
-For example:
+
+ To create an alias to an existing drawable, use the {@code }
+ element. For example:
+
<?xml version="1.0" encoding="utf-8"?>
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/icon_ca" />
+<resources>
+ <drawable name="icon">@drawable/icon_ca</drawable>
+</resources>
-If you save this file as {@code icon.xml} (in an alternative resource directory, such as
-{@code res/drawable-en-rCA/}), it is compiled into a resource that you
-can reference as {@code R.drawable.icon}, but is actually an alias for the {@code
-R.drawable.icon_ca} resource (which is saved in {@code res/drawable/}).
-
+
+ If you save this file as {@code drawables.xml} (in an alternative resource
+ directory, such as {@code res/values-en-rCA/}), it is compiled into a
+ resource that you can reference as {@code R.drawable.icon}, but is actually
+ an alias for the {@code R.drawable.icon_ca} resource (which is saved in
+ {@code res/drawable/}).
+
Layout
From 25cd01cc69fcad34756b00e52a79c0c54178f2e6 Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Fri, 23 Sep 2016 09:07:11 +0100
Subject: [PATCH 64/98] Zygote: Additional whitelists for runtime overlay /
other static resources.
Partially cherry picked from commit 1c15c635785c64a.
These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.
Bug: 32618130
Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f
---
core/jni/fd_utils-inl.h | 44 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index db56c320e4f2a..e0363a1226849 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -240,9 +240,22 @@ class FileDescriptorInfo {
is_sock(false) {
}
+ static bool StartsWith(const std::string& str, const std::string& prefix) {
+ return str.compare(0, prefix.size(), prefix) == 0;
+ }
+
+ static bool EndsWith(const std::string& str, const std::string& suffix) {
+ if (suffix.size() > str.size()) {
+ return false;
+ }
+
+ return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
+ }
+
// Returns true iff. a given path is whitelisted. A path is whitelisted
// if it belongs to the whitelist (see kPathWhitelist) or if it's a path
- // under /system/framework that ends with ".jar".
+ // under /system/framework that ends with ".jar" or if it is a system
+ // framework overlay.
static bool IsWhitelisted(const std::string& path) {
for (size_t i = 0; i < (sizeof(kPathWhitelist) / sizeof(kPathWhitelist[0])); ++i) {
if (kPathWhitelist[i] == path) {
@@ -252,10 +265,35 @@ class FileDescriptorInfo {
static const std::string kFrameworksPrefix = "/system/framework/";
static const std::string kJarSuffix = ".jar";
- if (path.compare(0, kFrameworksPrefix.size(), kFrameworksPrefix) == 0 &&
- path.compare(path.size() - kJarSuffix.size(), kJarSuffix.size(), kJarSuffix) == 0) {
+ if (StartsWith(path, kFrameworksPrefix) && EndsWith(path, kJarSuffix)) {
return true;
}
+
+ // Whitelist files needed for Runtime Resource Overlay, like these:
+ // /system/vendor/overlay/framework-res.apk
+ // /system/vendor/overlay-subdir/pg/framework-res.apk
+ // /data/resource-cache/system@vendor@overlay@framework-res.apk@idmap
+ // /data/resource-cache/system@vendor@overlay-subdir@pg@framework-res.apk@idmap
+ // See AssetManager.cpp for more details on overlay-subdir.
+ static const std::string kOverlayDir = "/system/vendor/overlay/";
+ static const std::string kVendorOverlayDir = "/vendor/overlay";
+ static const std::string kOverlaySubdir = "/system/vendor/overlay-subdir/";
+ static const std::string kApkSuffix = ".apk";
+
+ if ((StartsWith(path, kOverlayDir) || StartsWith(path, kOverlaySubdir)
+ || StartsWith(path, kVendorOverlayDir))
+ && EndsWith(path, kApkSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
+ static const std::string kOverlayIdmapPrefix = "/data/resource-cache/";
+ static const std::string kOverlayIdmapSuffix = ".apk@idmap";
+ if (StartsWith(path, kOverlayIdmapPrefix) && EndsWith(path, kOverlayIdmapSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
return false;
}
From 4364bbf93f9aeff91f76e78b60ff7aec2efd37e3 Mon Sep 17 00:00:00 2001
From: Damien Bargiacchi
Date: Tue, 1 Nov 2016 21:44:20 -0700
Subject: [PATCH 65/98] Allow config.xml to set the default display's default
color mode
Bug: 31928803
Change-Id: I2707ae47611dca134fa9b4afa2d09e0812b3efd3
---
core/res/res/values/config.xml | 6 ++++++
core/res/res/values/symbols.xml | 1 +
.../server/display/DisplayManagerService.java | 16 ++++++++++++++++
.../server/display/PersistentDataStore.java | 4 ++--
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f8c463ce9ba28..90c19fb4e861d 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1936,6 +1936,12 @@
mirror the content of the default display. -->
true
+
+ 0
+
false
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index ecce83368266e..bbfee14201006 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -307,6 +307,7 @@
+
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 971989b212194..9c762cce7e0fa 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -220,6 +220,11 @@ public final class DisplayManagerService extends SystemService {
private final DisplayViewport mTempDefaultViewport = new DisplayViewport();
private final DisplayViewport mTempExternalTouchViewport = new DisplayViewport();
+ // The default color mode for default displays. Overrides the usual
+ // Display.Display.COLOR_MODE_DEFAULT for displays with the
+ // DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY flag set.
+ private final int mDefaultDisplayDefaultColorMode;
+
// Temporary list of deferred work to perform when setting the display state.
// Only used by requestDisplayState. The field is self-synchronized and only
// intended for use inside of the requestGlobalDisplayStateInternal function.
@@ -232,6 +237,8 @@ public final class DisplayManagerService extends SystemService {
mUiHandler = UiThread.getHandler();
mDisplayAdapterListener = new DisplayAdapterListener();
mSingleDisplayDemoMode = SystemProperties.getBoolean("persist.demo.singledisplay", false);
+ mDefaultDisplayDefaultColorMode = mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_defaultDisplayDefaultColorMode);
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mGlobalDisplayBrightness = pm.getDefaultScreenBrightnessSetting();
@@ -703,6 +710,14 @@ public final class DisplayManagerService extends SystemService {
}
if (display != null && display.getPrimaryDisplayDeviceLocked() == device) {
int colorMode = mPersistentDataStore.getColorMode(device);
+ if (colorMode == Display.COLOR_MODE_INVALID) {
+ if ((device.getDisplayDeviceInfoLocked().flags
+ & DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY) != 0) {
+ colorMode = mDefaultDisplayDefaultColorMode;
+ } else {
+ colorMode = Display.COLOR_MODE_DEFAULT;
+ }
+ }
display.setRequestedColorModeLocked(colorMode);
}
scheduleTraversalLocked(false);
@@ -1043,6 +1058,7 @@ public final class DisplayManagerService extends SystemService {
pw.println(" mNextNonDefaultDisplayId=" + mNextNonDefaultDisplayId);
pw.println(" mDefaultViewport=" + mDefaultViewport);
pw.println(" mExternalTouchViewport=" + mExternalTouchViewport);
+ pw.println(" mDefaultDisplayDefaultColorMode=" + mDefaultDisplayDefaultColorMode);
pw.println(" mSingleDisplayDemoMode=" + mSingleDisplayDemoMode);
pw.println(" mWifiDisplayScanRequestCount=" + mWifiDisplayScanRequestCount);
diff --git a/services/core/java/com/android/server/display/PersistentDataStore.java b/services/core/java/com/android/server/display/PersistentDataStore.java
index 5616fb97bad76..47701b99860af 100644
--- a/services/core/java/com/android/server/display/PersistentDataStore.java
+++ b/services/core/java/com/android/server/display/PersistentDataStore.java
@@ -183,11 +183,11 @@ final class PersistentDataStore {
public int getColorMode(DisplayDevice device) {
if (!device.hasStableUniqueId()) {
- return Display.COLOR_MODE_DEFAULT;
+ return Display.COLOR_MODE_INVALID;
}
DisplayState state = getDisplayState(device.getUniqueId(), false);
if (state == null) {
- return Display.COLOR_MODE_DEFAULT;
+ return Display.COLOR_MODE_INVALID;
}
return state.getColorMode();
}
From 4e8ba1d73eee1311bb78144be43862b393548d5d Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Fri, 23 Sep 2016 09:07:11 +0100
Subject: [PATCH 66/98] Zygote: Additional whitelists for runtime overlay /
other static resources.
Partially cherry picked from commit 1c15c635785c64a.
These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.
Bug: 32618130
Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f
---
core/jni/fd_utils-inl.h | 44 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index a34874512139c..6f1e231b550db 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -241,9 +241,22 @@ class FileDescriptorInfo {
is_sock(false) {
}
+ static bool StartsWith(const std::string& str, const std::string& prefix) {
+ return str.compare(0, prefix.size(), prefix) == 0;
+ }
+
+ static bool EndsWith(const std::string& str, const std::string& suffix) {
+ if (suffix.size() > str.size()) {
+ return false;
+ }
+
+ return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
+ }
+
// Returns true iff. a given path is whitelisted. A path is whitelisted
// if it belongs to the whitelist (see kPathWhitelist) or if it's a path
- // under /system/framework that ends with ".jar".
+ // under /system/framework that ends with ".jar" or if it is a system
+ // framework overlay.
static bool IsWhitelisted(const std::string& path) {
for (size_t i = 0; i < (sizeof(kPathWhitelist) / sizeof(kPathWhitelist[0])); ++i) {
if (kPathWhitelist[i] == path) {
@@ -253,10 +266,35 @@ class FileDescriptorInfo {
static const std::string kFrameworksPrefix = "/system/framework/";
static const std::string kJarSuffix = ".jar";
- if (path.compare(0, kFrameworksPrefix.size(), kFrameworksPrefix) == 0 &&
- path.compare(path.size() - kJarSuffix.size(), kJarSuffix.size(), kJarSuffix) == 0) {
+ if (StartsWith(path, kFrameworksPrefix) && EndsWith(path, kJarSuffix)) {
return true;
}
+
+ // Whitelist files needed for Runtime Resource Overlay, like these:
+ // /system/vendor/overlay/framework-res.apk
+ // /system/vendor/overlay-subdir/pg/framework-res.apk
+ // /data/resource-cache/system@vendor@overlay@framework-res.apk@idmap
+ // /data/resource-cache/system@vendor@overlay-subdir@pg@framework-res.apk@idmap
+ // See AssetManager.cpp for more details on overlay-subdir.
+ static const std::string kOverlayDir = "/system/vendor/overlay/";
+ static const std::string kVendorOverlayDir = "/vendor/overlay";
+ static const std::string kOverlaySubdir = "/system/vendor/overlay-subdir/";
+ static const std::string kApkSuffix = ".apk";
+
+ if ((StartsWith(path, kOverlayDir) || StartsWith(path, kOverlaySubdir)
+ || StartsWith(path, kVendorOverlayDir))
+ && EndsWith(path, kApkSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
+ static const std::string kOverlayIdmapPrefix = "/data/resource-cache/";
+ static const std::string kOverlayIdmapSuffix = ".apk@idmap";
+ if (StartsWith(path, kOverlayIdmapPrefix) && EndsWith(path, kOverlayIdmapSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
return false;
}
From 5e2f7c6229d7191183888d685b57a7d0a2835fce Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Mon, 7 Nov 2016 19:59:29 +0000
Subject: [PATCH 67/98] Zygote: Additional whitelisting for legacy devices.
On M and below, we provide a blanket whitelist for all files under
"/vendor/zygote_whitelist". This path is whitelisted purely to allow
this patch to be applied easily on legacy devices and configurations.
Note that this does not amount to a loosening of our security policy
because whitelisted files are reopened anyway.
Bug: 32691930
Test: manual
Change-Id: If5b53f6f0a707f8d36603c09bfd3f72dbfbbbb99
---
core/jni/fd_utils-inl.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index 6f1e231b550db..064e2ed88afc3 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -295,6 +295,12 @@ class FileDescriptorInfo {
return true;
}
+ // All regular files that are placed under this path are whitelisted automatically.
+ static const std::string kZygoteWhitelistPath = "/vendor/zygote_whitelist/";
+ if (StartsWith(path, kZygoteWhitelistPath) && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
return false;
}
From aa451616c8bcf760096a348282879af6d83b94db Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Mon, 7 Nov 2016 20:59:23 -0800
Subject: [PATCH 68/98] Import translations. DO NOT MERGE
Change-Id: Icd8a71ffdf6db4fcfa0a001ffded8b51a729b10d
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-bn-rBD/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index 2cd7b04501072..f3a007e9f7680 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -531,7 +531,7 @@
"হোম"
"ফিরুন"
"উপরে"
- "নীচে"
+ "নিচে"
"বাম"
"ডান"
"কেন্দ্র"
From 0ad0e859f6309fa6e6cea68fe3366d68b5c08f73 Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Fri, 23 Sep 2016 09:07:11 +0100
Subject: [PATCH 69/98] Zygote: Additional whitelists for runtime overlay /
other static resources.
Partially cherry picked from commit 1c15c635785c64a.
These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.
Bug: 32618130
Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f
---
core/jni/fd_utils-inl.h | 44 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index 760596397102b..2d7ba1c58465e 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -243,9 +243,22 @@ class FileDescriptorInfo {
is_sock(false) {
}
+ static bool StartsWith(const std::string& str, const std::string& prefix) {
+ return str.compare(0, prefix.size(), prefix) == 0;
+ }
+
+ static bool EndsWith(const std::string& str, const std::string& suffix) {
+ if (suffix.size() > str.size()) {
+ return false;
+ }
+
+ return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
+ }
+
// Returns true iff. a given path is whitelisted. A path is whitelisted
// if it belongs to the whitelist (see kPathWhitelist) or if it's a path
- // under /system/framework that ends with ".jar".
+ // under /system/framework that ends with ".jar" or if it is a system
+ // framework overlay.
static bool IsWhitelisted(const std::string& path) {
for (size_t i = 0; i < (sizeof(kPathWhitelist) / sizeof(kPathWhitelist[0])); ++i) {
if (kPathWhitelist[i] == path) {
@@ -255,10 +268,35 @@ class FileDescriptorInfo {
static const std::string kFrameworksPrefix = "/system/framework/";
static const std::string kJarSuffix = ".jar";
- if (path.compare(0, kFrameworksPrefix.size(), kFrameworksPrefix) == 0 &&
- path.compare(path.size() - kJarSuffix.size(), kJarSuffix.size(), kJarSuffix) == 0) {
+ if (StartsWith(path, kFrameworksPrefix) && EndsWith(path, kJarSuffix)) {
return true;
}
+
+ // Whitelist files needed for Runtime Resource Overlay, like these:
+ // /system/vendor/overlay/framework-res.apk
+ // /system/vendor/overlay-subdir/pg/framework-res.apk
+ // /data/resource-cache/system@vendor@overlay@framework-res.apk@idmap
+ // /data/resource-cache/system@vendor@overlay-subdir@pg@framework-res.apk@idmap
+ // See AssetManager.cpp for more details on overlay-subdir.
+ static const std::string kOverlayDir = "/system/vendor/overlay/";
+ static const std::string kVendorOverlayDir = "/vendor/overlay";
+ static const std::string kOverlaySubdir = "/system/vendor/overlay-subdir/";
+ static const std::string kApkSuffix = ".apk";
+
+ if ((StartsWith(path, kOverlayDir) || StartsWith(path, kOverlaySubdir)
+ || StartsWith(path, kVendorOverlayDir))
+ && EndsWith(path, kApkSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
+ static const std::string kOverlayIdmapPrefix = "/data/resource-cache/";
+ static const std::string kOverlayIdmapSuffix = ".apk@idmap";
+ if (StartsWith(path, kOverlayIdmapPrefix) && EndsWith(path, kOverlayIdmapSuffix)
+ && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
return false;
}
From 7d302e018db99e859b465413d514406fb02f4d8d Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Mon, 7 Nov 2016 19:59:29 +0000
Subject: [PATCH 70/98] Zygote: Additional whitelisting for legacy devices.
On M and below, we provide a blanket whitelist for all files under
"/vendor/zygote_whitelist". This path is whitelisted purely to allow
this patch to be applied easily on legacy devices and configurations.
Note that this does not amount to a loosening of our security policy
because whitelisted files are reopened anyway.
Bug: 32691930
Test: manual
(cherry picked from commit 5e2f7c6229d7191183888d685b57a7d0a2835fce)
Change-Id: I9700fc7b469d0bc4d876c52292f25888b94a5223
---
core/jni/fd_utils-inl.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index 2d7ba1c58465e..53b2a0ddc1ca0 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -297,6 +297,12 @@ class FileDescriptorInfo {
return true;
}
+ // All regular files that are placed under this path are whitelisted automatically.
+ static const std::string kZygoteWhitelistPath = "/vendor/zygote_whitelist/";
+ if (StartsWith(path, kZygoteWhitelistPath) && path.find("/../") == std::string::npos) {
+ return true;
+ }
+
return false;
}
From 0244ca8d10dfc27e14f481fe649b89f7638c48eb Mon Sep 17 00:00:00 2001
From: "neo.chae"
Date: Tue, 1 Nov 2016 00:02:38 +0900
Subject: [PATCH 71/98] Fix idmap leak in zygote process
Fix a idmap leak in AssetManager::addSystemOverlays.
And, The fix could also prevent fd leak of idmap.
Test: none
Bug: 32691930
Signed-off-by: Hyangseok Chae
(cherry picked from commit 6a742a38509693f8b39ee9a5ad2803fca12688bf)
Change-Id: Idc4af77db2b0cb739bd6b009b6af0f9123be1aac
---
libs/androidfw/AssetManager.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index de6a33cf15e72..b54f0c1590908 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -798,6 +798,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
sharedRes->add(oass, oidmap, offset + 1, false);
const_cast(this)->mAssetPaths.add(oap);
const_cast(this)->mZipSet.addOverlay(targetPackagePath, oap);
+ delete oidmap;
}
}
fclose(fin);
From 7821bbd9a55fd571ad23ec6aa9398a06c019f1ef Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Tue, 8 Nov 2016 02:03:00 -0800
Subject: [PATCH 72/98] Import translations. DO NOT MERGE
Change-Id: I1caa69921dbde7442c433f3373f17a442d1b48b3
Auto-generated-cl: translation import
---
packages/SystemUI/res/values-bn-rBD/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index 2cd7b04501072..f3a007e9f7680 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -531,7 +531,7 @@
"হোম"
"ফিরুন"
"উপরে"
- "নীচে"
+ "নিচে"
"বাম"
"ডান"
"কেন্দ্র"
From 686de427113ec40c3104eabcfec60cb3a153385f Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Tue, 8 Nov 2016 14:29:26 -0800
Subject: [PATCH 73/98] Enable swipe to dismiss for watch devices.
Bug: 32745441
Change-Id: Ic59784e6cd52e32d57ec845ceec02d726e6e4ef0
---
core/res/res/values-watch/config_material.xml | 3 +++
core/res/res/values/config_material.xml | 3 +++
core/res/res/values/themes_material.xml | 2 ++
3 files changed, 8 insertions(+)
diff --git a/core/res/res/values-watch/config_material.xml b/core/res/res/values-watch/config_material.xml
index 529f18b78e4dd..03d3637b150db 100644
--- a/core/res/res/values-watch/config_material.xml
+++ b/core/res/res/values-watch/config_material.xml
@@ -30,6 +30,9 @@
true
+
+ true
+
@drawable/scrollbar_vertical_thumb
@drawable/scrollbar_vertical_track
diff --git a/core/res/res/values/config_material.xml b/core/res/res/values/config_material.xml
index 840a551f914ff..8737df84e0600 100644
--- a/core/res/res/values/config_material.xml
+++ b/core/res/res/values/config_material.xml
@@ -32,6 +32,9 @@
false
+
+ false
+
true
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index ff8693bbbdade..0de773bc37248 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -175,6 +175,7 @@ please see themes_device_defaults.xml.
- @transition/move
- false
- true
+ - @bool/config_windowSwipeToDismiss
- @style/ThemeOverlay.Material.Dialog
@@ -536,6 +537,7 @@ please see themes_device_defaults.xml.
- @transition/move
- false
- true
+ - @bool/config_windowSwipeToDismiss
- @style/ThemeOverlay.Material.Dialog
From 95cd3f1976bfa44ad0aeb5bb1b2356e362543046 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Tue, 8 Nov 2016 17:24:36 -0800
Subject: [PATCH 74/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32363164
Change-Id: I8b2e02fa6ddcf65e7bd9f413e9d31022b60b57a5
---
core/res/res/values-bn-rBD/strings.xml | 2 +-
core/res/res/values-ca/strings.xml | 16 ++++++++--------
core/res/res/values-de/strings.xml | 2 +-
core/res/res/values-hy-rAM/strings.xml | 8 ++++----
core/res/res/values-kn-rIN/strings.xml | 10 +++++-----
core/res/res/values-ko/strings.xml | 2 +-
core/res/res/values-sv/strings.xml | 4 ++--
core/res/res/values-tr/strings.xml | 10 +++++-----
8 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 8d893e53a91cd..1274e963e30bd 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1432,7 +1432,7 @@
" — "
"সরান"
"প্রস্তাবিত স্তরের চেয়ে বেশি উঁচুতে ভলিউম বাড়াবেন?\n\nউঁচু ভলিউমে বেশি সময় ধরে কিছু শুনলে আপনার শ্রবনশক্তির ক্ষতি হতে পারে।"
- "অ্যাক্সেসযোগ্যতা সক্রিয় করতে দুইটি আঙ্গুলকে চেপে নীচে ধরে রাখুন৷"
+ "অ্যাক্সেসযোগ্যতা সক্রিয় করতে দুইটি আঙ্গুলকে চেপে নিচে ধরে রাখুন৷"
"অ্যাক্সেসযোগ্যতা সক্ষম করা হয়েছে৷"
"অ্যাক্সেসযোগ্যতা বাতিল করা হয়েছে৷"
"বর্তমান ব্যবহারকারী %1$s৷"
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 137d924ac1fc4..4c03d184e54b6 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -67,8 +67,8 @@
"IMEI"
"MEID"
- "ID de l\'emissor (trucada entrant)"
- "ID de l\'emissor (trucada de sortida)"
+ "Identificador de trucada (trucada entrant)"
+ "Identificador de trucada (trucada de sortida)"
"Identificador de la línia connectada"
"Restricció de l\'identificador de la línia connectada"
"Desviació de trucades"
@@ -82,12 +82,12 @@
"Rebuig de trucades molestes no desitjades"
"Lliurament de número que truca"
"No molesteu"
- "El valor predeterminat de l\'identificador de l\'emissor és restringit. Següent trucada: restringit"
- "El valor predeterminat de l\'identificador de l\'emissor és restringit. Següent trucada: no restringit"
- "El valor predeterminat de l\'identificador de l\'emissor és no restringit. Següent trucada: restringit"
- "El valor predeterminat de l\'identificador de l\'emissor és no restringit. Següent trucada: no restringit"
+ "El valor predeterminat de l\'identificador de trucada és restringit. Trucada següent: restringit"
+ "El valor predeterminat de l\'identificador de trucada és restringit. Trucada següent: no restringit"
+ "El valor predeterminat de l\'identificador de trucada és no restringit. Trucada següent: restringit"
+ "El valor predeterminat de l\'identificador de trucada és no restringit. Trucada següent: no restringit"
"No s\'ha proveït el servei."
- "No pots canviar la configuració de l\'identificador de l\'emissor."
+ "No pots canviar la configuració de l\'identificador de trucada."
"El servei de dades està bloquejat."
"El servei d\'emergència està bloquejat."
"El servei de veu està bloquejat."
@@ -1246,7 +1246,7 @@
"La VPN sempre activada està desconnectada"
"Error de la VPN sempre activada"
"Toca per configurar"
- "Trieu un fitxer"
+ "Tria un fitxer"
"No s\'ha escollit cap fitxer"
"Restableix"
"Envia"
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index a6fad85e2df93..f5b724dda712e 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1226,7 +1226,7 @@
"Ablehnen"
"Berechtigung angefordert"
"Berechtigung angefordert\nfür Konto %s"
- "Sie verwenden diese App außerhalb Ihres Arbeitsprofils"
+ "Du verwendest diese App außerhalb deines Arbeitsprofils"
"Du verwendest diese App in deinem Arbeitsprofil."
"Eingabemethode"
"Synchronisieren"
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 160efff177e38..572d716a47610 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -1137,7 +1137,7 @@
"Սահմանել ժամը"
"Սահմանել ամսաթիվը"
"Սահմանել"
- "Կատարված է"
+ "Պատրաստ է"
"Նոր` "
"Տրամադրված է %1$s-ի կողմից:"
"Թույլտվություններ չեն պահանջվում"
@@ -1214,7 +1214,7 @@
"Որոնել"
"Ուղարկել"
"Հաջորդը"
- "Կատարված է"
+ "Պատրաստ է"
"Նախորդ"
"Կատարել"
"Հավաքել հեռախոսահամարը`\nօգտագործելով %s-ը"
@@ -1263,7 +1263,7 @@
- %d՝ %d-ից
- %d՝ %d-ից
- "Կատարված է"
+ "Պատրաստ է"
"Ջնջում է USB կրիչը..."
"Ջնջում է SD քարտը..."
"Կիսվել"
@@ -1305,7 +1305,7 @@
"Alt"
"Չեղարկել"
"Ջնջել"
- "Կատարված է"
+ "Պատրաստ է"
"Ռեժիմի փոփոխում"
"Shift"
"Մուտք"
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 7cb97a7c56b78..6cffa0d32ad99 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -958,9 +958,9 @@
"%1$s ಚಾಲನೆಯಲ್ಲಿದೆ"
"ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ ಅಥವಾ ಅಪ್ಲಿಕೇಶನ್ ನಿಲ್ಲಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."
"ಸರಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಸರಿ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಗಮನಿಸಿ"
"ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ..."
"ಆನ್ ಮಾಡು"
@@ -1118,7 +1118,7 @@
"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ ""ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗಬಹುದು""."
"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗುತ್ತದೆ."
"ಕಳುಹಿಸು"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ನನ್ನ ಆಯ್ಕೆಯನ್ನು ನೆನಪಿಡು"
"ನೀವು ಇದನ್ನು ನಂತರದಲ್ಲಿ ಸೆಟ್ಟಿಂಗ್ಗಳು > ಅಪ್ಲಿಕೇಶನ್ಗಳಲ್ಲಿ ಬದಲಾಯಿಸಬಹುದು"
"ಯಾವಾಗಲೂ ಅನುಮತಿಸು"
@@ -1303,7 +1303,7 @@
"ಹಿಂದಿನ ತಿಂಗಳು"
"ಮುಂದಿನ ತಿಂಗಳು"
"Alt"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಅಳಿಸು"
"ಮುಗಿದಿದೆ"
"ಮೋಡ್ ಬದಲಾವಣೆ"
@@ -1672,7 +1672,7 @@
"ಸಾಧನ ಮರುಹೊಂದಿಸಲಾಗುತ್ತಿದೆ..."
"ಸಾಧನವನ್ನು ಮರುಹೊಂದಿಸುವುದೇ?"
"ನೀವು ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಕಳೆದುಕೊಳ್ಳುತ್ತೀರಿ ಮತ್ತು %1$s ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಡೆಮೋ ಮತ್ತೆ ಪ್ರಾರಂಭವಾಗುತ್ತದೆ..."
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಈಗಲೇ ಮರುಹೊಂದಿಸು"
"ನಿರ್ಬಂಧಗಳು ಇಲ್ಲದೆಯೇ ಈ ಸಾಧನವನ್ನು ಬಳಸಲು ಫ್ಯಾಕ್ಟರಿ ಮರುಹೊಂದಿಸಿ"
"ಇನ್ನಷ್ಟು ತಿಳಿಯಲು ಸ್ಪರ್ಶಿಸಿ."
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index b23a96637c578..39824c72f072f 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -254,7 +254,7 @@
"저장"
"기기 사진, 미디어, 파일 액세스"
"마이크"
- "오디오를 녹음할 수 있도록"
+ "오디오 녹음"
"카메라"
"사진 및 동영상 촬영"
"전화"
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index d43282db76868..7d6ed4788d26f 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -667,11 +667,11 @@
"Ange lösenord för att låsa upp"
"Ange PIN-kod för att låsa upp"
"Fel PIN-kod."
- "Tryck på Menu och sedan på 0 om du vill låsa upp."
+ "Tryck på Menu och sedan på 0 för att låsa upp."
"Nödsamtalsnummer"
"Ingen tjänst"
"Skärmen har låsts."
- "Tryck på Menu om du vill låsa upp eller ringa nödsamtal."
+ "Tryck på Menu för att låsa upp eller ringa nödsamtal."
"Tryck på Menu för att låsa upp."
"Rita grafiskt lösenord för att låsa upp"
"Nödsamtal"
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index a089fd42feb62..efc7adac8e13e 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -773,7 +773,7 @@
"Bu sayfada kal"
"%s\n\nBu sayfadan ayrılmak istediğinizden emin misiniz?"
"Onayla"
- "İpucu: Yakınlaştırmak ve uzaklaştırmak için iki kez hafifçe dokunun."
+ "İpucu: Yakınlaştırmak ve uzaklaştırmak için iki kez dokunun."
"Otomatik Doldur"
"Otomatik doldurma ayarla"
" "
@@ -1133,7 +1133,7 @@
"UYGULAMAYI AL"
"ŞİMDİ DEĞİL"
"Yeni SIM kart takıldı"
- "Kurmak için hafifçe dokunun"
+ "Kurmak için dokunun"
"Saati ayarlayın"
"Tarihi ayarlayın"
"Ayarla"
@@ -1531,7 +1531,7 @@
"bilinmiyor"
"Yazdırma hizmeti etkin değil"
"%s hizmeti yüklendi"
- "Etkinleştirmek için hafifçe dokunun"
+ "Etkinleştirmek için dokunun"
"Yönetici PIN\'ini girin"
"PIN\'i girin"
"Yanlış"
@@ -1659,9 +1659,9 @@
"Kilidi açmak için dokunun"
"Kullanıcı verileri kilitlendi"
"İş profili kilitlendi"
- "İş profilinin kilidini açmak için hafifçe dokunun"
+ "İş profilinin kilidini açmak için dokunun"
"%1$s cihazına bağlandı"
- "Dosyaları görüntülemek için hafifçe dokunun"
+ "Dosyaları görüntülemek için dokunun"
"Sabitle"
"Sabitlemeyi kaldır"
"Uygulama bilgileri"
From dfcc79ee8ecd4166cba19be7493c6175cb0c65a9 Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Mon, 7 Nov 2016 16:22:48 +0000
Subject: [PATCH 75/98] Zygote : Block SIGCHLD during fork.
We close the android logging related sockets prior as late as possible
before every fork to avoid having to whitelist them. If one of the
zygote's children dies after this point (but prior to the fork), we can
end up reopening the logging sockets from the SIGCHLD signal handler.
To prevent this from happening, block SIGCHLD during this critical
section.
Bug: 32693692
Test: Manual
(cherry picked from commit e9a525829a354c92983a35455ccab16d1b0d3892)
Zygote: Unblock SIGCHLD in the parent after fork.
Follow up to change e9a525829a354c92983a. Allows the zygote to
receive SIGCHLD again and prevents the zygote from getting into a
zombie state if it's killed.
Contributed-By: rhed_jao
Bug: 32693692
Test: manual
(cherry picked from commit c7161f756e86b98f2244a04d9207b47149965fd7)
Change-Id: If89903a29c84dfc9b056f9e19618046874bba689
---
core/jni/com_android_internal_os_Zygote.cpp | 24 +++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 9bec6a36b5e35..2fdabcd9fa69d 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -452,6 +452,20 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
SetForkLoad(true);
#endif
+ sigset_t sigchld;
+ sigemptyset(&sigchld);
+ sigaddset(&sigchld, SIGCHLD);
+
+ // Temporarily block SIGCHLD during forks. The SIGCHLD handler might
+ // log, which would result in the logging FDs we close being reopened.
+ // This would cause failures because the FDs are not whitelisted.
+ //
+ // Note that the zygote process is single threaded at this point.
+ if (sigprocmask(SIG_BLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_BLOCK, { SIGCHLD }) failed.");
+ }
+
// Close any logging related FDs before we start evaluating the list of
// file descriptors.
__android_log_close();
@@ -483,6 +497,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
RuntimeAbort(env, __LINE__, "Unable to reopen whitelisted descriptors.");
}
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
+
// Keep capabilities across UID change, unless we're staying root.
if (uid != 0) {
EnableKeepCapabilities(env);
@@ -616,6 +635,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
SetForkLoad(false);
#endif
+ // We blocked SIGCHLD prior to a fork, we unblock it here.
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
}
return pid;
}
From 9072dcd82c8c09ec2758726dfa197f02079fd0f7 Mon Sep 17 00:00:00 2001
From: FEI WU
Date: Wed, 9 Nov 2016 14:12:29 -0800
Subject: [PATCH 76/98] Update colorPrimary in watch
1. Update colorPrimary in watch. This value is only used for icons and
switch background on watch.
2. Replace hard coded color and disable alpha in switch track.
3. Rename watch_switch_track_mtrl_alpha to be watch_switch_track_mtrl
since it's no longer a alpha mask.
Change-Id: Ia1eaae62a934c89e3ca6cc8736b256c552f0329b
---
.../watch_switch_track_color_material.xml} | 15 ++++++++-------
...trl_alpha.png => watch_switch_track_mtrl.png} | Bin
...trl_alpha.png => watch_switch_track_mtrl.png} | Bin
...trl_alpha.png => watch_switch_track_mtrl.png} | Bin
.../layout-watch/preference_widget_switch.xml | 3 ++-
core/res/res/values-watch/colors_material.xml | 2 +-
6 files changed, 11 insertions(+), 9 deletions(-)
rename core/res/res/{drawable/watch_switch_track_material.xml => color/watch_switch_track_color_material.xml} (72%)
rename core/res/res/drawable-hdpi/{watch_switch_track_mtrl_alpha.png => watch_switch_track_mtrl.png} (100%)
rename core/res/res/drawable-xhdpi/{watch_switch_track_mtrl_alpha.png => watch_switch_track_mtrl.png} (100%)
rename core/res/res/drawable-xxhdpi/{watch_switch_track_mtrl_alpha.png => watch_switch_track_mtrl.png} (100%)
diff --git a/core/res/res/drawable/watch_switch_track_material.xml b/core/res/res/color/watch_switch_track_color_material.xml
similarity index 72%
rename from core/res/res/drawable/watch_switch_track_material.xml
rename to core/res/res/color/watch_switch_track_color_material.xml
index 79e92a3310710..c7dc5d34204a0 100644
--- a/core/res/res/drawable/watch_switch_track_material.xml
+++ b/core/res/res/color/watch_switch_track_color_material.xml
@@ -1,9 +1,12 @@
- -
-
-
- -
-
-
-
+
+
+
\ No newline at end of file
diff --git a/core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-hdpi/watch_switch_track_mtrl.png
similarity index 100%
rename from core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png
rename to core/res/res/drawable-hdpi/watch_switch_track_mtrl.png
diff --git a/core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png
similarity index 100%
rename from core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png
rename to core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png
diff --git a/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png
similarity index 100%
rename from core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png
rename to core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png
diff --git a/core/res/res/layout-watch/preference_widget_switch.xml b/core/res/res/layout-watch/preference_widget_switch.xml
index 5881cf0c4d1ea..a1a845abfe3ab 100644
--- a/core/res/res/layout-watch/preference_widget_switch.xml
+++ b/core/res/res/layout-watch/preference_widget_switch.xml
@@ -24,7 +24,8 @@
android:thumb="@drawable/watch_switch_thumb_material_anim"
android:thumbTint="@color/watch_switch_thumb_color_material"
android:thumbTintMode="multiply"
- android:track="@drawable/watch_switch_track_material"
+ android:track="@drawable/watch_switch_track_mtrl"
+ android:trackTint="@color/watch_switch_track_color_material"
android:focusable="false"
android:clickable="false"
android:background="@null" />
diff --git a/core/res/res/values-watch/colors_material.xml b/core/res/res/values-watch/colors_material.xml
index 18bfd4db5ae04..92f77622a2a28 100644
--- a/core/res/res/values-watch/colors_material.xml
+++ b/core/res/res/values-watch/colors_material.xml
@@ -22,7 +22,7 @@
#ff5e97f6
#ffd0def7
- #4D4D4D
+ #33ffffff
#ff919699
From 7b371575e4c62c065ef9f66f3afa288c8691dfb4 Mon Sep 17 00:00:00 2001
From: Alain Vongsouvanh
Date: Wed, 9 Nov 2016 14:52:37 -0800
Subject: [PATCH 77/98] colors: Properly set the default accent colors.
The 700 and 50 variant of the default accent colors were pointing to the
wrong material resources (deep_teal instead of accent).
This CL also update the watch colors to the proper specs.
BUG: 32087183
Change-Id: Ib8a23d9078e79bc0fdf6da893b4dff12954c2cbb
---
core/res/res/values-watch/colors_material.xml | 12 ++++++------
core/res/res/values/colors_device_defaults.xml | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/core/res/res/values-watch/colors_material.xml b/core/res/res/values-watch/colors_material.xml
index 18bfd4db5ae04..1456976e897e4 100644
--- a/core/res/res/values-watch/colors_material.xml
+++ b/core/res/res/values-watch/colors_material.xml
@@ -14,13 +14,13 @@
limitations under the License.
-->
- #ff232e33
- #ff3e5059
+ #232E33
+ #3E5059
- #ff2e4978
- #ff4285f4
- #ff5e97f6
- #ffd0def7
+ #5385DB
+ #75A4F5
+ #5E97F6
+ #93B7F5
#4D4D4D
diff --git a/core/res/res/values/colors_device_defaults.xml b/core/res/res/values/colors_device_defaults.xml
index 89691e90d46ed..8f0350a887b96 100644
--- a/core/res/res/values/colors_device_defaults.xml
+++ b/core/res/res/values/colors_device_defaults.xml
@@ -28,10 +28,10 @@
@color/tertiary_material_settings
@color/quaternary_material_settings
- @color/material_deep_teal_700
+ @color/accent_material_700
@color/accent_material_light
@color/accent_material_dark
- @color/material_deep_teal_50
+ @color/accent_material_50
@color/background_material_dark
@color/background_material_light
From f88508bd3e32736948f12cc9bd66716c8affa630 Mon Sep 17 00:00:00 2001
From: Hugo Benichi
Date: Tue, 19 Jul 2016 15:59:27 +0900
Subject: [PATCH 78/98] DO NOT MERGE ANYWHERE Add
CONNECTIVITY_USE_RESTRICTED_NETWORKS permission
This patch creates a new permission used by ConnectivityService to give
access to restricted networks without the NET_CAPABILITY_NOT_RESTRICTED
capability bit on.
Bug: 24497316
Change-Id: I5b6c8a9ef14395b2f1ab26cb17b24d7876ec79f1
---
core/res/AndroidManifest.xml | 5 +++
.../android/server/ConnectivityService.java | 12 ++++++-
.../connectivity/PermissionMonitor.java | 36 ++++++++++---------
3 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 9565ba5e6c85e..d21b4b210fa16 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1064,6 +1064,11 @@
+
+
+
mUsers = new HashSet();
+ private final Set mUsers = new HashSet<>();
// Keys are App IDs. Values are true for SYSTEM permission and false for NETWORK permission.
- private final Map mApps = new HashMap();
+ private final Map mApps = new HashMap<>();
public PermissionMonitor(Context context, INetworkManagementService netd) {
mContext = context;
@@ -126,14 +127,14 @@ public class PermissionMonitor {
}
boolean isNetwork = hasNetworkPermission(app);
- boolean isSystem = hasSystemPermission(app);
+ boolean hasRestrictedPermission = hasRestrictedNetworkPermission(app);
- if (isNetwork || isSystem) {
+ if (isNetwork || hasRestrictedPermission) {
Boolean permission = mApps.get(uid);
// If multiple packages share a UID (cf: android:sharedUserId) and ask for different
// permissions, don't downgrade (i.e., if it's already SYSTEM, leave it as is).
if (permission == null || permission == NETWORK) {
- mApps.put(uid, isSystem);
+ mApps.put(uid, hasRestrictedPermission);
}
}
}
@@ -164,12 +165,13 @@ public class PermissionMonitor {
return hasPermission(app, CHANGE_NETWORK_STATE);
}
- private boolean hasSystemPermission(PackageInfo app) {
+ private boolean hasRestrictedNetworkPermission(PackageInfo app) {
int flags = app.applicationInfo != null ? app.applicationInfo.flags : 0;
if ((flags & FLAG_SYSTEM) != 0 || (flags & FLAG_UPDATED_SYSTEM_APP) != 0) {
return true;
}
- return hasPermission(app, CONNECTIVITY_INTERNAL);
+ return hasPermission(app, CONNECTIVITY_INTERNAL)
+ || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS);
}
private int[] toIntArray(List list) {
@@ -181,8 +183,8 @@ public class PermissionMonitor {
}
private void update(Set users, Map apps, boolean add) {
- List network = new ArrayList();
- List system = new ArrayList();
+ List network = new ArrayList<>();
+ List system = new ArrayList<>();
for (Entry app : apps.entrySet()) {
List list = app.getValue() ? system : network;
for (int user : users) {
@@ -209,7 +211,7 @@ public class PermissionMonitor {
}
mUsers.add(user);
- Set users = new HashSet();
+ Set users = new HashSet<>();
users.add(user);
update(users, mApps, true);
}
@@ -221,7 +223,7 @@ public class PermissionMonitor {
}
mUsers.remove(user);
- Set users = new HashSet();
+ Set users = new HashSet<>();
users.add(user);
update(users, mApps, false);
}
@@ -235,16 +237,16 @@ public class PermissionMonitor {
try {
PackageInfo app = mPackageManager.getPackageInfo(appName, GET_PERMISSIONS);
boolean isNetwork = hasNetworkPermission(app);
- boolean isSystem = hasSystemPermission(app);
- if (isNetwork || isSystem) {
+ boolean hasRestrictedPermission = hasRestrictedNetworkPermission(app);
+ if (isNetwork || hasRestrictedPermission) {
Boolean permission = mApps.get(appUid);
// If multiple packages share a UID (cf: android:sharedUserId) and ask for different
// permissions, don't downgrade (i.e., if it's already SYSTEM, leave it as is).
if (permission == null || permission == NETWORK) {
- mApps.put(appUid, isSystem);
+ mApps.put(appUid, hasRestrictedPermission);
- Map apps = new HashMap();
- apps.put(appUid, isSystem);
+ Map apps = new HashMap<>();
+ apps.put(appUid, hasRestrictedPermission);
update(mUsers, apps, true);
}
}
@@ -260,7 +262,7 @@ public class PermissionMonitor {
}
mApps.remove(appUid);
- Map apps = new HashMap();
+ Map apps = new HashMap<>();
apps.put(appUid, NETWORK); // doesn't matter which permission we pick here
update(mUsers, apps, false);
}
From c5bf8bc74d17dbf9737979ec8c339e2feb85ccec Mon Sep 17 00:00:00 2001
From: Andriy Naborskyy
Date: Thu, 10 Nov 2016 01:51:24 +0000
Subject: [PATCH 79/98] DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE
libhwui: make setSurface asynchronous"
This reverts commit 80e6d8873b79ced40e79fcba0bf793ea6528d20c.
Bug: 32771832
Change-Id: Ia2f2ffd08dfd87cbce1ec750d6b61277799b536f
---
core/java/android/view/ThreadedRenderer.java | 5 ++---
core/jni/android_view_ThreadedRenderer.cpp | 6 +++---
libs/hwui/renderthread/CanvasContext.cpp | 5 +++--
libs/hwui/renderthread/CanvasContext.h | 2 +-
libs/hwui/renderthread/RenderProxy.cpp | 7 +++----
libs/hwui/renderthread/RenderProxy.h | 2 +-
6 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index db147ab51263f..f6119e2898f00 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -145,10 +145,9 @@ public class ThreadedRenderer extends HardwareRenderer {
@Override
boolean initialize(Surface surface) throws OutOfResourcesException {
- boolean status = !mInitialized;
mInitialized = true;
updateEnabledState(surface);
- nInitialize(mNativeProxy, surface);
+ boolean status = nInitialize(mNativeProxy, surface);
return status;
}
@@ -504,7 +503,7 @@ public class ThreadedRenderer extends HardwareRenderer {
private static native boolean nLoadSystemProperties(long nativeProxy);
private static native void nSetName(long nativeProxy, String name);
- private static native void nInitialize(long nativeProxy, Surface window);
+ private static native boolean nInitialize(long nativeProxy, Surface window);
private static native void nUpdateSurface(long nativeProxy, Surface window);
private static native boolean nPauseSurface(long nativeProxy, Surface window);
private static native void nSetup(long nativeProxy, int width, int height,
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 7400ef04bbcda..47132f40be21b 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -262,11 +262,11 @@ static void android_view_ThreadedRenderer_setName(JNIEnv* env, jobject clazz,
env->ReleaseStringUTFChars(jname, name);
}
-static void android_view_ThreadedRenderer_initialize(JNIEnv* env, jobject clazz,
+static jboolean android_view_ThreadedRenderer_initialize(JNIEnv* env, jobject clazz,
jlong proxyPtr, jobject jsurface) {
RenderProxy* proxy = reinterpret_cast(proxyPtr);
sp window = android_view_Surface_getNativeWindow(env, jsurface);
- proxy->initialize(window);
+ return proxy->initialize(window);
}
static void android_view_ThreadedRenderer_updateSurface(JNIEnv* env, jobject clazz,
@@ -461,7 +461,7 @@ static JNINativeMethod gMethods[] = {
{ "nDeleteProxy", "(J)V", (void*) android_view_ThreadedRenderer_deleteProxy },
{ "nLoadSystemProperties", "(J)Z", (void*) android_view_ThreadedRenderer_loadSystemProperties },
{ "nSetName", "(JLjava/lang/String;)V", (void*) android_view_ThreadedRenderer_setName },
- { "nInitialize", "(JLandroid/view/Surface;)V", (void*) android_view_ThreadedRenderer_initialize },
+ { "nInitialize", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_initialize },
{ "nUpdateSurface", "(JLandroid/view/Surface;)V", (void*) android_view_ThreadedRenderer_updateSurface },
{ "nPauseSurface", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_pauseSurface },
{ "nSetup", "(JIIFII)V", (void*) android_view_ThreadedRenderer_setup },
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 57e5832ff752c..4cf8b152ed40f 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -110,11 +110,12 @@ void CanvasContext::setSwapBehavior(SwapBehavior swapBehavior) {
mSwapBehavior = swapBehavior;
}
-void CanvasContext::initialize(ANativeWindow* window) {
+bool CanvasContext::initialize(ANativeWindow* window) {
setSurface(window);
- if (mCanvas) return;
+ if (mCanvas) return false;
mCanvas = new OpenGLRenderer(mRenderThread.renderState());
mCanvas->initProperties();
+ return true;
}
void CanvasContext::updateSurface(ANativeWindow* window) {
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 1e6f830dbeb26..f2fa9cdcbefdd 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -67,7 +67,7 @@ public:
// Won't take effect until next EGLSurface creation
void setSwapBehavior(SwapBehavior swapBehavior);
- void initialize(ANativeWindow* window);
+ bool initialize(ANativeWindow* window);
void updateSurface(ANativeWindow* window);
bool pauseSurface(ANativeWindow* window);
bool hasSurface() { return mNativeWindow.get(); }
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 30f0073fd1f0e..6d9acd429279a 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -140,15 +140,14 @@ void RenderProxy::setName(const char* name) {
}
CREATE_BRIDGE2(initialize, CanvasContext* context, ANativeWindow* window) {
- args->context->initialize(args->window);
- return nullptr;
+ return (void*) args->context->initialize(args->window);
}
-void RenderProxy::initialize(const sp& window) {
+bool RenderProxy::initialize(const sp& window) {
SETUP_TASK(initialize);
args->context = mContext;
args->window = window.get();
- post(task);
+ return (bool) postAndWait(task);
}
CREATE_BRIDGE2(updateSurface, CanvasContext* context, ANativeWindow* window) {
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index db03b29f134b4..5febbe0ab26c5 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -67,7 +67,7 @@ public:
ANDROID_API bool loadSystemProperties();
ANDROID_API void setName(const char* name);
- ANDROID_API void initialize(const sp& window);
+ ANDROID_API bool initialize(const sp& window);
ANDROID_API void updateSurface(const sp& window);
ANDROID_API bool pauseSurface(const sp& window);
ANDROID_API void setup(int width, int height, float lightRadius,
From b1f1209d9a3321d8bc44529406a3e210524d5e3a Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Mon, 7 Nov 2016 16:22:48 +0000
Subject: [PATCH 80/98] Zygote : Block SIGCHLD during fork.
We close the android logging related sockets prior as late as possible
before every fork to avoid having to whitelist them. If one of the
zygote's children dies after this point (but prior to the fork), we can
end up reopening the logging sockets from the SIGCHLD signal handler.
To prevent this from happening, block SIGCHLD during this critical
section.
Bug: 32693692
Test: Manual
(cherry picked from commit e9a525829a354c92983a35455ccab16d1b0d3892)
Zygote: Unblock SIGCHLD in the parent after fork.
Follow up to change e9a525829a354c92983a. Allows the zygote to
receive SIGCHLD again and prevents the zygote from getting into a
zombie state if it's killed.
Contributed-By: rhed_jao
Bug: 32693692
Test: manual
(cherry picked from commit 1480dc3e97b661f5bfa3a5c2fbce72385b8d2be6)
Change-Id: If89903a29c84dfc9b056f9e19618046874bba689
---
core/jni/com_android_internal_os_Zygote.cpp | 25 +++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 22a3edc64dbca..10342412c5a66 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -446,6 +446,20 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
ckTime(start, "ForkAndSpecializeCommon:SetSigChldHandler");
+ sigset_t sigchld;
+ sigemptyset(&sigchld);
+ sigaddset(&sigchld, SIGCHLD);
+
+ // Temporarily block SIGCHLD during forks. The SIGCHLD handler might
+ // log, which would result in the logging FDs we close being reopened.
+ // This would cause failures because the FDs are not whitelisted.
+ //
+ // Note that the zygote process is single threaded at this point.
+ if (sigprocmask(SIG_BLOCK, &sigchld, NULL) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_BLOCK, { SIGCHLD }) failed.");
+ }
+
// Close any logging related FDs before we start evaluating the list of
// file descriptors.
__android_log_close();
@@ -479,6 +493,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
RuntimeAbort(env, __LINE__, "Unable to reopen whitelisted descriptors.");
}
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, NULL) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
+
// Keep capabilities across UID change, unless we're staying root.
if (uid != 0) {
EnableKeepCapabilities(env);
@@ -609,6 +628,12 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
}
} else if (pid > 0) {
// the parent process
+
+ // We blocked SIGCHLD prior to a fork, we unblock it here.
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, NULL) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
}
return pid;
}
From 37fa5cbc283f886727a419f86f6345adc0756acb Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 02:13:53 -0800
Subject: [PATCH 81/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: I3116c8192dcb7e203d6551eaa50e6faf4220cd0e
---
.../res/values-bn-rBD/strings.xml | 12 ++++++------
.../res/values-sk/strings.xml | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml b/packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml
index 440cb647c0245..2b69d5bfd5409 100644
--- a/packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml
@@ -24,13 +24,13 @@
"একটি সংযুক্ত ডেস্কটপ কম্পিউটার থেকে সমস্ত ডেটার সম্পূর্ণ ব্যাকআপ নেওয়ার অনুরোধ করা হয়েছে৷ আপনি কি এটি করার অনুমতি দিতে চান?\n\nযদি আপনি নিজের থেকে এই ব্যাকআপ নেওয়ার অনুরোধ না করে থাকেন, তবে এই প্রক্রিয়াটিতে অনুমতি প্রদান করবেন না৷ এটি বর্তমানে ডিভাইসটিতে থাকা সমস্ত ডেটাকে প্রতিস্থাপন করবে!"
"আমার ডেটা পুনরুদ্ধার করুন"
"পুনরুদ্ধার করবেন না"
- "দয়া করে নীচে আপনার বর্তমান ব্যাকআপের পাসওয়ার্ড দিন:"
- "দয়া করে নীচে আপনার ডিভাইসের এনক্রিপশান পাসওয়ার্ড লিখুন৷"
- "দয়া করে নীচে আপানার ডিভাইসের এনক্রিপশান পাসওয়ার্ড লিখুন৷ এছাড়াও ব্যাকআপ সংরক্ষণাগার এনক্রিপ্ট করতে এটি ব্যবহার করা হবে৷"
+ "দয়া করে নিচে আপনার বর্তমান ব্যাকআপের পাসওয়ার্ড দিন:"
+ "দয়া করে নিচে আপনার ডিভাইসের এনক্রিপশান পাসওয়ার্ড লিখুন৷"
+ "দয়া করে নিচে আপানার ডিভাইসের এনক্রিপশান পাসওয়ার্ড লিখুন৷ এছাড়াও ব্যাকআপ সংরক্ষণাগার এনক্রিপ্ট করতে এটি ব্যবহার করা হবে৷"
"সম্পূর্ণ ব্যাকআপ ডেটা এনক্রিপ্ট করতে দয়া করে একটি পাসওয়ার্ড লিখুন৷ যদি এটি খালি রেখে দেওয়া হয় তবে আপনার বর্তমান ব্যাকআপ পাসওয়ার্ডটি ব্যবহার করা হবে:"
- "আপনি যদি সম্পূর্ণ ব্যাকআপ ডেটা এনক্রিপ্ট করতে চান তাহলে নীচে একটি পাসওয়ার্ড লিখুন:"
- "আপনার ডিভাইস এনক্রিপ্ট হয়ে থাকার কারণে আপনার ব্যাকআপকে এনক্রিপ্ট করতে হবে। দয়া করে নীচে একটি পাসওয়ার্ড দিন:"
- "যদি পুনরুদ্ধার করা ডেটা এনক্রিপ্ট করা থাকে, তবে দয়া করে নীচে পাসওয়ার্ডটি লিখুন:"
+ "আপনি যদি সম্পূর্ণ ব্যাকআপ ডেটা এনক্রিপ্ট করতে চান তাহলে নিচে একটি পাসওয়ার্ড লিখুন:"
+ "আপনার ডিভাইস এনক্রিপ্ট হয়ে থাকার কারণে আপনার ব্যাকআপকে এনক্রিপ্ট করতে হবে। দয়া করে নিচে একটি পাসওয়ার্ড দিন:"
+ "যদি পুনরুদ্ধার করা ডেটা এনক্রিপ্ট করা থাকে, তবে দয়া করে নিচে পাসওয়ার্ডটি লিখুন:"
"ব্যাকআপ নেওয়া শুরু হয়েছে..."
"ব্যাকআপ নেওয়া সম্পূর্ণ হয়েছে"
"পুনরুদ্ধার করা শুরু হচ্ছে..."
diff --git a/packages/BackupRestoreConfirmation/res/values-sk/strings.xml b/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
index 804f980b16744..44d01deafe6bb 100644
--- a/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
@@ -19,7 +19,7 @@
"Úplná záloha"
"Úplné obnovenie"
"Bola vyžiadaná úplná záloha všetkých dát do pripojeného počítača. Chcete túto akciu povoliť?\n\nAk ste zálohu nevyžiadali vy, túto operáciu nepovoľujte."
- "Zálohovať dáta"
+ "Zálohovať moje dáta"
"Nezálohovať"
"Z pripojeného počítača bolo vyžiadané úplné obnovenie všetkých údajov. Chcete túto akciu povoliť?\n\nAk ste toto obnovenie nevyžiadali vy, túto operáciu nepovoľujte. Táto akcia nahradí všetky údaje v zariadení."
"Obnoviť údaje"
From 377d4af0d00e6bf81d75f70db8681d6e9db377e7 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 02:24:31 -0800
Subject: [PATCH 82/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: I7d27891f4b452f54e6f14d22f37b6b2bcbdefc5b
---
packages/DocumentsUI/res/values-b+sr+Latn/strings.xml | 2 +-
packages/DocumentsUI/res/values-fa/strings.xml | 6 +++---
packages/DocumentsUI/res/values-kk-rKZ/strings.xml | 4 ++--
packages/DocumentsUI/res/values-kn-rIN/strings.xml | 2 +-
packages/DocumentsUI/res/values-nl/strings.xml | 6 +++---
packages/DocumentsUI/res/values-sr/strings.xml | 2 +-
packages/DocumentsUI/res/values-sv/strings.xml | 2 +-
packages/DocumentsUI/res/values-tr/strings.xml | 2 +-
packages/DocumentsUI/res/values-uz-rUZ/strings.xml | 2 +-
9 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml b/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
index 75b0d861ec1a6..88aeab519cff5 100644
--- a/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
@@ -44,7 +44,7 @@
"Kopiraj"
"Premesti"
"Odbaci"
- "Pokušaj ponovo"
+ "Probaj ponovo"
"Prema imenu"
"Prema datumu izmene"
"Prema veličini"
diff --git a/packages/DocumentsUI/res/values-fa/strings.xml b/packages/DocumentsUI/res/values-fa/strings.xml
index f2f59ede2b1ab..cc27e8e9a0b55 100644
--- a/packages/DocumentsUI/res/values-fa/strings.xml
+++ b/packages/DocumentsUI/res/values-fa/strings.xml
@@ -36,8 +36,8 @@
"پنجره جدید"
"کپی"
"جایگذاری"
- "نمایش فضای ذخیرهسازی داخلی"
- "پنهان کردن فضای ذخیرهسازی داخلی"
+ "نمایش حافظه داخلی"
+ "پنهان کردن حافظه داخلی"
"نمایش اندازه فایل"
"پنهان کردن اندازه فایل"
"انتخاب"
@@ -112,7 +112,7 @@
"بعضی از فایلها تبدیل شدند"
"به ^1 اجازه داده شود به فهرست راهنمای ^2 در ^3 دسترسی داشته باشد؟"
"به ^1 اجازه دسترسی به دایرکتوری ^2 داده شود؟"
- "به ^1 اجازه میدهید به دادههایتان دسترسی پیدا کند، از جمله عکسها و ویدیوهایتان در ^2؟"
+ "به ^1 اجازه میدهید به دادههایتان دسترسی پیدا کند، از جمله عکسها و ویدئوهایتان در ^2؟"
"دوباره سؤال نشود"
"ارزیابیشده"
"اجازه ندارد"
diff --git a/packages/DocumentsUI/res/values-kk-rKZ/strings.xml b/packages/DocumentsUI/res/values-kk-rKZ/strings.xml
index 27ac0a663215b..075f2560b3f5f 100644
--- a/packages/DocumentsUI/res/values-kk-rKZ/strings.xml
+++ b/packages/DocumentsUI/res/values-kk-rKZ/strings.xml
@@ -23,7 +23,7 @@
"Жаңа қалта"
"Торлы көрініс"
"Тізім көрінісі"
- "Белгіге қарай сұрыптау"
+ "Сұрыптау"
"Іздеу"
"Жад параметрлері"
"Ашу"
@@ -53,7 +53,7 @@
"Құжатты сақтау орындалмады"
"Қалта жасақтау іске аспады"
"Қазір мазмұнды жүктеу мүмкін емес"
- "Жуықта қолданылған"
+ "Соңғы"
"%1$s бос"
"Жад қызметтері"
"Төте пернелер"
diff --git a/packages/DocumentsUI/res/values-kn-rIN/strings.xml b/packages/DocumentsUI/res/values-kn-rIN/strings.xml
index 1eb499be5a783..7becf4e7776ac 100644
--- a/packages/DocumentsUI/res/values-kn-rIN/strings.xml
+++ b/packages/DocumentsUI/res/values-kn-rIN/strings.xml
@@ -24,7 +24,7 @@
"ಗ್ರಿಡ್ ವೀಕ್ಷಣೆ"
"ಪಟ್ಟಿ ವೀಕ್ಷಣೆ"
"ಈ ಪ್ರಕಾರ ವಿಂಗಡಿಸು"
- "ಹುಡುಕು"
+ "ಹುಡುಕಿ"
"ಸಂಗ್ರಹಣೆ ಸೆಟ್ಟಿಂಗ್ಗಳು"
"ತೆರೆ"
"ಉಳಿಸು"
diff --git a/packages/DocumentsUI/res/values-nl/strings.xml b/packages/DocumentsUI/res/values-nl/strings.xml
index 07c41f8096ace..7bcd8539ad03d 100644
--- a/packages/DocumentsUI/res/values-nl/strings.xml
+++ b/packages/DocumentsUI/res/values-nl/strings.xml
@@ -125,14 +125,14 @@
- %1$d item
"%1$s verwijderen?"
- "Map %1$s en de bijbehorende inhoud verwijderen?"
+ "Map %1$s en de bijbehorende content verwijderen?"
- %1$d bestanden verwijderen?
- %1$d bestand verwijderen?
- - %1$d mappen en de bijbehorende inhoud verwijderen?
- - %1$d map en de bijbehorende inhoud verwijderen?
+ - %1$d mappen en de bijbehorende content verwijderen?
+ - %1$d map en de bijbehorende content verwijderen?
- %1$d items verwijderen?
diff --git a/packages/DocumentsUI/res/values-sr/strings.xml b/packages/DocumentsUI/res/values-sr/strings.xml
index 393573985ab43..ee9a9edf6c3df 100644
--- a/packages/DocumentsUI/res/values-sr/strings.xml
+++ b/packages/DocumentsUI/res/values-sr/strings.xml
@@ -44,7 +44,7 @@
"Копирај"
"Премести"
"Одбаци"
- "Покушај поново"
+ "Пробај поново"
"Према имену"
"Према датуму измене"
"Према величини"
diff --git a/packages/DocumentsUI/res/values-sv/strings.xml b/packages/DocumentsUI/res/values-sv/strings.xml
index 53a26b609ce98..5fd3c8c1437b3 100644
--- a/packages/DocumentsUI/res/values-sv/strings.xml
+++ b/packages/DocumentsUI/res/values-sv/strings.xml
@@ -43,7 +43,7 @@
"Välj"
"Kopiera"
"Flytta"
- "Ta bort permanent"
+ "Avvisa"
"Försök igen"
"Efter namn"
"Efter ändringsdatum"
diff --git a/packages/DocumentsUI/res/values-tr/strings.xml b/packages/DocumentsUI/res/values-tr/strings.xml
index 24107c6027400..4ba5f4bbf6bb3 100644
--- a/packages/DocumentsUI/res/values-tr/strings.xml
+++ b/packages/DocumentsUI/res/values-tr/strings.xml
@@ -96,7 +96,7 @@
- %1$d dosya silinemedi
- %1$d dosya silinemedi
- "Ayrıntıları görmek için hafifçe dokunun"
+ "Ayrıntıları görmek için dokunun"
"Kapat"
"Şu dosyalar kopyalanamadı: %1$s"
"Şu dosyalar taşınamadı: %1$s"
diff --git a/packages/DocumentsUI/res/values-uz-rUZ/strings.xml b/packages/DocumentsUI/res/values-uz-rUZ/strings.xml
index 1d0e01bac5887..a0ac3296678c5 100644
--- a/packages/DocumentsUI/res/values-uz-rUZ/strings.xml
+++ b/packages/DocumentsUI/res/values-uz-rUZ/strings.xml
@@ -115,7 +115,7 @@
"^1 ilovasiga ^2 xotirasidagi ma’lumotlardan, jumladan, rasmlar va videolardan foydalanishiga ruxsat berilsinmi?"
"Boshqa so‘ralmasin"
"Ruxsat berish"
- "Rad qilish"
+ "Rad etish"
- %1$d ta belgilandi
- %1$d ta belgilandi
From fade1235e5c3d34933e727bf067e85fd7fd157b9 Mon Sep 17 00:00:00 2001
From: Alain Vongsouvanh
Date: Thu, 10 Nov 2016 13:18:35 -0800
Subject: [PATCH 83/98] colors: add missing accent_material_{700,50} resources.
Those two resources were only defined for watches and had no default
counterparts.
BUG: 32786346
Change-Id: I0868d34d1df55c6dfd26d13c3a7d468866603a97
---
core/res/res/values/colors_material.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index 92426c6a9bcac..37feff8daf7f8 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -36,8 +36,10 @@
@color/material_blue_grey_700
@color/material_blue_grey_200
+ @color/material_deep_teal_700
@color/material_deep_teal_500
@color/material_deep_teal_200
+ @color/material_deep_teal_50
#ff5a595b
#ffd6d7d7
From b6f375159939b343ef1198b43b7421879050f698 Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Mon, 7 Nov 2016 16:22:48 +0000
Subject: [PATCH 84/98] Zygote : Block SIGCHLD during fork.
We close the android logging related sockets prior as late as possible
before every fork to avoid having to whitelist them. If one of the
zygote's children dies after this point (but prior to the fork), we can
end up reopening the logging sockets from the SIGCHLD signal handler.
To prevent this from happening, block SIGCHLD during this critical
section.
Bug: 32693692
Test: Manual
(cherry picked from commit e9a525829a354c92983a35455ccab16d1b0d3892)
Zygote: Unblock SIGCHLD in the parent after fork.
Follow up to change e9a525829a354c92983a. Allows the zygote to
receive SIGCHLD again and prevents the zygote from getting into a
zombie state if it's killed.
Contributed-By: rhed_jao
Bug: 32693692
Test: manual
(cherry picked from commit c7161f756e86b98f2244a04d9207b47149965fd7)
Change-Id: If89903a29c84dfc9b056f9e19618046874bba689
(cherry picked from commit dfcc79ee8ecd4166cba19be7493c6175cb0c65a9)
---
core/jni/com_android_internal_os_Zygote.cpp | 24 +++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index a1fef4a4d9639..4f9ea68ade5af 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -465,6 +465,20 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
SetForkLoad(true);
#endif
+ sigset_t sigchld;
+ sigemptyset(&sigchld);
+ sigaddset(&sigchld, SIGCHLD);
+
+ // Temporarily block SIGCHLD during forks. The SIGCHLD handler might
+ // log, which would result in the logging FDs we close being reopened.
+ // This would cause failures because the FDs are not whitelisted.
+ //
+ // Note that the zygote process is single threaded at this point.
+ if (sigprocmask(SIG_BLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_BLOCK, { SIGCHLD }) failed.");
+ }
+
// Close any logging related FDs before we start evaluating the list of
// file descriptors.
__android_log_close();
@@ -496,6 +510,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
RuntimeAbort(env, __LINE__, "Unable to reopen whitelisted descriptors.");
}
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
+
// Keep capabilities across UID change, unless we're staying root.
if (uid != 0) {
EnableKeepCapabilities(env);
@@ -633,6 +652,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
SetForkLoad(false);
#endif
+ // We blocked SIGCHLD prior to a fork, we unblock it here.
+ if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
+ ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ }
}
return pid;
}
From e65092639fbe91e406d447dd81cca5f6e0a1e316 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 20:12:02 -0800
Subject: [PATCH 85/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: Ife576e74510d81bdf004e911f46d294a75aba7b5
---
core/res/res/values-nl/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 1f53e8dc1bfde..a282fa16a28cc 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1333,7 +1333,7 @@
"Tik voor gebruik en instellingen"
"Gegevenslimiet van 2G-3G bereikt"
"Gegevenslimiet van 4G bereikt"
- "Mobiele gegevenslimiet bereikt"
+ "Mobiele datalimiet bereikt"
"Wifi-gegevenslimiet bereikt"
"Gegev. onderbr. voor rest cyclus"
"Gegevenslimiet 2G-3G overschreden"
From c51dd0919371fec53bf8f1a9f3bf0c89b7d8ffe0 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 20:39:44 -0800
Subject: [PATCH 86/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: Ib8d20a325693588125631810c810665922d4191a
---
packages/Keyguard/res/values-b+sr+Latn/strings.xml | 12 ++++++------
packages/Keyguard/res/values-da/strings.xml | 2 +-
packages/Keyguard/res/values-sr/strings.xml | 12 ++++++------
packages/Keyguard/res/values-sv/strings.xml | 2 +-
packages/Keyguard/res/values-zh-rCN/strings.xml | 2 +-
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/packages/Keyguard/res/values-b+sr+Latn/strings.xml b/packages/Keyguard/res/values-b+sr+Latn/strings.xml
index 570f4bc96f867..800612520436a 100644
--- a/packages/Keyguard/res/values-b+sr+Latn/strings.xml
+++ b/packages/Keyguard/res/values-b+sr+Latn/strings.xml
@@ -56,7 +56,7 @@
"Pogrešan šablon"
"Pogrešna lozinka"
"Pogrešan PIN"
- "Pokušajte ponovo za %d sekunde(i)."
+ "Probajte ponovo za %d sekunde(i)."
"Nacrtajte šablon"
"Unesite PIN SIM kartice"
"Unesite PIN za SIM „%1$s“"
@@ -72,9 +72,9 @@
"Ponovo unesite ispravni PUK kôd. Ponovljeni pokušaji će trajno onemogućiti SIM."
"PIN kodovi se ne podudaraju"
"Previše pokušaja unosa šablona"
- "Uneli ste netačni PIN %1$d puta. \n\nPokušajte ponovo za %2$d sekunde(i)."
- "Uneli ste netačnu lozinku %1$d puta. \n\nPokušajte ponovo za %2$d sekunde(i)."
- "Nacrtali ste šablon za otključavanje netačno %1$d puta. \n\nPokušajte ponovo za %2$d sekunde(i)."
+ "Uneli ste netačni PIN %1$d puta. \n\nProbajte ponovo za %2$d sekunde(i)."
+ "Uneli ste netačnu lozinku %1$d puta. \n\nProbajte ponovo za %2$d sekunde(i)."
+ "Nacrtali ste šablon za otključavanje netačno %1$d puta. \n\nProbajte ponovo za %2$d sekunde(i)."
"Pogrešno ste pokušali da otključate tablet %1$d put(a). Imate još %2$d pokušaj(a), nakon čega se tablet resetuje i svi podaci sa njega brišu."
"Pogrešno ste pokušali da otključate telefon %1$d put(a). Imate još %2$d pokušaj(a), nakon čega se telefon resetuje i svi podaci sa njega brišu."
"Pogrešno ste pokušali da otključate tablet %d put(a). Tablet će biti resetovan i svi podaci sa njega će biti izbrisani."
@@ -87,8 +87,8 @@
"Pogrešno ste pokušali da otključate telefon %1$d put(a). Imate još %2$d pokušaj(a), nakon čega se poslovni profil uklanja i svi podaci sa profila brišu."
"Pogrešno ste pokušali da otključate tablet %d put(a). Poslovni profil će biti uklonjen i svi podaci sa njega će biti izbrisani."
"Pogrešno ste pokušali da otključate telefon %d put(a). Poslovni profil će biti uklonjen i svi podaci sa njega će biti izbrisani."
- "Nacrtali ste šablon za otključavanje netačno %1$d puta. Posle još %2$d neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate tablet pomoću naloga e-pošte.\n\nPokušajte ponovo za %3$d sekunde(i)."
- "Nacrtali ste šablon za otključavanje netačno %1$d puta. Posle još %2$d neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate telefon pomoću naloga e-pošte.\n\nPokušajte ponovo za %3$d sekunde(i)."
+ "Nacrtali ste šablon za otključavanje netačno %1$d puta. Posle još %2$d neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate tablet pomoću naloga e-pošte.\n\nProbajte ponovo za %3$d sekunde(i)."
+ "Nacrtali ste šablon za otključavanje netačno %1$d puta. Posle još %2$d neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate telefon pomoću naloga e-pošte.\n\nProbajte ponovo za %3$d sekunde(i)."
"Netačan SIM PIN kôd. Sada morate da kontaktirate mobilnog operatera da biste otključali uređaj."
- Netačan SIM PIN kôd. Imate još %d pokušaj.
diff --git a/packages/Keyguard/res/values-da/strings.xml b/packages/Keyguard/res/values-da/strings.xml
index ebea6eeb19896..b98a2536c2d2b 100644
--- a/packages/Keyguard/res/values-da/strings.xml
+++ b/packages/Keyguard/res/values-da/strings.xml
@@ -128,5 +128,5 @@
- Enheden blev sidst låst op for %d timer siden. Bekræft adgangskoden.
- Enheden blev sidst låst op for %d timer siden. Bekræft adgangskoden.
- "Kan ikke genkendes"
+ "Ikke genkendt"
diff --git a/packages/Keyguard/res/values-sr/strings.xml b/packages/Keyguard/res/values-sr/strings.xml
index 840cae79665ad..23c0b50f9c30a 100644
--- a/packages/Keyguard/res/values-sr/strings.xml
+++ b/packages/Keyguard/res/values-sr/strings.xml
@@ -56,7 +56,7 @@
"Погрешан шаблон"
"Погрешна лозинка"
"Погрешан PIN"
- "Покушајте поново за %d секунде(и)."
+ "Пробајте поново за %d секунде(и)."
"Нацртајте шаблон"
"Унесите PIN SIM картице"
"Унесите PIN за SIM „%1$s“"
@@ -72,9 +72,9 @@
"Поново унесите исправни PUK кôд. Поновљени покушаји ће трајно онемогућити SIM."
"PIN кодови се не подударају"
"Превише покушаја уноса шаблона"
- "Унели сте нетачни PIN %1$d пута. \n\nПокушајте поново за %2$d секунде(и)."
- "Унели сте нетачну лозинку %1$d пута. \n\nПокушајте поново за %2$d секунде(и)."
- "Нацртали сте шаблон за откључавање нетачно %1$d пута. \n\nПокушајте поново за %2$d секунде(и)."
+ "Унели сте нетачни PIN %1$d пута. \n\nПробајте поново за %2$d секунде(и)."
+ "Унели сте нетачну лозинку %1$d пута. \n\nПробајте поново за %2$d секунде(и)."
+ "Нацртали сте шаблон за откључавање нетачно %1$d пута. \n\nПробајте поново за %2$d секунде(и)."
"Погрешно сте покушали да откључате таблет %1$d пут(а). Имате још %2$d покушај(а), након чега се таблет ресетује и сви подаци са њега бришу."
"Погрешно сте покушали да откључате телефон %1$d пут(а). Имате још %2$d покушај(а), након чега се телефон ресетује и сви подаци са њега бришу."
"Погрешно сте покушали да откључате таблет %d пут(а). Таблет ће бити ресетован и сви подаци са њега ће бити избрисани."
@@ -87,8 +87,8 @@
"Погрешно сте покушали да откључате телефон %1$d пут(а). Имате још %2$d покушај(а), након чега се пословни профил уклања и сви подаци са профила бришу."
"Погрешно сте покушали да откључате таблет %d пут(а). Пословни профил ће бити уклоњен и сви подаци са њега ће бити избрисани."
"Погрешно сте покушали да откључате телефон %d пут(а). Пословни профил ће бити уклоњен и сви подаци са њега ће бити избрисани."
- "Нацртали сте шаблон за откључавање нетачно %1$d пута. После још %2$d неуспешна(их) покушаја, од вас ће бити затражено да откључате таблет помоћу налога е-поште.\n\nПокушајте поново за %3$d секунде(и)."
- "Нацртали сте шаблон за откључавање нетачно %1$d пута. После још %2$d неуспешна(их) покушаја, од вас ће бити затражено да откључате телефон помоћу налога е-поште.\n\nПокушајте поново за %3$d секунде(и)."
+ "Нацртали сте шаблон за откључавање нетачно %1$d пута. После још %2$d неуспешна(их) покушаја, од вас ће бити затражено да откључате таблет помоћу налога е-поште.\n\nПробајте поново за %3$d секунде(и)."
+ "Нацртали сте шаблон за откључавање нетачно %1$d пута. После још %2$d неуспешна(их) покушаја, од вас ће бити затражено да откључате телефон помоћу налога е-поште.\n\nПробајте поново за %3$d секунде(и)."
"Нетачан SIM PIN кôд. Сада морате да контактирате мобилног оператера да бисте откључали уређај."
- Нетачан SIM PIN кôд. Имате још %d покушај.
diff --git a/packages/Keyguard/res/values-sv/strings.xml b/packages/Keyguard/res/values-sv/strings.xml
index 527c8e65b3845..4a1d67b8d94a5 100644
--- a/packages/Keyguard/res/values-sv/strings.xml
+++ b/packages/Keyguard/res/values-sv/strings.xml
@@ -34,7 +34,7 @@
"Laddas snabbt"
"Laddas långsamt"
"Anslut din laddare."
- "Tryck på Meny om du vill låsa upp."
+ "Tryck på Meny för att låsa upp."
"Nätverk låst"
"Inget SIM-kort"
"Inget SIM-kort i surfplattan."
diff --git a/packages/Keyguard/res/values-zh-rCN/strings.xml b/packages/Keyguard/res/values-zh-rCN/strings.xml
index 0723ab19e7b67..e15950f7779d0 100644
--- a/packages/Keyguard/res/values-zh-rCN/strings.xml
+++ b/packages/Keyguard/res/values-zh-rCN/strings.xml
@@ -36,7 +36,7 @@
"请连接充电器。"
"按“菜单”键解锁。"
"网络已锁定"
- "无 SIM 卡"
+ "没有 SIM 卡"
"平板电脑中没有SIM卡。"
"手机中没有SIM卡。"
"请插入SIM卡。"
From 3bd78c2416b221a1bab323ec32280320121e6a17 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 20:43:06 -0800
Subject: [PATCH 87/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: Iade7d25f2c66d2014fe58640bd66dc953649edf2
---
packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml b/packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml
index 54bf4a9771ecf..7e61c7cedff98 100644
--- a/packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml
+++ b/packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml
@@ -19,7 +19,7 @@
"Host MTP"
"Descargas"
"%2$s de %1$s"
- "Accedendo aos ficheiros de %1$s"
+ "Accedendo aos ficheiros do dispositivo %1$s"
"O outro dispositivo está ocupado. Non podes transferir ficheiros ata que estea dispoñible."
"Non se atopou ningún ficheiro. Se o outro dispositivo está bloqueado, desbloquéao e téntao de novo."
From 05a48e2a3dc5c86508f76746cb03c847370c5137 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 20:46:18 -0800
Subject: [PATCH 88/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: Iaad4fea006740a06defea8a03fcd070f670e331a
---
packages/PrintSpooler/res/values-ar/strings.xml | 2 +-
packages/PrintSpooler/res/values-b+sr+Latn/strings.xml | 4 ++--
packages/PrintSpooler/res/values-bs-rBA/strings.xml | 2 +-
packages/PrintSpooler/res/values-ja/strings.xml | 2 +-
packages/PrintSpooler/res/values-kn-rIN/strings.xml | 6 +++---
packages/PrintSpooler/res/values-sr/strings.xml | 4 ++--
packages/PrintSpooler/res/values-zh-rCN/strings.xml | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/packages/PrintSpooler/res/values-ar/strings.xml b/packages/PrintSpooler/res/values-ar/strings.xml
index d23e1bc93595e..9751ca283b7d8 100644
--- a/packages/PrintSpooler/res/values-ar/strings.xml
+++ b/packages/PrintSpooler/res/values-ar/strings.xml
@@ -30,7 +30,7 @@
"اختر طابعة"
"جميع الصفحات وعددها %1$s"
"النطاق %1$s"
- "مثلاً، ۱—۵،۹،۷—۱۰"
+ "مثلاً، ١—٥،٨،١١—١٣"
"معاينة قبل الطباعة"
"تثبيت برنامج عرض PDF للمعاينة"
"تعطّل تطبيق الطباعة"
diff --git a/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml b/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
index c2b84d0165ca4..a75874415d856 100644
--- a/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
+++ b/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
@@ -103,8 +103,8 @@
- "Vodoravno"
"Upisivanje u datoteku nije moguće"
- "Žao nam je, ovo nije uspelo. Pokušajte ponovo."
- "Pokušajte ponovo"
+ "Žao nam je, ovo nije uspelo. Probajte ponovo."
+ "Probajte ponovo"
"Ovaj štampač trenutno nije dostupan."
"Nije uspeo prikaz pregleda"
"Priprema pregleda..."
diff --git a/packages/PrintSpooler/res/values-bs-rBA/strings.xml b/packages/PrintSpooler/res/values-bs-rBA/strings.xml
index cc04d66462788..42b8f90b5ae57 100644
--- a/packages/PrintSpooler/res/values-bs-rBA/strings.xml
+++ b/packages/PrintSpooler/res/values-bs-rBA/strings.xml
@@ -32,7 +32,7 @@
"Opseg od %1$s"
"npr. 1—5,8,11—13"
"Pregled prije štampanja"
- "Instaliraj PDF preglednik za prikaz"
+ "Instaliraj PDF pregledavač za prikaz"
"Aplikacija za štampanje je prestala raditi"
"Kreiranje zadatka za štampu"
"Sačuvaj kao PDF"
diff --git a/packages/PrintSpooler/res/values-ja/strings.xml b/packages/PrintSpooler/res/values-ja/strings.xml
index 6d03880d5399e..0519083eb4af4 100644
--- a/packages/PrintSpooler/res/values-ja/strings.xml
+++ b/packages/PrintSpooler/res/values-ja/strings.xml
@@ -29,7 +29,7 @@
"ページ"
"プリンタを選択"
"%1$sページすべて"
- "%1$sページ分"
+ "範囲選択(%1$sページ内)"
"例: 1-5,8,11-13"
"印刷プレビュー"
"プレビュー用PDFビューアをインストール"
diff --git a/packages/PrintSpooler/res/values-kn-rIN/strings.xml b/packages/PrintSpooler/res/values-kn-rIN/strings.xml
index f4b9d6190f4ad..487ac01281596 100644
--- a/packages/PrintSpooler/res/values-kn-rIN/strings.xml
+++ b/packages/PrintSpooler/res/values-kn-rIN/strings.xml
@@ -47,7 +47,7 @@
"PDF ಗೆ ಉಳಿಸು"
"ಪ್ರಿಂಟ್ ಆಯ್ಕೆಗಳನ್ನು ವಿಸ್ತರಿಸಲಾಗಿದೆ"
"ಪ್ರಿಂಟ್ ಆಯ್ಕೆಗಳನ್ನು ಮುಚ್ಚಲಾಗಿದೆ"
- "ಹುಡುಕು"
+ "ಹುಡುಕಿ"
"ಎಲ್ಲಾ ಪ್ರಿಂಟರ್ಗಳು"
"ಸೇವೆಯನ್ನು ಸೇರಿಸು"
"ಹುಡುಕಾಟ ಪೆಟ್ಟಿಗೆಯನ್ನು ತೋರಿಸಲಾಗಿದೆ"
@@ -81,10 +81,10 @@
"%1$s ರದ್ದು ಮಾಡಲಾಗುತ್ತಿದೆ"
"ಮುದ್ರಕ ದೋಷ %1$s"
"ಮುದ್ರಕವು %1$s ನಿರ್ಬಂಧಿಸಿದೆ"
- "ರದ್ದುಮಾಡು"
+ "ರದ್ದುಮಾಡಿ"
"ಮರುಪ್ರಾರಂಭಿಸು"
"ಮುದ್ರಕಕ್ಕೆ ಸಂಪರ್ಕವಿಲ್ಲ"
- "ಅಜ್ಞಾತ"
+ "ಅಪರಿಚಿತ"
"%1$s ಬಳಸುವುದೇ?"
"ನಿಮ್ಮ ಡಾಕ್ಯುಮೆಂಟ್ ಪ್ರಿಂಟರ್ಗೆ ಹೋಗುವ ಸಂದರ್ಭದಲ್ಲಿ ಒಂದು ಅಥವಾ ಅದಕ್ಕಿಂತ ಹೆಚ್ಚು ಸರ್ವರ್ಗಳ ಮೂಲಕ ಹಾದು ಹೋಗಬಹುದು."
diff --git a/packages/PrintSpooler/res/values-sr/strings.xml b/packages/PrintSpooler/res/values-sr/strings.xml
index 3b66b380bb724..c96fd914786de 100644
--- a/packages/PrintSpooler/res/values-sr/strings.xml
+++ b/packages/PrintSpooler/res/values-sr/strings.xml
@@ -103,8 +103,8 @@
- "Водоравно"
"Уписивање у датотеку није могуће"
- "Жао нам је, ово није успело. Покушајте поново."
- "Покушајте поново"
+ "Жао нам је, ово није успело. Пробајте поново."
+ "Пробајте поново"
"Овај штампач тренутно није доступан."
"Није успео приказ прегледа"
"Припрема прегледа..."
diff --git a/packages/PrintSpooler/res/values-zh-rCN/strings.xml b/packages/PrintSpooler/res/values-zh-rCN/strings.xml
index 3debf8e60cdbc..d4e796339bc9a 100644
--- a/packages/PrintSpooler/res/values-zh-rCN/strings.xml
+++ b/packages/PrintSpooler/res/values-zh-rCN/strings.xml
@@ -60,7 +60,7 @@
- 找到 %1$s 台打印机
"%1$s - %2$s"
- "关于此打印机的更多信息"
+ "此打印机的详细信息"
"无法创建文件"
"部分打印服务已停用"
"正在搜索打印机"
From b8aaaa894919887818b1fe566fd117e89cddf0ee Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 20:49:23 -0800
Subject: [PATCH 89/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: Iedf58d553e92d709ee8e7b4c7423d7e5a13a4996
---
packages/Shell/res/values-tr/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/Shell/res/values-tr/strings.xml b/packages/Shell/res/values-tr/strings.xml
index d444d786e5948..69d526a04a1f6 100644
--- a/packages/Shell/res/values-tr/strings.xml
+++ b/packages/Shell/res/values-tr/strings.xml
@@ -22,7 +22,7 @@
"Hata raporuna ayrıntılar ekleniyor"
"Lütfen bekleyin…"
"Hata raporu kısa süre içinde telefonda görüntülenecektir"
- "Hata raporunuzu paylaşmak için hafifçe dokunun"
+ "Hata raporunuzu paylaşmak için dokunun"
"Hata raporunu ekran görüntüsüz paylaşmak için dokunun veya bitirmek için ekran görüntüsünü bekleyin"
"Hata raporunu ekran görüntüsüz paylaşmak için dokunun veya bitirmek için ekran görüntüsünü bekleyin"
"Hata raporları, sistemin çeşitli günlük dosyalarından veriler içerir. Bu günlükler, hassas olarak kabul ettiğiniz verileri (uygulama kullanımı ve konum verileri gibi) içerebilir. Hata raporlarını yalnızca güvendiğiniz kişiler ve uygulamalarla paylaşın."
From 1b9fbcf993fa36e729683b2f938f4fe206b4f2df Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 21:12:09 -0800
Subject: [PATCH 90/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: If37bb6852c438a2b3579f4af2045841d30be829e
---
packages/SystemUI/res/values-bs-rBA-land/strings.xml | 2 +-
packages/SystemUI/res/values-fa-land/strings.xml | 2 +-
packages/SystemUI/res/values-fa/strings_tv.xml | 2 +-
packages/SystemUI/res/values-hy-rAM/strings.xml | 4 ++--
packages/SystemUI/res/values-it/strings_car.xml | 2 +-
packages/SystemUI/res/values-kn-rIN/strings_tv.xml | 2 +-
packages/SystemUI/res/values-nl/strings.xml | 4 ++--
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/res/values-bs-rBA-land/strings.xml b/packages/SystemUI/res/values-bs-rBA-land/strings.xml
index bdc652af8f1a2..56a4ad276d086 100644
--- a/packages/SystemUI/res/values-bs-rBA-land/strings.xml
+++ b/packages/SystemUI/res/values-bs-rBA-land/strings.xml
@@ -19,5 +19,5 @@
- "Ekran je sada zaključan u pejzažnom prikazu."
+ "Ekran je sada zaključan u vodoravnom prikazu."
diff --git a/packages/SystemUI/res/values-fa-land/strings.xml b/packages/SystemUI/res/values-fa-land/strings.xml
index adc2b118894f9..fe67cf0a7d41e 100644
--- a/packages/SystemUI/res/values-fa-land/strings.xml
+++ b/packages/SystemUI/res/values-fa-land/strings.xml
@@ -19,5 +19,5 @@
- "صفحه اکنون در جهت افقی قفل است."
+ "صفحه اکنون در حالت افقی قفل است."
diff --git a/packages/SystemUI/res/values-fa/strings_tv.xml b/packages/SystemUI/res/values-fa/strings_tv.xml
index 2894abba3b929..b97a64650dfc5 100644
--- a/packages/SystemUI/res/values-fa/strings_tv.xml
+++ b/packages/SystemUI/res/values-fa/strings_tv.xml
@@ -25,7 +25,7 @@
"مکث"
"کنترل PIP با نگهداشتن ""HOME"
"تصویر در تصویر"
- "تا زمانی که ویدیوی دیگری را پخش کنید، این صفحه حالت ویدیو در ویدیوی شما را حفظ میکند. برای کنترل آن، دکمه ""صفحه اصلی"" را فشار دهید و نگه دارید."
+ "تا زمانی که ویدئوی دیگری را پخش کنید، این صفحه حالت ویدئو در ویدئوی شما را حفظ میکند. برای کنترل آن، دکمه ""صفحه اصلی"" را فشار دهید و نگه دارید."
"متوجه شدم"
"رد کردن"
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index 77b1c824a7f4c..0e12b28f552ab 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -424,7 +424,7 @@
"Սարքը կմնա արգելափակված՝ մինչև ձեռքով չբացեք"
"Ավելի արագ ստացեք ծանուցումները"
"Տեսեք դրանք մինչև ապակողպելը"
- "Ոչ, շնորհակալություն"
+ "Ոչ"
"Կարգավորել"
"%1$s. %2$s"
"Ավարտել"
@@ -433,7 +433,7 @@
"Էկրանն ամրացված է"
"Էկրանը կմնա տեսադաշտում, մինչև այն ապամրացնեք: Ապամրացնելու համար հպեք և պահեք Հետ կոճակը:"
"Եղավ"
- "Ոչ, շնորհակալություն"
+ "Ոչ"
"Թաքցնե՞լ %1$s-ը:"
"Այն դարձյալ կհայտնվի, երբ նորից միացնեք կարգավորումներում:"
"Թաքցնել"
diff --git a/packages/SystemUI/res/values-it/strings_car.xml b/packages/SystemUI/res/values-it/strings_car.xml
index ae26c9e102bdc..19c4e2b02ad01 100644
--- a/packages/SystemUI/res/values-it/strings_car.xml
+++ b/packages/SystemUI/res/values-it/strings_car.xml
@@ -20,5 +20,5 @@
"Guida in modo sicuro"
- "È necessario essere sempre pienamente coscienti delle condizioni di guida e rispettare le leggi vigenti. Le indicazioni stradali potrebbero essere imprecise, incomplete, pericolose, non adatte, vietate o implicare l\'attraversamento di confini. Anche le informazioni sulle attività commerciali potrebbero essere imprecise o incomplete. I dati non vengono forniti in tempo reale e non è possibile garantire la precisione della geolocalizzazione. Non maneggiare il dispositivo mobile e non utilizzare app non progettate per Android Auto durante la guida."
+ "È necessario essere sempre pienamente informati sulle condizioni della strada e rispettare la legislazione vigente. Le indicazioni stradali potrebbero essere imprecise, incomplete, pericolose, inadatte, vietate o richiedere l\'attraversamento di aree amministrative. Anche le informazioni sugli esercizi commerciali potrebbero essere imprecise o incomplete. I dati forniti non sono aggiornati in tempo reale e non è possibile garantire la precisione della geolocalizzazione. Non maneggiare dispositivi mobili e app non destinate ad Android Auto durante la guida."
diff --git a/packages/SystemUI/res/values-kn-rIN/strings_tv.xml b/packages/SystemUI/res/values-kn-rIN/strings_tv.xml
index 5afb322d3ea67..edaa8e60a4446 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings_tv.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings_tv.xml
@@ -25,7 +25,7 @@
"ವಿರಾಮ"
"PIP ನಿಯಂತ್ರಿಸಲು ""HOME"" ಕೀಯನ್ನು ಹಿಡಿದುಕೊಳ್ಳಿ"
"ಚಿತ್ರದಲ್ಲಿ ಚಿತ್ರ"
- "ನೀವು ಮತ್ತೊಂದನ್ನು ಪ್ಲೇ ಮಾಡುವ ತನಕ ಇದು ನಿಮ್ಮ ವೀಡಿಯೋವನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿರಿಸುತ್ತದೆ. ಅದನ್ನು ನಿಯಂತ್ರಿಸಲು ""ಹೋಮ್"" ಅನ್ನು ಒತ್ತಿ ಹಿಡಿಯಿರಿ."
+ "ನೀವು ಮತ್ತೊಂದನ್ನು ಪ್ಲೇ ಮಾಡುವ ತನಕ ಇದು ನಿಮ್ಮ ವೀಡಿಯೋವನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿರಿಸುತ್ತದೆ. ಅದನ್ನು ನಿಯಂತ್ರಿಸಲು ""ಮುಖಪುಟ"" ಅನ್ನು ಒತ್ತಿ ಹಿಡಿಯಿರಿ."
"ಅರ್ಥವಾಯಿತು"
"ವಜಾಗೊಳಿಸಿ"
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index a2a43650dcdf9..7fe1fee7ef32f 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -236,7 +236,7 @@
"Helderheid van het scherm"
"2G/3G-data zijn onderbroken"
"4G-data zijn onderbroken"
- "Mobiele gegevens zijn onderbroken"
+ "Mobiele data zijn onderbroken"
"Gegevens zijn onderbroken"
"De ingestelde datalimiet is bereikt. Je gebruikt geen mobiele data meer.\n\nAls je hervat, kunnen er kosten voor datagebruik in rekening worden gebracht."
"Hervatten"
@@ -311,7 +311,7 @@
"Hotspot"
"Meldingen"
"Zaklamp"
- "Mobiele gegevens"
+ "Mobiele data"
"Datagebruik"
"Resterende gegevens"
"Limiet overschreden"
From f5ffd25c53f26da728a48f9be1008e21de6c7ce6 Mon Sep 17 00:00:00 2001
From: Bill Yi
Date: Thu, 10 Nov 2016 21:16:01 -0800
Subject: [PATCH 91/98] Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Bug: 32766034
Change-Id: I9086f7b84b9bcdb6df83033e3d0fac621ec2c6e0
---
packages/VpnDialogs/res/values-ro/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/VpnDialogs/res/values-ro/strings.xml b/packages/VpnDialogs/res/values-ro/strings.xml
index 4865e964fc74c..e2e1e44021b09 100644
--- a/packages/VpnDialogs/res/values-ro/strings.xml
+++ b/packages/VpnDialogs/res/values-ro/strings.xml
@@ -25,5 +25,5 @@
"Durată:"
"Trimise:"
"Primite:"
- "%1$s (de) octeți/%2$s (de) pachete"
+ "%1$s octeți/%2$s pachete"
From d9a8ee7598288112f6518f94d1b948d334d0d20a Mon Sep 17 00:00:00 2001
From: Narayan Kamath
Date: Fri, 23 Sep 2016 09:07:11 +0100
Subject: [PATCH 92/98] Zygote: Additional whitelists for runtime overlay /
other static resources.
Partially cherry picked from commit 1c15c635785c64a.
These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.
Bug: 32618130
Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f
(cherry picked from commit 25cd01cc69fcad34756b00e52a79c0c54178f2e6)
(cherry picked from commit 9087f331a85790d49d1095e1eaf0305b7863e0ba)
---
core/jni/fd_utils-inl.h | 43 +++++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 14 deletions(-)
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index 1739abf3516e2..e1ed5416e0127 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -240,6 +240,18 @@ class FileDescriptorInfo {
is_sock(false) {
}
+ static bool StartsWith(const std::string& str, const std::string& prefix) {
+ return str.compare(0, prefix.size(), prefix) == 0;
+ }
+
+ static bool EndsWith(const std::string& str, const std::string& suffix) {
+ if (suffix.size() > str.size()) {
+ return false;
+ }
+
+ return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
+ }
+
// Returns true iff. a given path is whitelisted. A path is whitelisted
// if it belongs to the whitelist (see kPathWhitelist) or if it's a path
// under /system/framework that ends with ".jar" or if it is a system
@@ -251,31 +263,34 @@ class FileDescriptorInfo {
}
}
- static const char* kFrameworksPrefix = "/system/framework/";
- static const char* kJarSuffix = ".jar";
- if (android::base::StartsWith(path, kFrameworksPrefix)
- && android::base::EndsWith(path, kJarSuffix)) {
+ static const std::string kFrameworksPrefix = "/system/framework/";
+ static const std::string kJarSuffix = ".jar";
+ if (StartsWith(path, kFrameworksPrefix) && EndsWith(path, kJarSuffix)) {
return true;
}
// Whitelist files needed for Runtime Resource Overlay, like these:
// /system/vendor/overlay/framework-res.apk
- // /system/vendor/overlay/PG/android-framework-runtime-resource-overlay.apk
+ // /system/vendor/overlay-subdir/pg/framework-res.apk
// /data/resource-cache/system@vendor@overlay@framework-res.apk@idmap
- // /data/resource-cache/system@vendor@overlay@PG@framework-res.apk@idmap
- static const char* kOverlayDir = "/system/vendor/overlay/";
- static const char* kApkSuffix = ".apk";
+ // /data/resource-cache/system@vendor@overlay-subdir@pg@framework-res.apk@idmap
+ // See AssetManager.cpp for more details on overlay-subdir.
+ static const std::string kOverlayDir = "/system/vendor/overlay/";
+ static const std::string kVendorOverlayDir = "/vendor/overlay";
+ static const std::string kOverlaySubdir = "/system/vendor/overlay-subdir/";
+ static const std::string kApkSuffix = ".apk";
- if (android::base::StartsWith(path, kOverlayDir)
- && android::base::EndsWith(path, kApkSuffix)
+ if ((StartsWith(path, kOverlayDir) || StartsWith(path, kOverlaySubdir)
+ || StartsWith(path, kVendorOverlayDir))
+ && EndsWith(path, kApkSuffix)
&& path.find("/../") == std::string::npos) {
return true;
}
- static const char* kOverlayIdmapPrefix = "/data/resource-cache/";
- static const char* kOverlayIdmapSuffix = ".apk@idmap";
- if (android::base::StartsWith(path, kOverlayIdmapPrefix)
- && android::base::EndsWith(path, kOverlayIdmapSuffix)) {
+ static const std::string kOverlayIdmapPrefix = "/data/resource-cache/";
+ static const std::string kOverlayIdmapSuffix = ".apk@idmap";
+ if (StartsWith(path, kOverlayIdmapPrefix) && EndsWith(path, kOverlayIdmapSuffix)
+ && path.find("/../") == std::string::npos) {
return true;
}
From b8a7f78d242cafb0c3ec10868c28583e8aacdf7a Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Thu, 3 Nov 2016 14:55:40 -0700
Subject: [PATCH 93/98] Fixed a bug with the emergency affordance in multi user
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.
Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
---
.../android/internal/policy/EmergencyAffordanceManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
index bed7c1ba4ed3e..eb75bd4974342 100644
--- a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
+++ b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
+import android.os.UserHandle;
import android.provider.Settings;
/**
@@ -72,7 +73,7 @@ public class EmergencyAffordanceManager {
Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY);
intent.setData(getPhoneUri(context));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(intent);
+ context.startActivityAsUser(intent, UserHandle.CURRENT);
}
/**
From 3fef783359bf1953f7bef31fcdbbfa86c085b35b Mon Sep 17 00:00:00 2001
From: Scott Main
Date: Tue, 15 Nov 2016 15:22:32 -0800
Subject: [PATCH 94/98] Add cross-links between FINE and COARSE location
permissions. bug: 25371600
Change-Id: I7af21b063533085ce20c51d18f118c7752fd77f0
(cherry picked from commit b18745616f9dd6b79202168b648edcef382ea967)
---
core/res/AndroidManifest.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e9a3409be6abb..84a9ed3663143 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -699,6 +699,7 @@
android:priority="400" />
Date: Thu, 17 Nov 2016 18:49:17 +0000
Subject: [PATCH 95/98] Catch KeyStoreException for setting profile lock
When device upgrades from L->N, sid(in gatekeeper) could be 0
even primary profile screenlock is set.
We are now trying to catch the exception so when sid==0 happens,
it will try to tie profile lock again when primary profile is unlocked.
Bug: 32490092
Change-Id: I73011d872ac15e7e09be9bda0165cf7f6a75493a
---
.../com/android/server/LockSettingsService.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index a91e2053c01d1..846551f7f1191 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -245,13 +245,16 @@ public class LockSettingsService extends ILockSettings.Stub {
try {
randomLockSeed = SecureRandom.getInstance("SHA1PRNG").generateSeed(40);
String newPassword = String.valueOf(HexEncoding.encode(randomLockSeed));
+ tieProfileLockToParent(managedUserId, newPassword);
setLockPasswordInternal(newPassword, managedUserPassword, managedUserId);
// We store a private credential for the managed user that's unlocked by the primary
// account holder's credential. As such, the user will never be prompted to enter this
// password directly, so we always store a password.
setLong(LockPatternUtils.PASSWORD_TYPE_KEY,
DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC, managedUserId);
- tieProfileLockToParent(managedUserId, newPassword);
+ } catch (KeyStoreException e) {
+ // Bug: 32490092
+ Slog.e(TAG, "Not able to set keys to keystore", e);
} catch (NoSuchAlgorithmException | RemoteException e) {
Slog.e(TAG, "Fail to tie managed profile", e);
// Nothing client can do to fix this issue, so we do not throw exception out
@@ -758,6 +761,7 @@ public class LockSettingsService extends ILockSettings.Stub {
}
private void unlockChildProfile(int profileHandle) throws RemoteException {
+ if (DEBUG) Slog.v(TAG, "Unlock child profile");
try {
doVerifyPassword(getDecryptedPasswordForTiedProfile(profileHandle), false,
0 /* no challenge */, profileHandle, null /* progressCallback */);
@@ -1017,7 +1021,7 @@ public class LockSettingsService extends ILockSettings.Stub {
}
}
- private void tieProfileLockToParent(int userId, String password) {
+ private void tieProfileLockToParent(int userId, String password) throws KeyStoreException {
if (DEBUG) Slog.v(TAG, "tieProfileLockToParent for user: " + userId);
byte[] randomLockSeed = password.getBytes(StandardCharsets.UTF_8);
byte[] encryptionResult;
@@ -1059,7 +1063,7 @@ public class LockSettingsService extends ILockSettings.Stub {
keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + userId);
}
} catch (CertificateException | UnrecoverableKeyException
- | IOException | BadPaddingException | IllegalBlockSizeException | KeyStoreException
+ | IOException | BadPaddingException | IllegalBlockSizeException
| NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException e) {
throw new RuntimeException("Failed to encrypt key", e);
}
@@ -1201,7 +1205,11 @@ public class LockSettingsService extends ILockSettings.Stub {
} finally {
if (managedUserId != -1 && managedUserDecryptedPassword != null) {
if (DEBUG) Slog.v(TAG, "Restore tied profile lock");
- tieProfileLockToParent(managedUserId, managedUserDecryptedPassword);
+ try {
+ tieProfileLockToParent(managedUserId, managedUserDecryptedPassword);
+ } catch (KeyStoreException e) {
+ throw new RuntimeException("Failed to tie profile lock", e);
+ }
}
}
}
From 56c25af2749f8db355d6f0bf1403d463227a0024 Mon Sep 17 00:00:00 2001
From: Michael Kwan
Date: Fri, 18 Nov 2016 15:02:43 -0800
Subject: [PATCH 96/98] Fix default dialog background colour for watch devices.
Bug: 33008587
Change-Id: I0fe4f9a7244958406d2a3466393476f7775ae995
---
core/res/res/values-watch/themes_device_defaults.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values-watch/themes_device_defaults.xml b/core/res/res/values-watch/themes_device_defaults.xml
index aa1594d465166..fbe780db6fae1 100644
--- a/core/res/res/values-watch/themes_device_defaults.xml
+++ b/core/res/res/values-watch/themes_device_defaults.xml
@@ -314,7 +314,7 @@ a similar way.
- @color/primary_device_default_dark
- @color/primary_dark_device_default_dark
- @color/accent_device_default_dark
- - ?attr/colorBackgroundFloating
+ - @color/background_device_default_dark
- @color/background_floating_device_default_dark
- @color/background_cache_hint_selector_device_default
- @color/button_normal_device_default_dark
From 43f166dfb439e7706b829a5e5a7cc910bb53dc8c Mon Sep 17 00:00:00 2001
From: Nancy Zheng
Date: Fri, 18 Nov 2016 18:15:09 -0800
Subject: [PATCH 97/98] Fix createConfirmDeviceCredentialIntent for wear for
CTS.
Bug: 33000237
Change-Id: I1fdb5a518c41ab005f12d3142763e374b38d7553
---
core/java/android/app/KeyguardManager.java | 21 ++++++++++++++-----
.../android/app/SystemServiceRegistry.java | 6 +++---
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 391065787683d..b794f9cdbc79f 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -21,6 +21,7 @@ import android.annotation.RequiresPermission;
import android.app.trust.ITrustManager;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.os.Binder;
import android.os.RemoteException;
@@ -44,6 +45,7 @@ public class KeyguardManager {
private IWindowManager mWM;
private ITrustManager mTrustManager;
private IUserManager mUserManager;
+ private Context mContext;
/**
* Intent used to prompt user for device credentials.
@@ -86,8 +88,12 @@ public class KeyguardManager {
Intent intent = new Intent(ACTION_CONFIRM_DEVICE_CREDENTIAL);
intent.putExtra(EXTRA_TITLE, title);
intent.putExtra(EXTRA_DESCRIPTION, description);
- // For security reasons, only allow this to come from system settings.
- intent.setPackage("com.android.settings");
+ if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+ intent.setPackage("com.google.android.apps.wearable.settings");
+ } else {
+ // For security reasons, only allow this to come from system settings.
+ intent.setPackage("com.android.settings");
+ }
return intent;
}
@@ -108,8 +114,12 @@ public class KeyguardManager {
intent.putExtra(EXTRA_TITLE, title);
intent.putExtra(EXTRA_DESCRIPTION, description);
intent.putExtra(Intent.EXTRA_USER_ID, userId);
- // For security reasons, only allow this to come from system settings.
- intent.setPackage("com.android.settings");
+ if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+ intent.setPackage("com.google.android.apps.wearable.settings");
+ } else {
+ // For security reasons, only allow this to come from system settings.
+ intent.setPackage("com.android.settings");
+ }
return intent;
}
@@ -191,7 +201,8 @@ public class KeyguardManager {
}
- KeyguardManager() {
+ KeyguardManager(Context context) {
+ mContext = context;
mWM = WindowManagerGlobal.getWindowManagerService();
mTrustManager = ITrustManager.Stub.asInterface(
ServiceManager.getService(Context.TRUST_SERVICE));
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 55744b935f517..4c9b9778d7b54 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -320,10 +320,10 @@ final class SystemServiceRegistry {
}});
registerService(Context.KEYGUARD_SERVICE, KeyguardManager.class,
- new StaticServiceFetcher() {
+ new CachedServiceFetcher() {
@Override
- public KeyguardManager createService() {
- return new KeyguardManager();
+ public KeyguardManager createService(ContextImpl ctx) {
+ return new KeyguardManager(ctx);
}});
registerService(Context.LAYOUT_INFLATER_SERVICE, LayoutInflater.class,
From e61672ab087df4857a4f0923258b945800046589 Mon Sep 17 00:00:00 2001
From: Zach Jang
Date: Tue, 22 Nov 2016 17:47:18 +0000
Subject: [PATCH 98/98] Revert "Catch KeyStoreException for setting profile
lock"
This reverts commit c8fa5ed8f2d492aa5e005fcdb5991c3f980de045.
Change-Id: Ia1425e649e102cb79280d75e5f49db670214cec3
---
.../com/android/server/LockSettingsService.java | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 846551f7f1191..a91e2053c01d1 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -245,16 +245,13 @@ public class LockSettingsService extends ILockSettings.Stub {
try {
randomLockSeed = SecureRandom.getInstance("SHA1PRNG").generateSeed(40);
String newPassword = String.valueOf(HexEncoding.encode(randomLockSeed));
- tieProfileLockToParent(managedUserId, newPassword);
setLockPasswordInternal(newPassword, managedUserPassword, managedUserId);
// We store a private credential for the managed user that's unlocked by the primary
// account holder's credential. As such, the user will never be prompted to enter this
// password directly, so we always store a password.
setLong(LockPatternUtils.PASSWORD_TYPE_KEY,
DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC, managedUserId);
- } catch (KeyStoreException e) {
- // Bug: 32490092
- Slog.e(TAG, "Not able to set keys to keystore", e);
+ tieProfileLockToParent(managedUserId, newPassword);
} catch (NoSuchAlgorithmException | RemoteException e) {
Slog.e(TAG, "Fail to tie managed profile", e);
// Nothing client can do to fix this issue, so we do not throw exception out
@@ -761,7 +758,6 @@ public class LockSettingsService extends ILockSettings.Stub {
}
private void unlockChildProfile(int profileHandle) throws RemoteException {
- if (DEBUG) Slog.v(TAG, "Unlock child profile");
try {
doVerifyPassword(getDecryptedPasswordForTiedProfile(profileHandle), false,
0 /* no challenge */, profileHandle, null /* progressCallback */);
@@ -1021,7 +1017,7 @@ public class LockSettingsService extends ILockSettings.Stub {
}
}
- private void tieProfileLockToParent(int userId, String password) throws KeyStoreException {
+ private void tieProfileLockToParent(int userId, String password) {
if (DEBUG) Slog.v(TAG, "tieProfileLockToParent for user: " + userId);
byte[] randomLockSeed = password.getBytes(StandardCharsets.UTF_8);
byte[] encryptionResult;
@@ -1063,7 +1059,7 @@ public class LockSettingsService extends ILockSettings.Stub {
keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + userId);
}
} catch (CertificateException | UnrecoverableKeyException
- | IOException | BadPaddingException | IllegalBlockSizeException
+ | IOException | BadPaddingException | IllegalBlockSizeException | KeyStoreException
| NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException e) {
throw new RuntimeException("Failed to encrypt key", e);
}
@@ -1205,11 +1201,7 @@ public class LockSettingsService extends ILockSettings.Stub {
} finally {
if (managedUserId != -1 && managedUserDecryptedPassword != null) {
if (DEBUG) Slog.v(TAG, "Restore tied profile lock");
- try {
- tieProfileLockToParent(managedUserId, managedUserDecryptedPassword);
- } catch (KeyStoreException e) {
- throw new RuntimeException("Failed to tie profile lock", e);
- }
+ tieProfileLockToParent(managedUserId, managedUserDecryptedPassword);
}
}
}