Merge "Allow configuration of Toast gravity settings" into klp-dev
diff --git a/Android.mk b/Android.mk
index df10876..22ee3a6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -95,6 +95,7 @@
core/java/android/bluetooth/IBluetoothManager.aidl \
core/java/android/bluetooth/IBluetoothManagerCallback.aidl \
core/java/android/bluetooth/IBluetoothPbap.aidl \
+ core/java/android/bluetooth/IBluetoothMap.aidl \
core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \
core/java/android/bluetooth/IBluetoothGatt.aidl \
core/java/android/bluetooth/IBluetoothGattCallback.aidl \
@@ -161,8 +162,9 @@
core/java/android/os/IVibratorService.aidl \
core/java/android/service/notification/INotificationListener.aidl \
core/java/android/print/ILayoutResultCallback.aidl \
+ core/java/android/print/IPrinterDiscoverySessionController.aidl \
+ core/java/android/print/IPrinterDiscoverySessionObserver.aidl \
core/java/android/print/IPrintDocumentAdapter.aidl \
- core/java/android/print/IPrinterDiscoveryObserver.aidl \
core/java/android/print/IPrintClient.aidl \
core/java/android/print/IPrintManager.aidl \
core/java/android/print/IPrintSpooler.aidl \
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 73e8fa4..8fd5186 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -167,6 +167,9 @@
$(call add-clean-step, rm -rf $(HOST_OUT)/obj/STATIC_LIBRARIES/libandroidfw_intermediates/import_includes)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/core/java/android/print/IPrinterDiscoveryObserver.*)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/core/java/android/print/)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/core/java/android/printservice/)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/api/current.txt b/api/current.txt
index d79a8c0..ff47557 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2338,17 +2338,23 @@
public abstract class Animator implements java.lang.Cloneable {
ctor public Animator();
method public void addListener(android.animation.Animator.AnimatorListener);
+ method public void addPauseListener(android.animation.Animator.AnimatorPauseListener);
method public void cancel();
method public android.animation.Animator clone();
method public void end();
method public abstract long getDuration();
method public android.animation.TimeInterpolator getInterpolator();
method public java.util.ArrayList<android.animation.Animator.AnimatorListener> getListeners();
+ method public java.util.ArrayList<android.animation.Animator.AnimatorPauseListener> getPauseListeners();
method public abstract long getStartDelay();
+ method public boolean isPaused();
method public abstract boolean isRunning();
method public boolean isStarted();
+ method public void pause();
method public void removeAllListeners();
method public void removeListener(android.animation.Animator.AnimatorListener);
+ method public void removePauseListener(android.animation.Animator.AnimatorPauseListener);
+ method public void resume();
method public abstract android.animation.Animator setDuration(long);
method public abstract void setInterpolator(android.animation.TimeInterpolator);
method public abstract void setStartDelay(long);
@@ -2365,16 +2371,23 @@
method public abstract void onAnimationStart(android.animation.Animator);
}
+ public static abstract interface Animator.AnimatorPauseListener {
+ method public abstract void onAnimationPause(android.animation.Animator);
+ method public abstract void onAnimationResume(android.animation.Animator);
+ }
+
public class AnimatorInflater {
ctor public AnimatorInflater();
method public static android.animation.Animator loadAnimator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
}
- public abstract class AnimatorListenerAdapter implements android.animation.Animator.AnimatorListener {
+ public abstract class AnimatorListenerAdapter implements android.animation.Animator.AnimatorListener android.animation.Animator.AnimatorPauseListener {
ctor public AnimatorListenerAdapter();
method public void onAnimationCancel(android.animation.Animator);
method public void onAnimationEnd(android.animation.Animator);
+ method public void onAnimationPause(android.animation.Animator);
method public void onAnimationRepeat(android.animation.Animator);
+ method public void onAnimationResume(android.animation.Animator);
method public void onAnimationStart(android.animation.Animator);
}
@@ -5587,8 +5600,10 @@
method public final int delete(android.net.Uri, java.lang.String, java.lang.String[]);
method public static deprecated android.content.SyncInfo getCurrentSync();
method public static java.util.List<android.content.SyncInfo> getCurrentSyncs();
+ method public android.net.Uri[] getIncomingUriPermissionGrants(int, int);
method public static int getIsSyncable(android.accounts.Account, java.lang.String);
method public static boolean getMasterSyncAutomatically();
+ method public android.net.Uri[] getOutgoingUriPermissionGrants(int, int);
method public static java.util.List<android.content.PeriodicSync> getPeriodicSyncs(android.accounts.Account, java.lang.String);
method public java.lang.String[] getStreamTypes(android.net.Uri, java.lang.String);
method public static android.content.SyncAdapterType[] getSyncAdapterTypes();
@@ -5718,11 +5733,14 @@
method public abstract java.io.File getDatabasePath(java.lang.String);
method public abstract java.io.File getDir(java.lang.String, int);
method public abstract java.io.File getExternalCacheDir();
+ method public abstract java.io.File[] getExternalCacheDirs();
method public abstract java.io.File getExternalFilesDir(java.lang.String);
+ method public abstract java.io.File[] getExternalFilesDirs(java.lang.String);
method public abstract java.io.File getFileStreamPath(java.lang.String);
method public abstract java.io.File getFilesDir();
method public abstract android.os.Looper getMainLooper();
method public abstract java.io.File getObbDir();
+ method public abstract java.io.File[] getObbDirs();
method public abstract java.lang.String getPackageCodePath();
method public abstract android.content.pm.PackageManager getPackageManager();
method public abstract java.lang.String getPackageName();
@@ -5873,11 +5891,14 @@
method public java.io.File getDatabasePath(java.lang.String);
method public java.io.File getDir(java.lang.String, int);
method public java.io.File getExternalCacheDir();
+ method public java.io.File[] getExternalCacheDirs();
method public java.io.File getExternalFilesDir(java.lang.String);
+ method public java.io.File[] getExternalFilesDirs(java.lang.String);
method public java.io.File getFileStreamPath(java.lang.String);
method public java.io.File getFilesDir();
method public android.os.Looper getMainLooper();
method public java.io.File getObbDir();
+ method public java.io.File[] getObbDirs();
method public java.lang.String getPackageCodePath();
method public android.content.pm.PackageManager getPackageManager();
method public java.lang.String getPackageName();
@@ -17530,6 +17551,7 @@
method public static java.io.File getExternalStoragePublicDirectory(java.lang.String);
method public static java.lang.String getExternalStorageState();
method public static java.io.File getRootDirectory();
+ method public static java.lang.String getStorageState(java.io.File);
method public static boolean isExternalStorageEmulated();
method public static boolean isExternalStorageRemovable();
field public static java.lang.String DIRECTORY_ALARMS;
@@ -17548,6 +17570,7 @@
field public static final java.lang.String MEDIA_NOFS = "nofs";
field public static final java.lang.String MEDIA_REMOVED = "removed";
field public static final java.lang.String MEDIA_SHARED = "shared";
+ field public static final java.lang.String MEDIA_UNKNOWN = "unknown";
field public static final java.lang.String MEDIA_UNMOUNTABLE = "unmountable";
field public static final java.lang.String MEDIA_UNMOUNTED = "unmounted";
}
@@ -18629,11 +18652,11 @@
}
public static final class PrintAttributes.MediaSize {
- ctor public PrintAttributes.MediaSize(java.lang.String, java.lang.CharSequence, int, int);
+ ctor public PrintAttributes.MediaSize(java.lang.String, java.lang.String, int, int);
method public static android.print.PrintAttributes.MediaSize createMediaSize(android.content.pm.PackageManager, int);
method public int getHeightMils();
method public java.lang.String getId();
- method public java.lang.CharSequence getLabel();
+ method public java.lang.String getLabel();
method public int getWidthMils();
field public static final int ISO_A0 = 1; // 0x1
field public static final int ISO_A1 = 2; // 0x2
@@ -18677,17 +18700,17 @@
}
public static final class PrintAttributes.Resolution {
- ctor public PrintAttributes.Resolution(java.lang.String, java.lang.CharSequence, int, int);
+ ctor public PrintAttributes.Resolution(java.lang.String, java.lang.String, int, int);
method public int getHorizontalDpi();
method public java.lang.String getId();
- method public java.lang.CharSequence getLabel();
+ method public java.lang.String getLabel();
method public int getVerticalDpi();
}
public static final class PrintAttributes.Tray {
- ctor public PrintAttributes.Tray(java.lang.String, java.lang.CharSequence);
+ ctor public PrintAttributes.Tray(java.lang.String, java.lang.String);
method public java.lang.String getId();
- method public java.lang.CharSequence getLabel();
+ method public java.lang.String getLabel();
}
public abstract class PrintDocumentAdapter {
@@ -18714,6 +18737,7 @@
public final class PrintDocumentInfo implements android.os.Parcelable {
method public int describeContents();
method public int getContentType();
+ method public java.lang.String getName();
method public int getPageCount();
method public void writeToParcel(android.os.Parcel, int);
field public static final int CONTENT_TYPE_DOCUMENT = 0; // 0x0
@@ -18724,12 +18748,18 @@
}
public static final class PrintDocumentInfo.Builder {
- ctor public PrintDocumentInfo.Builder();
+ ctor public PrintDocumentInfo.Builder(java.lang.String);
method public android.print.PrintDocumentInfo create();
method public android.print.PrintDocumentInfo.Builder setContentType(int);
method public android.print.PrintDocumentInfo.Builder setPageCount(int);
}
+ public class PrintFileDocumentAdapter extends android.print.PrintDocumentAdapter {
+ ctor public PrintFileDocumentAdapter(android.content.Context, java.io.File, android.print.PrintDocumentInfo);
+ method public void onLayout(android.print.PrintAttributes, android.print.PrintAttributes, android.os.CancellationSignal, android.print.PrintDocumentAdapter.LayoutResultCallback, android.os.Bundle);
+ method public void onWrite(android.print.PageRange[], java.io.FileDescriptor, android.os.CancellationSignal, android.print.PrintDocumentAdapter.WriteResultCallback);
+ }
+
public final class PrintJob {
method public void cancel();
method public int getId();
@@ -18758,50 +18788,66 @@
public final class PrintManager {
method public java.util.List<android.print.PrintJob> getPrintJobs();
- method public android.print.PrintJob print(java.lang.String, java.io.File, android.print.PrintAttributes);
+ method public android.print.PrintJob print(java.lang.String, java.io.File, android.print.PrintDocumentInfo, android.print.PrintAttributes);
method public android.print.PrintJob print(java.lang.String, android.print.PrintDocumentAdapter, android.print.PrintAttributes);
}
- public final class PrinterId implements android.os.Parcelable {
- method public int describeContents();
- method public java.lang.String getPrinterName();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator CREATOR;
- }
-
- public final class PrinterInfo implements android.os.Parcelable {
+ public final class PrinterCapabilitiesInfo implements android.os.Parcelable {
method public int describeContents();
method public int getColorModes();
method public void getDefaults(android.print.PrintAttributes);
method public int getDuplexModes();
method public int getFittingModes();
- method public android.print.PrinterId getId();
method public java.util.List<android.print.PrintAttributes.Tray> getInputTrays();
method public java.util.List<android.print.PrintAttributes.MediaSize> getMediaSizes();
method public android.print.PrintAttributes.Margins getMinMargins();
method public int getOrientations();
method public java.util.List<android.print.PrintAttributes.Tray> getOutputTrays();
method public java.util.List<android.print.PrintAttributes.Resolution> getResolutions();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
+ public static final class PrinterCapabilitiesInfo.Builder {
+ ctor public PrinterCapabilitiesInfo.Builder(android.print.PrinterId);
+ method public android.print.PrinterCapabilitiesInfo.Builder addInputTray(android.print.PrintAttributes.Tray, boolean);
+ method public android.print.PrinterCapabilitiesInfo.Builder addMediaSize(android.print.PrintAttributes.MediaSize, boolean);
+ method public android.print.PrinterCapabilitiesInfo.Builder addOutputTray(android.print.PrintAttributes.Tray, boolean);
+ method public android.print.PrinterCapabilitiesInfo.Builder addResolution(android.print.PrintAttributes.Resolution, boolean);
+ method public android.print.PrinterCapabilitiesInfo create();
+ method public android.print.PrinterCapabilitiesInfo.Builder setColorModes(int, int);
+ method public android.print.PrinterCapabilitiesInfo.Builder setDuplexModes(int, int);
+ method public android.print.PrinterCapabilitiesInfo.Builder setFittingModes(int, int);
+ method public android.print.PrinterCapabilitiesInfo.Builder setMinMargins(android.print.PrintAttributes.Margins, android.print.PrintAttributes.Margins);
+ method public android.print.PrinterCapabilitiesInfo.Builder setOrientations(int, int);
+ }
+
+ public final class PrinterId implements android.os.Parcelable {
+ method public int describeContents();
+ method public java.lang.String getLocalId();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
+ public final class PrinterInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method public android.print.PrinterCapabilitiesInfo getCapabilities();
+ method public java.lang.String getDescription();
+ method public android.print.PrinterId getId();
+ method public java.lang.String getName();
method public int getStatus();
- method public boolean hasAllRequiredAttributes();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int STATUS_READY = 1; // 0x1
}
public static final class PrinterInfo.Builder {
- ctor public PrinterInfo.Builder(android.print.PrinterId);
- method public android.print.PrinterInfo.Builder addInputTray(android.print.PrintAttributes.Tray, boolean);
- method public android.print.PrinterInfo.Builder addMediaSize(android.print.PrintAttributes.MediaSize, boolean);
- method public android.print.PrinterInfo.Builder addOutputTray(android.print.PrintAttributes.Tray, boolean);
- method public android.print.PrinterInfo.Builder addResolution(android.print.PrintAttributes.Resolution, boolean);
+ ctor public PrinterInfo.Builder(android.print.PrinterId, java.lang.String, int);
+ ctor public PrinterInfo.Builder(android.print.PrinterInfo);
method public android.print.PrinterInfo create();
- method public android.print.PrinterInfo.Builder setColorModes(int, int);
- method public android.print.PrinterInfo.Builder setDuplexModes(int, int);
- method public android.print.PrinterInfo.Builder setFittingModes(int, int);
- method public android.print.PrinterInfo.Builder setMinMargins(android.print.PrintAttributes.Margins, android.print.PrintAttributes.Margins);
- method public android.print.PrinterInfo.Builder setOrientations(int, int);
- method public android.print.PrinterInfo.Builder setStatus(int);
+ method public android.print.PrinterInfo.Builder setCapabilities(android.print.PrinterCapabilitiesInfo);
+ method public android.print.PrinterInfo.Builder setDescription(java.lang.String);
+ method public android.print.PrinterInfo.Builder setName(java.lang.String);
}
}
@@ -18853,6 +18899,9 @@
method public android.printservice.PrintDocument getDocument();
method public int getId();
method public android.print.PrintJobInfo getInfo();
+ method public boolean isCancelled();
+ method public boolean isCompleted();
+ method public boolean isFailed();
method public boolean isQueued();
method public boolean isStarted();
method public boolean setTag(java.lang.String);
@@ -18861,23 +18910,30 @@
public abstract class PrintService extends android.app.Service {
ctor public PrintService();
- method public final void addDiscoveredPrinters(java.util.List<android.print.PrinterInfo>);
+ method protected final void attachBaseContext(android.content.Context);
method public final android.print.PrinterId generatePrinterId(java.lang.String);
- method public final java.util.List<android.printservice.PrintJob> getPrintJobs();
+ method public final java.util.List<android.printservice.PrintJob> getActivePrintJobs();
method public final android.os.IBinder onBind(android.content.Intent);
method protected void onConnected();
+ method protected abstract android.printservice.PrinterDiscoverySession onCreatePrinterDiscoverySession();
method protected void onDisconnected();
method protected abstract void onPrintJobQueued(android.printservice.PrintJob);
- method protected void onRequestCancelPrintJob(android.printservice.PrintJob);
- method protected void onRequestUpdatePrinters(java.util.List<android.print.PrinterId>);
- method protected abstract void onStartPrinterDiscovery();
- method protected abstract void onStopPrinterDiscovery();
- method public final void removeDiscoveredPrinters(java.util.List<android.print.PrinterId>);
- method public final void updateDiscoveredPrinters(java.util.List<android.print.PrinterInfo>);
+ method protected abstract void onRequestCancelPrintJob(android.printservice.PrintJob);
field public static final java.lang.String SERVICE_INTERFACE = "android.printservice.PrintService";
field public static final java.lang.String SERVICE_META_DATA = "android.printservice";
}
+ public abstract class PrinterDiscoverySession {
+ ctor public PrinterDiscoverySession(android.content.Context);
+ method public final void addPrinters(java.util.List<android.print.PrinterInfo>);
+ method public final boolean isClosed();
+ method public abstract void onClose();
+ method public abstract void onOpen(java.util.List<android.print.PrinterId>);
+ method public abstract void onRequestPrinterUpdate(android.print.PrinterId);
+ method public final void removePrinters(java.util.List<android.print.PrinterId>);
+ method public final void updatePrinters(java.util.List<android.print.PrinterInfo>);
+ }
+
}
package android.provider {
@@ -20312,6 +20368,7 @@
method public static android.net.Uri buildSearchUri(java.lang.String, java.lang.String, java.lang.String, java.lang.String);
method public static android.net.Uri buildSearchUri(android.net.Uri, java.lang.String);
method public static java.lang.String getDocId(android.net.Uri);
+ method public static android.net.Uri[] getOpenDocuments(android.content.Context);
method public static java.lang.String getRootId(android.net.Uri);
method public static java.lang.String getSearchQuery(android.net.Uri);
method public static android.graphics.Bitmap getThumbnail(android.content.ContentResolver, android.net.Uri, android.graphics.Point);
@@ -20716,6 +20773,7 @@
field public static final java.lang.String ACTION_MEMORY_CARD_SETTINGS = "android.settings.MEMORY_CARD_SETTINGS";
field public static final java.lang.String ACTION_NETWORK_OPERATOR_SETTINGS = "android.settings.NETWORK_OPERATOR_SETTINGS";
field public static final java.lang.String ACTION_NFCSHARING_SETTINGS = "android.settings.NFCSHARING_SETTINGS";
+ field public static final java.lang.String ACTION_NFC_PAYMENT_SETTINGS = "android.settings.NFC_PAYMENT_SETTINGS";
field public static final java.lang.String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
field public static final java.lang.String ACTION_PRIVACY_SETTINGS = "android.settings.PRIVACY_SETTINGS";
field public static final java.lang.String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS";
@@ -23327,11 +23385,14 @@
method public java.io.File getDatabasePath(java.lang.String);
method public java.io.File getDir(java.lang.String, int);
method public java.io.File getExternalCacheDir();
+ method public java.io.File[] getExternalCacheDirs();
method public java.io.File getExternalFilesDir(java.lang.String);
+ method public java.io.File[] getExternalFilesDirs(java.lang.String);
method public java.io.File getFileStreamPath(java.lang.String);
method public java.io.File getFilesDir();
method public android.os.Looper getMainLooper();
method public java.io.File getObbDir();
+ method public java.io.File[] getObbDirs();
method public java.lang.String getPackageCodePath();
method public android.content.pm.PackageManager getPackageManager();
method public java.lang.String getPackageName();
@@ -25771,7 +25832,9 @@
method public android.view.InputDevice.MotionRange getMotionRange(int, int);
method public java.util.List<android.view.InputDevice.MotionRange> getMotionRanges();
method public java.lang.String getName();
+ method public int getProductId();
method public int getSources();
+ method public int getVendorId();
method public android.os.Vibrator getVibrator();
method public boolean isVirtual();
method public void writeToParcel(android.os.Parcel, int);
@@ -27827,6 +27890,7 @@
method public final boolean hasChildren();
method public boolean hasFeature(int);
method protected final boolean hasSoftInputMode();
+ method public void injectInputEvent(android.view.InputEvent);
method public abstract void invalidatePanelMenu(int);
method public final boolean isActive();
method public abstract boolean isFloating();
@@ -27864,6 +27928,7 @@
method public void setGravity(int);
method public void setIcon(int);
method public void setLayout(int, int);
+ method public void setLocalFocus(boolean, boolean);
method public void setLogo(int);
method public void setSoftInputMode(int);
method public abstract void setTitle(java.lang.CharSequence);
@@ -28002,6 +28067,7 @@
field public static final int FLAG_LAYOUT_IN_OVERSCAN = 33554432; // 0x2000000
field public static final int FLAG_LAYOUT_IN_SCREEN = 256; // 0x100
field public static final int FLAG_LAYOUT_NO_LIMITS = 512; // 0x200
+ field public static final int FLAG_LOCAL_FOCUS_MODE = 268435456; // 0x10000000
field public static final int FLAG_NOT_FOCUSABLE = 8; // 0x8
field public static final int FLAG_NOT_TOUCHABLE = 16; // 0x10
field public static final int FLAG_NOT_TOUCH_MODAL = 32; // 0x20
diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java
index 39eb8d6..89accbb 100644
--- a/core/java/android/animation/Animator.java
+++ b/core/java/android/animation/Animator.java
@@ -30,6 +30,17 @@
ArrayList<AnimatorListener> mListeners = null;
/**
+ * The set of listeners to be sent pause/resume events through the life
+ * of an animation.
+ */
+ ArrayList<AnimatorPauseListener> mPauseListeners = null;
+
+ /**
+ * Whether this animator is currently in a paused state.
+ */
+ boolean mPaused = false;
+
+ /**
* Starts this animation. If the animation has a nonzero startDelay, the animation will start
* running after that delay elapses. A non-delayed animation will have its initial
* value(s) set immediately, followed by calls to
@@ -69,6 +80,66 @@
}
/**
+ * Pauses a running animation. This method should only be called on the same thread on
+ * which the animation was started. If the animation has not yet been {@link
+ * #isStarted() started} or has since ended, then the call is ignored. Paused
+ * animations can be resumed by calling {@link #resume()}.
+ *
+ * @see #resume()
+ * @see #isPaused()
+ * @see AnimatorPauseListener
+ */
+ public void pause() {
+ if (isStarted() && !mPaused) {
+ mPaused = true;
+ if (mPauseListeners != null) {
+ ArrayList<AnimatorPauseListener> tmpListeners =
+ (ArrayList<AnimatorPauseListener>) mPauseListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationPause(this);
+ }
+ }
+ }
+ }
+
+ /**
+ * Resumes a paused animation, causing the animator to pick up where it left off
+ * when it was paused. This method should only be called on the same thread on
+ * which the animation was started. Calls to resume() on an animator that is
+ * not currently paused will be ignored.
+ *
+ * @see #pause()
+ * @see #isPaused()
+ * @see AnimatorPauseListener
+ */
+ public void resume() {
+ if (mPaused) {
+ mPaused = false;
+ if (mPauseListeners != null) {
+ ArrayList<AnimatorPauseListener> tmpListeners =
+ (ArrayList<AnimatorPauseListener>) mPauseListeners.clone();
+ int numListeners = tmpListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ tmpListeners.get(i).onAnimationResume(this);
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns whether this animator is currently in a paused state.
+ *
+ * @return True if the animator is currently paused, false otherwise.
+ *
+ * @see #pause()
+ * @see #resume()
+ */
+ public boolean isPaused() {
+ return mPaused;
+ }
+
+ /**
* The amount of time, in milliseconds, to delay processing the animation
* after {@link #start()} is called.
*
@@ -180,15 +251,58 @@
}
/**
+ * Adds a pause listener to this animator.
+ *
+ * @param listener the listener to be added to the current set of pause listeners
+ * for this animation.
+ */
+ public void addPauseListener(AnimatorPauseListener listener) {
+ if (mPauseListeners == null) {
+ mPauseListeners = new ArrayList<AnimatorPauseListener>();
+ }
+ mPauseListeners.add(listener);
+ }
+
+ /**
+ * Removes a pause listener from the set listening to this animation.
+ *
+ * @param listener the listener to be removed from the current set of pause
+ * listeners for this animation.
+ */
+ public void removePauseListener(AnimatorPauseListener listener) {
+ if (mPauseListeners == null) {
+ return;
+ }
+ mPauseListeners.remove(listener);
+ if (mPauseListeners.size() == 0) {
+ mPauseListeners = null;
+ }
+ }
+
+ /**
+ * Gets the set of {@link AnimatorPauseListener} objects that are currently
+ * listening for pause/resume events on this animator.
+ *
+ * @return ArrayList<AnimatorListener> The set of pause listeners.
+ */
+ public ArrayList<AnimatorPauseListener> getPauseListeners() {
+ return mPauseListeners;
+ }
+
+ /**
* Removes all listeners from this object. This is equivalent to calling
- * <code>getListeners()</code> followed by calling <code>clear()</code> on the
- * returned list of listeners.
+ * {@link #getListeners()} and {@link #getPauseListeners()} followed by calling
+ * {@link ArrayList#clear()} on the returned lists of listeners.
*/
public void removeAllListeners() {
if (mListeners != null) {
mListeners.clear();
mListeners = null;
}
+ if (mPauseListeners != null) {
+ mPauseListeners.clear();
+ mPauseListeners = null;
+ }
}
@Override
@@ -203,6 +317,14 @@
anim.mListeners.add(oldListeners.get(i));
}
}
+ if (mPauseListeners != null) {
+ ArrayList<AnimatorPauseListener> oldListeners = mPauseListeners;
+ anim.mPauseListeners = new ArrayList<AnimatorPauseListener>();
+ int numListeners = oldListeners.size();
+ for (int i = 0; i < numListeners; ++i) {
+ anim.mPauseListeners.add(oldListeners.get(i));
+ }
+ }
return anim;
} catch (CloneNotSupportedException e) {
throw new AssertionError();
@@ -280,4 +402,29 @@
*/
void onAnimationRepeat(Animator animation);
}
+
+ /**
+ * A pause listener receives notifications from an animation when the
+ * animation is {@link #pause() paused} or {@link #resume() resumed}.
+ *
+ * @see #addPauseListener(AnimatorPauseListener)
+ */
+ public static interface AnimatorPauseListener {
+ /**
+ * <p>Notifies that the animation was paused.</p>
+ *
+ * @param animation The animaton being paused.
+ * @see #pause()
+ */
+ void onAnimationPause(Animator animation);
+
+ /**
+ * <p>Notifies that the animation was resumed, after being
+ * previously paused.</p>
+ *
+ * @param animation The animation being resumed.
+ * @see #resume()
+ */
+ void onAnimationResume(Animator animation);
+ }
}
diff --git a/core/java/android/animation/AnimatorListenerAdapter.java b/core/java/android/animation/AnimatorListenerAdapter.java
index e5d70a4..2ecb8c3 100644
--- a/core/java/android/animation/AnimatorListenerAdapter.java
+++ b/core/java/android/animation/AnimatorListenerAdapter.java
@@ -21,7 +21,8 @@
* Any custom listener that cares only about a subset of the methods of this listener can
* simply subclass this adapter class instead of implementing the interface directly.
*/
-public abstract class AnimatorListenerAdapter implements Animator.AnimatorListener {
+public abstract class AnimatorListenerAdapter implements Animator.AnimatorListener,
+ Animator.AnimatorPauseListener {
/**
* {@inheritDoc}
@@ -51,4 +52,17 @@
public void onAnimationStart(Animator animation) {
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationPause(Animator animation) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onAnimationResume(Animator animation) {
+ }
}
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index b48853b..018a2d6 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -455,6 +455,36 @@
}
}
+ @Override
+ public void pause() {
+ boolean previouslyPaused = mPaused;
+ super.pause();
+ if (!previouslyPaused && mPaused) {
+ if (mDelayAnim != null) {
+ mDelayAnim.pause();
+ } else {
+ for (Node node : mNodes) {
+ node.animation.pause();
+ }
+ }
+ }
+ }
+
+ @Override
+ public void resume() {
+ boolean previouslyPaused = mPaused;
+ super.resume();
+ if (previouslyPaused && !mPaused) {
+ if (mDelayAnim != null) {
+ mDelayAnim.resume();
+ } else {
+ for (Node node : mNodes) {
+ node.animation.resume();
+ }
+ }
+ }
+ }
+
/**
* {@inheritDoc}
*
@@ -467,6 +497,7 @@
public void start() {
mTerminated = false;
mStarted = true;
+ mPaused = false;
if (mDuration >= 0) {
// If the duration was set on this AnimatorSet, pass it along to all child animations
@@ -549,6 +580,7 @@
mPlayingSet.add(node.animation);
}
}
+ mDelayAnim = null;
}
});
mDelayAnim.start();
@@ -787,6 +819,7 @@
}
}
mAnimatorSet.mStarted = false;
+ mAnimatorSet.mPaused = false;
}
}
}
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index e370e4a..6394299 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -80,6 +80,20 @@
*/
long mSeekTime = -1;
+ /**
+ * Set on the next frame after pause() is called, used to calculate a new startTime
+ * or delayStartTime which allows the animator to continue from the point at which
+ * it was paused. If negative, has not yet been set.
+ */
+ private long mPauseTime;
+
+ /**
+ * Set when an animator is resumed. This triggers logic in the next frame which
+ * actually resumes the animator.
+ */
+ private boolean mResumed = false;
+
+
// The static sAnimationHandler processes the internal timing loop on which all animations
// are based
/**
@@ -147,7 +161,7 @@
private boolean mStarted = false;
/**
- * Tracks whether we've notified listeners of the onAnimationSTart() event. This can be
+ * Tracks whether we've notified listeners of the onAnimationStart() event. This can be
* complex to keep track of since we notify listeners at different times depending on
* startDelay and whether start() was called before end().
*/
@@ -914,6 +928,7 @@
mPlayingState = STOPPED;
mStarted = true;
mStartedDelay = false;
+ mPaused = false;
AnimationHandler animationHandler = getOrCreateAnimationHandler();
animationHandler.mPendingAnimations.add(this);
if (mStartDelay == 0) {
@@ -971,6 +986,24 @@
}
@Override
+ public void resume() {
+ if (mPaused) {
+ mResumed = true;
+ }
+ super.resume();
+ }
+
+ @Override
+ public void pause() {
+ boolean previouslyPaused = mPaused;
+ super.pause();
+ if (!previouslyPaused && mPaused) {
+ mPauseTime = -1;
+ mResumed = false;
+ }
+ }
+
+ @Override
public boolean isRunning() {
return (mPlayingState == RUNNING || mRunning);
}
@@ -1008,6 +1041,7 @@
handler.mPendingAnimations.remove(this);
handler.mDelayedAnims.remove(this);
mPlayingState = STOPPED;
+ mPaused = false;
if ((mStarted || mRunning) && mListeners != null) {
if (!mRunning) {
// If it's not yet running, then start listeners weren't called. Call them now.
@@ -1071,6 +1105,18 @@
mStartedDelay = true;
mDelayStartTime = currentTime;
} else {
+ if (mPaused) {
+ if (mPauseTime < 0) {
+ mPauseTime = currentTime;
+ }
+ return false;
+ } else if (mResumed) {
+ mResumed = false;
+ if (mPauseTime > 0) {
+ // Offset by the duration that the animation was paused
+ mDelayStartTime += (currentTime - mPauseTime);
+ }
+ }
long deltaTime = currentTime - mDelayStartTime;
if (deltaTime > mStartDelay) {
// startDelay ended - start the anim and record the
@@ -1093,7 +1139,7 @@
*
* @param currentTime The current time, as tracked by the static timing handler
* @return true if the animation's duration, including any repetitions due to
- * <code>repeatCount</code> has been exceeded and the animation should be ended.
+ * <code>repeatCount</code>, has been exceeded and the animation should be ended.
*/
boolean animationFrame(long currentTime) {
boolean done = false;
@@ -1148,6 +1194,18 @@
mSeekTime = -1;
}
}
+ if (mPaused) {
+ if (mPauseTime < 0) {
+ mPauseTime = frameTime;
+ }
+ return false;
+ } else if (mResumed) {
+ mResumed = false;
+ if (mPauseTime > 0) {
+ // Offset by the duration that the animation was paused
+ mStartTime += (frameTime - mPauseTime);
+ }
+ }
// The frame time might be before the start time during the first frame of
// an animation. The "current time" must always be on or after the start
// time to avoid animating frames at negative time intervals. In practice, this
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index cc964c2..6a29552 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1980,6 +1980,19 @@
reply.writeNoException();
return true;
}
+
+ case GET_GRANTED_URI_PERMISSIONS_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ final String sourcePackage = data.readString();
+ final String targetPackage = data.readString();
+ final int modeFlags = data.readInt();
+ final int modeMask = data.readInt();
+ final Uri[] uris = getGrantedUriPermissions(
+ sourcePackage, targetPackage, modeFlags, modeMask);
+ reply.writeNoException();
+ reply.writeParcelableArray(uris, 0);
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -4540,5 +4553,23 @@
reply.recycle();
}
+ public Uri[] getGrantedUriPermissions(
+ String sourcePackage, String targetPackage, int modeFlags, int modeMask)
+ throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeString(sourcePackage);
+ data.writeString(targetPackage);
+ data.writeInt(modeFlags);
+ data.writeInt(modeMask);
+ mRemote.transact(GET_GRANTED_URI_PERMISSIONS_TRANSACTION, data, reply, 0);
+ reply.readException();
+ final Uri[] uris = (Uri[]) reply.readParcelableArray(null);
+ data.recycle();
+ reply.recycle();
+ return uris;
+ }
+
private IBinder mRemote;
}
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index eb5c3e7..cdec399 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -111,6 +111,7 @@
import android.accounts.IAccountManager;
import android.app.admin.DevicePolicyManager;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsService;
import com.android.internal.os.IDropBoxManagerService;
@@ -197,13 +198,21 @@
private final Object mSync = new Object();
+ @GuardedBy("mSync")
private File mDatabasesDir;
+ @GuardedBy("mSync")
private File mPreferencesDir;
+ @GuardedBy("mSync")
private File mFilesDir;
+ @GuardedBy("mSync")
private File mCacheDir;
- private File mObbDir;
- private File mExternalFilesDir;
- private File mExternalCacheDir;
+
+ @GuardedBy("mSync")
+ private File[] mExternalObbDirs;
+ @GuardedBy("mSync")
+ private File[] mExternalFilesDirs;
+ @GuardedBy("mSync")
+ private File[] mExternalCacheDirs;
private static final String[] EMPTY_FILE_LIST = {};
@@ -802,44 +811,41 @@
@Override
public File getExternalFilesDir(String type) {
+ // Operates on primary external storage
+ return getExternalFilesDirs(type)[0];
+ }
+
+ @Override
+ public File[] getExternalFilesDirs(String type) {
synchronized (mSync) {
- if (mExternalFilesDir == null) {
- mExternalFilesDir = Environment.getExternalStorageAppFilesDirectory(
- getPackageName());
+ if (mExternalFilesDirs == null) {
+ mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
}
- if (!mExternalFilesDir.exists()) {
- try {
- (new File(Environment.getExternalStorageAndroidDataDir(),
- ".nomedia")).createNewFile();
- } catch (IOException e) {
- }
- if (!mExternalFilesDir.mkdirs()) {
- Log.w(TAG, "Unable to create external files directory");
- return null;
- }
+
+ // Splice in requested type, if any
+ File[] dirs = mExternalFilesDirs;
+ if (type != null) {
+ dirs = Environment.buildPaths(dirs, type);
}
- if (type == null) {
- return mExternalFilesDir;
- }
- File dir = new File(mExternalFilesDir, type);
- if (!dir.exists()) {
- if (!dir.mkdirs()) {
- Log.w(TAG, "Unable to create external media directory " + dir);
- return null;
- }
- }
- return dir;
+
+ // Create dirs if needed
+ return ensureDirsExistOrFilter(dirs);
}
}
@Override
public File getObbDir() {
+ // Operates on primary external storage
+ return getObbDirs()[0];
+ }
+
+ @Override
+ public File[] getObbDirs() {
synchronized (mSync) {
- if (mObbDir == null) {
- mObbDir = Environment.getExternalStorageAppObbDirectory(
- getPackageName());
+ if (mExternalObbDirs == null) {
+ mExternalObbDirs = Environment.buildExternalStorageAppObbDirs(getPackageName());
}
- return mObbDir;
+ return mExternalObbDirs;
}
}
@@ -865,23 +871,19 @@
@Override
public File getExternalCacheDir() {
+ // Operates on primary external storage
+ return getExternalCacheDirs()[0];
+ }
+
+ @Override
+ public File[] getExternalCacheDirs() {
synchronized (mSync) {
- if (mExternalCacheDir == null) {
- mExternalCacheDir = Environment.getExternalStorageAppCacheDirectory(
- getPackageName());
+ if (mExternalCacheDirs == null) {
+ mExternalCacheDirs = Environment.buildExternalStorageAppCacheDirs(getPackageName());
}
- if (!mExternalCacheDir.exists()) {
- try {
- (new File(Environment.getExternalStorageAndroidDataDir(),
- ".nomedia")).createNewFile();
- } catch (IOException e) {
- }
- if (!mExternalCacheDir.mkdirs()) {
- Log.w(TAG, "Unable to create external cache directory");
- return null;
- }
- }
- return mExternalCacheDir;
+
+ // Create dirs if needed
+ return ensureDirsExistOrFilter(mExternalCacheDirs);
}
}
@@ -2081,6 +2083,25 @@
"File " + name + " contains a path separator");
}
+ /**
+ * Ensure that given directories exist, trying to create them if missing. If
+ * unable to create, they are filtered by replacing with {@code null}.
+ */
+ private static File[] ensureDirsExistOrFilter(File[] dirs) {
+ File[] result = new File[dirs.length];
+ for (int i = 0; i < dirs.length; i++) {
+ File dir = dirs[i];
+ if (!dir.exists()) {
+ if (!dir.mkdirs()) {
+ Log.w(TAG, "Failed to ensure directory: " + dir);
+ dir = null;
+ }
+ }
+ result[i] = dir;
+ }
+ return result;
+ }
+
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 3851eb3..6d1b6fc 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -399,6 +399,10 @@
public void restart() throws RemoteException;
+ public Uri[] getGrantedUriPermissions(
+ String sourcePackage, String targetPackage, int modeFlags, int modeMask)
+ throws RemoteException;
+
/*
* Private non-Binder interfaces
*/
@@ -680,4 +684,5 @@
int NOTIFY_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+175;
int REPORT_ACTIVITY_FULLY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+176;
int RESTART_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+177;
+ int GET_GRANTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+178;
}
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java
index 63c6acd..b84889f 100644
--- a/core/java/android/app/NativeActivity.java
+++ b/core/java/android/app/NativeActivity.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package android.app;
import android.content.Context;
@@ -23,17 +24,15 @@
import android.graphics.PixelFormat;
import android.os.Build;
import android.os.Bundle;
-import android.os.Environment;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.AttributeSet;
import android.view.InputQueue;
-import android.view.KeyEvent;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.View;
-import android.view.WindowManager;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import java.io.File;
@@ -176,8 +175,8 @@
? savedInstanceState.getByteArray(KEY_NATIVE_SAVED_STATE) : null;
mNativeHandle = loadNativeCode(path, funcname, Looper.myQueue(),
- getFilesDir().toString(), getObbDir().toString(),
- Environment.getExternalStorageAppFilesDirectory(ai.packageName).toString(),
+ getFilesDir().getAbsolutePath(), getObbDir().getAbsolutePath(),
+ getExternalFilesDir(null).getAbsolutePath(),
Build.VERSION.SDK_INT, getAssets(), nativeSavedState);
if (mNativeHandle == 0) {
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 17e8dd9..be831d7 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -1527,9 +1527,26 @@
*/
public boolean setDeviceOwner(String packageName) throws IllegalArgumentException,
IllegalStateException {
+ return setDeviceOwner(packageName, null);
+ }
+
+ /**
+ * @hide
+ * Sets the given package as the device owner. The package must already be installed and there
+ * shouldn't be an existing device owner registered, for this call to succeed. Also, this
+ * method must be called before the device is provisioned.
+ * @param packageName the package name of the application to be registered as the device owner.
+ * @param ownerName the human readable name of the institution that owns this device.
+ * @return whether the package was successfully registered as the device owner.
+ * @throws IllegalArgumentException if the package name is null or invalid
+ * @throws IllegalStateException if a device owner is already registered or the device has
+ * already been provisioned.
+ */
+ public boolean setDeviceOwner(String packageName, String ownerName)
+ throws IllegalArgumentException, IllegalStateException {
if (mService != null) {
try {
- return mService.setDeviceOwner(packageName);
+ return mService.setDeviceOwner(packageName, ownerName);
} catch (RemoteException re) {
Log.w(TAG, "Failed to set device owner");
}
@@ -1581,4 +1598,16 @@
}
return null;
}
+
+ /** @hide */
+ public String getDeviceOwnerName() {
+ if (mService != null) {
+ try {
+ return mService.getDeviceOwnerName();
+ } catch (RemoteException re) {
+ Log.w(TAG, "Failed to get device owner");
+ }
+ }
+ return null;
+ }
}
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index b2a65bf..9659a91 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -98,7 +98,8 @@
void reportFailedPasswordAttempt(int userHandle);
void reportSuccessfulPasswordAttempt(int userHandle);
- boolean setDeviceOwner(String packageName);
+ boolean setDeviceOwner(String packageName, String ownerName);
boolean isDeviceOwner(String packageName);
String getDeviceOwner();
+ String getDeviceOwnerName();
}
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 3ee7142..3acd9b0 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -343,6 +343,9 @@
/**@hide*/
public static final int REQUEST_TYPE_PHONEBOOK_ACCESS = 2;
+ /**@hide*/
+ public static final int REQUEST_TYPE_MESSAGE_ACCESS = 3;
+
/**
* Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REQUEST} intents,
* Contains package name to return reply intent to.
diff --git a/core/java/android/bluetooth/BluetoothMap.java b/core/java/android/bluetooth/BluetoothMap.java
new file mode 100644
index 0000000..7de309f
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothMap.java
@@ -0,0 +1,300 @@
+/*
+ * Copyright (C) 2008 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 android.bluetooth;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.RemoteException;
+import android.os.IBinder;
+import android.os.ServiceManager;
+import android.util.Log;
+
+/**
+ * This class provides the APIs to control the Bluetooth MAP
+ * Profile.
+ *@hide
+ */
+public class BluetoothMap {
+
+ private static final String TAG = "BluetoothMap";
+ private static final boolean DBG = true;
+ private static final boolean VDBG = false;
+
+ /** int extra for MAP_STATE_CHANGED_ACTION */
+ public static final String MAP_STATE =
+ "android.bluetooth.map.intent.MAP_STATE";
+ /** int extra for MAP_STATE_CHANGED_ACTION */
+ public static final String MAP_PREVIOUS_STATE =
+ "android.bluetooth.map.intent.MAP_PREVIOUS_STATE";
+
+ /** Indicates the state of a Map connection state has changed.
+ * This intent will always contain MAP_STATE, MAP_PREVIOUS_STATE and
+ * BluetoothIntent.ADDRESS extras.
+ */
+ public static final String MAP_STATE_CHANGED_ACTION =
+ "android.bluetooth.map.intent.action.MAP_STATE_CHANGED";
+
+ private IBluetoothMap mService;
+ private final Context mContext;
+ private ServiceListener mServiceListener;
+ private BluetoothAdapter mAdapter;
+
+ /** There was an error trying to obtain the state */
+ public static final int STATE_ERROR = -1;
+ /** No client currently connected */
+ public static final int STATE_DISCONNECTED = 0;
+ /** Connection attempt in progress */
+ public static final int STATE_CONNECTING = 1;
+ /** Client is currently connected */
+ public static final int STATE_CONNECTED = 2;
+
+ public static final int RESULT_FAILURE = 0;
+ public static final int RESULT_SUCCESS = 1;
+ /** Connection canceled before completion. */
+ public static final int RESULT_CANCELED = 2;
+
+ /**
+ * An interface for notifying Bluetooth PCE IPC clients when they have
+ * been connected to the BluetoothMap service.
+ */
+ public interface ServiceListener {
+ /**
+ * Called to notify the client when this proxy object has been
+ * connected to the BluetoothMap service. Clients must wait for
+ * this callback before making IPC calls on the BluetoothMap
+ * service.
+ */
+ public void onServiceConnected(BluetoothMap proxy);
+
+ /**
+ * Called to notify the client that this proxy object has been
+ * disconnected from the BluetoothMap service. Clients must not
+ * make IPC calls on the BluetoothMap service after this callback.
+ * This callback will currently only occur if the application hosting
+ * the BluetoothMap service, but may be called more often in future.
+ */
+ public void onServiceDisconnected();
+ }
+
+ final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
+ new IBluetoothStateChangeCallback.Stub() {
+ public void onBluetoothStateChange(boolean up) {
+ if (DBG) Log.d(TAG, "onBluetoothStateChange: up=" + up);
+ if (!up) {
+ if (VDBG) Log.d(TAG,"Unbinding service...");
+ synchronized (mConnection) {
+ try {
+ mService = null;
+ mContext.unbindService(mConnection);
+ } catch (Exception re) {
+ Log.e(TAG,"",re);
+ }
+ }
+ } else {
+ synchronized (mConnection) {
+ try {
+ if (mService == null) {
+ if (VDBG) Log.d(TAG,"Binding service...");
+ if (!mContext.bindService(
+ new Intent(IBluetoothMap.class.getName()),
+ mConnection, 0)) {
+ Log.e(TAG, "Could not bind to Bluetooth MAP Service");
+ }
+ }
+ } catch (Exception re) {
+ Log.e(TAG,"",re);
+ }
+ }
+ }
+ }
+ };
+
+ /**
+ * Create a BluetoothMap proxy object.
+ */
+ public BluetoothMap(Context context, ServiceListener l) {
+ mContext = context;
+ mServiceListener = l;
+ mAdapter = BluetoothAdapter.getDefaultAdapter();
+ IBluetoothManager mgr = mAdapter.getBluetoothManager();
+ if (mgr != null) {
+ try {
+ mgr.registerStateChangeCallback(mBluetoothStateChangeCallback);
+ } catch (RemoteException e) {
+ Log.e(TAG,"",e);
+ }
+ }
+ if (!context.bindService(new Intent(IBluetoothMap.class.getName()), mConnection, 0)) {
+ Log.e(TAG, "Could not bind to Bluetooth Map Service");
+ }
+ }
+
+ protected void finalize() throws Throwable {
+ try {
+ close();
+ } finally {
+ super.finalize();
+ }
+ }
+
+ /**
+ * Close the connection to the backing service.
+ * Other public functions of BluetoothMap will return default error
+ * results once close() has been called. Multiple invocations of close()
+ * are ok.
+ */
+ public synchronized void close() {
+ IBluetoothManager mgr = mAdapter.getBluetoothManager();
+ if (mgr != null) {
+ try {
+ mgr.unregisterStateChangeCallback(mBluetoothStateChangeCallback);
+ } catch (Exception e) {
+ Log.e(TAG,"",e);
+ }
+ }
+
+ synchronized (mConnection) {
+ if (mService != null) {
+ try {
+ mService = null;
+ mContext.unbindService(mConnection);
+ mConnection = null;
+ } catch (Exception re) {
+ Log.e(TAG,"",re);
+ }
+ }
+ }
+ mServiceListener = null;
+ }
+
+ /**
+ * Get the current state of the BluetoothMap service.
+ * @return One of the STATE_ return codes, or STATE_ERROR if this proxy
+ * object is currently not connected to the Map service.
+ */
+ public int getState() {
+ if (VDBG) log("getState()");
+ if (mService != null) {
+ try {
+ return mService.getState();
+ } catch (RemoteException e) {Log.e(TAG, e.toString());}
+ } else {
+ Log.w(TAG, "Proxy not attached to service");
+ if (DBG) log(Log.getStackTraceString(new Throwable()));
+ }
+ return BluetoothMap.STATE_ERROR;
+ }
+
+ /**
+ * Get the currently connected remote Bluetooth device (PCE).
+ * @return The remote Bluetooth device, or null if not in connected or
+ * connecting state, or if this proxy object is not connected to
+ * the Map service.
+ */
+ public BluetoothDevice getClient() {
+ if (VDBG) log("getClient()");
+ if (mService != null) {
+ try {
+ return mService.getClient();
+ } catch (RemoteException e) {Log.e(TAG, e.toString());}
+ } else {
+ Log.w(TAG, "Proxy not attached to service");
+ if (DBG) log(Log.getStackTraceString(new Throwable()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns true if the specified Bluetooth device is connected (does not
+ * include connecting). Returns false if not connected, or if this proxy
+ * object is not currently connected to the Map service.
+ */
+ public boolean isConnected(BluetoothDevice device) {
+ if (VDBG) log("isConnected(" + device + ")");
+ if (mService != null) {
+ try {
+ return mService.isConnected(device);
+ } catch (RemoteException e) {Log.e(TAG, e.toString());}
+ } else {
+ Log.w(TAG, "Proxy not attached to service");
+ if (DBG) log(Log.getStackTraceString(new Throwable()));
+ }
+ return false;
+ }
+
+ /**
+ * Disconnects the current Map Client. Currently this call blocks,
+ * it may soon be made asynchronous. Returns false if this proxy object is
+ * not currently connected to the Map service.
+ */
+ public boolean disconnect() {
+ if (DBG) log("disconnect()");
+ if (mService != null) {
+ try {
+ mService.disconnect();
+ return true;
+ } catch (RemoteException e) {Log.e(TAG, e.toString());}
+ } else {
+ Log.w(TAG, "Proxy not attached to service");
+ if (DBG) log(Log.getStackTraceString(new Throwable()));
+ }
+ return false;
+ }
+
+ /**
+ * Check class bits for possible Map support.
+ * This is a simple heuristic that tries to guess if a device with the
+ * given class bits might support Map. It is not accurate for all
+ * devices. It tries to err on the side of false positives.
+ * @return True if this device might support Map.
+ */
+ public static boolean doesClassMatchSink(BluetoothClass btClass) {
+ // TODO optimize the rule
+ switch (btClass.getDeviceClass()) {
+ case BluetoothClass.Device.COMPUTER_DESKTOP:
+ case BluetoothClass.Device.COMPUTER_LAPTOP:
+ case BluetoothClass.Device.COMPUTER_SERVER:
+ case BluetoothClass.Device.COMPUTER_UNCATEGORIZED:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ private ServiceConnection mConnection = new ServiceConnection() {
+ public void onServiceConnected(ComponentName className, IBinder service) {
+ if (DBG) log("Proxy object connected");
+ mService = IBluetoothMap.Stub.asInterface(service);
+ if (mServiceListener != null) {
+ mServiceListener.onServiceConnected(BluetoothMap.this);
+ }
+ }
+ public void onServiceDisconnected(ComponentName className) {
+ if (DBG) log("Proxy object disconnected");
+ mService = null;
+ if (mServiceListener != null) {
+ mServiceListener.onServiceDisconnected();
+ }
+ }
+ };
+
+ private static void log(String msg) {
+ Log.d(TAG, msg);
+ }
+}
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index 43079f4..1574090 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -98,6 +98,12 @@
static public final int GATT_SERVER = 8;
/**
+ * MAP Profile
+ * @hide
+ */
+ public static final int MAP = 9;
+
+ /**
* Default priority for devices that we try to auto-connect to and
* and allow incoming connections for the profile
* @hide
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index 5962235..fe66fbd 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -64,10 +64,14 @@
ParcelUuid.fromString("0000000f-0000-1000-8000-00805F9B34FB");
public static final ParcelUuid PBAP_PSE =
ParcelUuid.fromString("0000112f-0000-1000-8000-00805F9B34FB");
+ public static final ParcelUuid MAP =
+ ParcelUuid.fromString("00001132-0000-1000-8000-00805F9B34FB");
+ public static final ParcelUuid MNS =
+ ParcelUuid.fromString("00001133-0000-1000-8000-00805F9B34FB");
public static final ParcelUuid[] RESERVED_UUIDS = {
AudioSink, AudioSource, AdvAudioDist, HSP, Handsfree, AvrcpController, AvrcpTarget,
- ObexObjectPush, PANU, NAP};
+ ObexObjectPush, PANU, NAP, MAP, MNS};
public static boolean isAudioSource(ParcelUuid uuid) {
return uuid.equals(AudioSource);
@@ -112,6 +116,13 @@
public static boolean isBnep(ParcelUuid uuid) {
return uuid.equals(BNEP);
}
+ public static boolean isMap(ParcelUuid uuid) {
+ return uuid.equals(MAP);
+ }
+ public static boolean isMns(ParcelUuid uuid) {
+ return uuid.equals(MNS);
+ }
+
/**
* Returns true if ParcelUuid is present in uuidArray
*
diff --git a/core/java/android/bluetooth/IBluetoothMap.aidl b/core/java/android/bluetooth/IBluetoothMap.aidl
new file mode 100644
index 0000000..0c18e06
--- /dev/null
+++ b/core/java/android/bluetooth/IBluetoothMap.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2008 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 android.bluetooth;
+
+import android.bluetooth.BluetoothDevice;
+
+/**
+ * System private API for Bluetooth MAP service
+ *
+ * {@hide}
+ */
+interface IBluetoothMap {
+ int getState();
+ BluetoothDevice getClient();
+ boolean connect(in BluetoothDevice device);
+ void disconnect();
+ boolean isConnected(in BluetoothDevice device);
+}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 243c91a..45fed2d 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -16,8 +16,6 @@
package android.content;
-import dalvik.system.CloseGuard;
-
import android.accounts.Account;
import android.app.ActivityManagerNative;
import android.app.ActivityThread;
@@ -44,7 +42,8 @@
import android.text.TextUtils;
import android.util.EventLog;
import android.util.Log;
-import android.util.Pair;
+
+import dalvik.system.CloseGuard;
import java.io.File;
import java.io.FileInputStream;
@@ -1389,6 +1388,58 @@
}
/**
+ * Return list of all Uri permissions that have been granted <em>to</em> the
+ * calling package, and which exactly match the requested flags. For
+ * example, to return all Uris that the calling application has
+ * <em>non-persistent</em> read access to:
+ *
+ * <pre class="prettyprint">
+ * getIncomingUriPermissionGrants(Intent.FLAG_GRANT_READ_URI_PERMISSION,
+ * Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_PERSIST_GRANT_URI_PERMISSION);
+ * </pre>
+ *
+ * @param modeFlags any combination of
+ * {@link Intent#FLAG_GRANT_READ_URI_PERMISSION},
+ * {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION}, or
+ * {@link Intent#FLAG_PERSIST_GRANT_URI_PERMISSION}.
+ * @param modeMask mask indicating which flags must match.
+ */
+ public Uri[] getIncomingUriPermissionGrants(int modeFlags, int modeMask) {
+ try {
+ return ActivityManagerNative.getDefault()
+ .getGrantedUriPermissions(null, getPackageName(), modeFlags, modeMask);
+ } catch (RemoteException e) {
+ return new Uri[0];
+ }
+ }
+
+ /**
+ * Return list of all Uri permissions that have been granted <em>from</em> the
+ * calling package, and which exactly match the requested flags. For
+ * example, to return all Uris that the calling application has granted
+ * <em>non-persistent</em> read access to:
+ *
+ * <pre class="prettyprint">
+ * getOutgoingUriPermissionGrants(Intent.FLAG_GRANT_READ_URI_PERMISSION,
+ * Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_PERSIST_GRANT_URI_PERMISSION);
+ * </pre>
+ *
+ * @param modeFlags any combination of
+ * {@link Intent#FLAG_GRANT_READ_URI_PERMISSION},
+ * {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION}, or
+ * {@link Intent#FLAG_PERSIST_GRANT_URI_PERMISSION}.
+ * @param modeMask mask indicating which flags must match.
+ */
+ public Uri[] getOutgoingUriPermissionGrants(int modeFlags, int modeMask) {
+ try {
+ return ActivityManagerNative.getDefault()
+ .getGrantedUriPermissions(getPackageName(), null, modeFlags, modeMask);
+ } catch (RemoteException e) {
+ return new Uri[0];
+ }
+ }
+
+ /**
* Start an asynchronous sync operation. If you want to monitor the progress
* of the sync you may register a SyncObserver. Only values of the following
* types may be used in the extras bundle:
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 81a5e57..ff81f72 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -590,7 +590,7 @@
* Returns the absolute path to the directory on the external filesystem
* (that is somewhere on {@link android.os.Environment#getExternalStorageDirectory()
* Environment.getExternalStorageDirectory()}) where the application can
- * place persistent files it owns. These files are private to the
+ * place persistent files it owns. These files are internal to the
* applications, and not typically visible to the user as media.
*
* <p>This is like {@link #getFilesDir()} in that these
@@ -637,9 +637,11 @@
*
* {@sample development/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
* private_picture}
- *
- * <p>Writing to this path requires the
- * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} permission.</p>
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * this path. Otherwise, {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE}
+ * or {@link android.Manifest.permission#READ_EXTERNAL_STORAGE} are required.
*
* @param type The type of files directory to return. May be null for
* the root of the files directory or one of
@@ -663,18 +665,66 @@
public abstract File getExternalFilesDir(String type);
/**
- * Return the directory where this application's OBB files (if there
- * are any) can be found. Note if the application does not have any OBB
- * files, this directory may not exist.
+ * Returns absolute paths to application-specific directories on all
+ * external storage devices where the application can place persistent files
+ * it owns. These files are internal to the application, and not typically
+ * visible to the user as media.
+ * <p>
+ * External storage devices returned here are considered a permanent part of
+ * the device, including both emulated external storage and physical media
+ * slots. This does not include transient devices, such as USB flash drives.
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * these paths.
+ * <p>
+ * The returned paths include any path that would be returned by
+ * {@link #getExternalFilesDir(String)}.
*
- * <p>On devices with multiple users (as described by {@link UserManager}),
+ * @see #getExternalFilesDir(String)
+ */
+ public abstract File[] getExternalFilesDirs(String type);
+
+ /**
+ * Return the directory where this application's OBB files (if there are
+ * any) can be found. Note if the application does not have any OBB files,
+ * this directory may not exist.
+ * <p>
+ * On devices with multiple users (as described by {@link UserManager}),
* multiple users may share the same OBB storage location. Applications
- * should ensure that multiple instances running under different users
- * don't interfere with each other.</p>
+ * should ensure that multiple instances running under different users don't
+ * interfere with each other.
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * this path. Otherwise,
+ * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} or
+ * {@link android.Manifest.permission#READ_EXTERNAL_STORAGE} are required.
*/
public abstract File getObbDir();
/**
+ * Returns absolute paths to application-specific directories on all
+ * external storage devices where the application's OBB files (if there are
+ * any) can be found. Note if the application does not have any OBB files,
+ * these directories may not exist.
+ * <p>
+ * External storage devices returned here are considered a permanent part of
+ * the device, including both emulated external storage and physical media
+ * slots. This does not include transient devices, such as USB flash drives.
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * this path.
+ * <p>
+ * The returned paths include any path that would be returned by
+ * {@link #getObbDir()}
+ *
+ * @see #getObbDir()
+ */
+ public abstract File[] getObbDirs();
+
+ /**
* Returns the absolute path to the application specific cache directory
* on the filesystem. These files will be ones that get deleted first when the
* device runs low on storage.
@@ -697,7 +747,8 @@
* Returns the absolute path to the directory on the external filesystem
* (that is somewhere on {@link android.os.Environment#getExternalStorageDirectory()
* Environment.getExternalStorageDirectory()} where the application can
- * place cache files it owns.
+ * place cache files it owns. These files are internal to the application, and
+ * not typically visible to the user as media.
*
* <p>This is like {@link #getCacheDir()} in that these
* files will be deleted when the application is uninstalled, however there
@@ -722,9 +773,12 @@
* <p>On devices with multiple users (as described by {@link UserManager}),
* each user has their own isolated external storage. Applications only
* have access to the external storage for the user they're running as.</p>
- *
- * <p>Writing to this path requires the
- * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} permission.</p>
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * this path. Otherwise,
+ * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} or
+ * {@link android.Manifest.permission#READ_EXTERNAL_STORAGE} are required.
*
* @return The path of the directory holding application cache files
* on external storage. Returns null if external storage is not currently
@@ -736,6 +790,27 @@
public abstract File getExternalCacheDir();
/**
+ * Returns absolute paths to application-specific directories on all
+ * external storage devices where the application can place cache files it
+ * owns. These files are internal to the application, and not typically
+ * visible to the user as media.
+ * <p>
+ * External storage devices returned here are considered a permanent part of
+ * the device, including both emulated external storage and physical media
+ * slots. This does not include transient devices, such as USB flash drives.
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, no
+ * permissions are required for the owning application to read or write to
+ * these paths.
+ * <p>
+ * The returned paths include any path that would be returned by
+ * {@link #getExternalCacheDir()}.
+ *
+ * @see #getExternalCacheDir()
+ */
+ public abstract File[] getExternalCacheDirs();
+
+ /**
* Returns an array of strings naming the private files associated with
* this Context's application package.
*
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index 606a1f4..e09d367 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -203,12 +203,22 @@
public File getExternalFilesDir(String type) {
return mBase.getExternalFilesDir(type);
}
-
+
+ @Override
+ public File[] getExternalFilesDirs(String type) {
+ return mBase.getExternalFilesDirs(type);
+ }
+
@Override
public File getObbDir() {
return mBase.getObbDir();
}
-
+
+ @Override
+ public File[] getObbDirs() {
+ return mBase.getObbDirs();
+ }
+
@Override
public File getCacheDir() {
return mBase.getCacheDir();
@@ -220,6 +230,11 @@
}
@Override
+ public File[] getExternalCacheDirs() {
+ return mBase.getExternalCacheDirs();
+ }
+
+ @Override
public File getDir(String name, int mode) {
return mBase.getDir(name, mode);
}
diff --git a/core/java/android/net/PacProxySelector.java b/core/java/android/net/PacProxySelector.java
index be3a31d..d3ce2e5 100644
--- a/core/java/android/net/PacProxySelector.java
+++ b/core/java/android/net/PacProxySelector.java
@@ -3,6 +3,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.util.Log;
import com.android.net.IProxyService;
import com.google.android.collect.Lists;
@@ -21,16 +22,25 @@
* @hide
*/
public class PacProxySelector extends ProxySelector {
+ private static final String TAG = "PacProxySelector";
public static final String PROXY_SERVICE = "com.android.net.IProxyService";
private IProxyService mProxyService;
public PacProxySelector() {
mProxyService = IProxyService.Stub.asInterface(
ServiceManager.getService(PROXY_SERVICE));
+ if (mProxyService == null) {
+ // Added because of b10267814 where mako is restarting.
+ Log.e(TAG, "PackManager: no proxy service");
+ }
}
@Override
public List<Proxy> select(URI uri) {
+ if (mProxyService == null) {
+ Log.e(TAG, "select: no proxy service return NO_PROXY");
+ return Lists.newArrayList(java.net.Proxy.NO_PROXY);
+ }
String response = null;
String urlString;
try {
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
index ffa7d7e..3f7e3ef 100644
--- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java
+++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
@@ -188,7 +188,8 @@
currentGroup != null) {
final TypedArray a = res.obtainAttributes(attrs,
com.android.internal.R.styleable.AidFilter);
- String aid = a.getString(com.android.internal.R.styleable.AidFilter_name);
+ String aid = a.getString(com.android.internal.R.styleable.AidFilter_name).
+ toUpperCase();
if (isValidAid(aid) && !currentGroup.aids.contains(aid)) {
currentGroup.aids.add(aid);
mAids.add(aid);
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index ce5f163..d4a3006 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -177,8 +177,9 @@
public abstract class AsyncTask<Params, Progress, Result> {
private static final String LOG_TAG = "AsyncTask";
- private static final int CORE_POOL_SIZE = 5;
- private static final int MAXIMUM_POOL_SIZE = 128;
+ private static final int CPU_COUNT = Runtime.getRuntime().availableProcessors();
+ private static final int CORE_POOL_SIZE = CPU_COUNT + 1;
+ private static final int MAXIMUM_POOL_SIZE = CPU_COUNT * 2 + 1;
private static final int KEEP_ALIVE = 1;
private static final ThreadFactory sThreadFactory = new ThreadFactory() {
@@ -190,7 +191,7 @@
};
private static final BlockingQueue<Runnable> sPoolWorkQueue =
- new LinkedBlockingQueue<Runnable>(10);
+ new LinkedBlockingQueue<Runnable>(128);
/**
* An {@link Executor} that can be used to execute tasks in parallel.
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 70a1edc..3b9456f 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -16,6 +16,7 @@
package android.os;
+import android.content.Context;
import android.os.storage.IMountService;
import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
@@ -41,7 +42,16 @@
private static final String ENV_ANDROID_ROOT = "ANDROID_ROOT";
/** {@hide} */
- public static String DIRECTORY_ANDROID = "Android";
+ public static final String DIR_ANDROID = "Android";
+ private static final String DIR_DATA = "data";
+ private static final String DIR_MEDIA = "media";
+ private static final String DIR_OBB = "obb";
+ private static final String DIR_FILES = "files";
+ private static final String DIR_CACHE = "cache";
+
+ /** {@hide} */
+ @Deprecated
+ public static final String DIRECTORY_ANDROID = DIR_ANDROID;
private static final File DIR_ANDROID_ROOT = getDirectory(ENV_ANDROID_ROOT, "/system");
private static final File DIR_MEDIA_STORAGE = getDirectory(ENV_MEDIA_STORAGE, "/data/media");
@@ -98,12 +108,10 @@
/** {@hide} */
public static class UserEnvironment {
// TODO: generalize further to create package-specific environment
+ // TODO: add support for secondary external storage
- private final File mExternalStorage;
- private final File mExternalStorageAndroidData;
- private final File mExternalStorageAndroidMedia;
- private final File mExternalStorageAndroidObb;
- private final File mMediaStorage;
+ private final File[] mExternalDirs;
+ private final File mMediaDir;
public UserEnvironment(int userId) {
// See storage config details at http://source.android.com/tech/storage/
@@ -122,9 +130,9 @@
final File mediaBase = new File(rawMediaStorage);
// /storage/emulated/0
- mExternalStorage = buildPath(emulatedBase, rawUserId);
+ mExternalDirs = new File[] { buildPath(emulatedBase, rawUserId) };
// /data/media/0
- mMediaStorage = buildPath(mediaBase, rawUserId);
+ mMediaDir = buildPath(mediaBase, rawUserId);
} else {
// Device has physical external storage; use plain paths.
@@ -134,54 +142,60 @@
}
// /storage/sdcard0
- mExternalStorage = new File(rawExternalStorage);
+ mExternalDirs = new File[] { new File(rawExternalStorage) };
// /data/media
- mMediaStorage = new File(rawMediaStorage);
+ mMediaDir = new File(rawMediaStorage);
}
-
- mExternalStorageAndroidObb = buildPath(mExternalStorage, DIRECTORY_ANDROID, "obb");
- mExternalStorageAndroidData = buildPath(mExternalStorage, DIRECTORY_ANDROID, "data");
- mExternalStorageAndroidMedia = buildPath(mExternalStorage, DIRECTORY_ANDROID, "media");
}
+ @Deprecated
public File getExternalStorageDirectory() {
- return mExternalStorage;
+ return mExternalDirs[0];
}
- public File getExternalStorageObbDirectory() {
- return mExternalStorageAndroidObb;
- }
-
+ @Deprecated
public File getExternalStoragePublicDirectory(String type) {
- return new File(mExternalStorage, type);
+ return buildExternalStoragePublicDirs(type)[0];
}
- public File getExternalStorageAndroidDataDir() {
- return mExternalStorageAndroidData;
+ public File[] getExternalDirs() {
+ return mExternalDirs;
}
- public File getExternalStorageAppDataDirectory(String packageName) {
- return new File(mExternalStorageAndroidData, packageName);
+ public File getMediaDir() {
+ return mMediaDir;
}
- public File getExternalStorageAppMediaDirectory(String packageName) {
- return new File(mExternalStorageAndroidMedia, packageName);
+ public File[] buildExternalStoragePublicDirs(String type) {
+ return buildPaths(mExternalDirs, type);
}
- public File getExternalStorageAppObbDirectory(String packageName) {
- return new File(mExternalStorageAndroidObb, packageName);
+ public File[] buildExternalStorageAndroidDataDirs() {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_DATA);
}
- public File getExternalStorageAppFilesDirectory(String packageName) {
- return new File(new File(mExternalStorageAndroidData, packageName), "files");
+ public File[] buildExternalStorageAndroidObbDirs() {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_OBB);
}
- public File getExternalStorageAppCacheDirectory(String packageName) {
- return new File(new File(mExternalStorageAndroidData, packageName), "cache");
+ public File[] buildExternalStorageAppDataDirs(String packageName) {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_DATA, packageName);
}
- public File getMediaStorageDirectory() {
- return mMediaStorage;
+ public File[] buildExternalStorageAppMediaDirs(String packageName) {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_MEDIA, packageName);
+ }
+
+ public File[] buildExternalStorageAppObbDirs(String packageName) {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_OBB, packageName);
+ }
+
+ public File[] buildExternalStorageAppFilesDirs(String packageName) {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_DATA, packageName, DIR_FILES);
+ }
+
+ public File[] buildExternalStorageAppCacheDirs(String packageName) {
+ return buildPaths(mExternalDirs, DIR_ANDROID, DIR_DATA, packageName, DIR_CACHE);
}
}
@@ -230,7 +244,7 @@
*/
public static File getMediaStorageDirectory() {
throwIfUserRequired();
- return sCurrentUser.getMediaStorageDirectory();
+ return sCurrentUser.getMediaDir();
}
/**
@@ -266,58 +280,64 @@
private static final File DOWNLOAD_CACHE_DIRECTORY = getDirectory("DOWNLOAD_CACHE", "/cache");
/**
- * Gets the Android data directory.
+ * Return the user data directory.
*/
public static File getDataDirectory() {
return DATA_DIRECTORY;
}
/**
- * Gets the Android external storage directory. This directory may not
+ * Return the primary external storage directory. This directory may not
* currently be accessible if it has been mounted by the user on their
* computer, has been removed from the device, or some other problem has
- * happened. You can determine its current state with
+ * happened. You can determine its current state with
* {@link #getExternalStorageState()}.
- *
- * <p><em>Note: don't be confused by the word "external" here. This
- * directory can better be thought as media/shared storage. It is a
- * filesystem that can hold a relatively large amount of data and that
- * is shared across all applications (does not enforce permissions).
- * Traditionally this is an SD card, but it may also be implemented as
- * built-in storage in a device that is distinct from the protected
- * internal storage and can be mounted as a filesystem on a computer.</em></p>
- *
- * <p>On devices with multiple users (as described by {@link UserManager}),
- * each user has their own isolated external storage. Applications only
- * have access to the external storage for the user they're running as.</p>
- *
- * <p>In devices with multiple "external" storage directories (such as
- * both secure app storage and mountable shared storage), this directory
+ * <p>
+ * <em>Note: don't be confused by the word "external" here. This directory
+ * can better be thought as media/shared storage. It is a filesystem that
+ * can hold a relatively large amount of data and that is shared across all
+ * applications (does not enforce permissions). Traditionally this is an SD
+ * card, but it may also be implemented as built-in storage in a device that
+ * is distinct from the protected internal storage and can be mounted as a
+ * filesystem on a computer.</em>
+ * <p>
+ * On devices with multiple users (as described by {@link UserManager}),
+ * each user has their own isolated external storage. Applications only have
+ * access to the external storage for the user they're running as.
+ * <p>
+ * In devices with multiple "external" storage directories, this directory
* represents the "primary" external storage that the user will interact
- * with.</p>
- *
- * <p>Applications should not directly use this top-level directory, in
- * order to avoid polluting the user's root namespace. Any files that are
- * private to the application should be placed in a directory returned
- * by {@link android.content.Context#getExternalFilesDir
+ * with. Access to secondary storage is available through
+ * <p>
+ * Applications should not directly use this top-level directory, in order
+ * to avoid polluting the user's root namespace. Any files that are private
+ * to the application should be placed in a directory returned by
+ * {@link android.content.Context#getExternalFilesDir
* Context.getExternalFilesDir}, which the system will take care of deleting
- * if the application is uninstalled. Other shared files should be placed
- * in one of the directories returned by
- * {@link #getExternalStoragePublicDirectory}.</p>
- *
- * <p>Writing to this path requires the
- * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} permission. In
- * a future platform release, access to this path will require the
+ * if the application is uninstalled. Other shared files should be placed in
+ * one of the directories returned by
+ * {@link #getExternalStoragePublicDirectory}.
+ * <p>
+ * Writing to this path requires the
+ * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} permission,
+ * and starting in read access requires the
* {@link android.Manifest.permission#READ_EXTERNAL_STORAGE} permission,
- * which is automatically granted if you hold the write permission.</p>
- *
- * <p>This path may change between platform versions, so applications
- * should only persist relative paths.</p>
- *
- * <p>Here is an example of typical code to monitor the state of
- * external storage:</p>
- *
- * {@sample development/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
+ * which is automatically granted if you hold the write permission.
+ * <p>
+ * Starting in {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE}, if your
+ * application only needs to store internal data, consider using
+ * {@link Context#getExternalFilesDir(String)} or
+ * {@link Context#getExternalCacheDir()}, which require no permissions to
+ * read or write.
+ * <p>
+ * This path may change between platform versions, so applications should
+ * only persist relative paths.
+ * <p>
+ * Here is an example of typical code to monitor the state of external
+ * storage:
+ * <p>
+ * {@sample
+ * development/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java
* monitor_storage}
*
* @see #getExternalStorageState()
@@ -325,7 +345,7 @@
*/
public static File getExternalStorageDirectory() {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageDirectory();
+ return sCurrentUser.getExternalDirs()[0];
}
/** {@hide} */
@@ -335,7 +355,7 @@
/** {@hide} */
public static File getLegacyExternalStorageObbDirectory() {
- return buildPath(getLegacyExternalStorageDirectory(), DIRECTORY_ANDROID, "obb");
+ return buildPath(getLegacyExternalStorageDirectory(), DIR_ANDROID, DIR_OBB);
}
/** {@hide} */
@@ -347,7 +367,7 @@
/** {@hide} */
public static File getEmulatedStorageObbSource() {
// /mnt/shell/emulated/obb
- return new File(System.getenv(ENV_EMULATED_STORAGE_SOURCE), "obb");
+ return new File(System.getenv(ENV_EMULATED_STORAGE_SOURCE), DIR_OBB);
}
/**
@@ -472,139 +492,192 @@
*/
public static File getExternalStoragePublicDirectory(String type) {
throwIfUserRequired();
- return sCurrentUser.getExternalStoragePublicDirectory(type);
+ return sCurrentUser.buildExternalStoragePublicDirs(type)[0];
}
/**
* Returns the path for android-specific data on the SD card.
* @hide
*/
- public static File getExternalStorageAndroidDataDir() {
+ public static File[] buildExternalStorageAndroidDataDirs() {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAndroidDataDir();
+ return sCurrentUser.buildExternalStorageAndroidDataDirs();
}
-
+
/**
* Generates the raw path to an application's data
* @hide
*/
- public static File getExternalStorageAppDataDirectory(String packageName) {
+ public static File[] buildExternalStorageAppDataDirs(String packageName) {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAppDataDirectory(packageName);
+ return sCurrentUser.buildExternalStorageAppDataDirs(packageName);
}
/**
* Generates the raw path to an application's media
* @hide
*/
- public static File getExternalStorageAppMediaDirectory(String packageName) {
+ public static File[] buildExternalStorageAppMediaDirs(String packageName) {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAppMediaDirectory(packageName);
+ return sCurrentUser.buildExternalStorageAppMediaDirs(packageName);
}
/**
* Generates the raw path to an application's OBB files
* @hide
*/
- public static File getExternalStorageAppObbDirectory(String packageName) {
+ public static File[] buildExternalStorageAppObbDirs(String packageName) {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAppObbDirectory(packageName);
+ return sCurrentUser.buildExternalStorageAppObbDirs(packageName);
}
/**
* Generates the path to an application's files.
* @hide
*/
- public static File getExternalStorageAppFilesDirectory(String packageName) {
+ public static File[] buildExternalStorageAppFilesDirs(String packageName) {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAppFilesDirectory(packageName);
+ return sCurrentUser.buildExternalStorageAppFilesDirs(packageName);
}
/**
* Generates the path to an application's cache.
* @hide
*/
- public static File getExternalStorageAppCacheDirectory(String packageName) {
+ public static File[] buildExternalStorageAppCacheDirs(String packageName) {
throwIfUserRequired();
- return sCurrentUser.getExternalStorageAppCacheDirectory(packageName);
+ return sCurrentUser.buildExternalStorageAppCacheDirs(packageName);
}
/**
- * Gets the Android download/cache content directory.
+ * Return the download/cache content directory.
*/
public static File getDownloadCacheDirectory() {
return DOWNLOAD_CACHE_DIRECTORY;
}
/**
- * {@link #getExternalStorageState()} returns MEDIA_REMOVED if the media is not present.
+ * Unknown storage state, such as when a path isn't backed by known storage
+ * media.
+ *
+ * @see #getStorageState(File)
+ */
+ public static final String MEDIA_UNKNOWN = "unknown";
+
+ /**
+ * Storage state if the media is not present.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_REMOVED = "removed";
-
+
/**
- * {@link #getExternalStorageState()} returns MEDIA_UNMOUNTED if the media is present
- * but not mounted.
+ * Storage state if the media is present but not mounted.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_UNMOUNTED = "unmounted";
/**
- * {@link #getExternalStorageState()} returns MEDIA_CHECKING if the media is present
- * and being disk-checked
+ * Storage state if the media is present and being disk-checked.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_CHECKING = "checking";
/**
- * {@link #getExternalStorageState()} returns MEDIA_NOFS if the media is present
- * but is blank or is using an unsupported filesystem
+ * Storage state if the media is present but is blank or is using an
+ * unsupported filesystem.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_NOFS = "nofs";
/**
- * {@link #getExternalStorageState()} returns MEDIA_MOUNTED if the media is present
- * and mounted at its mount point with read/write access.
+ * Storage state if the media is present and mounted at its mount point with
+ * read/write access.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_MOUNTED = "mounted";
/**
- * {@link #getExternalStorageState()} returns MEDIA_MOUNTED_READ_ONLY if the media is present
- * and mounted at its mount point with read only access.
+ * Storage state if the media is present and mounted at its mount point with
+ * read-only access.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_MOUNTED_READ_ONLY = "mounted_ro";
/**
- * {@link #getExternalStorageState()} returns MEDIA_SHARED if the media is present
- * not mounted, and shared via USB mass storage.
+ * Storage state if the media is present not mounted, and shared via USB
+ * mass storage.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_SHARED = "shared";
/**
- * {@link #getExternalStorageState()} returns MEDIA_BAD_REMOVAL if the media was
- * removed before it was unmounted.
+ * Storage state if the media was removed before it was unmounted.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_BAD_REMOVAL = "bad_removal";
/**
- * {@link #getExternalStorageState()} returns MEDIA_UNMOUNTABLE if the media is present
- * but cannot be mounted. Typically this happens if the file system on the
- * media is corrupted.
+ * Storage state if the media is present but cannot be mounted. Typically
+ * this happens if the file system on the media is corrupted.
+ *
+ * @see #getStorageState(File)
*/
public static final String MEDIA_UNMOUNTABLE = "unmountable";
/**
- * Gets the current state of the primary "external" storage device.
+ * Returns the current state of the primary "external" storage device.
*
* @see #getExternalStorageDirectory()
+ * @return one of {@link #MEDIA_UNKNOWN}, {@link #MEDIA_REMOVED},
+ * {@link #MEDIA_UNMOUNTED}, {@link #MEDIA_CHECKING},
+ * {@link #MEDIA_NOFS}, {@link #MEDIA_MOUNTED},
+ * {@link #MEDIA_MOUNTED_READ_ONLY}, {@link #MEDIA_SHARED},
+ * {@link #MEDIA_BAD_REMOVAL}, or {@link #MEDIA_UNMOUNTABLE}.
*/
public static String getExternalStorageState() {
+ return getStorageState(getExternalStorageDirectory());
+ }
+
+ /**
+ * Returns the current state of the storage device that provides the given
+ * path.
+ *
+ * @return one of {@link #MEDIA_UNKNOWN}, {@link #MEDIA_REMOVED},
+ * {@link #MEDIA_UNMOUNTED}, {@link #MEDIA_CHECKING},
+ * {@link #MEDIA_NOFS}, {@link #MEDIA_MOUNTED},
+ * {@link #MEDIA_MOUNTED_READ_ONLY}, {@link #MEDIA_SHARED},
+ * {@link #MEDIA_BAD_REMOVAL}, or {@link #MEDIA_UNMOUNTABLE}.
+ */
+ public static String getStorageState(File path) {
+ final String rawPath;
try {
- IMountService mountService = IMountService.Stub.asInterface(ServiceManager
- .getService("mount"));
- final StorageVolume primary = getPrimaryVolume();
- return mountService.getVolumeState(primary.getPath());
- } catch (RemoteException rex) {
- Log.w(TAG, "Failed to read external storage state; assuming REMOVED: " + rex);
- return Environment.MEDIA_REMOVED;
+ rawPath = path.getCanonicalPath();
+ } catch (IOException e) {
+ Log.w(TAG, "Failed to resolve target path: " + e);
+ return Environment.MEDIA_UNKNOWN;
}
+
+ try {
+ final IMountService mountService = IMountService.Stub.asInterface(
+ ServiceManager.getService("mount"));
+ final StorageVolume[] volumes = mountService.getVolumeList();
+ for (StorageVolume volume : volumes) {
+ if (rawPath.startsWith(volume.getPath())) {
+ return mountService.getVolumeState(volume.getPath());
+ }
+ }
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed to find external storage state: " + e);
+ }
+ return Environment.MEDIA_UNKNOWN;
}
/**
@@ -668,7 +741,25 @@
}
}
- private static File buildPath(File base, String... segments) {
+ /**
+ * Append path segments to each given base path, returning result.
+ *
+ * @hide
+ */
+ public static File[] buildPaths(File[] base, String... segments) {
+ File[] result = new File[base.length];
+ for (int i = 0; i < base.length; i++) {
+ result[i] = buildPath(base[i], segments);
+ }
+ return result;
+ }
+
+ /**
+ * Append path segments to given base path, returning result.
+ *
+ * @hide
+ */
+ public static File buildPath(File base, String... segments) {
File cur = base;
for (String segment : segments) {
if (cur == null) {
diff --git a/core/java/android/print/IPrintSpoolerClient.aidl b/core/java/android/print/IPrintSpoolerClient.aidl
index 46857e4..8db2169 100644
--- a/core/java/android/print/IPrintSpoolerClient.aidl
+++ b/core/java/android/print/IPrintSpoolerClient.aidl
@@ -17,7 +17,7 @@
package android.print;
import android.content.ComponentName;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrinterId;
import android.print.PrintJobInfo;
@@ -28,10 +28,8 @@
* @hide
*/
oneway interface IPrintSpoolerClient {
+ void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer);
void onPrintJobQueued(in PrintJobInfo printJob);
- void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer);
- void onStopPrinterDiscovery();
- void onRequestUpdatePrinters(in List<PrinterId> printerIds);
void onAllPrintJobsForServiceHandled(in ComponentName printService);
void onAllPrintJobsHandled();
}
diff --git a/core/java/android/print/IPrinterDiscoveryObserver.aidl b/core/java/android/print/IPrinterDiscoverySessionController.aidl
similarity index 70%
rename from core/java/android/print/IPrinterDiscoveryObserver.aidl
rename to core/java/android/print/IPrinterDiscoverySessionController.aidl
index deabbcb..13116ef 100644
--- a/core/java/android/print/IPrinterDiscoveryObserver.aidl
+++ b/core/java/android/print/IPrinterDiscoverySessionController.aidl
@@ -17,15 +17,14 @@
package android.print;
import android.print.PrinterId;
-import android.print.PrinterInfo;
/**
- * Interface for observing printer discovery.
+* Interface for the controlling part of a printer discovery session.
*
* @hide
*/
-oneway interface IPrinterDiscoveryObserver {
- void onPrintersAdded(in List<PrinterInfo> printers);
- void onPrintersRemoved(in List<PrinterId> printers);
- void onPrintersUpdated(in List<PrinterInfo> printers);
+oneway interface IPrinterDiscoverySessionController {
+ void open(in List<PrinterId> priorityList);
+ void requestPrinterUpdate(in PrinterId printerId);
+ void close();
}
diff --git a/core/java/android/print/IPrinterDiscoveryObserver.aidl b/core/java/android/print/IPrinterDiscoverySessionObserver.aidl
similarity index 68%
copy from core/java/android/print/IPrinterDiscoveryObserver.aidl
copy to core/java/android/print/IPrinterDiscoverySessionObserver.aidl
index deabbcb..a78924c 100644
--- a/core/java/android/print/IPrinterDiscoveryObserver.aidl
+++ b/core/java/android/print/IPrinterDiscoverySessionObserver.aidl
@@ -16,16 +16,18 @@
package android.print;
+import android.print.IPrinterDiscoverySessionController;
import android.print.PrinterId;
import android.print.PrinterInfo;
/**
- * Interface for observing printer discovery.
+ * Interface for the observing part of a printer discovery session.
*
* @hide
*/
-oneway interface IPrinterDiscoveryObserver {
+oneway interface IPrinterDiscoverySessionObserver {
+ void setController(IPrinterDiscoverySessionController controller);
void onPrintersAdded(in List<PrinterInfo> printers);
- void onPrintersRemoved(in List<PrinterId> printers);
- void onPrintersUpdated(in List<PrinterInfo> printers);
+ void onPrintersRemoved(in List<PrinterId> printerIds);
+ void onPrintersUpdated(in List<PrinterInfo> printerIds);
}
diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java
index 911e380..a902c72 100644
--- a/core/java/android/print/PrintAttributes.java
+++ b/core/java/android/print/PrintAttributes.java
@@ -931,7 +931,7 @@
}
private final String mId;
- private final CharSequence mLabel;
+ private final String mLabel;
private final int mWidthMils;
private final int mHeightMils;
@@ -948,7 +948,7 @@
* @throws IllegalArgumentException If the widthMils is less than or equal to zero.
* @throws IllegalArgumentException If the heightMils is less than or equal to zero.
*/
- public MediaSize(String id, CharSequence label, int widthMils, int heightMils) {
+ public MediaSize(String id, String label, int widthMils, int heightMils) {
if (TextUtils.isEmpty(id)) {
throw new IllegalArgumentException("id cannot be empty.");
}
@@ -983,7 +983,7 @@
*
* @return The human readable label.
*/
- public CharSequence getLabel() {
+ public String getLabel() {
return mLabel;
}
@@ -1007,7 +1007,7 @@
void writeToParcel(Parcel parcel) {
parcel.writeString(mId);
- parcel.writeCharSequence(mLabel);
+ parcel.writeString(mLabel);
parcel.writeInt(mWidthMils);
parcel.writeInt(mHeightMils);
}
@@ -1015,7 +1015,7 @@
static MediaSize createFromParcel(Parcel parcel) {
return new MediaSize(
parcel.readString(),
- parcel.readCharSequence(),
+ parcel.readString(),
parcel.readInt(),
parcel.readInt());
}
@@ -1076,7 +1076,7 @@
*/
public static final class Resolution {
private final String mId;
- private final CharSequence mLabel;
+ private final String mLabel;
private final int mHorizontalDpi;
private final int mVerticalDpi;
@@ -1093,7 +1093,7 @@
* @throws IllegalArgumentException If the horizontalDpi is less than or equal to zero.
* @throws IllegalArgumentException If the verticalDpi is less than or equal to zero.
*/
- public Resolution(String id, CharSequence label, int horizontalDpi, int verticalDpi) {
+ public Resolution(String id, String label, int horizontalDpi, int verticalDpi) {
if (TextUtils.isEmpty(id)) {
throw new IllegalArgumentException("id cannot be empty.");
}
@@ -1128,7 +1128,7 @@
*
* @return The human readable label.
*/
- public CharSequence getLabel() {
+ public String getLabel() {
return mLabel;
}
@@ -1152,7 +1152,7 @@
void writeToParcel(Parcel parcel) {
parcel.writeString(mId);
- parcel.writeCharSequence(mLabel);
+ parcel.writeString(mLabel);
parcel.writeInt(mHorizontalDpi);
parcel.writeInt(mVerticalDpi);
}
@@ -1160,7 +1160,7 @@
static Resolution createFromParcel(Parcel parcel) {
return new Resolution(
parcel.readString(),
- parcel.readCharSequence(),
+ parcel.readString(),
parcel.readInt(),
parcel.readInt());
}
@@ -1364,7 +1364,7 @@
*/
public static final class Tray {
private final String mId;
- private final CharSequence mLabel;
+ private final String mLabel;
/**
* Creates a new instance.
@@ -1375,7 +1375,7 @@
* @throws IllegalArgumentException If the id is empty.
* @throws IllegalArgumentException If the label is empty.
*/
- public Tray(String id, CharSequence label) {
+ public Tray(String id, String label) {
if (TextUtils.isEmpty(id)) {
throw new IllegalArgumentException("id cannot be empty.");
}
@@ -1400,19 +1400,19 @@
*
* @return The human readable label.
*/
- public CharSequence getLabel() {
+ public String getLabel() {
return mLabel;
}
void writeToParcel(Parcel parcel) {
parcel.writeString(mId);
- parcel.writeCharSequence(mLabel);
+ parcel.writeString(mLabel);
}
static Tray createFromParcel(Parcel parcel) {
return new Tray(
parcel.readString(),
- parcel.readCharSequence());
+ parcel.readString());
}
@Override
@@ -1457,7 +1457,7 @@
}
}
- private static String duplexModeToString(int duplexMode) {
+ static String duplexModeToString(int duplexMode) {
switch (duplexMode) {
case DUPLEX_MODE_NONE: {
return "DUPLEX_MODE_NONE";
@@ -1473,7 +1473,7 @@
}
}
- private static String colorModeToString(int colorMode) {
+ static String colorModeToString(int colorMode) {
switch (colorMode) {
case COLOR_MODE_MONOCHROME: {
return "COLOR_MODE_MONOCHROME";
@@ -1486,7 +1486,7 @@
}
}
- private static String orientationToString(int orientation) {
+ static String orientationToString(int orientation) {
switch (orientation) {
case ORIENTATION_PORTRAIT: {
return "ORIENTATION_PORTRAIT";
@@ -1499,7 +1499,7 @@
}
}
- private static String fittingModeToString(int fittingMode) {
+ static String fittingModeToString(int fittingMode) {
switch (fittingMode) {
case FITTING_MODE_NONE: {
return "FITTING_MODE_NONE";
diff --git a/core/java/android/print/PrintDocumentInfo.java b/core/java/android/print/PrintDocumentInfo.java
index 29e8e7c..653ad4b 100644
--- a/core/java/android/print/PrintDocumentInfo.java
+++ b/core/java/android/print/PrintDocumentInfo.java
@@ -18,6 +18,7 @@
import android.os.Parcel;
import android.os.Parcelable;
+import android.text.TextUtils;
/**
* This class encapsulates information about a printed document.
@@ -44,6 +45,7 @@
*/
public static final int CONTENT_TYPE_PHOTO = 1;
+ private String mName;
private int mPageCount;
private int mContentType;
@@ -61,6 +63,7 @@
* @param Prototype from which to clone.
*/
private PrintDocumentInfo(PrintDocumentInfo prototype) {
+ mName = prototype.mName;
mPageCount = prototype.mPageCount;
mContentType = prototype.mContentType;
}
@@ -71,11 +74,21 @@
* @param parcel Data from which to initialize.
*/
private PrintDocumentInfo(Parcel parcel) {
+ mName = parcel.readString();
mPageCount = parcel.readInt();
mContentType = parcel.readInt();
}
/**
+ * Gets the document name.
+ *
+ * @return The document name.
+ */
+ public String getName() {
+ return mName;
+ }
+
+ /**
* Gets the total number of pages.
*
* @return The number of pages.
@@ -106,6 +119,7 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
+ parcel.writeString(mName);
parcel.writeInt(mPageCount);
parcel.writeInt(mContentType);
}
@@ -114,6 +128,7 @@
public int hashCode() {
final int prime = 31;
int result = 1;
+ result = prime * result + ((mName != null) ? mName.hashCode() : 0);
result = prime * result + mContentType;
result = prime * result + mPageCount;
return result;
@@ -131,6 +146,9 @@
return false;
}
PrintDocumentInfo other = (PrintDocumentInfo) obj;
+ if (!TextUtils.equals(mName, other.mName)) {
+ return false;
+ }
if (mContentType != other.mContentType) {
return false;
}
@@ -144,17 +162,47 @@
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PrintDocumentInfo{");
- builder.append("pageCount: ").append(mPageCount);
- builder.append(", contentType: ").append(mContentType);
+ builder.append("name=").append(mName);
+ builder.append(", pageCount=").append(mPageCount);
+ builder.append(", contentType=").append(contentTyepToString(mContentType));
builder.append("}");
return builder.toString();
}
+ private String contentTyepToString(int contentType) {
+ switch (contentType) {
+ case CONTENT_TYPE_DOCUMENT: {
+ return "CONTENT_TYPE_DOCUMENT";
+ }
+ case CONTENT_TYPE_PHOTO: {
+ return "CONTENT_TYPE_PHOTO";
+ }
+ default: {
+ return "CONTENT_TYPE_UNKNOWN";
+ }
+ }
+ }
+
/**
* Builder for creating an {@link PrintDocumentInfo}.
*/
public static final class Builder {
- private final PrintDocumentInfo mPrototype = new PrintDocumentInfo();
+ private final PrintDocumentInfo mPrototype;
+
+ /**
+ * Constructor.
+ *
+ * @param name The document name. Cannot be empty.
+ *
+ * @throws IllegalArgumentException If the name is empty.
+ */
+ public Builder(String name) {
+ if (TextUtils.isEmpty(name)) {
+ throw new IllegalArgumentException("name cannot be empty");
+ }
+ mPrototype = new PrintDocumentInfo();
+ mPrototype.mName = name;
+ }
/**
* Sets the total number of pages.
diff --git a/core/java/android/print/FileDocumentAdapter.java b/core/java/android/print/PrintFileDocumentAdapter.java
similarity index 81%
rename from core/java/android/print/FileDocumentAdapter.java
rename to core/java/android/print/PrintFileDocumentAdapter.java
index d642a61..dbc8b6f 100644
--- a/core/java/android/print/FileDocumentAdapter.java
+++ b/core/java/android/print/PrintFileDocumentAdapter.java
@@ -36,34 +36,48 @@
import java.io.OutputStream;
/**
- * Adapter for printing files.
+ * Adapter for printing files. This class could be useful if you
+ * want to print a file and intercept when the system is ready
+ * spooling the data, so you can deleted the file if it is a
+ * temporary one.
*/
-final class FileDocumentAdapter extends PrintDocumentAdapter {
+public class PrintFileDocumentAdapter extends PrintDocumentAdapter {
- private static final String LOG_TAG = "FileDocumentAdapter";
+ private static final String LOG_TAG = "PrintedFileDocumentAdapter";
private final Context mContext;
private final File mFile;
+ private final PrintDocumentInfo mDocumentInfo;
+
private WriteFileAsyncTask mWriteFileAsyncTask;
- public FileDocumentAdapter(Context context, File file) {
+ /**
+ * Constructor.
+ *
+ * @param context Context for accessing resources.
+ * @param file The file to print.
+ * @param documentInfo The information about the printed file.
+ */
+ public PrintFileDocumentAdapter(Context context, File file,
+ PrintDocumentInfo documentInfo) {
if (file == null) {
throw new IllegalArgumentException("File cannot be null!");
}
+ if (documentInfo == null) {
+ throw new IllegalArgumentException("documentInfo cannot be null!");
+ }
mContext = context;
mFile = file;
+ mDocumentInfo = documentInfo;
}
@Override
public void onLayout(PrintAttributes oldAttributes, PrintAttributes newAttributes,
CancellationSignal cancellationSignal, LayoutResultCallback callback,
Bundle metadata) {
- // TODO: When we have a PDF rendering library we should query the page count.
- PrintDocumentInfo info = new PrintDocumentInfo.Builder()
- .setPageCount(PrintDocumentInfo.PAGE_COUNT_UNKNOWN).create();
- callback.onLayoutFinished(info, false);
+ callback.onLayoutFinished(mDocumentInfo, false);
}
@Override
diff --git a/core/java/android/print/PrintJobInfo.java b/core/java/android/print/PrintJobInfo.java
index 096dcd5..2fb4751 100644
--- a/core/java/android/print/PrintJobInfo.java
+++ b/core/java/android/print/PrintJobInfo.java
@@ -109,6 +109,9 @@
/** The unique id of the printer. */
private PrinterId mPrinterId;
+ /** The name of the printer - internally used */
+ private String mPrinterName;
+
/** The status of the print job. */
private int mState;
@@ -146,6 +149,7 @@
mId = other.mId;
mLabel = other.mLabel;
mPrinterId = other.mPrinterId;
+ mPrinterName = other.mPrinterName;
mState = other.mState;
mAppId = other.mAppId;
mUserId = other.mUserId;
@@ -161,6 +165,7 @@
mId = parcel.readInt();
mLabel = parcel.readCharSequence();
mPrinterId = parcel.readParcelable(null);
+ mPrinterName = parcel.readString();
mState = parcel.readInt();
mAppId = parcel.readInt();
mUserId = parcel.readInt();
@@ -245,6 +250,28 @@
}
/**
+ * Gets the name of the target printer.
+ *
+ * @return The printer name.
+ *
+ * @hide
+ */
+ public String getPrinterName() {
+ return mPrinterName;
+ }
+
+ /**
+ * Sets the name of the target printer.
+ *
+ * @param printerName The printer name.
+ *
+ * @hide
+ */
+ public void setPrinterName(String printerName) {
+ mPrinterName = printerName;
+ }
+
+ /**
* Gets the current job state.
*
* @return The job state.
@@ -445,6 +472,7 @@
parcel.writeInt(mId);
parcel.writeCharSequence(mLabel);
parcel.writeParcelable(mPrinterId, flags);
+ parcel.writeString(mPrinterName);
parcel.writeInt(mState);
parcel.writeInt(mAppId);
parcel.writeInt(mUserId);
diff --git a/core/java/android/print/PrintManager.java b/core/java/android/print/PrintManager.java
index c067661..636b9d4 100644
--- a/core/java/android/print/PrintManager.java
+++ b/core/java/android/print/PrintManager.java
@@ -161,13 +161,16 @@
*
* @param printJobName A name for the new print job.
* @param pdfFile The PDF file to print.
+ * @param documentInfo Information about the printed document.
* @param attributes The default print job attributes.
* @return The created print job.
*
* @see PrintJob
*/
- public PrintJob print(String printJobName, File pdfFile, PrintAttributes attributes) {
- FileDocumentAdapter documentAdapter = new FileDocumentAdapter(mContext, pdfFile);
+ public PrintJob print(String printJobName, File pdfFile, PrintDocumentInfo documentInfo,
+ PrintAttributes attributes) {
+ PrintFileDocumentAdapter documentAdapter = new PrintFileDocumentAdapter(
+ mContext, pdfFile, documentInfo);
return print(printJobName, documentAdapter, attributes);
}
diff --git a/core/java/android/print/PrinterCapabilitiesInfo.aidl b/core/java/android/print/PrinterCapabilitiesInfo.aidl
new file mode 100644
index 0000000..0f5fb6b
--- /dev/null
+++ b/core/java/android/print/PrinterCapabilitiesInfo.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 2013, 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 android.print;
+
+parcelable PrinterCapabilitiesInfo;
diff --git a/core/java/android/print/PrinterCapabilitiesInfo.java b/core/java/android/print/PrinterCapabilitiesInfo.java
new file mode 100644
index 0000000..70b418c
--- /dev/null
+++ b/core/java/android/print/PrinterCapabilitiesInfo.java
@@ -0,0 +1,972 @@
+/*
+ * Copyright (C) 2013 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 android.print;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.print.PrintAttributes.Margins;
+import android.print.PrintAttributes.MediaSize;
+import android.print.PrintAttributes.Resolution;
+import android.print.PrintAttributes.Tray;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This class represents the capabilities of a printer.
+ */
+public final class PrinterCapabilitiesInfo implements Parcelable {
+ /**
+ * Undefined default value.
+ *
+ * @hide
+ */
+ public static final int DEFAULT_UNDEFINED = -1;
+
+ private static final int PROPERTY_MEDIA_SIZE = 0;
+ private static final int PROPERTY_RESOLUTION = 1;
+ private static final int PROPERTY_INPUT_TRAY = 2;
+ private static final int PROPERTY_OUTPUT_TRAY = 3;
+ private static final int PROPERTY_DUPLEX_MODE = 4;
+ private static final int PROPERTY_COLOR_MODE = 5;
+ private static final int PROPERTY_FITTING_MODE = 6;
+ private static final int PROPERTY_ORIENTATION = 7;
+ private static final int PROPERTY_COUNT = 8;
+
+ private static final Margins DEFAULT_MARGINS = new Margins(0, 0, 0, 0);
+
+ private Margins mMinMargins = DEFAULT_MARGINS;
+ private List<MediaSize> mMediaSizes;
+ private List<Resolution> mResolutions;
+ private List<Tray> mInputTrays;
+ private List<Tray> mOutputTrays;
+
+ private int mDuplexModes;
+ private int mColorModes;
+ private int mFittingModes;
+ private int mOrientations;
+
+ private final int[] mDefaults = new int[PROPERTY_COUNT];
+ private Margins mDefaultMargins = DEFAULT_MARGINS;
+
+ /**
+ * @hide
+ */
+ public PrinterCapabilitiesInfo() {
+ Arrays.fill(mDefaults, DEFAULT_UNDEFINED);
+ }
+
+ /**
+ * @hide
+ */
+ public PrinterCapabilitiesInfo(PrinterCapabilitiesInfo prototype) {
+ copyFrom(prototype);
+ }
+
+ /**
+ * @hide
+ */
+ public void copyFrom(PrinterCapabilitiesInfo other) {
+ mMinMargins = other.mMinMargins;
+
+ if (other.mMediaSizes != null) {
+ if (mMediaSizes != null) {
+ mMediaSizes.clear();
+ mMediaSizes.addAll(other.mMediaSizes);
+ } else {
+ mMediaSizes = new ArrayList<MediaSize>(other.mMediaSizes);
+ }
+ } else {
+ mMediaSizes = null;
+ }
+
+ if (other.mResolutions != null) {
+ if (mResolutions != null) {
+ mResolutions.clear();
+ mResolutions.addAll(other.mResolutions);
+ } else {
+ mResolutions = new ArrayList<Resolution>(other.mResolutions);
+ }
+ } else {
+ mResolutions = null;
+ }
+
+ if (other.mInputTrays != null) {
+ if (mInputTrays != null) {
+ mInputTrays.clear();
+ mInputTrays.addAll(other.mInputTrays);
+ } else {
+ mInputTrays = new ArrayList<Tray>(other.mInputTrays);
+ }
+ } else {
+ mInputTrays = null;
+ }
+
+ if (other.mOutputTrays != null) {
+ if (mOutputTrays != null) {
+ mOutputTrays.clear();
+ mOutputTrays.addAll(other.mOutputTrays);
+ } else {
+ mOutputTrays = new ArrayList<Tray>(other.mOutputTrays);
+ }
+ } else {
+ mOutputTrays = null;
+ }
+
+ mDuplexModes = other.mDuplexModes;
+ mColorModes = other.mColorModes;
+ mFittingModes = other.mFittingModes;
+ mOrientations = other.mOrientations;
+
+ final int defaultCount = other.mDefaults.length;
+ for (int i = 0; i < defaultCount; i++) {
+ mDefaults[i] = other.mDefaults[i];
+ }
+
+ mDefaultMargins = other.mDefaultMargins;
+ }
+
+ /**
+ * Gets the supported media sizes.
+ *
+ * @return The media sizes.
+ */
+ public List<MediaSize> getMediaSizes() {
+ return mMediaSizes;
+ }
+
+ /**
+ * Gets the supported resolutions.
+ *
+ * @return The resolutions.
+ */
+ public List<Resolution> getResolutions() {
+ return mResolutions;
+ }
+
+ /**
+ * Gets the minimal supported margins.
+ *
+ * @return The minimal margins.
+ */
+ public Margins getMinMargins() {
+ return mMinMargins;
+ }
+
+ /**
+ * Gets the available input trays.
+ *
+ * @return The input trays.
+ */
+ public List<Tray> getInputTrays() {
+ return mInputTrays;
+ }
+
+ /**
+ * Gets the available output trays.
+ *
+ * @return The output trays.
+ */
+ public List<Tray> getOutputTrays() {
+ return mOutputTrays;
+ }
+
+ /**
+ * Gets the supported duplex modes.
+ *
+ * @return The duplex modes.
+ *
+ * @see PrintAttributes#DUPLEX_MODE_NONE
+ * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
+ * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
+ */
+ public int getDuplexModes() {
+ return mDuplexModes;
+ }
+
+ /**
+ * Gets the supported color modes.
+ *
+ * @return The color modes.
+ *
+ * @see PrintAttributes#COLOR_MODE_COLOR
+ * @see PrintAttributes#COLOR_MODE_MONOCHROME
+ */
+ public int getColorModes() {
+ return mColorModes;
+ }
+
+ /**
+ * Gets the supported fitting modes.
+ *
+ * @return The fitting modes.
+ *
+ * @see PrintAttributes#FITTING_MODE_NONE
+ * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
+ */
+ public int getFittingModes() {
+ return mFittingModes;
+ }
+
+ /**
+ * Gets the supported orientations.
+ *
+ * @return The orientations.
+ *
+ * @see PrintAttributes#ORIENTATION_PORTRAIT
+ * @see PrintAttributes#ORIENTATION_LANDSCAPE
+ */
+ public int getOrientations() {
+ return mOrientations;
+ }
+
+ /**
+ * Gets the default print attributes.
+ *
+ * @param outAttributes The attributes to populated.
+ */
+ public void getDefaults(PrintAttributes outAttributes) {
+ outAttributes.clear();
+
+ outAttributes.setMargins(mDefaultMargins);
+
+ final int mediaSizeIndex = mDefaults[PROPERTY_MEDIA_SIZE];
+ if (mediaSizeIndex >= 0) {
+ outAttributes.setMediaSize(mMediaSizes.get(mediaSizeIndex));
+ }
+
+ final int resolutionIndex = mDefaults[PROPERTY_RESOLUTION];
+ if (resolutionIndex >= 0) {
+ outAttributes.setResolution(mResolutions.get(resolutionIndex));
+ }
+
+ final int inputTrayIndex = mDefaults[PROPERTY_INPUT_TRAY];
+ if (inputTrayIndex >= 0) {
+ outAttributes.setInputTray(mInputTrays.get(inputTrayIndex));
+ }
+
+ final int outputTrayIndex = mDefaults[PROPERTY_OUTPUT_TRAY];
+ if (outputTrayIndex >= 0) {
+ outAttributes.setOutputTray(mOutputTrays.get(outputTrayIndex));
+ }
+
+ final int duplexMode = mDefaults[PROPERTY_DUPLEX_MODE];
+ if (duplexMode > 0) {
+ outAttributes.setDuplexMode(duplexMode);
+ }
+
+ final int colorMode = mDefaults[PROPERTY_COLOR_MODE];
+ if (colorMode > 0) {
+ outAttributes.setColorMode(colorMode);
+ }
+
+ final int fittingMode = mDefaults[PROPERTY_FITTING_MODE];
+ if (fittingMode > 0) {
+ outAttributes.setFittingMode(fittingMode);
+ }
+
+ final int orientation = mDefaults[PROPERTY_ORIENTATION];
+ if (orientation > 0) {
+ outAttributes.setOrientation(orientation);
+ }
+ }
+
+ private PrinterCapabilitiesInfo(Parcel parcel) {
+ mMinMargins = readMargins(parcel);
+ readMediaSizes(parcel);
+ readResolutions(parcel);
+ mInputTrays = readInputTrays(parcel);
+ mOutputTrays = readOutputTrays(parcel);
+
+ mColorModes = parcel.readInt();
+ mDuplexModes = parcel.readInt();
+ mFittingModes = parcel.readInt();
+ mOrientations = parcel.readInt();
+
+ readDefaults(parcel);
+ mDefaultMargins = readMargins(parcel);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel parcel, int flags) {
+ writeMargins(mMinMargins, parcel);
+ writeMediaSizes(parcel);
+ writeResolutions(parcel);
+ writeInputTrays(parcel);
+ writeOutputTrays(parcel);
+
+ parcel.writeInt(mColorModes);
+ parcel.writeInt(mDuplexModes);
+ parcel.writeInt(mFittingModes);
+ parcel.writeInt(mOrientations);
+
+ writeDefaults(parcel);
+ writeMargins(mDefaultMargins, parcel);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((mMinMargins == null) ? 0 : mMinMargins.hashCode());
+ result = prime * result + ((mMediaSizes == null) ? 0 : mMediaSizes.hashCode());
+ result = prime * result + ((mResolutions == null) ? 0 : mResolutions.hashCode());
+ result = prime * result + ((mInputTrays == null) ? 0 : mInputTrays.hashCode());
+ result = prime * result + ((mOutputTrays == null) ? 0 : mOutputTrays.hashCode());
+ result = prime * result + mColorModes;
+ result = prime * result + mDuplexModes;
+ result = prime * result + mFittingModes;
+ result = prime * result + mOrientations;
+ result = prime * result + Arrays.hashCode(mDefaults);
+ result = prime * result + ((mDefaultMargins == null) ? 0 : mDefaultMargins.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ PrinterCapabilitiesInfo other = (PrinterCapabilitiesInfo) obj;
+ if (mMinMargins == null) {
+ if (other.mMinMargins != null) {
+ return false;
+ }
+ } else if (!mMinMargins.equals(other.mMinMargins)) {
+ return false;
+ }
+ if (mMediaSizes == null) {
+ if (other.mMediaSizes != null) {
+ return false;
+ }
+ } else if (!mMediaSizes.equals(other.mMediaSizes)) {
+ return false;
+ }
+ if (mResolutions == null) {
+ if (other.mResolutions != null) {
+ return false;
+ }
+ } else if (!mResolutions.equals(other.mResolutions)) {
+ return false;
+ }
+ if (mInputTrays == null) {
+ if (other.mInputTrays != null) {
+ return false;
+ }
+ } else if (!mInputTrays.equals(other.mInputTrays)) {
+ return false;
+ }
+ if (mOutputTrays == null) {
+ if (other.mOutputTrays != null) {
+ return false;
+ }
+ } else if (!mOutputTrays.equals(other.mOutputTrays)) {
+ return false;
+ }
+ if (mDuplexModes != other.mDuplexModes) {
+ return false;
+ }
+ if (mColorModes != other.mColorModes) {
+ return false;
+ }
+ if (mFittingModes != other.mFittingModes) {
+ return false;
+ }
+ if (mOrientations != other.mOrientations) {
+ return false;
+ }
+ if (!Arrays.equals(mDefaults, other.mDefaults)) {
+ return false;
+ }
+ if (mDefaultMargins == null) {
+ if (other.mDefaultMargins != null) {
+ return false;
+ }
+ } else if (!mDefaultMargins.equals(other.mDefaultMargins)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("PrinterInfo{");
+ builder.append("minMargins=").append(mMinMargins);
+ builder.append(", mediaSizes=").append(mMediaSizes);
+ builder.append(", resolutions=").append(mResolutions);
+ builder.append(", inputTrays=").append(mInputTrays);
+ builder.append(", outputTrays=").append(mOutputTrays);
+ builder.append(", duplexModes=").append(duplexModesToString());
+ builder.append(", colorModes=").append(colorModesToString());
+ builder.append(", fittingModes=").append(fittingModesToString());
+ builder.append(", orientations=").append(orientationsToString());
+ builder.append("\"}");
+ return builder.toString();
+ }
+
+ private String duplexModesToString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('[');
+ int duplexModes = mDuplexModes;
+ while (duplexModes != 0) {
+ final int duplexMode = 1 << Integer.numberOfTrailingZeros(duplexModes);
+ duplexModes &= ~duplexMode;
+ if (builder.length() > 0) {
+ builder.append(", ");
+ }
+ builder.append(PrintAttributes.duplexModeToString(duplexMode));
+ }
+ builder.append(']');
+ return builder.toString();
+ }
+
+ private String colorModesToString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('[');
+ int colorModes = mColorModes;
+ while (colorModes != 0) {
+ final int colorMode = 1 << Integer.numberOfTrailingZeros(colorModes);
+ colorModes &= ~colorMode;
+ if (builder.length() > 0) {
+ builder.append(", ");
+ }
+ builder.append(PrintAttributes.colorModeToString(colorMode));
+ }
+ builder.append(']');
+ return builder.toString();
+ }
+
+ private String fittingModesToString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('[');
+ int fittingModes = mFittingModes;
+ while (fittingModes != 0) {
+ final int fittingMode = 1 << Integer.numberOfTrailingZeros(fittingModes);
+ fittingModes &= ~fittingMode;
+ if (builder.length() > 0) {
+ builder.append(", ");
+ }
+ builder.append(PrintAttributes.fittingModeToString(fittingMode));
+ }
+ builder.append(']');
+ return builder.toString();
+ }
+
+ private String orientationsToString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append('[');
+ int orientations = mOrientations;
+ while (orientations != 0) {
+ final int orientation = 1 << Integer.numberOfTrailingZeros(orientations);
+ orientations &= ~orientation;
+ if (builder.length() > 0) {
+ builder.append(", ");
+ }
+ builder.append(PrintAttributes.orientationToString(orientation));
+ }
+ builder.append(']');
+ return builder.toString();
+ }
+
+ private void writeMediaSizes(Parcel parcel) {
+ if (mMediaSizes == null) {
+ parcel.writeInt(0);
+ return;
+ }
+ final int mediaSizeCount = mMediaSizes.size();
+ parcel.writeInt(mediaSizeCount);
+ for (int i = 0; i < mediaSizeCount; i++) {
+ mMediaSizes.get(i).writeToParcel(parcel);
+ }
+ }
+
+ private void readMediaSizes(Parcel parcel) {
+ final int mediaSizeCount = parcel.readInt();
+ if (mediaSizeCount > 0 && mMediaSizes == null) {
+ mMediaSizes = new ArrayList<MediaSize>();
+ }
+ for (int i = 0; i < mediaSizeCount; i++) {
+ mMediaSizes.add(MediaSize.createFromParcel(parcel));
+ }
+ }
+
+ private void writeResolutions(Parcel parcel) {
+ if (mResolutions == null) {
+ parcel.writeInt(0);
+ return;
+ }
+ final int resolutionCount = mResolutions.size();
+ parcel.writeInt(resolutionCount);
+ for (int i = 0; i < resolutionCount; i++) {
+ mResolutions.get(i).writeToParcel(parcel);
+ }
+ }
+
+ private void readResolutions(Parcel parcel) {
+ final int resolutionCount = parcel.readInt();
+ if (resolutionCount > 0 && mResolutions == null) {
+ mResolutions = new ArrayList<Resolution>();
+ }
+ for (int i = 0; i < resolutionCount; i++) {
+ mResolutions.add(Resolution.createFromParcel(parcel));
+ }
+ }
+
+ private void writeMargins(Margins margins, Parcel parcel) {
+ if (margins == null) {
+ parcel.writeInt(0);
+ } else {
+ parcel.writeInt(1);
+ margins.writeToParcel(parcel);
+ }
+ }
+
+ private Margins readMargins(Parcel parcel) {
+ return (parcel.readInt() == 1) ? Margins.createFromParcel(parcel) : null;
+ }
+
+ private void writeInputTrays(Parcel parcel) {
+ if (mInputTrays == null) {
+ parcel.writeInt(0);
+ return;
+ }
+ final int inputTrayCount = mInputTrays.size();
+ parcel.writeInt(inputTrayCount);
+ for (int i = 0; i < inputTrayCount; i++) {
+ mInputTrays.get(i).writeToParcel(parcel);
+ }
+ }
+
+ private List<Tray> readInputTrays(Parcel parcel) {
+ final int inputTrayCount = parcel.readInt();
+ if (inputTrayCount <= 0) {
+ return null;
+ }
+ List<Tray> inputTrays = new ArrayList<Tray>(inputTrayCount);
+ for (int i = 0; i < inputTrayCount; i++) {
+ inputTrays.add(Tray.createFromParcel(parcel));
+ }
+ return inputTrays;
+ }
+
+ private void writeOutputTrays(Parcel parcel) {
+ if (mOutputTrays == null) {
+ parcel.writeInt(0);
+ return;
+ }
+ final int outputTrayCount = mOutputTrays.size();
+ parcel.writeInt(outputTrayCount);
+ for (int i = 0; i < outputTrayCount; i++) {
+ mOutputTrays.get(i).writeToParcel(parcel);
+ }
+ }
+
+ private List<Tray> readOutputTrays(Parcel parcel) {
+ final int outputTrayCount = parcel.readInt();
+ if (outputTrayCount <= 0) {
+ return null;
+ }
+ List<Tray> outputTrays = new ArrayList<Tray>(outputTrayCount);
+ for (int i = 0; i < outputTrayCount; i++) {
+ outputTrays.add(Tray.createFromParcel(parcel));
+ }
+ return outputTrays;
+ }
+
+ private void readDefaults(Parcel parcel) {
+ final int defaultCount = parcel.readInt();
+ for (int i = 0; i < defaultCount; i++) {
+ mDefaults[i] = parcel.readInt();
+ }
+ }
+
+ private void writeDefaults(Parcel parcel) {
+ final int defaultCount = mDefaults.length;
+ parcel.writeInt(defaultCount);
+ for (int i = 0; i < defaultCount; i++) {
+ parcel.writeInt(mDefaults[i]);
+ }
+ }
+
+ /**
+ * Builder for creating of a {@link PrinterInfo}. This class is responsible
+ * to enforce that all required attributes have at least one default value.
+ * In other words, this class creates only well-formed {@link PrinterInfo}s.
+ * <p>
+ * Look at the individual methods for a reference whether a property is
+ * required or if it is optional.
+ * </p>
+ */
+ public static final class Builder {
+ private final PrinterCapabilitiesInfo mPrototype;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param printerId The printer id. Cannot be null.
+ *
+ * @throws IllegalArgumentException If the printer id is null.
+ */
+ public Builder(PrinterId printerId) {
+ if (printerId == null) {
+ throw new IllegalArgumentException("printerId cannot be null.");
+ }
+ mPrototype = new PrinterCapabilitiesInfo();
+ }
+
+ /**
+ * Adds a supported media size.
+ * <p>
+ * <strong>Required:</strong> Yes
+ * </p>
+ *
+ * @param mediaSize A media size.
+ * @param isDefault Whether this is the default.
+ * @return This builder.
+ * @throws IllegalArgumentException If set as default and there
+ * is already a default.
+ *
+ * @see PrintAttributes.MediaSize
+ */
+ public Builder addMediaSize(MediaSize mediaSize, boolean isDefault) {
+ if (mPrototype.mMediaSizes == null) {
+ mPrototype.mMediaSizes = new ArrayList<MediaSize>();
+ }
+ final int insertionIndex = mPrototype.mMediaSizes.size();
+ mPrototype.mMediaSizes.add(mediaSize);
+ if (isDefault) {
+ throwIfDefaultAlreadySpecified(PROPERTY_MEDIA_SIZE);
+ mPrototype.mDefaults[PROPERTY_MEDIA_SIZE] = insertionIndex;
+ }
+ return this;
+ }
+
+ /**
+ * Adds a supported resolution.
+ * <p>
+ * <strong>Required:</strong> Yes
+ * </p>
+ *
+ * @param resolution A resolution.
+ * @param isDefault Whether this is the default.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If set as default and there
+ * is already a default.
+ *
+ * @see PrintAttributes.Resolution
+ */
+ public Builder addResolution(Resolution resolution, boolean isDefault) {
+ if (mPrototype.mResolutions == null) {
+ mPrototype.mResolutions = new ArrayList<Resolution>();
+ }
+ final int insertionIndex = mPrototype.mResolutions.size();
+ mPrototype.mResolutions.add(resolution);
+ if (isDefault) {
+ throwIfDefaultAlreadySpecified(PROPERTY_RESOLUTION);
+ mPrototype.mDefaults[PROPERTY_RESOLUTION] = insertionIndex;
+ }
+ return this;
+ }
+
+ /**
+ * Sets the minimal margins.
+ * <p>
+ * <strong>Required:</strong> No
+ * </p>
+ *
+ * @param margins The margins.
+ * @param defaultMargins The default margins.
+ * @return This builder.
+ *
+ * @see PrintAttributes.Margins
+ */
+ public Builder setMinMargins(Margins margins, Margins defaultMargins) {
+ if (margins.getLeftMils() > defaultMargins.getLeftMils()
+ || margins.getTopMils() > defaultMargins.getTopMils()
+ || margins.getRightMils() < defaultMargins.getRightMils()
+ || margins.getBottomMils() < defaultMargins.getBottomMils()) {
+ throw new IllegalArgumentException("Default margins"
+ + " cannot be outside of the min margins.");
+ }
+ mPrototype.mMinMargins = margins;
+ mPrototype.mDefaultMargins = defaultMargins;
+ return this;
+ }
+
+ /**
+ * Adds an input tray.
+ * <p>
+ * <strong>Required:</strong> No
+ * </p>
+ *
+ * @param inputTray A tray.
+ * @param isDefault Whether this is the default.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If set as default and there
+ * is already a default.
+ *
+ * @see PrintAttributes.Tray
+ */
+ public Builder addInputTray(Tray inputTray, boolean isDefault) {
+ if (mPrototype.mInputTrays == null) {
+ mPrototype.mInputTrays = new ArrayList<Tray>();
+ }
+ final int insertionIndex = mPrototype.mInputTrays.size();
+ mPrototype.mInputTrays.add(inputTray);
+ if (isDefault) {
+ throwIfDefaultAlreadySpecified(PROPERTY_INPUT_TRAY);
+ mPrototype.mDefaults[PROPERTY_INPUT_TRAY] = insertionIndex;
+ }
+ return this;
+ }
+
+ /**
+ * Adds an output tray.
+ * <p>
+ * <strong>Required:</strong> No
+ * </p>
+ *
+ * @param outputTray A tray.
+ * @param isDefault Whether this is the default.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If set as default and there
+ * is already a default.
+ *
+ * @see PrintAttributes.Tray
+ */
+ public Builder addOutputTray(Tray outputTray, boolean isDefault) {
+ if (mPrototype.mOutputTrays == null) {
+ mPrototype.mOutputTrays = new ArrayList<Tray>();
+ }
+ final int insertionIndex = mPrototype.mOutputTrays.size();
+ mPrototype.mOutputTrays.add(outputTray);
+ if (isDefault) {
+ throwIfDefaultAlreadySpecified(PROPERTY_OUTPUT_TRAY);
+ mPrototype.mDefaults[PROPERTY_OUTPUT_TRAY] = insertionIndex;
+ }
+ return this;
+ }
+
+ /**
+ * Sets the color modes.
+ * <p>
+ * <strong>Required:</strong> Yes
+ * </p>
+ *
+ * @param colorModes The color mode bit mask.
+ * @param defaultColorMode The default color mode.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If color modes contains an invalid
+ * mode bit or if the default color mode is invalid.
+ *
+ * @see PrintAttributes#COLOR_MODE_COLOR
+ * @see PrintAttributes#COLOR_MODE_MONOCHROME
+ */
+ public Builder setColorModes(int colorModes, int defaultColorMode) {
+ int currentModes = colorModes;
+ while (currentModes > 0) {
+ final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+ currentModes &= ~currentMode;
+ PrintAttributes.enforceValidColorMode(currentMode);
+ }
+ if ((colorModes & defaultColorMode) == 0) {
+ throw new IllegalArgumentException("Default color mode not in color modes.");
+ }
+ PrintAttributes.enforceValidColorMode(colorModes);
+ mPrototype.mColorModes = colorModes;
+ mPrototype.mDefaults[PROPERTY_COLOR_MODE] = defaultColorMode;
+ return this;
+ }
+
+ /**
+ * Set the duplex modes.
+ * <p>
+ * <strong>Required:</strong> No
+ * </p>
+ *
+ * @param duplexModes The duplex mode bit mask.
+ * @param defaultDuplexMode The default duplex mode.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If duplex modes contains an invalid
+ * mode bit or if the default duplex mode is invalid.
+ *
+ * @see PrintAttributes#DUPLEX_MODE_NONE
+ * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
+ * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
+ */
+ public Builder setDuplexModes(int duplexModes, int defaultDuplexMode) {
+ int currentModes = duplexModes;
+ while (currentModes > 0) {
+ final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+ currentModes &= ~currentMode;
+ PrintAttributes.enforceValidDuplexMode(currentMode);
+ }
+ if ((duplexModes & defaultDuplexMode) == 0) {
+ throw new IllegalArgumentException("Default duplex mode not in duplex modes.");
+ }
+ PrintAttributes.enforceValidDuplexMode(defaultDuplexMode);
+ mPrototype.mDuplexModes = duplexModes;
+ mPrototype.mDefaults[PROPERTY_DUPLEX_MODE] = defaultDuplexMode;
+ return this;
+ }
+
+ /**
+ * Sets the fitting modes.
+ * <p>
+ * <strong>Required:</strong> No
+ * </p>
+ *
+ * @param fittingModes The fitting mode bit mask.
+ * @param defaultFittingMode The default fitting mode.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If fitting modes contains an invalid
+ * mode bit or if the default fitting mode is invalid.
+ *
+ * @see PrintAttributes#FITTING_MODE_NONE
+ * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
+ */
+ public Builder setFittingModes(int fittingModes, int defaultFittingMode) {
+ int currentModes = fittingModes;
+ while (currentModes > 0) {
+ final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+ currentModes &= ~currentMode;
+ PrintAttributes.enfoceValidFittingMode(currentMode);
+ }
+ if ((fittingModes & defaultFittingMode) == 0) {
+ throw new IllegalArgumentException("Default fitting mode not in fiting modes.");
+ }
+ PrintAttributes.enfoceValidFittingMode(defaultFittingMode);
+ mPrototype.mFittingModes = fittingModes;
+ mPrototype.mDefaults[PROPERTY_FITTING_MODE] = defaultFittingMode;
+ return this;
+ }
+
+ /**
+ * Sets the orientations.
+ * <p>
+ * <strong>Required:</strong> Yes
+ * </p>
+ *
+ * @param orientations The orientation bit mask.
+ * @param defaultOrientation The default orientation.
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException If orientations contains an invalid
+ * mode bit or if the default orientation is invalid.
+ *
+ * @see PrintAttributes#ORIENTATION_PORTRAIT
+ * @see PrintAttributes#ORIENTATION_LANDSCAPE
+ */
+ public Builder setOrientations(int orientations, int defaultOrientation) {
+ int currentOrientaions = orientations;
+ while (currentOrientaions > 0) {
+ final int currentOrnt = (1 << Integer.numberOfTrailingZeros(currentOrientaions));
+ currentOrientaions &= ~currentOrnt;
+ PrintAttributes.enforceValidOrientation(currentOrnt);
+ }
+ if ((orientations & defaultOrientation) == 0) {
+ throw new IllegalArgumentException("Default orientation not in orientations.");
+ }
+ PrintAttributes.enforceValidOrientation(defaultOrientation);
+ mPrototype.mOrientations = orientations;
+ mPrototype.mDefaults[PROPERTY_ORIENTATION] = defaultOrientation;
+ return this;
+ }
+
+ /**
+ * Crates a new {@link PrinterCapabilitiesInfo} enforcing that all
+ * required properties have need specified. See individual methods
+ * in this class for reference about required attributes.
+ *
+ * @return A new {@link PrinterCapabilitiesInfo}.
+ *
+ * @throws IllegalStateException If a required attribute was not specified.
+ */
+ public PrinterCapabilitiesInfo create() {
+ if (mPrototype.mMediaSizes == null || mPrototype.mMediaSizes.isEmpty()) {
+ throw new IllegalStateException("No media size specified.");
+ }
+ if (mPrototype.mDefaults[PROPERTY_MEDIA_SIZE] == DEFAULT_UNDEFINED) {
+ throw new IllegalStateException("No default media size specified.");
+ }
+ if (mPrototype.mResolutions == null || mPrototype.mResolutions.isEmpty()) {
+ throw new IllegalStateException("No resolution specified.");
+ }
+ if (mPrototype.mDefaults[PROPERTY_RESOLUTION] == DEFAULT_UNDEFINED) {
+ throw new IllegalStateException("No default resolution specified.");
+ }
+ if (mPrototype.mColorModes == 0) {
+ throw new IllegalStateException("No color mode specified.");
+ }
+ if (mPrototype.mDefaults[PROPERTY_COLOR_MODE] == DEFAULT_UNDEFINED) {
+ throw new IllegalStateException("No default color mode specified.");
+ }
+ if (mPrototype.mOrientations == 0) {
+ throw new IllegalStateException("No oprientation specified.");
+ }
+ if (mPrototype.mDefaults[PROPERTY_ORIENTATION] == DEFAULT_UNDEFINED) {
+ throw new IllegalStateException("No default orientation specified.");
+ }
+ if (mPrototype.mMinMargins == null) {
+ mPrototype.mMinMargins = new Margins(0, 0, 0, 0);
+ }
+ if (mPrototype.mDefaultMargins == null) {
+ mPrototype.mDefaultMargins = mPrototype.mMinMargins;
+ }
+ return new PrinterCapabilitiesInfo(mPrototype);
+ }
+
+ private void throwIfDefaultAlreadySpecified(int propertyIndex) {
+ if (mPrototype.mDefaults[propertyIndex] != DEFAULT_UNDEFINED) {
+ throw new IllegalArgumentException("Default already specified.");
+ }
+ }
+ }
+
+ public static final Parcelable.Creator<PrinterCapabilitiesInfo> CREATOR =
+ new Parcelable.Creator<PrinterCapabilitiesInfo>() {
+ @Override
+ public PrinterCapabilitiesInfo createFromParcel(Parcel parcel) {
+ return new PrinterCapabilitiesInfo(parcel);
+ }
+
+ @Override
+ public PrinterCapabilitiesInfo[] newArray(int size) {
+ return new PrinterCapabilitiesInfo[size];
+ }
+ };
+}
+
diff --git a/core/java/android/print/PrinterId.java b/core/java/android/print/PrinterId.java
index 8462736..a3f3b2bf 100644
--- a/core/java/android/print/PrinterId.java
+++ b/core/java/android/print/PrinterId.java
@@ -28,24 +28,24 @@
private final ComponentName mServiceName;
- private final String mPrinterName;
+ private final String mLocalId;
/**
* Creates a new instance.
*
* @param serviceName The managing print service.
- * @param printerName The unique name within the managing service.
+ * @param localId The locally unique id within the managing service.
*
* @hide
*/
- public PrinterId(ComponentName serviceName, String printerName) {
+ public PrinterId(ComponentName serviceName, String localId) {
mServiceName = serviceName;
- mPrinterName = printerName;
+ mLocalId = localId;
}
private PrinterId(Parcel parcel) {
mServiceName = parcel.readParcelable(null);
- mPrinterName = parcel.readString();
+ mLocalId = parcel.readString();
}
/**
@@ -60,13 +60,13 @@
}
/**
- * Gets the name of this printer which is unique in the context
+ * Gets the id of this printer which is unique in the context
* of the print service that manages it.
*
* @return The printer name.
*/
- public String getPrinterName() {
- return mPrinterName;
+ public String getLocalId() {
+ return mLocalId;
}
@Override
@@ -77,7 +77,7 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeParcelable(mServiceName, flags);
- parcel.writeString(mPrinterName);
+ parcel.writeString(mLocalId);
}
@Override
@@ -99,7 +99,7 @@
} else if (!mServiceName.equals(other.mServiceName)) {
return false;
}
- if (!TextUtils.equals(mPrinterName, other.mPrinterName)) {
+ if (!TextUtils.equals(mLocalId, other.mLocalId)) {
return false;
}
return true;
@@ -111,7 +111,7 @@
int hashCode = 1;
hashCode = prime * hashCode + ((mServiceName != null)
? mServiceName.hashCode() : 1);
- hashCode = prime * hashCode + mPrinterName.hashCode();
+ hashCode = prime * hashCode + mLocalId.hashCode();
return hashCode;
}
@@ -119,9 +119,8 @@
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PrinterId{");
- builder.append(mServiceName.flattenToString());
- builder.append(":");
- builder.append(mPrinterName);
+ builder.append("serviceName=").append(mServiceName.flattenToString());
+ builder.append(", localId=").append(mLocalId);
builder.append('}');
return builder.toString();
}
diff --git a/core/java/android/print/PrinterInfo.java b/core/java/android/print/PrinterInfo.java
index 10cecca..ac782a8 100644
--- a/core/java/android/print/PrinterInfo.java
+++ b/core/java/android/print/PrinterInfo.java
@@ -18,67 +18,30 @@
import android.os.Parcel;
import android.os.Parcelable;
-import android.print.PrintAttributes.Margins;
-import android.print.PrintAttributes.MediaSize;
-import android.print.PrintAttributes.Resolution;
-import android.print.PrintAttributes.Tray;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import android.text.TextUtils;
/**
- * This class represents the description of a printer. A description
- * contains the printer id, human readable name, status, and available
- * options for various printer capabilities, such as media size, etc.
+ * This class represents the description of a printer.
*/
public final class PrinterInfo implements Parcelable {
- /**
- * Undefined default value.
- *
- * @hide
- */
- public static final int DEFAULT_UNDEFINED = -1;
-
- private static final int PROPERTY_MEDIA_SIZE = 0;
- private static final int PROPERTY_RESOLUTION = 1;
- private static final int PROPERTY_INPUT_TRAY = 2;
- private static final int PROPERTY_OUTPUT_TRAY = 3;
- private static final int PROPERTY_DUPLEX_MODE = 4;
- private static final int PROPERTY_COLOR_MODE = 5;
- private static final int PROPERTY_FITTING_MODE = 6;
- private static final int PROPERTY_ORIENTATION = 7;
- private static final int PROPERTY_COUNT = 8;
/** Printer status: the printer is ready to print. */
public static final int STATUS_READY = 1;
- private static final Margins DEFAULT_MARGINS = new Margins(0, 0, 0, 0);
-
// TODO: Add printer status constants.
private PrinterId mId;
+
+ private String mName;
+
private int mStatus;
- private Margins mMinMargins = DEFAULT_MARGINS;
- private List<MediaSize> mMediaSizes;
- private List<Resolution> mResolutions;
- private List<Tray> mInputTrays;
- private List<Tray> mOutputTrays;
+ private String mDescription;
- private int mDuplexModes;
- private int mColorModes;
- private int mFittingModes;
- private int mOrientations;
+ private PrinterCapabilitiesInfo mCapabilities;
- private final int[] mDefaults = new int[PROPERTY_COUNT];
- private Margins mDefaultMargins = DEFAULT_MARGINS;
-
- /**
- * @hide
- */
- public PrinterInfo() {
- Arrays.fill(mDefaults, DEFAULT_UNDEFINED);
+ private PrinterInfo() {
+ /* do nothing */
}
private PrinterInfo(PrinterInfo prototype) {
@@ -90,63 +53,18 @@
*/
public void copyFrom(PrinterInfo other) {
mId = other.mId;
+ mName = other.mName;
mStatus = other.mStatus;
-
- mMinMargins = other.mMinMargins;
- if (other.mMediaSizes != null) {
- if (mMediaSizes != null) {
- mMediaSizes.clear();
- mMediaSizes.addAll(other.mMediaSizes);
+ mDescription = other.mDescription;
+ if (other.mCapabilities != null) {
+ if (mCapabilities != null) {
+ mCapabilities.copyFrom(other.mCapabilities);
} else {
- mMediaSizes = new ArrayList<MediaSize>(other.mMediaSizes);
+ mCapabilities = new PrinterCapabilitiesInfo(other.mCapabilities);
}
} else {
- mMediaSizes = null;
+ mCapabilities = null;
}
-
- if (other.mResolutions != null) {
- if (mResolutions != null) {
- mResolutions.clear();
- mResolutions.addAll(other.mResolutions);
- } else {
- mResolutions = new ArrayList<Resolution>(other.mResolutions);
- }
- } else {
- mResolutions = null;
- }
-
- if (other.mInputTrays != null) {
- if (mInputTrays != null) {
- mInputTrays.clear();
- mInputTrays.addAll(other.mInputTrays);
- } else {
- mInputTrays = new ArrayList<Tray>(other.mInputTrays);
- }
- } else {
- mInputTrays = null;
- }
-
- if (other.mOutputTrays != null) {
- if (mOutputTrays != null) {
- mOutputTrays.clear();
- mOutputTrays.addAll(other.mOutputTrays);
- } else {
- mOutputTrays = new ArrayList<Tray>(other.mOutputTrays);
- }
- } else {
- mOutputTrays = null;
- }
-
- mDuplexModes = other.mDuplexModes;
- mColorModes = other.mColorModes;
- mFittingModes = other.mFittingModes;
- mOrientations = other.mOrientations;
-
- final int defaultCount = other.mDefaults.length;
- for (int i = 0; i < defaultCount; i++) {
- mDefaults[i] = other.mDefaults[i];
- }
- mDefaultMargins = other.mDefaultMargins;
}
/**
@@ -159,7 +77,16 @@
}
/**
- * Gets the status of the printer.
+ * Get the printer name.
+ *
+ * @return The printer name.
+ */
+ public String getName() {
+ return mName;
+ }
+
+ /**
+ * Gets the printer status.
*
* @return The status.
*/
@@ -168,184 +95,29 @@
}
/**
- * Gets the supported media sizes.
+ * Gets the printer description.
*
- * @return The supported media sizes.
+ * @return The description.
*/
- public List<MediaSize> getMediaSizes() {
- return mMediaSizes;
+ public String getDescription() {
+ return mDescription;
}
/**
- * Gets the supported resolutions.
+ * Gets the printer capabilities.
*
- * @return The supported resolutions.
+ * @return The capabilities.
*/
- public List<Resolution> getResolutions() {
- return mResolutions;
- }
-
- /**
- * Gets the minimal supported margins.
- *
- * @return The minimal margins.
- */
- public Margins getMinMargins() {
- return mMinMargins;
- }
-
- /**
- * Gets the available input trays.
- *
- * @return The input trays.
- */
- public List<Tray> getInputTrays() {
- return mInputTrays;
- }
-
- /**
- * Gets the available output trays.
- *
- * @return The output trays.
- */
- public List<Tray> getOutputTrays() {
- return mOutputTrays;
- }
-
- /**
- * Gets the supported duplex modes.
- *
- * @return The duplex modes.
- *
- * @see PrintAttributes#DUPLEX_MODE_NONE
- * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
- * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
- */
- public int getDuplexModes() {
- return mDuplexModes;
- }
-
- /**
- * Gets the supported color modes.
- *
- * @return The color modes.
- *
- * @see PrintAttributes#COLOR_MODE_COLOR
- * @see PrintAttributes#COLOR_MODE_MONOCHROME
- */
- public int getColorModes() {
- return mColorModes;
- }
-
- /**
- * Gets the supported fitting modes.
- *
- * @return The fitting modes.
- *
- * @see PrintAttributes#FITTING_MODE_NONE
- * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
- */
- public int getFittingModes() {
- return mFittingModes;
- }
-
- /**
- * Gets the supported orientations.
- *
- * @return The orientations.
- *
- * @see PrintAttributes#ORIENTATION_PORTRAIT
- * @see PrintAttributes#ORIENTATION_LANDSCAPE
- */
- public int getOrientations() {
- return mOrientations;
- }
-
- /**
- * Gets the default print attributes.
- *
- * @param outAttributes The attributes to populated.
- */
- public void getDefaults(PrintAttributes outAttributes) {
- outAttributes.clear();
-
- outAttributes.setMargins(mDefaultMargins);
-
- final int mediaSizeIndex = mDefaults[PROPERTY_MEDIA_SIZE];
- if (mediaSizeIndex >= 0) {
- outAttributes.setMediaSize(mMediaSizes.get(mediaSizeIndex));
- }
-
- final int resolutionIndex = mDefaults[PROPERTY_RESOLUTION];
- if (resolutionIndex >= 0) {
- outAttributes.setResolution(mResolutions.get(resolutionIndex));
- }
-
- final int inputTrayIndex = mDefaults[PROPERTY_INPUT_TRAY];
- if (inputTrayIndex >= 0) {
- outAttributes.setInputTray(mInputTrays.get(inputTrayIndex));
- }
-
- final int outputTrayIndex = mDefaults[PROPERTY_OUTPUT_TRAY];
- if (outputTrayIndex >= 0) {
- outAttributes.setOutputTray(mOutputTrays.get(outputTrayIndex));
- }
-
- final int duplexMode = mDefaults[PROPERTY_DUPLEX_MODE];
- if (duplexMode > 0) {
- outAttributes.setDuplexMode(duplexMode);
- }
-
- final int colorMode = mDefaults[PROPERTY_COLOR_MODE];
- if (colorMode > 0) {
- outAttributes.setColorMode(mColorModes & colorMode);
- }
-
- final int fittingMode = mDefaults[PROPERTY_FITTING_MODE];
- if (fittingMode > 0) {
- outAttributes.setFittingMode(fittingMode);
- }
-
- final int orientation = mDefaults[PROPERTY_ORIENTATION];
- if (orientation > 0) {
- outAttributes.setOrientation(orientation);
- }
- }
-
- /**
- * Gets whether this printer info is fully-populated, i.e. whether
- * all required attributes are specified. See the {@link Builder}
- * documentation for which attributes are required.
- *
- * @return Whether this info has all required attributes.
- */
- public boolean hasAllRequiredAttributes() {
- return (mMediaSizes != null && !mMediaSizes.isEmpty()
- && mResolutions != null && !mResolutions.isEmpty()
- && mColorModes != 0 || mOrientations != 0
- && mDefaults[PROPERTY_MEDIA_SIZE] != DEFAULT_UNDEFINED
- && mDefaults[PROPERTY_RESOLUTION] != DEFAULT_UNDEFINED
- && mDefaults[PROPERTY_COLOR_MODE] != DEFAULT_UNDEFINED
- && mDefaults[PROPERTY_ORIENTATION] != DEFAULT_UNDEFINED);
+ public PrinterCapabilitiesInfo getCapabilities() {
+ return mCapabilities;
}
private PrinterInfo(Parcel parcel) {
mId = parcel.readParcelable(null);
+ mName = parcel.readString();
mStatus = parcel.readInt();
-
- mMinMargins = readMargins(parcel);
- readMediaSizes(parcel);
- readResolutions(parcel);
- mInputTrays = readInputTrays(parcel);
- mOutputTrays = readOutputTrays(parcel);
-
- mColorModes = parcel.readInt();
- mDuplexModes = parcel.readInt();
- mFittingModes = parcel.readInt();
- mOrientations = parcel.readInt();
-
- readDefaults(parcel);
- mDefaultMargins = readMargins(parcel);
+ mDescription = parcel.readString();
+ mCapabilities = parcel.readParcelable(null);
}
@Override
@@ -356,40 +128,21 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeParcelable(mId, flags);
+ parcel.writeString(mName);
parcel.writeInt(mStatus);
-
- writeMargins(mMinMargins, parcel);
- writeMediaSizes(parcel);
- writeResolutions(parcel);
- writeInputTrays(parcel);
- writeOutputTrays(parcel);
-
- parcel.writeInt(mColorModes);
- parcel.writeInt(mDuplexModes);
- parcel.writeInt(mFittingModes);
- parcel.writeInt(mOrientations);
-
- writeDefaults(parcel);
- writeMargins(mDefaultMargins, parcel);
+ parcel.writeString(mDescription);
+ parcel.writeParcelable(mCapabilities, flags);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((mId == null) ? 0 : mId.hashCode());
+ result = prime * result + ((mId != null) ? mId.hashCode() : 0);
+ result = prime * result + ((mName != null) ? mName.hashCode() : 0);
result = prime * result + mStatus;
- result = prime * result + ((mMinMargins == null) ? 0 : mMinMargins.hashCode());
- result = prime * result + ((mMediaSizes == null) ? 0 : mMediaSizes.hashCode());
- result = prime * result + ((mResolutions == null) ? 0 : mResolutions.hashCode());
- result = prime * result + ((mInputTrays == null) ? 0 : mInputTrays.hashCode());
- result = prime * result + ((mOutputTrays == null) ? 0 : mOutputTrays.hashCode());
- result = prime * result + mDuplexModes;
- result = prime * result + mColorModes;
- result = prime * result + mFittingModes;
- result = prime * result + mOrientations;
- result = prime * result + Arrays.hashCode(mDefaults);
- result = prime * result + ((mDefaultMargins == null) ? 0 : mDefaultMargins.hashCode());
+ result = prime * result + ((mDescription != null) ? mDescription.hashCode() : 0);
+ result = prime * result + ((mCapabilities != null) ? mCapabilities.hashCode() : 0);
return result;
}
@@ -412,64 +165,20 @@
} else if (!mId.equals(other.mId)) {
return false;
}
+ if (!TextUtils.equals(mName, other.mName)) {
+ return false;
+ }
if (mStatus != other.mStatus) {
return false;
}
- if (mMinMargins == null) {
- if (other.mMinMargins != null) {
+ if (!TextUtils.equals(mDescription, other.mDescription)) {
+ return false;
+ }
+ if (mCapabilities == null) {
+ if (other.mCapabilities != null) {
return false;
}
- } else if (!mMinMargins.equals(other.mMinMargins)) {
- return false;
- }
- if (mMediaSizes == null) {
- if (other.mMediaSizes != null) {
- return false;
- }
- } else if (!mMediaSizes.equals(other.mMediaSizes)) {
- return false;
- }
- if (mResolutions == null) {
- if (other.mResolutions != null) {
- return false;
- }
- } else if (!mResolutions.equals(other.mResolutions)) {
- return false;
- }
- if (mInputTrays == null) {
- if (other.mInputTrays != null) {
- return false;
- }
- } else if (!mInputTrays.equals(other.mInputTrays)) {
- return false;
- }
- if (mOutputTrays == null) {
- if (other.mOutputTrays != null) {
- return false;
- }
- } else if (!mOutputTrays.equals(other.mOutputTrays)) {
- return false;
- }
- if (mDuplexModes != other.mDuplexModes) {
- return false;
- }
- if (mColorModes != other.mColorModes) {
- return false;
- }
- if (mFittingModes != other.mFittingModes) {
- return false;
- }
- if (mOrientations != other.mOrientations) {
- return false;
- }
- if (!Arrays.equals(mDefaults, other.mDefaults)) {
- return false;
- }
- if (mDefaultMargins == null) {
- if (other.mDefaultMargins != null) {
- return false;
- }
- } else if (!mDefaultMargins.equals(other.mDefaultMargins)) {
+ } else if (!mCapabilities.equals(other.mCapabilities)) {
return false;
}
return true;
@@ -479,434 +188,83 @@
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PrinterInfo{");
- builder.append(mId).append(", \"");
+ builder.append("id=").append(mId);
+ builder.append(", name=").append(mName);
+ builder.append(", status=").append(mStatus);
+ builder.append(", description=").append(mDescription);
+ builder.append(", capabilities=").append(mCapabilities);
builder.append("\"}");
return builder.toString();
}
- private void writeMediaSizes(Parcel parcel) {
- if (mMediaSizes == null) {
- parcel.writeInt(0);
- return;
- }
- final int mediaSizeCount = mMediaSizes.size();
- parcel.writeInt(mediaSizeCount);
- for (int i = 0; i < mediaSizeCount; i++) {
- mMediaSizes.get(i).writeToParcel(parcel);
- }
- }
-
- private void readMediaSizes(Parcel parcel) {
- final int mediaSizeCount = parcel.readInt();
- if (mediaSizeCount > 0 && mMediaSizes == null) {
- mMediaSizes = new ArrayList<MediaSize>();
- }
- for (int i = 0; i < mediaSizeCount; i++) {
- mMediaSizes.add(MediaSize.createFromParcel(parcel));
- }
- }
-
- private void writeResolutions(Parcel parcel) {
- if (mResolutions == null) {
- parcel.writeInt(0);
- return;
- }
- final int resolutionCount = mResolutions.size();
- parcel.writeInt(resolutionCount);
- for (int i = 0; i < resolutionCount; i++) {
- mResolutions.get(i).writeToParcel(parcel);
- }
- }
-
- private void readResolutions(Parcel parcel) {
- final int resolutionCount = parcel.readInt();
- if (resolutionCount > 0 && mResolutions == null) {
- mResolutions = new ArrayList<Resolution>();
- }
- for (int i = 0; i < resolutionCount; i++) {
- mResolutions.add(Resolution.createFromParcel(parcel));
- }
- }
-
- private void writeMargins(Margins margins, Parcel parcel) {
- if (margins == null) {
- parcel.writeInt(0);
- } else {
- parcel.writeInt(1);
- margins.writeToParcel(parcel);
- }
- }
-
- private Margins readMargins(Parcel parcel) {
- return (parcel.readInt() == 1) ? Margins.createFromParcel(parcel) : null;
- }
-
- private void writeInputTrays(Parcel parcel) {
- if (mInputTrays == null) {
- parcel.writeInt(0);
- return;
- }
- final int inputTrayCount = mInputTrays.size();
- parcel.writeInt(inputTrayCount);
- for (int i = 0; i < inputTrayCount; i++) {
- mInputTrays.get(i).writeToParcel(parcel);
- }
- }
-
- private List<Tray> readInputTrays(Parcel parcel) {
- final int inputTrayCount = parcel.readInt();
- if (inputTrayCount <= 0) {
- return null;
- }
- List<Tray> inputTrays = new ArrayList<Tray>(inputTrayCount);
- for (int i = 0; i < inputTrayCount; i++) {
- inputTrays.add(Tray.createFromParcel(parcel));
- }
- return inputTrays;
- }
-
- private void writeOutputTrays(Parcel parcel) {
- if (mOutputTrays == null) {
- parcel.writeInt(0);
- return;
- }
- final int outputTrayCount = mOutputTrays.size();
- parcel.writeInt(outputTrayCount);
- for (int i = 0; i < outputTrayCount; i++) {
- mOutputTrays.get(i).writeToParcel(parcel);
- }
- }
-
- private List<Tray> readOutputTrays(Parcel parcel) {
- final int outputTrayCount = parcel.readInt();
- if (outputTrayCount <= 0) {
- return null;
- }
- List<Tray> outputTrays = new ArrayList<Tray>(outputTrayCount);
- for (int i = 0; i < outputTrayCount; i++) {
- outputTrays.add(Tray.createFromParcel(parcel));
- }
- return outputTrays;
- }
-
- private void readDefaults(Parcel parcel) {
- final int defaultCount = parcel.readInt();
- for (int i = 0; i < defaultCount; i++) {
- mDefaults[i] = parcel.readInt();
- }
- }
-
- private void writeDefaults(Parcel parcel) {
- final int defaultCount = mDefaults.length;
- parcel.writeInt(defaultCount);
- for (int i = 0; i < defaultCount; i++) {
- parcel.writeInt(mDefaults[i]);
- }
- }
-
/**
- * Builder for creating of a {@link PrinterInfo}. This class is responsible
- * to enforce that all required attributes have at least one default value.
- * In other words, this class creates only well-formed {@link PrinterInfo}s.
- * <p>
- * Look at the individual methods for a reference whether a property is
- * required or if it is optional.
- * </p>
+ * Builder for creating of a {@link PrinterInfo}.
*/
public static final class Builder {
private final PrinterInfo mPrototype;
/**
- * Creates a new instance.
+ * Constructor.
*
* @param printerId The printer id. Cannot be null.
- *
- * @throws IllegalArgumentException If the printer id is null.
+ * @param name The printer name. Cannot be empty.
+ * @param status The printer status. Must be a valid status.
*/
- public Builder(PrinterId printerId) {
+ public Builder(PrinterId printerId, String name, int status) {
if (printerId == null) {
throw new IllegalArgumentException("printerId cannot be null.");
}
+ if (TextUtils.isEmpty(name)) {
+ throw new IllegalArgumentException("name cannot be empty.");
+ }
+ if (!isValidStatus(status)) {
+ throw new IllegalArgumentException("status is invalid.");
+ }
mPrototype = new PrinterInfo();
mPrototype.mId = printerId;
- }
-
- /**
- * Sets the printer status.
- * <p>
- * <strong>Required:</strong> Yes
- * </p>
- *
- * @param status The status.
- * @return This builder.
- */
- public Builder setStatus(int status) {
+ mPrototype.mName = name;
mPrototype.mStatus = status;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param prototype Prototype from which to start building.
+ */
+ public Builder(PrinterInfo prototype) {
+ mPrototype = prototype;
+ }
+
+ /**
+ * Sets the printer name.
+ *
+ * @param name The name.
+ * @return This builder.
+ */
+ public Builder setName(String name) {
+ mPrototype.mName = name;
return this;
}
/**
- * Adds a supported media size.
- * <p>
- * <strong>Required:</strong> Yes
- * </p>
+ * Sets the printer description.
*
- * @param mediaSize A media size.
- * @param isDefault Whether this is the default.
+ * @param description The description.
* @return This builder.
- * @throws IllegalArgumentException If set as default and there
- * is already a default.
- *
- * @see PrintAttributes.MediaSize
*/
- public Builder addMediaSize(MediaSize mediaSize, boolean isDefault) {
- if (mPrototype.mMediaSizes == null) {
- mPrototype.mMediaSizes = new ArrayList<MediaSize>();
- }
- final int insertionIndex = mPrototype.mMediaSizes.size();
- mPrototype.mMediaSizes.add(mediaSize);
- if (isDefault) {
- throwIfDefaultAlreadySpecified(PROPERTY_MEDIA_SIZE);
- mPrototype.mDefaults[PROPERTY_MEDIA_SIZE] = insertionIndex;
- }
+ public Builder setDescription(String description) {
+ mPrototype.mDescription = description;
return this;
}
/**
- * Adds a supported resolution.
- * <p>
- * <strong>Required:</strong> Yes
- * </p>
+ * Sets the printer capabilities.
*
- * @param resolution A resolution.
- * @param isDefault Whether this is the default.
+ * @param capabilities The capabilities.
* @return This builder.
- *
- * @throws IllegalArgumentException If set as default and there
- * is already a default.
- *
- * @see PrintAttributes.Resolution
*/
- public Builder addResolution(Resolution resolution, boolean isDefault) {
- if (mPrototype.mResolutions == null) {
- mPrototype.mResolutions = new ArrayList<Resolution>();
- }
- final int insertionIndex = mPrototype.mResolutions.size();
- mPrototype.mResolutions.add(resolution);
- if (isDefault) {
- throwIfDefaultAlreadySpecified(PROPERTY_RESOLUTION);
- mPrototype.mDefaults[PROPERTY_RESOLUTION] = insertionIndex;
- }
- return this;
- }
-
- /**
- * Sets the minimal margins.
- * <p>
- * <strong>Required:</strong> No
- * </p>
- *
- * @param margins The margins.
- * @param defaultMargins The default margins.
- * @return This builder.
- *
- * @see PrintAttributes.Margins
- */
- public Builder setMinMargins(Margins margins, Margins defaultMargins) {
- if (margins.getLeftMils() > defaultMargins.getLeftMils()
- || margins.getTopMils() > defaultMargins.getTopMils()
- || margins.getRightMils() < defaultMargins.getRightMils()
- || margins.getBottomMils() < defaultMargins.getBottomMils()) {
- throw new IllegalArgumentException("Default margins"
- + " cannot be outside of the min margins.");
- }
- mPrototype.mMinMargins = margins;
- mPrototype.mDefaultMargins = defaultMargins;
- return this;
- }
-
- /**
- * Adds an input tray.
- * <p>
- * <strong>Required:</strong> No
- * </p>
- *
- * @param inputTray A tray.
- * @param isDefault Whether this is the default.
- * @return This builder.
- *
- * @throws IllegalArgumentException If set as default and there
- * is already a default.
- *
- * @see PrintAttributes.Tray
- */
- public Builder addInputTray(Tray inputTray, boolean isDefault) {
- if (mPrototype.mInputTrays == null) {
- mPrototype.mInputTrays = new ArrayList<Tray>();
- }
- final int insertionIndex = mPrototype.mInputTrays.size();
- mPrototype.mInputTrays.add(inputTray);
- if (isDefault) {
- throwIfDefaultAlreadySpecified(PROPERTY_INPUT_TRAY);
- mPrototype.mDefaults[PROPERTY_INPUT_TRAY] = insertionIndex;
- }
- return this;
- }
-
- /**
- * Adds an output tray.
- * <p>
- * <strong>Required:</strong> No
- * </p>
- *
- * @param outputTray A tray.
- * @param isDefault Whether this is the default.
- * @return This builder.
- *
- * @throws IllegalArgumentException If set as default and there
- * is already a default.
- *
- * @see PrintAttributes.Tray
- */
- public Builder addOutputTray(Tray outputTray, boolean isDefault) {
- if (mPrototype.mOutputTrays == null) {
- mPrototype.mOutputTrays = new ArrayList<Tray>();
- }
- final int insertionIndex = mPrototype.mOutputTrays.size();
- mPrototype.mOutputTrays.add(outputTray);
- if (isDefault) {
- throwIfDefaultAlreadySpecified(PROPERTY_OUTPUT_TRAY);
- mPrototype.mDefaults[PROPERTY_OUTPUT_TRAY] = insertionIndex;
- }
- return this;
- }
-
- /**
- * Sets the color modes.
- * <p>
- * <strong>Required:</strong> Yes
- * </p>
- *
- * @param colorModes The color mode bit mask.
- * @param defaultColorMode The default color mode.
- * @return This builder.
- *
- * @throws IllegalArgumentException If color modes contains an invalid
- * mode bit or if the default color mode is invalid.
- *
- * @see PrintAttributes#COLOR_MODE_COLOR
- * @see PrintAttributes#COLOR_MODE_MONOCHROME
- */
- public Builder setColorModes(int colorModes, int defaultColorMode) {
- int currentModes = colorModes;
- while (currentModes > 0) {
- final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
- currentModes &= ~currentMode;
- PrintAttributes.enforceValidColorMode(currentMode);
- }
- if ((colorModes & defaultColorMode) == 0) {
- throw new IllegalArgumentException("Default color mode not in color modes.");
- }
- PrintAttributes.enforceValidColorMode(colorModes);
- mPrototype.mColorModes = colorModes;
- mPrototype.mDefaults[PROPERTY_COLOR_MODE] = defaultColorMode;
- return this;
- }
-
- /**
- * Set the duplex modes.
- * <p>
- * <strong>Required:</strong> No
- * </p>
- *
- * @param duplexModes The duplex mode bit mask.
- * @param defaultDuplexMode The default duplex mode.
- * @return This builder.
- *
- * @throws IllegalArgumentException If duplex modes contains an invalid
- * mode bit or if the default duplex mode is invalid.
- *
- * @see PrintAttributes#DUPLEX_MODE_NONE
- * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
- * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
- */
- public Builder setDuplexModes(int duplexModes, int defaultDuplexMode) {
- int currentModes = duplexModes;
- while (currentModes > 0) {
- final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
- currentModes &= ~currentMode;
- PrintAttributes.enforceValidDuplexMode(currentMode);
- }
- if ((duplexModes & defaultDuplexMode) == 0) {
- throw new IllegalArgumentException("Default duplex mode not in duplex modes.");
- }
- PrintAttributes.enforceValidDuplexMode(defaultDuplexMode);
- mPrototype.mDuplexModes = duplexModes;
- mPrototype.mDefaults[PROPERTY_DUPLEX_MODE] = defaultDuplexMode;
- return this;
- }
-
- /**
- * Sets the fitting modes.
- * <p>
- * <strong>Required:</strong> No
- * </p>
- *
- * @param fittingModes The fitting mode bit mask.
- * @param defaultFittingMode The default fitting mode.
- * @return This builder.
- *
- * @throws IllegalArgumentException If fitting modes contains an invalid
- * mode bit or if the default fitting mode is invalid.
- *
- * @see PrintAttributes#FITTING_MODE_NONE
- * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
- */
- public Builder setFittingModes(int fittingModes, int defaultFittingMode) {
- int currentModes = fittingModes;
- while (currentModes > 0) {
- final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
- currentModes &= ~currentMode;
- PrintAttributes.enfoceValidFittingMode(currentMode);
- }
- if ((fittingModes & defaultFittingMode) == 0) {
- throw new IllegalArgumentException("Default fitting mode not in fiting modes.");
- }
- PrintAttributes.enfoceValidFittingMode(defaultFittingMode);
- mPrototype.mFittingModes = fittingModes;
- mPrototype.mDefaults[PROPERTY_FITTING_MODE] = defaultFittingMode;
- return this;
- }
-
- /**
- * Sets the orientations.
- * <p>
- * <strong>Required:</strong> Yes
- * </p>
- *
- * @param orientations The orientation bit mask.
- * @param defaultOrientation The default orientation.
- * @return This builder.
- *
- * @throws IllegalArgumentException If orientations contains an invalid
- * mode bit or if the default orientation is invalid.
- *
- * @see PrintAttributes#ORIENTATION_PORTRAIT
- * @see PrintAttributes#ORIENTATION_LANDSCAPE
- */
- public Builder setOrientations(int orientations, int defaultOrientation) {
- int currentOrientaions = orientations;
- while (currentOrientaions > 0) {
- final int currentOrnt = (1 << Integer.numberOfTrailingZeros(currentOrientaions));
- currentOrientaions &= ~currentOrnt;
- PrintAttributes.enforceValidOrientation(currentOrnt);
- }
- if ((orientations & defaultOrientation) == 0) {
- throw new IllegalArgumentException("Default orientation not in orientations.");
- }
- PrintAttributes.enforceValidOrientation(defaultOrientation);
- mPrototype.mOrientations = orientations;
- mPrototype.mDefaults[PROPERTY_ORIENTATION] = defaultOrientation;
+ public Builder setCapabilities(PrinterCapabilitiesInfo capabilities) {
+ mPrototype.mCapabilities = capabilities;
return this;
}
@@ -919,10 +277,8 @@
return new PrinterInfo(mPrototype);
}
- private void throwIfDefaultAlreadySpecified(int propertyIndex) {
- if (mPrototype.mDefaults[propertyIndex] != DEFAULT_UNDEFINED) {
- throw new IllegalArgumentException("Default already specified.");
- }
+ private boolean isValidStatus(int status) {
+ return (status == PrinterInfo.STATUS_READY);
}
}
diff --git a/core/java/android/printservice/IPrintService.aidl b/core/java/android/printservice/IPrintService.aidl
index e6fdbf9..16b7a26 100644
--- a/core/java/android/printservice/IPrintService.aidl
+++ b/core/java/android/printservice/IPrintService.aidl
@@ -10,16 +10,14 @@
* 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
+ * See the License for the specific languagÿe governing permissions and
* limitations under the License.
*/
package android.printservice;
-import android.os.ICancellationSignal;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintJobInfo;
-import android.print.PrinterId;
import android.printservice.IPrintServiceClient;
/**
@@ -29,9 +27,7 @@
*/
oneway interface IPrintService {
void setClient(IPrintServiceClient client);
- void onRequestUpdatePrinters(in List<PrinterId> printerIds);
- void onRequestCancelPrintJob(in PrintJobInfo printJobInfo);
+ void requestCancelPrintJob(in PrintJobInfo printJobInfo);
void onPrintJobQueued(in PrintJobInfo printJobInfo);
- void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer);
- void onStopPrinterDiscovery();
+ void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer);
}
diff --git a/core/java/android/printservice/PrintDocument.java b/core/java/android/printservice/PrintDocument.java
index 2a1581a..7437dc5 100644
--- a/core/java/android/printservice/PrintDocument.java
+++ b/core/java/android/printservice/PrintDocument.java
@@ -55,14 +55,14 @@
}
/**
- * Gets the data associated with this document. It is a responsibility of the
- * client to open a stream to the returned file descriptor and fully read the
- * data.
+ * Gets the data associated with this document.
* <p>
- * <strong>Note:</strong> It is your responsibility to close the file descriptor.
+ * <strong>Note: </strong> It is a responsibility of the client to open a
+ * stream to the returned file descriptor, fully read the data, and close
+ * the file descriptor.
* </p>
*
- * @return A file descriptor for reading the data or <code>null</code>.
+ * @return A file descriptor for reading the data.
*/
public FileDescriptor getData() {
ParcelFileDescriptor source = null;
diff --git a/core/java/android/printservice/PrintJob.java b/core/java/android/printservice/PrintJob.java
index 64c079e..5f9a730 100644
--- a/core/java/android/printservice/PrintJob.java
+++ b/core/java/android/printservice/PrintJob.java
@@ -21,9 +21,9 @@
import android.util.Log;
/**
- * This class represents a print job from the perspective of a
- * print service. It provides APIs for observing the print job
- * state and performing operations on the print job.
+ * This class represents a print job from the perspective of a print
+ * service. It provides APIs for observing the print job state and
+ * performing operations on the print job.
*/
public final class PrintJob {
@@ -38,7 +38,8 @@
PrintJob(PrintJobInfo jobInfo, IPrintServiceClient client) {
mCachedInfo = jobInfo;
mPrintServiceClient = client;
- mDocument = new PrintDocument(mCachedInfo.getId(), client, jobInfo.getDocumentInfo());
+ mDocument = new PrintDocument(mCachedInfo.getId(), client,
+ jobInfo.getDocumentInfo());
}
/**
@@ -77,7 +78,7 @@
}
/**
- * Gets the document of this print job.
+ * Gets the printed document.
*
* @return The document.
*/
@@ -87,11 +88,12 @@
/**
* Gets whether this print job is queued. Such a print job is
- * ready to be printed and can be started.
+ * ready to be printed and can be started or cancelled.
*
* @return Whether the print job is queued.
*
* @see #start()
+ * @see #cancel()
*/
public boolean isQueued() {
return getInfo().getState() == PrintJobInfo.STATE_QUEUED;
@@ -112,6 +114,42 @@
}
/**
+ * Gets whether this print job is completed. Such a print job
+ * is successfully printed. This is a final state.
+ *
+ * @return Whether the print job is completed.
+ *
+ * @see #complete()
+ */
+ public boolean isCompleted() {
+ return getInfo().getState() == PrintJobInfo.STATE_COMPLETED;
+ }
+
+ /**
+ * Gets whether this print job is failed. Such a print job is
+ * not successfully printed due to an error. This is a final state.
+ *
+ * @return Whether the print job is failed.
+ *
+ * @see #fail(CharSequence)
+ */
+ public boolean isFailed() {
+ return getInfo().getState() == PrintJobInfo.STATE_FAILED;
+ }
+
+ /**
+ * Gets whether this print job is cancelled. Such a print job was
+ * cancelled as a result of a user request. This is a final state.
+ *
+ * @return Whether the print job is cancelled.
+ *
+ * @see #cancel()
+ */
+ public boolean isCancelled() {
+ return getInfo().getState() == PrintJobInfo.STATE_FAILED;
+ }
+
+ /**
* Starts the print job. You should call this method if {@link
* #isQueued()} returns true and you started printing.
*
@@ -163,12 +201,13 @@
/**
* Cancels the print job. You should call this method if {@link
* #isQueued()} or {@link #isStarted()} returns true and you canceled
- * the print job as a response to a call to {@link PrintService
- * #onRequestCancelPrintJob(PrintJob)}.
+ * the print job as a response to a call to {@link
+ * PrintService#onRequestCancelPrintJob(PrintJob)}.
*
- * @return Whether the job as canceled.
+ * @return Whether the job is canceled.
*
* @see #isStarted()
+ * @see #isQueued()
*/
public boolean cancel() {
if (isQueued() || isStarted()) {
diff --git a/core/java/android/printservice/PrintService.java b/core/java/android/printservice/PrintService.java
index 49384db..92bccd4 100644
--- a/core/java/android/printservice/PrintService.java
+++ b/core/java/android/printservice/PrintService.java
@@ -25,10 +25,9 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintJobInfo;
import android.print.PrinterId;
-import android.print.PrinterInfo;
import android.util.Log;
import java.util.ArrayList;
@@ -37,84 +36,82 @@
/**
* <p>
- * This is the base class for implementing print services. A print service
- * knows how to discover and interact one or more printers via one or more
- * protocols.
+ * This is the base class for implementing print services. A print service knows
+ * how to discover and interact one or more printers via one or more protocols.
* </p>
* <h3>Printer discovery</h3>
* <p>
- * A print service is responsible for discovering and reporting printers.
- * A printer discovery period starts with a call to
- * {@link #onStartPrinterDiscovery()} and ends with a call to
- * {@link #onStopPrinterDiscovery()}. During a printer discovery
- * period the print service reports newly discovered printers by
- * calling {@link #addDiscoveredPrinters(List)} and reports added printers
- * that disappeared by calling {@link #removeDiscoveredPrinters(List)}.
- * Calls to {@link #addDiscoveredPrinters(List)} and
- * {@link #removeDiscoveredPrinters(List)} before a call to
- * {@link #onStartPrinterDiscovery()} and after a call to
- * {@link #onStopPrinterDiscovery()} are a no-op.
+ * A print service is responsible for discovering printers, adding discovered printers,
+ * removing added printers, and updating added printers. When the system is interested
+ * in printers managed by your service it will call {@link
+ * #onCreatePrinterDiscoverySession()} from which you must return a new {@link
+ * PrinterDiscoverySession} instance. The returned session encapsulates the interaction
+ * between the system and your service during printer discovery. For description of this
+ * interaction refer to the documentation for {@link PrinterDiscoverySession}.
* </p>
* <p>
- * For every printer discovery period all printers have to be added. Each
- * printer known to this print service should be added only once during a
- * discovery period, unless it was added and then removed before that.
- * Only an already added printer can be removed.
+ * For every printer discovery session all printers have to be added since system does
+ * not retain printers across sessions. Hence, each printer known to this print service
+ * should be added only once during a discovery session. Only an already added printer
+ * can be removed or updated. Removed printers can be added again.
* </p>
* <h3>Print jobs</h3>
* <p>
- * When a new print job targeted to the printers managed by this print
- * service is queued, i.e. ready for processing by the print service,
- * a call to {@link #onPrintJobQueued(PrintJob)} is made and the print
- * service may handle it immediately or schedule that for an appropriate
- * time in the future. The list of all print jobs for this service
- * are be available by calling {@link #getPrintJobs()}.
+ * When a new print job targeted to a printer managed by this print service is is queued,
+ * i.e. ready for processing by the print service, you will receive a call to {@link
+ * #onPrintJobQueued(PrintJob)}. The print service may handle the print job immediately
+ * or schedule that for an appropriate time in the future. The list of all active print
+ * jobs for this service is obtained by calling {@link #getActivePrintJobs()}. Active
+ * print jobs are ones that are queued or started.
* </p>
* <p>
- * A print service is responsible for setting the print job state as
- * appropriate while processing it. Initially, a print job is in a
- * {@link PrintJobInfo#STATE_QUEUED} state which means that the data to
- * be printed is spooled by the system and the print service can obtain
- * that data by calling {@link PrintJob#getDocument()}. A queued print
- * job's {@link PrintJob#isQueued()} method returns true.
+ * A print service is responsible for setting a print job's state as appropriate
+ * while processing it. Initially, a print job is queued, i.e. {@link PrintJob#isQueued()
+ * PrintJob.isQueued()} returns true, which means that the document to be printed is
+ * spooled by the system and the print service can begin processing it. You can obtain
+ * the printed document by calling {@link PrintJob#getDocument() PrintJob.getDocument()}
+ * whose data is accessed via {@link PrintDocument#getData() PrintDocument.getData()}.
+ * After the print service starts printing the data it should set the print job's
+ * state to started by calling {@link PrintJob#start()} after which
+ * {@link PrintJob#isStarted() PrintJob.isStarted()} would return true. Upon successful
+ * completion, the print job should be marked as completed by calling {@link
+ * PrintJob#complete() PrintJob.complete()} after which {@link PrintJob#isCompleted()
+ * PrintJob.isCompleted()} would return true. In case of a failure, the print job should
+ * be marked as failed by calling {@link PrintJob#fail(CharSequence) PrintJob.fail(
+ * CharSequence)} after which {@link PrintJob#isFailed() PrintJob.isFailed()} would
+ * return true.
* </p>
* <p>
- * After the print service starts printing the data it should set the
- * print job state to {@link PrintJobInfo#STATE_STARTED} by calling
- * {@link PrintJob#start()}. Upon successful completion, the print job
- * state has to be set to {@link PrintJobInfo#STATE_COMPLETED} by calling
- * {@link PrintJob#complete()}. In case of a failure, the print job
- * state should be set to {@link PrintJobInfo#STATE_FAILED} by calling
- * {@link PrintJob#fail(CharSequence)}. If a print job is in a
- * {@link PrintJobInfo#STATE_STARTED} state, i.e. {@link PrintJob#isStarted()}
- * return true, and the user requests to cancel it, the print service will
- * receive a call to {@link #onRequestCancelPrintJob(PrintJob)} which
- * requests from the service to do a best effort in canceling the job. In
- * case the job is successfully canceled, its state has to be set to
- * {@link PrintJobInfo#STATE_CANCELED}. by calling {@link PrintJob#cancel()}.
+ * If a print job is queued or started and the user requests to cancel it, the print
+ * service will receive a call to {@link #onRequestCancelPrintJob(PrintJob)} which
+ * requests from the service to do best effort in canceling the job. In case the job
+ * is successfully canceled, its state has to be marked as cancelled by calling {@link
+ * PrintJob#cancel() PrintJob.cancel()} after which {@link PrintJob#isCancelled()
+ * PrintJob.isCacnelled()} would return true.
* </p>
* <h3>Lifecycle</h3>
* <p>
- * The lifecycle of a print service is managed exclusively by the system
- * and follows the established service lifecycle. Additionally, starting
- * or stopping a print service is triggered exclusively by an explicit
- * user action through enabling or disabling it in the device settings.
- * After the system binds to a print service, it calls {@link #onConnected()}.
- * This method can be overriden by clients to perform post binding setup.
- * Also after the system unbinds from a print service, it calls
- * {@link #onDisconnected()}. This method can be overriden by clients to
- * perform post unbinding cleanup.
+ * The lifecycle of a print service is managed exclusively by the system and follows
+ * the established service lifecycle. Additionally, starting or stopping a print service
+ * is triggered exclusively by an explicit user action through enabling or disabling it
+ * in the device settings. After the system binds to a print service, it calls {@link
+ * #onConnected()}. This method can be overriden by clients to perform post binding setup.
+ * Also after the system unbinds from a print service, it calls {@link #onDisconnected()}.
+ * This method can be overriden by clients to perform post unbinding cleanup. Your should
+ * not do any work after the system disconnected from your print service since the
+ * service can be killed at any time to reclaim memory. The system will not disconnect
+ * from a print service if there are active print jobs for the printers managed by it.
* </p>
* <h3>Declaration</h3>
* <p>
- * A print service is declared as any other service in an AndroidManifest.xml
- * but it must also specify that it handles the {@link android.content.Intent}
- * with action {@link #SERVICE_INTERFACE}. Failure to declare this intent
- * will cause the system to ignore the print service. Additionally, a print
- * service must request the {@link android.Manifest.permission#BIND_PRINT_SERVICE}
- * permission to ensure that only the system can bind to it. Failure to
- * declare this intent will cause the system to ignore the print service.
- * Following is an example declaration:
+ * A print service is declared as any other service in an AndroidManifest.xml but it must
+ * also specify that it handles the {@link android.content.Intent} with action {@link
+ * #SERVICE_INTERFACE android.printservice.PrintService}. Failure to declare this intent
+ * will cause the system to ignore the print service. Additionally, a print service must
+ * request the {@link android.Manifest.permission#BIND_PRINT_SERVICE
+ * android.permission.BIND_PRINT_SERVICE} permission to ensure that only the system can
+ * bind to it. Failure to declare this intent will cause the system to ignore the print
+ * service. Following is an example declaration:
* </p>
* <pre>
* <service android:name=".MyPrintService"
@@ -127,17 +124,15 @@
* </pre>
* <h3>Configuration</h3>
* <p>
- * A print service can be configured by specifying an optional settings
- * activity which exposes service specific options, an optional add
- * prints activity which is used for manual addition of printers, vendor
- * name ,etc. It is a responsibility of the system to launch the settings
- * and add printers activities when appropriate.
+ * A print service can be configured by specifying an optional settings activity which
+ * exposes service specific settings, an optional add printers activity which is used for
+ * manual addition of printers, vendor name ,etc. It is a responsibility of the system
+ * to launch the settings and add printers activities when appropriate.
* </p>
* <p>
- * A print service is configured by providing a
- * {@link #SERVICE_META_DATA meta-data} entry in the manifest when declaring
- * the service. A service declaration with a meta-data tag is presented
- * below:
+ * A print service is configured by providing a {@link #SERVICE_META_DATA meta-data}
+ * entry in the manifest when declaring the service. A service declaration with a meta-data
+ * tag is presented below:
* <pre> <service android:name=".MyPrintService"
* android:permission="android.permission.BIND_PRINT_SERVICE">
* <intent-filter>
@@ -147,8 +142,9 @@
* </service></pre>
* </p>
* <p>
- * For more details refer to {@link #SERVICE_META_DATA} and
- * <code><{@link android.R.styleable#PrintService print-service}></code>.
+ * For more details for how to configure your print service via the meta-data refer to
+ * {@link #SERVICE_META_DATA} and <code><{@link android.R.styleable#PrintService
+ * print-service}></code>.
* </p>
*/
public abstract class PrintService extends Service {
@@ -157,21 +153,25 @@
/**
* The {@link Intent} action that must be declared as handled by a service
- * in its manifest to allow the system to recognize it as a print service.
+ * in its manifest for the system to recognize it as a print service.
*/
public static final String SERVICE_INTERFACE = "android.printservice.PrintService";
/**
- * Name under which a PrintService component publishes additional information
- * about itself. This meta-data must reference an XML resource containing a
- * <code><{@link android.R.styleable#PrintService print-service}></code>
- * tag. This is a a sample XML file configuring a print service:
+ * Name under which a {@link PrintService} component publishes additional information
+ * about itself. This meta-data must reference a XML resource containing a <code>
+ * <{@link android.R.styleable#PrintService print-service}></code> tag. This is
+ * a sample XML file configuring a print service:
* <pre> <print-service
* android:vendor="SomeVendor"
* android:settingsActivity="foo.bar.MySettingsActivity"
* andorid:addPrintersActivity="foo.bar.MyAddPrintersActivity."
* . . .
* /></pre>
+ * <p>
+ * For detailed configuration options that can be specified via the meta-data
+ * refer to {@link android.R.styleable#PrintService android.R.styleable.PrintService}.
+ * </p>
*/
public static final String SERVICE_META_DATA = "android.printservice";
@@ -181,12 +181,12 @@
private IPrintServiceClient mClient;
- private IPrinterDiscoveryObserver mDiscoveryObserver;
+ private int mLastSessionId = -1;
@Override
- protected void attachBaseContext(Context base) {
+ protected final void attachBaseContext(Context base) {
super.attachBaseContext(base);
- mHandler = new MyHandler(base.getMainLooper());
+ mHandler = new ServiceHandler(base.getMainLooper());
}
/**
@@ -204,203 +204,47 @@
}
/**
- * Callback requesting from this service to start printer discovery.
- * At the end of the printer discovery period the system will call
- * {@link #onStopPrinterDiscovery()}. Discovered printers should be
- * reported by calling {@link #addDiscoveredPrinters(List)} and reported
- * ones that disappear should be reported by calling
- * {@link #removeDiscoveredPrinters(List)}.
+ * Callback asking you to create a new {@link PrinterDiscoverySession}.
*
- * @see #onStopPrinterDiscovery()
- * @see #addDiscoveredPrinters(List)
- * @see #removeDiscoveredPrinters(List)
- * @see #updateDiscoveredPrinters(List)
+ * @see PrinterDiscoverySession
*/
- protected abstract void onStartPrinterDiscovery();
+ protected abstract PrinterDiscoverySession onCreatePrinterDiscoverySession();
/**
- * Callback requesting from this service to stop printer discovery.
- *
- * @see #onStartPrinterDiscovery()
- * @see #addDiscoveredPrinters(List)
- * @see #removeDiscoveredPrinters(List)
- * @see #updateDiscoveredPrinters(List)
- */
- protected abstract void onStopPrinterDiscovery();
-
- /**
- * Adds discovered printers. This method should be called during a
- * printer discovery period, i.e. after a call to
- * {@link #onStartPrinterDiscovery()} and before the corresponding
- * call to {@link #onStopPrinterDiscovery()}, otherwise it does nothing.
- * <p>
- * <strong>Note:</strong> For every printer discovery period all
- * printers have to be added. You can call this method as many times as
- * necessary during the discovery period but should not pass in already
- * added printers. If a printer is already added in the same printer
- * discovery period, it will be ignored.
- * </p>
- * <p>
- * A {@link PrinterInfo} can have all of its required attributes specified,
- * or not. Whether all attributes are specified can be verified by calling
- * {@link PrinterInfo#hasAllRequiredAttributes()}. You can add printers
- * regardless if all required attributes are specified. When the system
- * (and the user) needs to interact with a printer, you will receive a
- * call to {@link #onRequestUpdatePrinters(List)}. If you fail to update
- * a printer that was added without all required attributes via calling
- * {@link #updateDiscoveredPrinters(List)}, then this printer will be
- * ignored, i.e. considered unavailable.
- * <p>
- *
- * @param printers A list with discovered printers.
- *
- * @see #updateDiscoveredPrinters(List)
- * @see #removeDiscoveredPrinters(List)
- * @see #onStartPrinterDiscovery()
- * @see #onStopPrinterDiscovery()
- */
- public final void addDiscoveredPrinters(List<PrinterInfo> printers) {
- final IPrinterDiscoveryObserver observer;
- synchronized (mLock) {
- observer = mDiscoveryObserver;
- }
- if (observer != null) {
- try {
- observer.onPrintersAdded(printers);
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error adding discovered printers", re);
- }
- }
- }
-
- /**
- * Removes discovered printers given their ids. This method should be called
- * during a printer discovery period, i.e. after a call to
- * {@link #onStartPrinterDiscovery()} and before the corresponding
- * call to {@link #onStopPrinterDiscovery()}, otherwise it does nothing.
- * <p>
- * For every printer discovery period all printers have to be added. You
- * should remove only printers that were added in this printer discovery
- * period by a call to {@link #addDiscoveredPrinters(List)}. You can call
- * this method as many times as necessary during the discovery period
- * but should not pass in already removed printer ids. If a printer with
- * a given id is already removed, it will be ignored.
- * </p>
- *
- * @param printerIds A list with disappeared printer ids.
- *
- * @see #addDiscoveredPrinters(List)
- * @see #updateDiscoveredPrinters(List)
- * @see #onStartPrinterDiscovery()
- * @see #onStopPrinterDiscovery()
- */
- public final void removeDiscoveredPrinters(List<PrinterId> printerIds) {
- final IPrinterDiscoveryObserver observer;
- synchronized (mLock) {
- observer = mDiscoveryObserver;
- }
- if (observer != null) {
- try {
- observer.onPrintersRemoved(printerIds);
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error removing discovered printers", re);
- }
- }
- }
-
- /**
- * Updates discovered printers that are already added. This method should
- * be called during a printer discovery period, i.e. after a call to
- * {@link #onStartPrinterDiscovery()} and before the corresponding
- * call to {@link #onStopPrinterDiscovery()}, otherwise it does nothing.
- * <p>
- * For every printer discovery period all printers have to be added. You
- * should update only printers that were added in this printer discovery
- * period by a call to {@link #addDiscoveredPrinters(List)}. You can call
- * this method as many times as necessary during the discovery period
- * but should not try to update already removed or never added printers.
- * If a printer is already removed or never added, it will be ignored.
- * </p>
- *
- * @param printers A list with updated printers.
- *
- * @see #addDiscoveredPrinters(List)
- * @see #removeDiscoveredPrinters(List)
- * @see #onStartPrinterDiscovery()
- * @see #onStopPrinterDiscovery()
- */
- public final void updateDiscoveredPrinters(List<PrinterInfo> printers) {
- final IPrinterDiscoveryObserver observer;
- synchronized (mLock) {
- observer = mDiscoveryObserver;
- }
- if (observer != null) {
- try {
- observer.onPrintersUpdated(printers);
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error updating discovered printers", re);
- }
- }
- }
-
- /**
- * Called when the system will start interacting with a printer
- * giving you a change to update it in case some of its capabilities
- * have changed. For example, this method will be called when the
- * user selects a printer. Hence, it updating this printer should
- * be done as quickly as possible in order to achieve maximally
- * smooth user experience.
- * <p>
- * A {@link PrinterInfo} can have all of its required attributes specified,
- * or not. Whether all attributes are specified can be verified by calling
- * {@link PrinterInfo#hasAllRequiredAttributes()}. You can add printers
- * regardless if all required attributes are specified. When the system
- * (and the user) needs to interact with a printer, you will receive a
- * call to this method. If you fail to update a printer that was added
- * without all required attributes via calling
- * {@link #updateDiscoveredPrinters(List)}, then this printer will be
- * ignored, i.e. considered unavailable.
- * </p>
- *
- * @param printerIds The printers to be updated.
- */
- protected void onRequestUpdatePrinters(List<PrinterId> printerIds) {
- }
-
- /**
- * Called when canceling of a print job is requested. The service
+ * Called when cancellation of a print job is requested. The service
* should do best effort to fulfill the request. After the cancellation
- * is performed, the print job should be set to a cancelled state by
+ * is performed, the print job should be marked as cancelled state by
* calling {@link PrintJob#cancel()}.
*
- * @param printJob The print job to be canceled.
+ * @param printJob The print job to cancel.
+ *
+ * @see PrintJob#cancel() PrintJob.cancel()
+ * @see PrintJob#isCancelled() PrintJob.isCancelled()
*/
- protected void onRequestCancelPrintJob(PrintJob printJob) {
- }
+ protected abstract void onRequestCancelPrintJob(PrintJob printJob);
/**
* Called when there is a queued print job for one of the printers
- * managed by this print service. A queued print job is ready for
- * processing by a print service which can get the data to be printed
- * by calling {@link PrintJob#getDocument()}. This service may start
- * processing the passed in print job or schedule handling of queued
- * print jobs at a convenient time. The service can get the print
- * jobs by a call to {@link #getPrintJobs()} and examine their state
- * to find the ones with state {@link PrintJobInfo#STATE_QUEUED} by
- * calling {@link PrintJob#isQueued()}.
+ * managed by this print service.
*
* @param printJob The new queued print job.
*
- * @see #getPrintJobs()
+ * @see PrintJob#isQueued() PrintJob.isQueued()
+ * @see #getActivePrintJobs()
*/
protected abstract void onPrintJobQueued(PrintJob printJob);
/**
- * Gets the print jobs for the printers managed by this service.
+ * Gets the active print jobs for the printers managed by this service.
+ * Active print jobs are ones that are not in a final state, i.e. whose
+ * state is queued or started.
*
- * @return The print jobs.
+ * @return The active print jobs.
+ *
+ * @see PrintJob#isQueued() PrintJob.isQueued()
+ * @see PrintJob#isStarted() PrintJob.isStarted()
*/
- public final List<PrintJob> getPrintJobs() {
+ public final List<PrintJob> getActivePrintJobs() {
final IPrintServiceClient client;
synchronized (mLock) {
client = mClient;
@@ -428,14 +272,14 @@
}
/**
- * Generates a global printer id given the printer's locally unique name.
+ * Generates a global printer id given the printer's locally unique one.
*
- * @param printerName The printer name.
+ * @param localId A locally unique id in the context of your print service.
* @return Global printer id.
*/
- public final PrinterId generatePrinterId(String printerName) {
+ public final PrinterId generatePrinterId(String localId) {
return new PrinterId(new ComponentName(getPackageName(),
- getClass().getName()), printerName);
+ getClass().getName()), localId);
}
@Override
@@ -443,69 +287,58 @@
return new IPrintService.Stub() {
@Override
public void setClient(IPrintServiceClient client) {
- mHandler.obtainMessage(MyHandler.MSG_SET_CLEINT, client).sendToTarget();
+ mHandler.obtainMessage(ServiceHandler.MSG_SET_CLEINT, client)
+ .sendToTarget();
}
@Override
- public void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer) {
- mHandler.obtainMessage(MyHandler.MSG_ON_START_PRINTER_DISCOVERY,
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
+ mHandler.obtainMessage(ServiceHandler.MSG_ON_CREATE_PRINTER_DISCOVERY_SESSION,
observer).sendToTarget();
}
@Override
- public void onStopPrinterDiscovery() {
- mHandler.sendEmptyMessage(MyHandler.MSG_ON_STOP_PRINTER_DISCOVERY);
- }
-
- @Override
- public void onRequestUpdatePrinters(List<PrinterId> printerIds) {
- mHandler.obtainMessage(MyHandler.MSG_ON_REQUEST_UPDATE_PRINTERS,
- printerIds).sendToTarget();
- }
-
- @Override
- public void onRequestCancelPrintJob(PrintJobInfo printJobInfo) {
- mHandler.obtainMessage(MyHandler.MSG_ON_REQUEST_CANCEL_PRINTJOB,
+ public void requestCancelPrintJob(PrintJobInfo printJobInfo) {
+ mHandler.obtainMessage(ServiceHandler.MSG_ON_REQUEST_CANCEL_PRINTJOB,
printJobInfo).sendToTarget();
}
@Override
public void onPrintJobQueued(PrintJobInfo printJobInfo) {
- mHandler.obtainMessage(MyHandler.MSG_ON_PRINTJOB_QUEUED,
+ mHandler.obtainMessage(ServiceHandler.MSG_ON_PRINTJOB_QUEUED,
printJobInfo).sendToTarget();
}
};
}
- private final class MyHandler extends Handler {
- public static final int MSG_ON_START_PRINTER_DISCOVERY = 1;
- public static final int MSG_ON_STOP_PRINTER_DISCOVERY = 2;
+ private final class ServiceHandler extends Handler {
+ public static final int MSG_ON_CREATE_PRINTER_DISCOVERY_SESSION = 1;
+ public static final int MSG_ON_PRINTJOB_QUEUED = 2;
public static final int MSG_ON_REQUEST_CANCEL_PRINTJOB = 3;
- public static final int MSG_ON_REQUEST_UPDATE_PRINTERS = 4;
- public static final int MSG_ON_PRINTJOB_QUEUED = 5;
- public static final int MSG_SET_CLEINT = 6;
+ public static final int MSG_SET_CLEINT = 4;
- public MyHandler(Looper looper) {
+ public ServiceHandler(Looper looper) {
super(looper, null, true);
}
@Override
- @SuppressWarnings("unchecked")
public void handleMessage(Message message) {
final int action = message.what;
switch (action) {
- case MSG_ON_START_PRINTER_DISCOVERY: {
- synchronized (mLock) {
- mDiscoveryObserver = (IPrinterDiscoveryObserver) message.obj;
+ case MSG_ON_CREATE_PRINTER_DISCOVERY_SESSION: {
+ IPrinterDiscoverySessionObserver observer =
+ (IPrinterDiscoverySessionObserver) message.obj;
+ PrinterDiscoverySession session = onCreatePrinterDiscoverySession();
+ if (session == null) {
+ throw new NullPointerException("session cannot be null");
}
- onStartPrinterDiscovery();
- } break;
-
- case MSG_ON_STOP_PRINTER_DISCOVERY: {
synchronized (mLock) {
- mDiscoveryObserver = null;
+ if (session.getId() == mLastSessionId) {
+ throw new IllegalStateException("cannot reuse sessions");
+ }
+ mLastSessionId = session.getId();
}
- onStopPrinterDiscovery();
+ session.setObserver(observer);
} break;
case MSG_ON_REQUEST_CANCEL_PRINTJOB: {
@@ -513,11 +346,6 @@
onRequestCancelPrintJob(new PrintJob(printJobInfo, mClient));
} break;
- case MSG_ON_REQUEST_UPDATE_PRINTERS: {
- List<PrinterId> printerIds = (List<PrinterId>) message.obj;
- onRequestUpdatePrinters(printerIds);
- } break;
-
case MSG_ON_PRINTJOB_QUEUED: {
PrintJobInfo printJobInfo = (PrintJobInfo) message.obj;
onPrintJobQueued(new PrintJob(printJobInfo, mClient));
@@ -527,9 +355,6 @@
IPrintServiceClient client = (IPrintServiceClient) message.obj;
synchronized (mLock) {
mClient = client;
- if (client == null) {
- mDiscoveryObserver = null;
- }
}
if (client != null) {
onConnected();
diff --git a/core/java/android/printservice/PrinterDiscoverySession.java b/core/java/android/printservice/PrinterDiscoverySession.java
new file mode 100644
index 0000000..5bc0f2e
--- /dev/null
+++ b/core/java/android/printservice/PrinterDiscoverySession.java
@@ -0,0 +1,357 @@
+/*
+ * Copyright (C) 2013 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 android.printservice;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.print.IPrinterDiscoverySessionController;
+import android.print.IPrinterDiscoverySessionObserver;
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+import android.util.Log;
+
+import java.lang.ref.WeakReference;
+import java.util.List;
+
+/**
+ * This class encapsulates the interaction between a print service and the
+ * system during printer discovery. During printer discovery you are responsible
+ * for adding discovered printers, removing already added printers that
+ * disappeared, and updating already added printers.
+ * <p>
+ * The opening of the session is announced by a call to {@link
+ * PrinterDiscoverySession#onOpen(List)} at which point you should start printer
+ * discovery. The closing of the session is announced by a call to {@link
+ * PrinterDiscoverySession#onClose()} at which point you should stop printer
+ * discovery. Discovered printers are added by invoking {@link
+ * PrinterDiscoverySession#addPrinters(List)}. Added printers that disappeared
+ * are removed by invoking {@link PrinterDiscoverySession#removePrinters(List)}.
+ * Added printers whose properties or capabilities changed are updated through
+ * a call to {@link PrinterDiscoverySession#updatePrinters(List)}.
+ * </p>
+ * <p>
+ * The system will make a call to
+ * {@link PrinterDiscoverySession#onRequestPrinterUpdate(PrinterId)} if you
+ * need to update a given printer. It is possible that you add a printer without
+ * specifying its capabilities. This enables you to avoid querying all
+ * discovered printers for their capabilities, rather querying the capabilities
+ * of a printer only if necessary. For example, the system will require that you
+ * update a printer if it gets selected by the user. If you did not report the
+ * printer capabilities when adding it, you must do so after the system requests
+ * a printer update. Otherwise, the printer will be ignored.
+ * </p>
+ * <p>
+ * During printer discovery all printers that are known to your print service
+ * have to be added. The system does not retain any printers from previous
+ * sessions.
+ * </p>
+ */
+public abstract class PrinterDiscoverySession {
+ private static final String LOG_TAG = "PrinterDiscoverySession";
+
+ private static int sIdCounter = 0;
+
+ private final Object mLock = new Object();
+
+ private final Handler mHandler;
+
+ private final int mId;
+
+ private IPrinterDiscoverySessionController mController;
+
+ private IPrinterDiscoverySessionObserver mObserver;
+
+ /**
+ * Constructor.
+ *
+ * @param context A context instance.
+ */
+ public PrinterDiscoverySession(Context context) {
+ mId = sIdCounter++;
+ mHandler = new SessionHandler(context.getMainLooper());
+ mController = new PrinterDiscoverySessionController(this);
+ }
+
+ void setObserver(IPrinterDiscoverySessionObserver observer) {
+ synchronized (mLock) {
+ mObserver = observer;
+ try {
+ mObserver.setController(mController);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error setting session controller", re);
+ }
+ }
+ }
+
+ int getId() {
+ return mId;
+ }
+
+ /**
+ * Adds discovered printers. Adding an already added printer has no effect.
+ * Removed printers can be added again. You can call this method multiple
+ * times during printer discovery.
+ * <p>
+ * <strong>Note: </strong> Calling this method when the session is closed,
+ * which is if {@link #isClosed()} returns true, will throw an {@link
+ * IllegalStateException}.
+ * </p>
+ *
+ * @param printers The printers to add.
+ *
+ * @see #removePrinters(List)
+ * @see #updatePrinters(List)
+ * @see #isClosed()
+ */
+ public final void addPrinters(List<PrinterInfo> printers) {
+ final IPrinterDiscoverySessionObserver observer;
+ synchronized (mLock) {
+ throwIfClosedLocked();
+ observer = mObserver;
+ }
+ if (observer != null) {
+ try {
+ observer.onPrintersAdded(printers);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error adding printers", re);
+ }
+ }
+ }
+
+ /**
+ * Removes added printers. Removing an already removed or never added
+ * printer has no effect. Removed printers can be added again. You
+ * can call this method multiple times during printer discovery.
+ * <p>
+ * <strong>Note: </strong> Calling this method when the session is closed,
+ * which is if {@link #isClosed()} returns true, will throw an {@link
+ * IllegalStateException}.
+ * </p>
+ *
+ * @param printerIds The ids of the removed printers.
+ *
+ * @see #addPrinters(List)
+ * @see #updatePrinters(List)
+ * @see #isClosed()
+ */
+ public final void removePrinters(List<PrinterId> printerIds) {
+ final IPrinterDiscoverySessionObserver observer;
+ synchronized (mLock) {
+ throwIfClosedLocked();
+ observer = mObserver;
+ }
+ if (observer != null) {
+ try {
+ observer.onPrintersRemoved(printerIds);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error removing printers", re);
+ }
+ }
+ }
+
+ /**
+ * Updates added printers. Updating a printer that was not added or that
+ * was removed has no effect. You can call this method multiple times
+ * during printer discovery.
+ * <p>
+ * <strong>Note: </strong> Calling this method when the session is closed,
+ * which is if {@link #isClosed()} returns true, will throw an {@link
+ * IllegalStateException}.
+ * </p>
+ *
+ * @param printers The printers to update.
+ *
+ * @see #addPrinters(List)
+ * @see #removePrinters(List)
+ * @see #isClosed()
+ */
+ public final void updatePrinters(List<PrinterInfo> printers) {
+ final IPrinterDiscoverySessionObserver observer;
+ synchronized (mLock) {
+ throwIfClosedLocked();
+ observer = mObserver;
+ }
+ if (observer != null) {
+ try {
+ observer.onPrintersUpdated(printers);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error updating printers", re);
+ }
+ }
+ }
+
+ /**
+ * Callback notifying you that the session is open and you should start
+ * printer discovery. Discovered printers should be added via calling
+ * {@link #addPrinters(List)}. Added printers that disappeared should be
+ * removed via calling {@link #removePrinters(List)}. Added printers whose
+ * properties or capabilities changes should be updated via calling {@link
+ * #updatePrinters(List)}. When the session is closed you will receive a
+ * call to {@link #onClose()}.
+ * <p>
+ * During printer discovery all printers that are known to your print
+ * service have to be added. The system does not retain any printers from
+ * previous sessions.
+ * </p>
+ * <p>
+ * <strong>Note: </strong>You are also given a list of printers whose
+ * availability has to be checked first. For example, these printers could
+ * be the user's favorite ones, therefore they have to be verified first.
+ * </p>
+ *
+ * @see #onClose()
+ * @see #isClosed()
+ * @see #addPrinters(List)
+ * @see #removePrinters(List)
+ * @see #updatePrinters(List)
+ */
+ public abstract void onOpen(List<PrinterId> priorityList);
+
+ /**
+ * Callback notifying you that the session is closed and you should stop
+ * printer discovery. After the session is closed and any attempt to call
+ * any of its methods will throw an exception. Whether a session is closed
+ * can be checked by calling {@link #isClosed()}. Once the session is closed
+ * it will never be opened again.
+ *
+ * @see #onOpen(List)
+ * @see #isClosed()
+ * @see #addPrinters(List)
+ * @see #removePrinters(List)
+ * @see #updatePrinters(List)
+ */
+ public abstract void onClose();
+
+ /**
+ * Requests that you update a printer. You are responsible for updating
+ * the printer by also reporting its capabilities via calling {@link
+ * #updatePrinters(List)}.
+ * <p>
+ * <strong>Note: </strong> A printer can be initially added without its
+ * capabilities to avoid polling printers that the user will not select.
+ * However, after this method is called you are expected to update the
+ * printer <strong>including</strong> its capabilities. Otherwise, the
+ * printer will be ignored.
+ * <p>
+ * A scenario when you may be requested to update a printer is if the user
+ * selects it and the system has to present print options UI based on the
+ * printer's capabilities.
+ * </p>
+ *
+ * @param printerId The printer id.
+ *
+ * @see #updatePrinters(List)
+ * @see PrinterInfo.Builder#setCapabilities(PrinterCapabilitiesInfo)
+ * PrinterInfo.Builder.setCapabilities(PrinterCapabilitiesInfo)
+ */
+ public abstract void onRequestPrinterUpdate(PrinterId printerId);
+
+ /**
+ * Gets whether this session is closed.
+ *
+ * @return Whether the session is closed.
+ */
+ public final boolean isClosed() {
+ synchronized (mLock) {
+ return (mController == null && mObserver == null);
+ }
+ }
+
+ void close() {
+ synchronized (mLock) {
+ throwIfClosedLocked();
+ mController = null;
+ mObserver = null;
+ }
+ }
+
+ private void throwIfClosedLocked() {
+ if (isClosed()) {
+ throw new IllegalStateException("Session is closed");
+ }
+ }
+
+ private final class SessionHandler extends Handler {
+ public static final int MSG_OPEN = 1;
+ public static final int MSG_CLOSE = 2;
+ public static final int MSG_REQUEST_PRINTER_UPDATE = 3;
+
+ public SessionHandler(Looper looper) {
+ super(looper, null, true);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void handleMessage(Message message) {
+ switch (message.what) {
+ case MSG_OPEN: {
+ List<PrinterId> priorityList = (List<PrinterId>) message.obj;
+ onOpen(priorityList);
+ } break;
+
+ case MSG_CLOSE: {
+ onClose();
+ close();
+ } break;
+
+ case MSG_REQUEST_PRINTER_UPDATE: {
+ PrinterId printerId = (PrinterId) message.obj;
+ onRequestPrinterUpdate(printerId);
+ } break;
+ }
+ }
+ }
+
+ private static final class PrinterDiscoverySessionController extends
+ IPrinterDiscoverySessionController.Stub {
+ private final WeakReference<PrinterDiscoverySession> mWeakSession;
+
+ public PrinterDiscoverySessionController(PrinterDiscoverySession session) {
+ mWeakSession = new WeakReference<PrinterDiscoverySession>(session);
+ }
+
+ @Override
+ public void open(List<PrinterId> priorityList) {
+ PrinterDiscoverySession session = mWeakSession.get();
+ if (session != null) {
+ session.mHandler.obtainMessage(SessionHandler.MSG_OPEN,
+ priorityList).sendToTarget();
+ }
+ }
+
+ @Override
+ public void close() {
+ PrinterDiscoverySession session = mWeakSession.get();
+ if (session != null) {
+ session.mHandler.sendEmptyMessage(SessionHandler.MSG_CLOSE);
+ }
+ }
+
+ @Override
+ public void requestPrinterUpdate(PrinterId printerId) {
+ PrinterDiscoverySession session = mWeakSession.get();
+ if (session != null) {
+ session.mHandler.obtainMessage(
+ SessionHandler.MSG_REQUEST_PRINTER_UPDATE,
+ printerId).sendToTarget();
+ }
+ }
+ };
+}
diff --git a/core/java/android/printservice/package.html b/core/java/android/printservice/package.html
new file mode 100644
index 0000000..6b0327c
--- /dev/null
+++ b/core/java/android/printservice/package.html
@@ -0,0 +1,24 @@
+<HTML>
+<BODY>
+<p>
+Provides classes for implementing print services. Print services are plug-in components
+that know how to talk to printers via some standard protocols. These services serve as a
+bridge between the system and the printers. Hence, the printer and print protocol specific
+implementation is factored out of the system and can by independently developed and updated.
+</p>
+<p>
+A print service implementation should extend {@link android.printservice.PrintService}
+and implement its abstract methods. Also the print service has to follow the contract for
+managing print {@link android.printservice.PrintJob}s to ensure correct interaction with
+the system and consistent user experience.
+<p/>
+<p>
+The system is responsible for starting and stopping a print service depending on whether
+there are active print jobs for the printers managed by the service. The print service
+should also perform printer discovery in a timely fashion to ensure good user experience.
+The interaction between the system and the print service during printer discovery is
+encapsulated by a {@link android.printservice.PrinterDiscoverySession} instance created
+by the print service when requested by the system.
+</p>
+</BODY>
+</HTML>
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index acaed73..53f5d58 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -19,7 +19,9 @@
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
+import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
@@ -30,6 +32,8 @@
import android.os.Bundle;
import android.util.Log;
+import com.google.android.collect.Lists;
+
import libcore.io.IoUtils;
import java.io.IOException;
@@ -201,19 +205,25 @@
public static String getRootId(Uri documentUri) {
final List<String> paths = documentUri.getPathSegments();
+ if (paths.size() < 2) {
+ throw new IllegalArgumentException("Not a root: " + documentUri);
+ }
if (!PATH_ROOTS.equals(paths.get(0))) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Not a root: " + documentUri);
}
return paths.get(1);
}
public static String getDocId(Uri documentUri) {
final List<String> paths = documentUri.getPathSegments();
+ if (paths.size() < 4) {
+ throw new IllegalArgumentException("Not a document: " + documentUri);
+ }
if (!PATH_ROOTS.equals(paths.get(0))) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Not a document: " + documentUri);
}
if (!PATH_DOCS.equals(paths.get(2))) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Not a document: " + documentUri);
}
return paths.get(3);
}
@@ -359,6 +369,36 @@
}
/**
+ * Return list of all documents that the calling package has "open." These
+ * are Uris matching {@link DocumentsContract} to which persistent
+ * read/write access has been granted, usually through
+ * {@link Intent#ACTION_OPEN_DOCUMENT} or
+ * {@link Intent#ACTION_CREATE_DOCUMENT}.
+ *
+ * @see Context#grantUriPermission(String, Uri, int)
+ * @see ContentResolver#getIncomingUriPermissionGrants(int, int)
+ */
+ public static Uri[] getOpenDocuments(Context context) {
+ final int openedFlags = Intent.FLAG_GRANT_READ_URI_PERMISSION
+ | Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_PERSIST_GRANT_URI_PERMISSION;
+ final Uri[] uris = context.getContentResolver()
+ .getIncomingUriPermissionGrants(openedFlags, openedFlags);
+
+ // Filter to only include document providers
+ final PackageManager pm = context.getPackageManager();
+ final List<Uri> result = Lists.newArrayList();
+ for (Uri uri : uris) {
+ final ProviderInfo info = pm.resolveContentProvider(
+ uri.getAuthority(), PackageManager.GET_META_DATA);
+ if (info.metaData.containsKey(META_DATA_DOCUMENT_PROVIDER)) {
+ result.add(uri);
+ }
+ }
+
+ return result.toArray(new Uri[result.size()]);
+ }
+
+ /**
* Return thumbnail representing the document at the given URI. Callers are
* responsible for their own caching. Given document must have
* {@link #FLAG_SUPPORTS_THUMBNAIL} set.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 4865fd0..585115a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -644,6 +644,23 @@
"android.settings.NFCSHARING_SETTINGS";
/**
+ * Activity Action: Show NFC Tap & Pay settings
+ * <p>
+ * This shows UI that allows the user to configure Tap&Pay
+ * settings.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_NFC_PAYMENT_SETTINGS =
+ "android.settings.NFC_PAYMENT_SETTINGS";
+
+ /**
* Activity Action: Show Daydream settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index debf4ee..f43e4ab3 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -46,6 +46,8 @@
private final int mGeneration;
private final int mControllerNumber;
private final String mName;
+ private final int mVendorId;
+ private final int mProductId;
private final String mDescriptor;
private final boolean mIsExternal;
private final int mSources;
@@ -343,13 +345,15 @@
};
// Called by native code.
- private InputDevice(int id, int generation, int controllerNumber, String name,
- String descriptor, boolean isExternal, int sources, int keyboardType,
+ private InputDevice(int id, int generation, int controllerNumber, String name, int vendorId,
+ int productId, String descriptor, boolean isExternal, int sources, int keyboardType,
KeyCharacterMap keyCharacterMap, boolean hasVibrator, boolean hasButtonUnderPad) {
mId = id;
mGeneration = generation;
mControllerNumber = controllerNumber;
mName = name;
+ mVendorId = vendorId;
+ mProductId = productId;
mDescriptor = descriptor;
mIsExternal = isExternal;
mSources = sources;
@@ -364,6 +368,8 @@
mGeneration = in.readInt();
mControllerNumber = in.readInt();
mName = in.readString();
+ mVendorId = in.readInt();
+ mProductId = in.readInt();
mDescriptor = in.readString();
mIsExternal = in.readInt() != 0;
mSources = in.readInt();
@@ -443,6 +449,33 @@
}
/**
+ * Gets the vendor id for the given device, if available.
+ * <p>
+ * A vendor id uniquely identifies the company who manufactured the device. A value of 0 will
+ * be assigned where a vendor id is not available.
+ * </p>
+ *
+ * @return The vendor id of a given device
+ */
+ public int getVendorId() {
+ return mVendorId;
+ }
+
+ /**
+ * Gets the product id for the given device, if available.
+ * <p>
+ * A product id uniquely identifies which product within the address space of a given vendor,
+ * identified by the device's vendor id. A value of 0 will be assigned where a product id is
+ * not available.
+ * </p>
+ *
+ * @return The product id of a given device
+ */
+ public int getProductId() {
+ return mProductId;
+ }
+
+ /**
* Gets the input device descriptor, which is a stable identifier for an input device.
* <p>
* An input device descriptor uniquely identifies an input device. Its value
@@ -757,6 +790,8 @@
out.writeInt(mGeneration);
out.writeInt(mControllerNumber);
out.writeString(mName);
+ out.writeInt(mVendorId);
+ out.writeInt(mProductId);
out.writeString(mDescriptor);
out.writeInt(mIsExternal ? 1 : 0);
out.writeInt(mSources);
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 20938f51..7a82892 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -12062,7 +12062,8 @@
}
/**
- * Resolve padding depending on layout direction.
+ * Resolves padding depending on layout direction, if applicable, and
+ * recomputes internal padding values to adjust for scroll bars.
*
* @hide
*/
@@ -12102,11 +12103,11 @@
mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom;
- internalSetPadding(mUserPaddingLeft, mPaddingTop, mUserPaddingRight,
- mUserPaddingBottom);
onRtlPropertiesChanged(resolvedLayoutDirection);
}
+ internalSetPadding(mUserPaddingLeft, mPaddingTop, mUserPaddingRight, mUserPaddingBottom);
+
mPrivateFlags2 |= PFLAG2_PADDING_RESOLVED;
}
@@ -14012,10 +14013,6 @@
}
if (more && hardwareAccelerated) {
- // invalidation is the trigger to recreate display lists, so if we're using
- // display lists to render, force an invalidate to allow the animation to
- // continue drawing another frame
- parent.invalidate(true);
if (a.hasAlpha() && (mPrivateFlags & PFLAG_ALPHA_SET) == PFLAG_ALPHA_SET) {
// alpha animations should cause the child to recreate its display list
invalidate(true);
@@ -14659,13 +14656,26 @@
* @hide
*/
protected void resolveDrawables() {
- if (canResolveLayoutDirection()) {
- if (mBackground != null) {
- mBackground.setLayoutDirection(getLayoutDirection());
- }
- mPrivateFlags2 |= PFLAG2_DRAWABLE_RESOLVED;
- onResolveDrawables(getLayoutDirection());
+ // Drawables resolution may need to happen before resolving the layout direction (which is
+ // done only during the measure() call).
+ // If the layout direction is not resolved yet, we cannot resolve the Drawables except in
+ // one case: when the raw layout direction has not been defined as LAYOUT_DIRECTION_INHERIT.
+ // So, if the raw layout direction is LAYOUT_DIRECTION_LTR or LAYOUT_DIRECTION_RTL or
+ // LAYOUT_DIRECTION_LOCALE, we can "cheat" and we don't need to wait for the layout
+ // direction to be resolved as its resolved value will be the same as its raw value.
+ if (!isLayoutDirectionResolved() &&
+ getRawLayoutDirection() == View.LAYOUT_DIRECTION_INHERIT) {
+ return;
}
+
+ final int layoutDirection = isLayoutDirectionResolved() ?
+ getLayoutDirection() : getRawLayoutDirection();
+
+ if (mBackground != null) {
+ mBackground.setLayoutDirection(layoutDirection);
+ }
+ mPrivateFlags2 |= PFLAG2_DRAWABLE_RESOLVED;
+ onResolveDrawables(layoutDirection);
}
/**
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1f7ff9b..3977a33 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -608,6 +608,11 @@
}
}
+ /** Whether the window is in local focus mode or not */
+ private boolean isInLocalFocusMode() {
+ return (mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE) != 0;
+ }
+
void destroyHardwareResources() {
if (mAttachInfo.mHardwareRenderer != null) {
if (mAttachInfo.mHardwareRenderer.isEnabled()) {
@@ -1818,7 +1823,7 @@
mNewSurfaceNeeded = false;
mViewVisibility = viewVisibility;
- if (mAttachInfo.mHasWindowFocus) {
+ if (mAttachInfo.mHasWindowFocus && !isInLocalFocusMode()) {
final boolean imTarget = WindowManager.LayoutParams
.mayUseInputMethod(mWindowAttributes.flags);
if (imTarget != mLastWasImTarget) {
@@ -2906,7 +2911,7 @@
private final static int MSG_RESIZED = 4;
private final static int MSG_RESIZED_REPORT = 5;
private final static int MSG_WINDOW_FOCUS_CHANGED = 6;
- private final static int MSG_DISPATCH_KEY = 7;
+ private final static int MSG_DISPATCH_INPUT_EVENT = 7;
private final static int MSG_DISPATCH_APP_VISIBILITY = 8;
private final static int MSG_DISPATCH_GET_NEW_SURFACE = 9;
private final static int MSG_DISPATCH_KEY_FROM_IME = 11;
@@ -2941,8 +2946,8 @@
return "MSG_RESIZED_REPORT";
case MSG_WINDOW_FOCUS_CHANGED:
return "MSG_WINDOW_FOCUS_CHANGED";
- case MSG_DISPATCH_KEY:
- return "MSG_DISPATCH_KEY";
+ case MSG_DISPATCH_INPUT_EVENT:
+ return "MSG_DISPATCH_INPUT_EVENT";
case MSG_DISPATCH_APP_VISIBILITY:
return "MSG_DISPATCH_APP_VISIBILITY";
case MSG_DISPATCH_GET_NEW_SURFACE:
@@ -3092,7 +3097,8 @@
InputMethodManager imm = InputMethodManager.peekInstance();
if (mView != null) {
- if (hasWindowFocus && imm != null && mLastWasImTarget) {
+ if (hasWindowFocus && imm != null && mLastWasImTarget &&
+ !isInLocalFocusMode()) {
imm.startGettingWindowFocus(mView);
}
mAttachInfo.mKeyDispatchState.reset();
@@ -3103,7 +3109,7 @@
// Note: must be done after the focus change callbacks,
// so all of the view state is set up correctly.
if (hasWindowFocus) {
- if (imm != null && mLastWasImTarget) {
+ if (imm != null && mLastWasImTarget && !isInLocalFocusMode()) {
imm.onWindowFocus(mView, mView.findFocus(),
mWindowAttributes.softInputMode,
!mHasHadWindowFocus, mWindowAttributes.flags);
@@ -3131,8 +3137,8 @@
case MSG_DIE:
doDie();
break;
- case MSG_DISPATCH_KEY: {
- KeyEvent event = (KeyEvent)msg.obj;
+ case MSG_DISPATCH_INPUT_EVENT: {
+ InputEvent event = (InputEvent)msg.obj;
enqueueInputEvent(event, null, 0, true);
} break;
case MSG_DISPATCH_KEY_FROM_IME: {
@@ -3222,7 +3228,9 @@
// tell the window manager
try {
- mWindowSession.setInTouchMode(inTouchMode);
+ if (!isInLocalFocusMode()) {
+ mWindowSession.setInTouchMode(inTouchMode);
+ }
} catch (RemoteException e) {
throw new RuntimeException(e);
}
@@ -3624,7 +3632,7 @@
@Override
protected int onProcess(QueuedInputEvent q) {
- if (mLastWasImTarget) {
+ if (mLastWasImTarget && !isInLocalFocusMode()) {
InputMethodManager imm = InputMethodManager.peekInstance();
if (imm != null) {
final InputEvent event = q.mEvent;
@@ -5666,8 +5674,8 @@
mInvalidateOnAnimationRunnable.removeView(view);
}
- public void dispatchKey(KeyEvent event) {
- Message msg = mHandler.obtainMessage(MSG_DISPATCH_KEY, event);
+ public void dispatchInputEvent(InputEvent event) {
+ Message msg = mHandler.obtainMessage(MSG_DISPATCH_INPUT_EVENT, event);
msg.setAsynchronous(true);
mHandler.sendMessage(msg);
}
@@ -5697,7 +5705,7 @@
flags, event.getSource(), null);
fallbackAction.recycle();
- dispatchKey(fallbackEvent);
+ dispatchInputEvent(fallbackEvent);
}
}
}
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 39d48a7..7a24243 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -1290,4 +1290,18 @@
* @hide
*/
public void setDefaultLogo(int resId) { }
+
+ /**
+ * Set focus locally. The window should have the
+ * {@link WindowManager.LayoutParams#FLAG_LOCAL_FOCUS_MODE} flag set already.
+ * @param hasFocus Whether this window has focus or not.
+ * @param inTouchMode Whether this window is in touch mode or not.
+ */
+ public void setLocalFocus(boolean hasFocus, boolean inTouchMode) { }
+
+ /**
+ * Inject an event to window locally.
+ * @param event A key or touch event to inject to this window.
+ */
+ public void injectInputEvent(InputEvent event) { }
}
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 83a58be..c9c74e7 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -866,6 +866,15 @@
*/
public static final int FLAG_NEEDS_MENU_KEY = 0x08000000;
+ /**
+ * Flag for a window in local focus mode.
+ * Window in local focus mode can control focus independent of window manager using
+ * {@link Window#setLocalFocus(boolean, boolean)}.
+ * Usually window in this mode will not get touch/key events from window manager, but will
+ * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}.
+ */
+ public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000;
+
/** Window flag: special flag to limit the size of the window to be
* original size ([320x480] x density). Used to create window for applications
* running under compatibility mode.
@@ -905,6 +914,7 @@
* @see #FLAG_DISMISS_KEYGUARD
* @see #FLAG_SPLIT_TOUCH
* @see #FLAG_HARDWARE_ACCELERATED
+ * @see #FLAG_LOCAL_FOCUS_MODE
*/
@ViewDebug.ExportedProperty(flagMapping = {
@ViewDebug.FlagToString(mask = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON,
@@ -956,7 +966,9 @@
@ViewDebug.FlagToString(mask = FLAG_SPLIT_TOUCH, equals = FLAG_SPLIT_TOUCH,
name = "FLAG_SPLIT_TOUCH"),
@ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED,
- name = "FLAG_HARDWARE_ACCELERATED")
+ name = "FLAG_HARDWARE_ACCELERATED"),
+ @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE,
+ name = "FLAG_LOCAL_FOCUS_MODE")
})
public int flags;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index a6e68d0..0224fbe 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -48,6 +48,7 @@
import java.io.BufferedWriter;
import java.io.File;
+import java.io.OutputStream;
import java.util.Map;
/**
@@ -1034,6 +1035,34 @@
}
/**
+ * Exports the contents of this Webview as PDF. Only supported for API levels
+ * {@link android.os.Build.VERSION_CODES#KEY_LIME_PIE} and above.
+ *
+ * @param out The stream to export the PDF contents to. Cannot be null.
+ * @param width The page width. Should be larger than 0.
+ * @param height The page height. Should be larger than 0.
+ * @param resultCallback A callback to be invoked when the PDF content is exported.
+ * A true indicates success, and a false failure.
+ *
+ * TODO: explain method parameters, margins, consider making the callback
+ * return more meaningful information, explain any threading concerns, HW
+ * draw limitations, and make it public.
+ * TODO: at the moment we are asking app to provide paper size information (width
+ * and height). This is likely not ideal (I think need margin info too).
+ * Another approach would be using PrintAttributes. This is to be clarified later.
+ *
+ * TODO: explain this webview will not draw during export (onDraw will clear to
+ * background color) so recommend taking it offscreen, or putting in a layer with an
+ * overlaid progress UI / spinner.
+ * @hide
+ */
+ public void exportToPdf(OutputStream out, int width, int height,
+ ValueCallback<Boolean> resultCallback) {
+ checkThread();
+ mProvider.exportToPdf(out, width, height, resultCallback);
+ }
+
+ /**
* Gets the current scale of this WebView.
*
* @return the current scale
@@ -1852,6 +1881,11 @@
return WebView.this.getHorizontalScrollbarHeight();
}
+ public void super_onDrawVerticalScrollBar(Canvas canvas, Drawable scrollBar,
+ int l, int t, int r, int b) {
+ WebView.super.onDrawVerticalScrollBar(canvas, scrollBar, l, t, r, b);
+ }
+
// ---- Access to (non-public) fields ----
/** Raw setter for the scroll X value, without invoking onScrollChanged handlers etc. */
public void setScrollXRaw(int scrollX) {
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index b930276..228de5b 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -2659,7 +2659,7 @@
@Override
public void evaluateJavaScript(String script, ValueCallback<String> resultCallback) {
// K-only API not implemented in WebViewClassic.
- throw new IllegalStateException("This API not supported in Classic WebView.");
+ throw new IllegalStateException("This API not supported on Android 4.3 and earlier");
}
/**
@@ -2892,6 +2892,17 @@
}
/**
+ * See {@link WebView#exportToPdf()}
+ */
+ @Override
+ public void exportToPdf(java.io.OutputStream out, int width, int height,
+ ValueCallback<Boolean> resultCallback) {
+ // K-only API not implemented in WebViewClassic.
+ throw new IllegalStateException("This API not supported on Android 4.3 and earlier");
+
+ }
+
+ /**
* See {@link WebView#getScale()}
*/
@Override
diff --git a/core/java/android/webkit/WebViewProvider.java b/core/java/android/webkit/WebViewProvider.java
index 8c5c4ce..17b4061 100644
--- a/core/java/android/webkit/WebViewProvider.java
+++ b/core/java/android/webkit/WebViewProvider.java
@@ -40,6 +40,7 @@
import java.io.BufferedWriter;
import java.io.File;
+import java.io.OutputStream;
import java.util.Map;
/**
@@ -146,6 +147,9 @@
public Picture capturePicture();
+ public void exportToPdf(OutputStream out, int width, int height,
+ ValueCallback<Boolean> resultCallback);
+
public float getScale();
public void setInitialScale(int scaleInPercent);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 3f391ad..07198c75 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1243,6 +1243,12 @@
mFastScroller = new FastScroller(this);
mFastScroller.setEnabled(true);
}
+
+ recomputePadding();
+
+ if (mFastScroller != null) {
+ mFastScroller.updateLayout();
+ }
}
/**
@@ -1303,7 +1309,7 @@
@Override
public int getVerticalScrollbarWidth() {
- if (isFastScrollAlwaysVisible() && mFastScroller != null) {
+ if (mFastScroller != null && mFastScroller.isEnabled()) {
return Math.max(super.getVerticalScrollbarWidth(), mFastScroller.getWidth());
}
return super.getVerticalScrollbarWidth();
@@ -1327,6 +1333,14 @@
}
}
+ @Override
+ public void setScrollBarStyle(int style) {
+ super.setScrollBarStyle(style);
+ if (mFastScroller != null) {
+ mFastScroller.setScrollBarStyle(style);
+ }
+ }
+
/**
* If fast scroll is enabled, then don't draw the vertical scrollbar.
* @hide
@@ -2787,7 +2801,6 @@
@Override
public void onRtlPropertiesChanged(int layoutDirection) {
super.onRtlPropertiesChanged(layoutDirection);
-
if (mFastScroller != null) {
mFastScroller.setScrollbarPosition(getVerticalScrollbarPosition());
}
@@ -3472,7 +3485,8 @@
mLastY = Integer.MIN_VALUE;
}
- if (performButtonActionOnTouchDown(ev) && (mTouchMode == TOUCH_MODE_DOWN)) {
+ if (mTouchMode == TOUCH_MODE_DOWN && mMotionPosition != INVALID_POSITION
+ && performButtonActionOnTouchDown(ev)) {
removeCallbacks(mPendingCheckForTap);
}
}
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index 393720f..c48955f 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -131,6 +131,9 @@
/** Whether there is a track image to display. */
private final boolean mHasTrackImage;
+ /** Total width of decorations. */
+ private final int mWidth;
+
/** Set containing decoration transition animations. */
private AnimatorSet mDecorAnimation;
@@ -155,6 +158,9 @@
/** The index of the current section. */
private int mCurrentSection = -1;
+ /** The current scrollbar position. */
+ private int mScrollbarPosition = -1;
+
/** Whether the list is long enough to need a fast scroller. */
private boolean mLongList;
@@ -194,6 +200,9 @@
*/
private int mOverlayPosition;
+ /** Current scrollbar style, including inset and overlay properties. */
+ private int mScrollBarStyle;
+
/** Whether to precisely match the thumb position to the list. */
private boolean mMatchDragPosition;
@@ -245,34 +254,44 @@
final Resources res = context.getResources();
final TypedArray ta = context.getTheme().obtainStyledAttributes(ATTRS);
- mTrackImage = new ImageView(context);
+ final ImageView trackImage = new ImageView(context);
+ mTrackImage = trackImage;
+
+ int width = 0;
// Add track to overlay if it has an image.
- final int trackResId = ta.getResourceId(TRACK_DRAWABLE, 0);
- if (trackResId != 0) {
+ final Drawable trackDrawable = ta.getDrawable(TRACK_DRAWABLE);
+ if (trackDrawable != null) {
mHasTrackImage = true;
- mTrackImage.setBackgroundResource(trackResId);
- mOverlay.add(mTrackImage);
+ trackImage.setBackground(trackDrawable);
+ mOverlay.add(trackImage);
+ width = Math.max(width, trackDrawable.getIntrinsicWidth());
} else {
mHasTrackImage = false;
}
- mThumbImage = new ImageView(context);
+ final ImageView thumbImage = new ImageView(context);
+ mThumbImage = thumbImage;
// Add thumb to overlay if it has an image.
final Drawable thumbDrawable = ta.getDrawable(THUMB_DRAWABLE);
if (thumbDrawable != null) {
- mThumbImage.setImageDrawable(thumbDrawable);
- mOverlay.add(mThumbImage);
+ thumbImage.setImageDrawable(thumbDrawable);
+ mOverlay.add(thumbImage);
+ width = Math.max(width, thumbDrawable.getIntrinsicWidth());
}
// If necessary, apply minimum thumb width and height.
if (thumbDrawable.getIntrinsicWidth() <= 0 || thumbDrawable.getIntrinsicHeight() <= 0) {
- mThumbImage.setMinimumWidth(res.getDimensionPixelSize(R.dimen.fastscroll_thumb_width));
- mThumbImage.setMinimumHeight(
+ final int minWidth = res.getDimensionPixelSize(R.dimen.fastscroll_thumb_width);
+ thumbImage.setMinimumWidth(minWidth);
+ thumbImage.setMinimumHeight(
res.getDimensionPixelSize(R.dimen.fastscroll_thumb_height));
+ width = Math.max(width, minWidth);
}
+ mWidth = width;
+
final int previewSize = res.getDimensionPixelSize(R.dimen.fastscroll_overlay_size);
mPreviewImage = new ImageView(context);
mPreviewImage.setMinimumWidth(previewSize);
@@ -297,10 +316,11 @@
mOverlayPosition = ta.getInt(OVERLAY_POSITION, OVERLAY_FLOATING);
ta.recycle();
+ mScrollBarStyle = listView.getScrollBarStyle();
mScrollCompleted = true;
mState = STATE_VISIBLE;
- mMatchDragPosition =
- context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB;
+ mMatchDragPosition = context.getApplicationInfo().targetSdkVersion
+ >= Build.VERSION_CODES.HONEYCOMB;
getSectionsFromIndexer();
refreshDrawablePressedState();
@@ -362,6 +382,14 @@
return mAlwaysShow;
}
+ public void setScrollBarStyle(int style) {
+ if (mScrollBarStyle != style) {
+ mScrollBarStyle = style;
+
+ updateLayout();
+ }
+ }
+
/**
* Immediately transitions the fast scroller decorations to a hidden state.
*/
@@ -375,25 +403,29 @@
View.SCROLLBAR_POSITION_LEFT : View.SCROLLBAR_POSITION_RIGHT;
}
- mLayoutFromRight = position != View.SCROLLBAR_POSITION_LEFT;
+ if (mScrollbarPosition != position) {
+ mScrollbarPosition = position;
+ mLayoutFromRight = position != View.SCROLLBAR_POSITION_LEFT;
- final int previewResId = mPreviewResId[mLayoutFromRight ? PREVIEW_RIGHT : PREVIEW_LEFT];
- mPreviewImage.setBackgroundResource(previewResId);
+ final int previewResId = mPreviewResId[mLayoutFromRight ? PREVIEW_RIGHT : PREVIEW_LEFT];
+ mPreviewImage.setBackgroundResource(previewResId);
- // Add extra padding for text.
- final Drawable background = mPreviewImage.getBackground();
- if (background != null) {
- final Rect padding = mTempBounds;
- background.getPadding(padding);
- padding.offset(mPreviewPadding, mPreviewPadding);
- mPreviewImage.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+ // Add extra padding for text.
+ final Drawable background = mPreviewImage.getBackground();
+ if (background != null) {
+ final Rect padding = mTempBounds;
+ background.getPadding(padding);
+ padding.offset(mPreviewPadding, mPreviewPadding);
+ mPreviewImage.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+ }
+
+ // Requires re-layout.
+ updateLayout();
}
-
- updateLayout();
}
public int getWidth() {
- return mThumbImage.getWidth();
+ return mWidth;
}
public void onSizeChanged(int w, int h, int oldw, int oldh) {
@@ -437,7 +469,7 @@
/**
* Measures and layouts the scrollbar and decorations.
*/
- private void updateLayout() {
+ public void updateLayout() {
// Prevent re-entry when RTL properties change as a side-effect of
// resolving padding.
if (mUpdatingLayout) {
@@ -594,21 +626,36 @@
out.set(left, top, right, bottom);
}
+ /**
+ * Updates the container rectangle used for layout.
+ */
private void updateContainerRect() {
final AbsListView list = mList;
+ list.resolvePadding();
+
final Rect container = mContainerRect;
container.left = 0;
container.top = 0;
container.right = list.getWidth();
container.bottom = list.getHeight();
- final int scrollbarStyle = list.getScrollBarStyle();
+ final int scrollbarStyle = mScrollBarStyle;
if (scrollbarStyle == View.SCROLLBARS_INSIDE_INSET
|| scrollbarStyle == View.SCROLLBARS_INSIDE_OVERLAY) {
container.left += list.getPaddingLeft();
container.top += list.getPaddingTop();
container.right -= list.getPaddingRight();
container.bottom -= list.getPaddingBottom();
+
+ // In inset mode, we need to adjust for padded scrollbar width.
+ if (scrollbarStyle == View.SCROLLBARS_INSIDE_INSET) {
+ final int width = getWidth();
+ if (mScrollbarPosition == View.SCROLLBAR_POSITION_RIGHT) {
+ container.right += width;
+ } else {
+ container.left -= width;
+ }
+ }
}
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 3181164..9c21f0d 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -1378,6 +1378,8 @@
} else {
dr.mDrawableSizeEnd = dr.mDrawableHeightEnd = 0;
}
+ resetResolvedDrawables();
+ resolveDrawables();
}
}
diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java
index a89c9c1..50c803b 100644
--- a/core/java/android/widget/ZoomButtonsController.java
+++ b/core/java/android/widget/ZoomButtonsController.java
@@ -503,7 +503,7 @@
ViewRootImpl viewRoot = mOwnerView.getViewRootImpl();
if (viewRoot != null) {
- viewRoot.dispatchKey(event);
+ viewRoot.dispatchInputEvent(event);
}
// We gave the key to the owner, don't let the container handle this key
diff --git a/core/java/com/android/internal/app/IProcessStats.aidl b/core/java/com/android/internal/app/IProcessStats.aidl
index e4c8bd2..047424d 100644
--- a/core/java/com/android/internal/app/IProcessStats.aidl
+++ b/core/java/com/android/internal/app/IProcessStats.aidl
@@ -22,4 +22,5 @@
interface IProcessStats {
byte[] getCurrentStats(out List<ParcelFileDescriptor> historic);
+ int getCurrentMemoryState();
}
diff --git a/core/java/com/android/internal/app/ProcessStats.java b/core/java/com/android/internal/app/ProcessStats.java
index 39c23cf..ac9bf166 100644
--- a/core/java/com/android/internal/app/ProcessStats.java
+++ b/core/java/com/android/internal/app/ProcessStats.java
@@ -31,6 +31,8 @@
import com.android.internal.util.ArrayUtils;
import dalvik.system.VMRuntime;
+import java.io.IOException;
+import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -212,6 +214,80 @@
readFromParcel(in);
}
+ public void add(ProcessStats other) {
+ ArrayMap<String, SparseArray<PackageState>> pkgMap = other.mPackages.getMap();
+ for (int ip=0; ip<pkgMap.size(); ip++) {
+ String pkgName = pkgMap.keyAt(ip);
+ SparseArray<PackageState> uids = pkgMap.valueAt(ip);
+ for (int iu=0; iu<uids.size(); iu++) {
+ int uid = uids.keyAt(iu);
+ PackageState otherState = uids.valueAt(iu);
+ final int NPROCS = otherState.mProcesses.size();
+ final int NSRVS = otherState.mServices.size();
+ for (int iproc=0; iproc<NPROCS; iproc++) {
+ ProcessState otherProc = otherState.mProcesses.valueAt(iproc);
+ if (otherProc.mCommonProcess != otherProc) {
+ if (DEBUG) Slog.d(TAG, "Adding pkg " + pkgName + " uid " + uid
+ + " proc " + otherProc.mName);
+ ProcessState thisProc = getProcessStateLocked(pkgName, uid,
+ otherProc.mName);
+ if (thisProc.mCommonProcess == thisProc) {
+ if (DEBUG) Slog.d(TAG, "Existing process is single-package, splitting");
+ thisProc.mMultiPackage = true;
+ long now = SystemClock.uptimeMillis();
+ final PackageState pkgState = getPackageStateLocked(pkgName, uid);
+ thisProc = thisProc.clone(thisProc.mPackage, now);
+ pkgState.mProcesses.put(thisProc.mName, thisProc);
+ }
+ thisProc.add(otherProc);
+ }
+ }
+ for (int isvc=0; isvc<NSRVS; isvc++) {
+ ServiceState otherSvc = otherState.mServices.valueAt(isvc);
+ if (DEBUG) Slog.d(TAG, "Adding pkg " + pkgName + " uid " + uid
+ + " service " + otherSvc.mName);
+ ServiceState thisSvc = getServiceStateLocked(pkgName, uid,
+ null, otherSvc.mName);
+ thisSvc.add(otherSvc);
+ }
+ }
+ }
+
+ ArrayMap<String, SparseArray<ProcessState>> procMap = other.mProcesses.getMap();
+ for (int ip=0; ip<procMap.size(); ip++) {
+ SparseArray<ProcessState> uids = procMap.valueAt(ip);
+ for (int iu=0; iu<uids.size(); iu++) {
+ int uid = uids.keyAt(iu);
+ ProcessState otherProc = uids.valueAt(iu);
+ ProcessState thisProc = mProcesses.get(otherProc.mName, uid);
+ if (DEBUG) Slog.d(TAG, "Adding uid " + uid + " proc " + otherProc.mName);
+ if (thisProc == null) {
+ if (DEBUG) Slog.d(TAG, "Creating new process!");
+ thisProc = new ProcessState(this, otherProc.mPackage, uid, otherProc.mName);
+ mProcesses.put(otherProc.mName, uid, thisProc);
+ PackageState thisState = getPackageStateLocked(otherProc.mPackage, uid);
+ if (!thisState.mProcesses.containsKey(otherProc.mName)) {
+ thisState.mProcesses.put(otherProc.mName, thisProc);
+ }
+ }
+ thisProc.add(otherProc);
+ }
+ }
+
+ for (int i=0; i<ADJ_COUNT; i++) {
+ if (DEBUG) Slog.d(TAG, "Total duration #" + i + " inc by "
+ + other.mMemFactorDurations[i] + " from "
+ + mMemFactorDurations[i]);
+ mMemFactorDurations[i] += other.mMemFactorDurations[i];
+ }
+
+ if (other.mTimePeriodStartClock < mTimePeriodStartClock) {
+ mTimePeriodStartClock = other.mTimePeriodStartClock;
+ mTimePeriodStartClockStr = other.mTimePeriodStartClockStr;
+ }
+ mTimePeriodEndRealtime += other.mTimePeriodEndRealtime - other.mTimePeriodStartRealtime;
+ }
+
public static final Parcelable.Creator<ProcessStats> CREATOR
= new Parcelable.Creator<ProcessStats>() {
public ProcessStats createFromParcel(Parcel in) {
@@ -1098,6 +1174,43 @@
return true;
}
+ static byte[] readFully(InputStream stream) throws IOException {
+ int pos = 0;
+ int avail = stream.available();
+ byte[] data = new byte[avail];
+ while (true) {
+ int amt = stream.read(data, pos, data.length-pos);
+ //Log.i("foo", "Read " + amt + " bytes at " + pos
+ // + " of avail " + data.length);
+ if (amt <= 0) {
+ //Log.i("foo", "**** FINISHED READING: pos=" + pos
+ // + " len=" + data.length);
+ return data;
+ }
+ pos += amt;
+ avail = stream.available();
+ if (avail > data.length-pos) {
+ byte[] newData = new byte[pos+avail];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ }
+ }
+
+ public void read(InputStream stream) {
+ try {
+ byte[] raw = readFully(stream);
+ Parcel in = Parcel.obtain();
+ in.unmarshall(raw, 0, raw.length);
+ in.setDataPosition(0);
+ stream.close();
+
+ readFromParcel(in);
+ } catch (IOException e) {
+ mReadError = "caught exception: " + e;
+ }
+ }
+
public void readFromParcel(Parcel in) {
final boolean hadData = mPackages.getMap().size() > 0
|| mProcesses.getMap().size() > 0;
@@ -1289,7 +1402,7 @@
}
ServiceState serv = hadData ? pkgState.mServices.get(serviceName) : null;
if (serv == null) {
- serv = new ServiceState(this, pkgName, null);
+ serv = new ServiceState(this, pkgName, serviceName, null);
}
if (!serv.readFromParcel(in)) {
return;
@@ -1437,6 +1550,21 @@
return ps;
}
+ public ProcessStats.ServiceState getServiceStateLocked(String packageName, int uid,
+ String processName, String className) {
+ final ProcessStats.PackageState as = getPackageStateLocked(packageName, uid);
+ ProcessStats.ServiceState ss = as.mServices.get(className);
+ if (ss != null) {
+ ss.makeActive();
+ return ss;
+ }
+ final ProcessStats.ProcessState ps = processName != null
+ ? getProcessStateLocked(packageName, uid, processName) : null;
+ ss = new ProcessStats.ServiceState(this, packageName, className, ps);
+ as.mServices.put(className, ss);
+ return ss;
+ }
+
public void dumpLocked(PrintWriter pw, String reqPackage, long now, boolean dumpAll) {
long totalTime = dumpSingleTime(null, null, mMemFactorDurations, mMemFactor,
mStartTime, now);
@@ -1554,7 +1682,7 @@
}
}
- static long dumpSingleServiceTime(PrintWriter pw, String prefix, ServiceState service,
+ public static long dumpSingleServiceTime(PrintWriter pw, String prefix, ServiceState service,
int serviceType, int curState, long curStartTime, long now) {
long totalTime = 0;
int printedScreen = -1;
@@ -1947,6 +2075,29 @@
return pnew;
}
+ void add(ProcessState other) {
+ for (int i=0; i<other.mDurationsTableSize; i++) {
+ int ent = other.mDurationsTable[i];
+ int state = (ent>>OFFSET_TYPE_SHIFT)&OFFSET_TYPE_MASK;
+ if (DEBUG) Slog.d(TAG, "Adding state " + state + " duration "
+ + other.mStats.getLong(ent, 0));
+ addDuration(state, other.mStats.getLong(ent, 0));
+ }
+ for (int i=0; i<other.mPssTableSize; i++) {
+ int ent = other.mPssTable[i];
+ int state = (ent>>OFFSET_TYPE_SHIFT)&OFFSET_TYPE_MASK;
+ addPss(state, (int) other.mStats.getLong(ent, PSS_SAMPLE_COUNT),
+ other.mStats.getLong(ent, PSS_MINIMUM),
+ other.mStats.getLong(ent, PSS_AVERAGE),
+ other.mStats.getLong(ent, PSS_MAXIMUM),
+ other.mStats.getLong(ent, PSS_USS_MINIMUM),
+ other.mStats.getLong(ent, PSS_USS_AVERAGE),
+ other.mStats.getLong(ent, PSS_USS_MAXIMUM));
+ }
+ mNumExcessiveWake += other.mNumExcessiveWake;
+ mNumExcessiveCpu += other.mNumExcessiveCpu;
+ }
+
void resetSafely(long now) {
mDurationsTable = null;
mDurationsTableSize = 0;
@@ -2043,24 +2194,30 @@
if (mCurState != STATE_NOTHING) {
long dur = now - mStartTime;
if (dur > 0) {
- int idx = binarySearch(mDurationsTable, mDurationsTableSize, mCurState);
- int off;
- if (idx >= 0) {
- off = mDurationsTable[idx];
- } else {
- mStats.mAddLongTable = mDurationsTable;
- mStats.mAddLongTableSize = mDurationsTableSize;
- off = mStats.addLongData(~idx, mCurState, 1);
- mDurationsTable = mStats.mAddLongTable;
- mDurationsTableSize = mStats.mAddLongTableSize;
- }
- long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
- longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK] += dur;
+ addDuration(mCurState, dur);
}
}
mStartTime = now;
}
+ void addDuration(int state, long dur) {
+ int idx = binarySearch(mDurationsTable, mDurationsTableSize, state);
+ int off;
+ if (idx >= 0) {
+ off = mDurationsTable[idx];
+ } else {
+ mStats.mAddLongTable = mDurationsTable;
+ mStats.mAddLongTableSize = mDurationsTableSize;
+ off = mStats.addLongData(~idx, state, 1);
+ mDurationsTable = mStats.mAddLongTable;
+ mDurationsTableSize = mStats.mAddLongTableSize;
+ }
+ long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
+ if (DEBUG) Slog.d(TAG, "Duration of " + mName + " state " + state + " inc by " + dur
+ + " from " + longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK]);
+ longs[(off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK] += dur;
+ }
+
void incStartedServices(int memFactor, long now) {
if (mCommonProcess != this) {
mCommonProcess.incStartedServices(memFactor, now);
@@ -2094,46 +2251,53 @@
mLastPssState = mCurState;
mLastPssTime = SystemClock.uptimeMillis();
if (mCurState != STATE_NOTHING) {
- int idx = binarySearch(mPssTable, mPssTableSize, mCurState);
- int off;
- if (idx >= 0) {
- off = mPssTable[idx];
- } else {
- mStats.mAddLongTable = mPssTable;
- mStats.mAddLongTableSize = mPssTableSize;
- off = mStats.addLongData(~idx, mCurState, PSS_COUNT);
- mPssTable = mStats.mAddLongTable;
- mPssTableSize = mStats.mAddLongTableSize;
+ addPss(mCurState, 1, pss, pss, pss, uss, uss, uss);
+ }
+ }
+
+ void addPss(int state, int inCount, long minPss, long avgPss, long maxPss, long minUss,
+ long avgUss, long maxUss) {
+ int idx = binarySearch(mPssTable, mPssTableSize, state);
+ int off;
+ if (idx >= 0) {
+ off = mPssTable[idx];
+ } else {
+ mStats.mAddLongTable = mPssTable;
+ mStats.mAddLongTableSize = mPssTableSize;
+ off = mStats.addLongData(~idx, state, PSS_COUNT);
+ mPssTable = mStats.mAddLongTable;
+ mPssTableSize = mStats.mAddLongTableSize;
+ }
+ long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
+ idx = (off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK;
+ long count = longs[idx+PSS_SAMPLE_COUNT];
+ if (count == 0) {
+ longs[idx+PSS_SAMPLE_COUNT] = inCount;
+ longs[idx+PSS_MINIMUM] = minPss;
+ longs[idx+PSS_AVERAGE] = avgPss;
+ longs[idx+PSS_MAXIMUM] = maxPss;
+ longs[idx+PSS_USS_MINIMUM] = minUss;
+ longs[idx+PSS_USS_AVERAGE] = avgUss;
+ longs[idx+PSS_USS_MAXIMUM] = maxUss;
+ } else {
+ longs[idx+PSS_SAMPLE_COUNT] = count+inCount;
+ if (longs[idx+PSS_MINIMUM] > minPss) {
+ longs[idx+PSS_MINIMUM] = minPss;
}
- long[] longs = mStats.mLongs.get((off>>OFFSET_ARRAY_SHIFT)&OFFSET_ARRAY_MASK);
- idx = (off>>OFFSET_INDEX_SHIFT)&OFFSET_INDEX_MASK;
- long count = longs[idx+PSS_SAMPLE_COUNT];
- if (count == 0) {
- longs[idx+PSS_SAMPLE_COUNT] = 1;
- longs[idx+PSS_MINIMUM] = pss;
- longs[idx+PSS_AVERAGE] = pss;
- longs[idx+PSS_MAXIMUM] = pss;
- longs[idx+PSS_USS_MINIMUM] = uss;
- longs[idx+PSS_USS_AVERAGE] = uss;
- longs[idx+PSS_USS_MAXIMUM] = uss;
- } else {
- longs[idx+PSS_SAMPLE_COUNT] = count+1;
- if (longs[idx+PSS_MINIMUM] > pss) {
- longs[idx+PSS_MINIMUM] = pss;
- }
- longs[idx+PSS_AVERAGE] = (long)(
- ((longs[idx+PSS_AVERAGE]*(double)count)+pss) / (count+1) );
- if (longs[idx+PSS_MAXIMUM] < pss) {
- longs[idx+PSS_MAXIMUM] = pss;
- }
- if (longs[idx+PSS_USS_MINIMUM] > uss) {
- longs[idx+PSS_USS_MINIMUM] = uss;
- }
- longs[idx+PSS_USS_AVERAGE] = (long)(
- ((longs[idx+PSS_USS_AVERAGE]*(double)count)+uss) / (count+1) );
- if (longs[idx+PSS_USS_MAXIMUM] < uss) {
- longs[idx+PSS_USS_MAXIMUM] = uss;
- }
+ longs[idx+PSS_AVERAGE] = (long)(
+ ((longs[idx+PSS_AVERAGE]*(double)count)+(avgPss*(double)inCount))
+ / (count+inCount) );
+ if (longs[idx+PSS_MAXIMUM] < maxPss) {
+ longs[idx+PSS_MAXIMUM] = maxPss;
+ }
+ if (longs[idx+PSS_USS_MINIMUM] > minUss) {
+ longs[idx+PSS_USS_MINIMUM] = minUss;
+ }
+ longs[idx+PSS_USS_AVERAGE] = (long)(
+ ((longs[idx+PSS_USS_AVERAGE]*(double)count)+(avgUss*(double)inCount))
+ / (count+inCount) );
+ if (longs[idx+PSS_USS_MAXIMUM] < maxUss) {
+ longs[idx+PSS_USS_MAXIMUM] = maxUss;
}
}
}
@@ -2239,14 +2403,15 @@
public static final class ServiceState {
final ProcessStats mStats;
- final String mPackage;
+ public final String mPackage;
+ public final String mName;
ProcessState mProc;
int mActive = 1;
- static final int SERVICE_STARTED = 0;
- static final int SERVICE_BOUND = 1;
- static final int SERVICE_EXEC = 2;
+ public static final int SERVICE_STARTED = 0;
+ public static final int SERVICE_BOUND = 1;
+ public static final int SERVICE_EXEC = 2;
static final int SERVICE_COUNT = 3;
int[] mDurationsTable;
@@ -2264,9 +2429,10 @@
public int mExecState = STATE_NOTHING;
long mExecStartTime;
- public ServiceState(ProcessStats processStats, String pkg, ProcessState proc) {
+ public ServiceState(ProcessStats processStats, String pkg, String name, ProcessState proc) {
mStats = processStats;
mPackage = pkg;
+ mName = name;
mProc = proc;
}
@@ -2287,6 +2453,17 @@
return mActive > 0;
}
+ void add(ServiceState other) {
+ for (int i=0; i<other.mDurationsTableSize; i++) {
+ int ent = other.mDurationsTable[i];
+ int state = (ent>>OFFSET_TYPE_SHIFT)&OFFSET_TYPE_MASK;
+ addStateTime(state, other.mStats.getLong(ent, 0));
+ }
+ mStartedCount += other.mStartedCount;
+ mBoundCount += other.mBoundCount;
+ mExecCount += other.mExecCount;
+ }
+
void resetSafely(long now) {
mDurationsTable = null;
mDurationsTableSize = 0;
@@ -2321,9 +2498,8 @@
return true;
}
- void addStateTime(int opType, int memFactor, long time) {
+ void addStateTime(int state, long time) {
if (time > 0) {
- int state = opType + (memFactor*SERVICE_COUNT);
int idx = binarySearch(mDurationsTable, mDurationsTableSize, state);
int off;
if (idx >= 0) {
@@ -2342,15 +2518,16 @@
void commitStateTime(long now) {
if (mStartedState != STATE_NOTHING) {
- addStateTime(SERVICE_STARTED, mStartedState, now - mStartedStartTime);
+ addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
+ now - mStartedStartTime);
mStartedStartTime = now;
}
if (mBoundState != STATE_NOTHING) {
- addStateTime(SERVICE_BOUND, mBoundState, now - mBoundStartTime);
+ addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT), now - mBoundStartTime);
mBoundStartTime = now;
}
if (mExecState != STATE_NOTHING) {
- addStateTime(SERVICE_EXEC, mExecState, now - mExecStartTime);
+ addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);
mExecStartTime = now;
}
}
@@ -2362,7 +2539,8 @@
int state = started ? memFactor : STATE_NOTHING;
if (mStartedState != state) {
if (mStartedState != STATE_NOTHING) {
- addStateTime(SERVICE_STARTED, mStartedState, now - mStartedStartTime);
+ addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
+ now - mStartedStartTime);
} else if (started) {
mStartedCount++;
}
@@ -2386,7 +2564,8 @@
int state = bound ? memFactor : STATE_NOTHING;
if (mBoundState != state) {
if (mBoundState != STATE_NOTHING) {
- addStateTime(SERVICE_BOUND, mBoundState, now - mBoundStartTime);
+ addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT),
+ now - mBoundStartTime);
} else if (bound) {
mBoundCount++;
}
@@ -2402,7 +2581,7 @@
int state = executing ? memFactor : STATE_NOTHING;
if (mExecState != state) {
if (mExecState != STATE_NOTHING) {
- addStateTime(SERVICE_EXEC, mExecState, now - mExecStartTime);
+ addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);
} else if (executing) {
mExecCount++;
}
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
index f8332c4..a3df291 100644
--- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
+++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
@@ -184,7 +184,7 @@
KeyEvent event = events[i];
event = KeyEvent.changeFlags(event, event.getFlags()
| KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE);
- viewRootImpl.dispatchKey(event);
+ viewRootImpl.dispatchInputEvent(event);
}
}
}
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index 61ace4a..f5eb389 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -220,6 +220,8 @@
} else {
whichHeap = HEAP_ASHMEM;
}
+ } else if (strncmp(name, "[anon:libc_malloc]", 18) == 0) {
+ whichHeap = HEAP_NATIVE;
} else if (strncmp(name, "[stack", 6) == 0) {
whichHeap = HEAP_STACK;
} else if (strncmp(name, "/dev/", 5) == 0) {
@@ -246,6 +248,8 @@
} else if (nameLen > 4 && strcmp(name+nameLen-4, ".art") == 0) {
whichHeap = HEAP_ART;
is_swappable = true;
+ } else if (strncmp(name, "[anon:", 6) == 0) {
+ whichHeap = HEAP_UNKNOWN;
} else if (nameLen > 0) {
whichHeap = HEAP_UNKNOWN_MAP;
} else if (start == prevEnd && prevHeap == HEAP_SO) {
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 70a4daa..6d46cf9 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -610,6 +610,7 @@
const jchar* glyphs = value->getGlyphs();
size_t glyphsCount = value->getGlyphsCount();
jfloat totalAdvance = value->getTotalAdvance();
+ x += xOffsetForTextAlign(paint, totalAdvance);
const float* positions = value->getPos();
int bytesCount = glyphsCount * sizeof(jchar);
const SkRect& r = value->getBounds();
@@ -617,8 +618,7 @@
bounds.translate(x, y);
renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
- x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
- paint, totalAdvance, bounds);
+ x, y, positions, paint, totalAdvance, bounds);
}
static void renderTextOnPath(OpenGLRenderer* renderer, const jchar* text, int count,
@@ -646,6 +646,7 @@
const jchar* glyphs = value->getGlyphs();
size_t glyphsCount = value->getGlyphsCount();
jfloat totalAdvance = value->getTotalAdvance();
+ x += xOffsetForTextAlign(paint, totalAdvance);
const float* positions = value->getPos();
int bytesCount = glyphsCount * sizeof(jchar);
const SkRect& r = value->getBounds();
@@ -653,8 +654,7 @@
bounds.translate(x, y);
renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
- x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
- paint, totalAdvance, bounds);
+ x, y, positions, paint, totalAdvance, bounds);
}
static void android_view_GLES20Canvas_drawTextArray(JNIEnv* env, jobject clazz,
diff --git a/core/jni/android_view_InputDevice.cpp b/core/jni/android_view_InputDevice.cpp
index 5c8e010..bef0f84 100644
--- a/core/jni/android_view_InputDevice.cpp
+++ b/core/jni/android_view_InputDevice.cpp
@@ -53,11 +53,15 @@
return NULL;
}
+ const InputDeviceIdentifier& ident = deviceInfo.getIdentifier();
+
ScopedLocalRef<jobject> inputDeviceObj(env, env->NewObject(gInputDeviceClassInfo.clazz,
- gInputDeviceClassInfo.ctor, deviceInfo.getId(), deviceInfo.getGeneration(),
- deviceInfo.getControllerNumber(), nameObj.get(), descriptorObj.get(),
- deviceInfo.isExternal(), deviceInfo.getSources(), deviceInfo.getKeyboardType(),
- kcmObj.get(), deviceInfo.hasVibrator(), deviceInfo.hasButtonUnderPad()));
+ gInputDeviceClassInfo.ctor, deviceInfo.getId(), deviceInfo.getGeneration(),
+ deviceInfo.getControllerNumber(), nameObj.get(),
+ static_cast<int32_t>(ident.vendor), static_cast<int32_t>(ident.product),
+ descriptorObj.get(), deviceInfo.isExternal(), deviceInfo.getSources(),
+ deviceInfo.getKeyboardType(), kcmObj.get(), deviceInfo.hasVibrator(),
+ deviceInfo.hasButtonUnderPad()));
const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges();
for (size_t i = 0; i < ranges.size(); i++) {
@@ -88,7 +92,7 @@
GET_METHOD_ID(gInputDeviceClassInfo.ctor, gInputDeviceClassInfo.clazz,
"<init>",
- "(IIILjava/lang/String;Ljava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZ)V");
+ "(IIILjava/lang/String;IILjava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZ)V");
GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz,
"addMotionRange", "(IIFFFFF)V");
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 06d6895..848c585 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"verhoed program-oorskakelings"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Verhoed dat die gebruiker na \'n ander program oorskakel."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"kry huidige program-inligting"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Laat die houer toe om private inligting oor die huidige program op die voorgrond van die skerm te herwin."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitor en beheer alle programlaaiery"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Laat die program toe om te monitor en te beheer hoe die stelsel aktiwiteite laai. Kwaadwillige programme kan dalk die stelsel heeltemal in gevaar stel. Hierdie toestemming is net nodig vir ontwikkeling, en nooit vir normale gebruik nie."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"stuur uitsending met pakket verwyder"</string>
@@ -362,8 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Laat die houer toe om aan die top-koppelvlak van \'n drukdiens te verbind. Behoort nooit vir gewone programme nodig te wees nie."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"kry toegang tot alle druktake"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Gee die houer toegang tot druktake wat deur \'n ander program geskep is. Behoort nooit vir normale programme nodig te wees nie."</string>
- <string name="permlab_bindNfcService" msgid="2752731300419410724">"bind aan NFC-diens"</string>
- <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Laat die houer toe om die programme wat NFC-kaarte nastrewe, te bind. Behoort nooit vir normale programme nodig te wees nie."</string>
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"verbind aan NFC-diens"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Laat die houer toe om te verbind aan programme wat NFC-kaarte nastrewe. Behoort nooit vir normale programme nodig te wees nie."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"bind aan \'n teksdiens"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Dit laat die houer toe om aan die topvlak-koppelvlak van \'n teksdiens (bv SpellCheckerService) te bind. Dit moet nooit vir normale programme nodig wees nie."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"bind aan \'n VPN-diens"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Laat die program toe om Wi-Fi-skerms op te stel en daaraan te koppel."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"beheer Wi-Fi-skerms"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Laat die program toe om laevlak-kenmerke van Wi-Fi-skerms te beheer."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"vang oudio-uitset vas"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Laat die program oudio-uitset vasvang en herlei."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"vang video-uitset vas"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Laat die program video-uitset vasvang en herlei."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"vang sekure video-uitset vas"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Laat die program sekure video-uitset vasvang en herlei."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"verander jou klankinstellings"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Laat die program toe om globale klankinstellings soos volume en watter luidspreker vir uitvoer gebruik word, te verander."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"neem klank op"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Laat die houer toe om aan die top-koppelvlak van \'n kennisgewingluisteraardiens te bind. Behoort nooit vir gewone programme nodig te wees nie."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"roep die opstellingprogram op wat deur die diensverskaffer voorsien is"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Laat die houer toe om die opstellingsprogram wat deur die diensverskaffer voorsien word, op te roep. Behoort nooit vir gewone programme nodig te wees nie."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"luister vir waarnemings oor netwerktoestande"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Laat \'n program luister vir waarnemings oor netwerktoestande. Behoort nooit nodig te wees vir normale programme nie."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Stel wagwoordreëls"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Beheer lengte en watter karakters wat in die skermontsluit-wagwoorde gebruik word."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitor pogings om skerm te ontsluit"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index d554d54..b2ecd52 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"የትግበራ መቀያየርን ተከላከል"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"ተጠቃሚው ከሌላ መተግበሪያ ከመቀየር ይከላከላል።"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"የአሁኑ የመተግበሪያ መረጃ ያግኙ"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"ያዢው በማያ ገጹ ፊት ላይ ስላለው የአሁኑ መተግበሪያ የግል መረጃ እንዲያመጣ ያስችለዋል።"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"ሁሉንም መተግበሪያ ማስነሻ አሳይ እና ተቆጣጠር"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"እንቅስቃሴዎችን ስርዓቱ እንዴት እንደሚያስጀምር ለመከታተል እና ለመቆጣጠር ለመተግበሪያው ይፈቅዳሉ፡፡ ተንኮል አዘል መተግበሪያዎች የስርዓቱን ክብረ ገመና ሙሉለሙሉ ሊያጋልጡ ይችላሉ፡፡ ይህ ፍቃድ የሚያስፈልገው ለግንባታ ብቻ ነው፤ ለመደበኛ አጠቃቀም ፈጽሞ አይደለም፡፡"</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"አካታች የተወገደለት ስርጭት ላክ"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"መተግበሪያው የWifi ማሳያዎችን እንዲያዋቅርና ከእነሱ ጋር እንዲገናኝ ይፈቅድለታል።"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"የWifi ማሳያዎችን ተቆጣጠር"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"መተግበሪያው በዝቅተኛ ደረጃ ላይ ያሉ የWifi ማሳያዎችን እንዲቆጣጠር ይፈቅድለታል።"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"የድምጽ ውጽዓት ይቅረጹ"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"መተግበሪያው የድምጽ ውጽዓት እንዲቀርጽ እና አቅጣጫውን እንዲያዞር ያስችለዋል።"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"የቪዲዮ ውጽዓት ይቅረጹ"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"መተግበሪያው የቪዲዮ ውጽዓት እንዲቀርጽ እና አቅጣጫውን እንዲያዞር ያስችለዋል።"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"ደህንነቱ የተጠበቀ የቪዲዮ ውጽዓት ይቅረጹ"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"መተግበሪያው ደህንነቱ የተጠበቀ የቪዲዮ ውጽዓት እንዲቀርጽ እና አቅጣጫውን እንዲያዞር ያስችለዋል።"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"የድምፅ ቅንብሮችን ለውጥ"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"መተግበሪያው አንደ የድምጽ መጠን እና ለውጽአት የትኛውን የድምጽ ማጉያ ጥቅም ላይ እንደዋለ የመሳሰሉ ሁለንተናዊ የድምጽ ቅንብሮችን እንዲያስተካክል ይፈቅድለታል።"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ኦዲዮ ቅዳ"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"ያዢው የማሳወቂያ አዳማጭ አገልግሎቱን ከከፍተኛ-ደረጃ በይነገጹ ጋር እንዲያስር ያስችለዋል። ለመደበኛ መተግበሪያዎች በጭራሽ አያስፈልግም።"</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"በድምጸ-ተያያዥ ሞደም የቀረበው የውቅር መተግበሪያውን መጥራት"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"ያዢው በድምጸ-ተያያዥ ሞደም የቀረበው የውቅር መተግበሪያውን እንዲጠራው ያስችለዋል። ለመደበኛ መተግበሪያዎች በጭራሽ አያስፈልግም።"</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"በአውታረ መረብ ሁኔታዎች ላይ የተስተዋሉ ነገሮችን ያዳምጣል"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"አንድ መተግበሪያ በአውታረ መረብ ሁኔታዎች ላይ የተስተዋሉ ነገሮችን እንዲያዳምጥ ያስችለዋል። ለመደበኛ መተግበሪያዎች በጭራሽ አስፈላጊ ሊሆን አይገባም።"</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"የይለፍ ቃል ድንቦች አዘጋጅ"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"በማያ-መክፈት የተፈቀዱ የይለፍ ቃል ርዝመት እና ቁምፊዎች ተቆጣጠር።"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"የማሳያ-ክፈት ሙከራዎችን አሳይ"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 60dc57e..bc22b80 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"منع التبديل بين التطبيقات"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"لمنع المستخدم من التبديل إلى تطبيق آخر."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"الحصول على معلومات عن التطبيق الحالي"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"للسماح للمالك باسترداد معلومات خاصة عن التطبيق الحالي في مقدمة الشاشة."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"مراقبة بدء تشغيل جميع التطبيقات والتحكم فيها"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"للسماح للتطبيق بمراقبة كيفية بدء النظام للأنشطة والتحكم فيها. قد تُعرِّض التطبيقات الضارة النظام للضرر بشكل كامل. لن تكون هناك حاجة لهذا الإذن سوى للتطوير فقط، وليس للاستخدام العادي على الإطلاق."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"إرسال بث الحزمة الذي تمت إزالته"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"للسماح للتطبيق بتهيئة شاشات Wi-Fi والاتصال بها."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"التحكم في شاشات Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"للسماح للتطبيق بالتحكم في الميزات ذات المستوى المنخفض في شاشات Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"التقاط إخراج الصوت"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"السماح للتطبيق بالتقاط إخراج الصوت وإعادة توجيهه."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"التقاط إخراج الفيديو"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"السماح للتطبيق بالتقاط إخراج الفيديو وإعادة توجيهه."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"التقاط إخراج الفيديو الآمن"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"السماح للتطبيق بالتقاط إخراج الفيديو الآمن وإعادة توجيهه."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"تغيير إعداداتك الصوتية"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"للسماح للتطبيق بتعديل إعدادات الصوت العامة مثل مستوى الصوت وأي السماعات يتم استخدامها للاستماع."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"تسجيل الصوت"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"يتيح للمالك الربط بواجهة المستوى العلوي لخدمة تلقّي الإشعارات الصوتية. ولن تكون هناك حاجة إليه مطلقًا مع التطبيقات العادية."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"استدعاء تطبيق التهيئة الذي يوفره مشغل شبكة الجوال"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"للسماح للمالك باستدعاء تطبيق التهيئة الذي يوفره مشغل شبكة الجوال. لن تكون هناك حاجة إليه مطلقًا مع التطبيقات العادية."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"تعيين قواعد كلمة المرور"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"يمكنك التحكم في الطول والأحرف المسموح بها في كلمات مرور إلغاء تأمين الشاشة."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"مراقبة محاولات إلغاء قفل الشاشة"</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 86bb766..83a54b6 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -316,7 +316,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"прадухіляць пераключэнне прыкладанняў"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Не дазваляе карыстальніку пераходзіць да іншага прыкладання."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"атрымаць бягучую інфармацыю прыкладання"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Дазваляе ўладальніку атрымлiваць асабістую інфармацыю аб бягучым прыкладаннi на пярэднім плане экрана."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"адсочваць і кантраляваць запуск усіх прыкладанняў"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Дазваляе прыкладанню сачыць і кантраляваць, як сістэма запускае працэсы. Шкоднасныя прыкладанні могуць цалкам парушыць працу сістэмы. Гэты дазвол патрэбны толькі для распрацоўкі, ніколі для звычайнага выкарыстання."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"трансляваць паведамленні аб выдаленні пакетаў"</string>
@@ -675,6 +676,10 @@
<skip />
<!-- no translation found for permdesc_invokeCarrierSetup (4159549152529111920) -->
<skip />
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Устанавіць правілы паролю"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Кіраванне даўжынёй і колькасцю знакаў у паролі разблакоўкі экрана."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Сачыць за спробамі разблакоўкі экрана"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 1452ecf..21b4d95 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"предотвратяване на превключването между приложения"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Не позволява на потребителя да превключва към друго приложение."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"извличане на информация за текущото приложение"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Разрешава на собственика да извлича частна информация за текущото приложение на преден план на екрана."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"наблюдение и контрол на стартирането на всички приложения"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Разрешава на приложението да наблюдава и контролира как системата стартира дейности. Злонамерените приложения могат изцяло да компрометират системата. Това разрешение е нужно само за програмиране, никога за нормална употреба."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"изпращане на излъчване при премахнат пакет"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Разрешава на приложението да конфигурира и да се свързва с дисплеите през WiFi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"контролиране на дисплеите през WiFi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Разрешава на приложението да контролира функциите от ниско ниво на дисплеите през WiFi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"записване на възпроизвеждания звук"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Разрешава на приложението да записва и пренасочва възпроизвеждания звук."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"записване на възпроизвеждания образ"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Разрешава на приложението да записва и пренасочва възпроизвеждания образ."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"записване на защитеното възпроизвеждане на образ"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Разрешава на приложението да записва и пренасочва защитеното възпроизвеждане на образ."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"промяна на настройките ви за звука"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Разрешава на приложението да променя глобалните настройки за звука, като например силата и това, кой високоговорител се използва за изход."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"запис на звук"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Разрешава на притежателя да се обвърже с интерфейса от първо ниво на услуга за слушател на известия. Нормалните приложения не би трябвало никога да се нуждаят от това."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"извикване на предоставеното от оператора приложение за конфигуриране"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Разрешава на притежателя да извиква предоставеното от оператора приложение за конфигуриране. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"слушане за наблюдения на мрежовите условия"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Разрешава на приложението да слуша за наблюдения на мрежовите условия. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Задаване на правила за паролата"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Контролирайте дължината и разрешените знаци за паролите за отключване на екрана."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Наблюдаване на опитите за отключване на екрана"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 96a35d0..7379498 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"impedir els canvis d\'aplicació"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Impedeix que l\'usuari canviï a una altra aplicació."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obtenció d\'informació de l\'aplicació actual"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permet que el titular recuperi informació privada sobre l\'aplicació actual al primer pla de la pantalla."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"supervisa i controla tots els inicis d\'aplicacions"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permet que l\'aplicació supervisi i controli com el sistema inicia activitats. Les aplicacions malicioses poden comprometre totalment el sistema. Aquest permís només és necessari per al desenvolupament, mai per a l\'ús normal."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar difusió d\'eliminació de paquet"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permet a l\'aplicació configurar-se i connectar-se a les pantalles Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"control de les pantalles Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permet a l\'aplicació controlar les funcions de baix nivell de les pantalles Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"captura la sortida d\'àudio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permet que l\'aplicació capturi i redirigeixi la sortida d\'àudio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"captura la sortida de vídeo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permet que l\'aplicació capturi i redirigeixi la sortida de vídeo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"captura la sortida de vídeo segur"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permet que l\'aplicació capturi i redirigeixi la sortida de vídeo segur."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"canviar la configuració d\'àudio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permet que l\'aplicació modifiqui la configuració d\'àudio general, com ara el volum i l\'altaveu de sortida que es fa servir."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"enregistrar àudio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permet que el titular vinculi la interfície de nivell superior d\'un servei de processament de notificacions. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"invoca l\'aplicació de configuració proporcionada per l\'operador"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permet que el titular invoqui l\'aplicació de configuració proporcionada per l\'operador. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"conèixer les observacions sobre les condicions de la xarxa"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permet que una aplicació conegui les observacions sobre les condicions de la xarxa. No s\'ha de necessitar mai per a aplicacions normals."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Defineix les normes de contrasenya"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controla la longitud i els caràcters permesos a les contrasenyes de desbloqueig de pantalla."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Control d\'intents de desbloqueig de pantalla"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index e9d65f80..5a3bdf8 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"zabránění přepínání aplikací"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Zabrání uživateli přepnout na jinou aplikaci."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"získat informace o aktuální aplikaci"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Umožňuje držiteli získat soukromé informace o aktuální aplikaci na popředí obrazovky."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"sledování a řízení spouštění všech aplikací"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Umožňuje aplikaci sledovat a řídit spouštění činností systémem. Škodlivé aplikace mohou systém zcela ovládnout. Toto oprávnění je požadováno pouze pro účely vývoje, nikdy pro běžné použití."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"odeslání vysílání o odstranění balíčku"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Umožňuje navázání na nejvyšší úroveň tiskové služby. Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"přístup ke všem tiskovým úlohám"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Umožňuje přístup k tiskovým úlohám vytvořeným jinou aplikací. Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"navázat se na službu NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Umožňuje držiteli navázat se na aplikace, které emulují karty NFC. Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"navázat se na textovou službu"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Umožňuje držiteli připojit se k nejvyšší úrovni rozhraní textové služby (např. SpellCheckerService). Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"navázat se na službu VPN"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Povoluje aplikaci připojit a konfigurovat displeje přes Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"ovládat displeje přes Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Povoluje aplikaci ovládat základní funkce displejů přes Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"zachytit výstup zvuku"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Umožní aplikaci zachytit a přesměrovat výstup zvuku."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"zachytit výstup videa"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Umožní aplikaci zachytit a přesměrovat výstup videa."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"zachytit zabezpečený výstup videa"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Umožní aplikaci zachytit a přesměrovat zabezpečený výstup videa."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"změna nastavení zvuku"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Umožňuje aplikaci změnit globální nastavení zvuku, například hlasitost či reproduktor pro výstup zvuku."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"nahrávání zvuku"</string>
@@ -661,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Umožňuje držiteli navázat se na nejvyšší úroveň služby pro poslouchání oznámení. Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"vyvolat konfigurační aplikaci poskytnutou operátorem"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Umožňuje vyvolání konfigurační aplikace poskytnuté operátorem. Běžné aplikace by toto oprávnění neměly nikdy požadovat."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"naslouchat informacím o stavu sítě"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Umožňuje aplikaci naslouchat informacím o stavu sítě. Běžné aplikace by toto oprávnění neměly nikdy potřebovat."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Nastavit pravidla pro heslo"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Řídit délku hesel pro odemčení obrazovky a povolené znaky."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Sledovat pokusy o odemčení obrazovky"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index c97c7e7..56022e6 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"undgå programskift"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Forhindrer brugeren i at skifte til en anden app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"få aktuelle app-oplysninger"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Tillader, at brugeren henter private oplysninger om den aktuelle applikation i forgrunden på skærmen."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"overvåge og kontrollere åbning af alle apps"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Tillader, at appen kan overvåge og kontrollere, hvordan systemet starter aktiviteter. Ondsindede apps kan fuldstændig kompromittere systemet. Denne tilladelse er kun nødvendig til udvikling, aldrig til normal brug."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"send udsendelse om fjernet pakke"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Tillader, at appen konfigurerer og opretter forbindelse til Wi-Fi-skærme."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"kontrollér Wi-Fi-skærme"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Tillader, at appen kontrollerer Wi-Fi-skærmfunktioner på lavt niveau."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"opfang et lydoutput"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Tillader, at appen opfanger og omdirigerer et lydoutput."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"opfang et videooutput"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Tillader, at appen opfanger og omdirigerer et videooutput."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"opfang et sikkert videooutput"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Tillader, at appen opfanger og omdirigerer et sikkert videooutput."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"skift dine lydindstillinger"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Tillader, at appen kan ændre globale lydindstillinger, som f.eks. lydstyrke og hvilken højttaler der bruges til output."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"optage lyd"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Tillader brugeren at forpligte sig til en underretningslyttertjenestes grænseflade på øverste niveau. Bør aldrig være nødvendigt til almindelige apps."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"aktivere konfigurationsappen, der leveres af mobilselskabet"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Tillader, at brugeren aktiverer konfigurationsappen, der er forsynet af mobilselskabet. Dette bør aldrig være nødvendigt for almindelige apps."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"observer netværksforhold"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Tillader, at en applikation observerer netværksforhold. Bør aldrig være nødvendigt for almindelige apps."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Indstil regler for adgangskode"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontroller længden samt tilladte tegn i adgangskoder til oplåsning af skærmen."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Overvåg forsøg på oplåsning af skærm"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index b26f65b..c0006dd 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -236,7 +236,7 @@
<string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"Verbesserte Web-Bedienung aktivieren"</string>
<string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"Skripts können installiert werden, um den Zugriff auf App-Inhalte zu erleichtern."</string>
<string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"Text bei der Eingabe beobachten"</string>
- <string name="capability_desc_canRequestFilterKeyEvents" msgid="7463135292204152818">"Einschließlich persönlicher Daten wie Kreditkartennummern und Passwörter."</string>
+ <string name="capability_desc_canRequestFilterKeyEvents" msgid="7463135292204152818">"Einschließlich personenbezogener Daten wie Kreditkartennummern und Passwörter."</string>
<string name="permlab_statusBar" msgid="7417192629601890791">"Statusleiste deaktivieren oder ändern"</string>
<string name="permdesc_statusBar" msgid="8434669549504290975">"Ermöglicht der App, die Statusleiste zu deaktivieren oder Systemsymbole hinzuzufügen oder zu entfernen"</string>
<string name="permlab_statusBarService" msgid="7247281911387931485">"Statusleiste"</string>
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"App-Wechsel verhindern"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Hindert den Nutzer daran, zu einer anderen App zu wechseln"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"Informationen zur aktuellen App abrufen"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Ermöglicht es dem Inhaber, private Informationen zur aktuellen App im Vordergrund des Bildschirms abzurufen"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"Start von Apps überwachen und steuern"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Ermöglicht der App, den Start von Systemaktivitäten zu überwachen und zu steuern. Schädliche Apps können so das gesamte System beeinträchtigen. Diese Berechtigung wird nur zu Entwicklungszwecken und nie für die normale Nutzung benötigt."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"Broadcast ohne Paket senden"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Erlaubt der App, WLAN-Anzeigen zu konfigurieren und eine Verbindung zu diesen herzustellen"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"WLAN-Anzeigen steuern"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Erlaubt der App, untergeordnete Funktionen von WLAN-Anzeigen zu steuern"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"Audioausgabe erfassen"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Ermöglicht der App das Erfassen und Weiterleiten von Audioausgaben"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"Videoausgabe erfassen"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Ermöglicht der App das Erfassen und Weiterleiten von Videoausgaben"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"Sichere Videoausgabe erfassen"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Ermöglicht der App das Erfassen und Weiterleiten von sicheren Videoausgaben"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"Audio-Einstellungen ändern"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Ermöglicht der App, globale Audio-Einstellungen zu ändern, etwa die Lautstärke und den Lautsprecher für die Ausgabe."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"Audio aufnehmen"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Ermöglicht dem Inhaber, sich an die Oberfläche der obersten Ebene eines Benachrichtigungs-Listener-Dienstes zu binden. Sollte nie für normale Apps benötigt werden."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"Vom Mobilfunkanbieter bereitgestellte Konfigurations-App aufrufen"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Ermöglicht dem Inhaber, die vom Mobilfunkanbieter bereitgestellte Konfigurations-App aufzurufen. Sollte für normale Apps nie benötigt werden."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"Informationen zu den Netzwerkbedingungen erfassen"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Ermöglicht der App, Informationen zu den Netzwerkbedingungen zu erfassen. Sollte für normale Apps nie benötigt werden."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Passwortregeln festlegen"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Zulässige Länge und Zeichen für Passwörter zum Entsperren des Bildschirms festlegen"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Versuche zum Entsperren des Displays überwachen"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 571f155..c762d6f 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"αποτροπή εναλλαγών εφαρμογών"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Δεν επιτρέπει στο χρήστη να μεταβεί σε άλλη εφαρμογή."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"λήψη πληροφοριών σχετικά με την τρέχουσα εφαρμογή"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Δίνει στον κάτοχο τη δυνατότητα ανάκτησης απόρρητων πληροφοριών σχετικά με την τρέχουσα εφαρμογή στο προσκήνιο της οθόνης."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"παρακολούθηση και έλεγχος όλων των εκκινήσεων εφαρμογών"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Επιτρέπει στην εφαρμογή να παρακολουθεί και να ελέγχει τον τρόπο με τον οποίο το σύστημα εκκινεί δραστηριότητες. Τυχόν κακόβουλες εφαρμογές ενδέχεται να θέσουν σε κίνδυνο το σύστημα. Αυτή η άδεια είναι απαραίτητη μόνο για σκοπούς ανάπτυξης και ποτέ για συνήθη χρήση."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"αποστολή εκπομπής χωρίς πακέτο"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Επιτρέπει τη διαμόρφωση της εφαρμογής και τη σύνδεσης σε οθόνες Wifi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"έλεγχος οθονών Wifi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Επιτρέπει στην εφαρμογή τον έλεγχο των λειτουργιών χαμηλού επιπέδου των οθονών Wifi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"έγγραφή εξόδου ήχου"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Δίνει στην εφαρμογή τη δυνατότητα εγγραφής και ανακατεύθυνσης εξόδου ήχου."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"έγγραφή εξόδου βίντεο"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Δίνει στην εφαρμογή τη δυνατότητα εγγραφής και ανακατεύθυνσης εξόδου βίντεο."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"έγγραφή ασφαλούς εξόδου βίντεο"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Δίνει στην εφαρμογή τη δυνατότητα εγγραφής και ανακατεύθυνσης ασφαλούς εξόδου βίντεο."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"αλλαγή των ρυθμίσεων ήχου"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Επιτρέπει στην εφαρμογή την τροποποίηση καθολικών ρυθμίσεων ήχου, όπως η ένταση και ποιο ηχείο χρησιμοποιείται για έξοδο."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"εγγραφή ήχου"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Επιτρέπει στον κάτοχο τη δέσμευση στη διεπαφή ανωτάτου επιπέδου μιας υπηρεσίας ακρόασης ειδοποιήσεων. Δεν απαιτείται σε κανονικές εφαρμογές."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"κλήση της εφαρμογής διαμόρφωσης που παρέχεται από την εταιρεία κινητής τηλεφωνίας"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Επιτρέπει στον κάτοχο την κλήση της εφαρμογής διαμόρφωσης που παρέχεται από την εταιρεία κινητής τηλεφωνίας. Δεν απαιτείται για κανονικές εφαρμογές."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"λήψη παρατηρήσεων σχετικά με την κατάσταση δικτύου"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Επιτρέπει σε μια εφαρμογή να λαμβάνει παρατηρήσεις σχετικά με την κατάσταση δικτύου. Δεν θα πρέπει να απαιτείται ποτέ για κανονικές εφαρμογές."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Ορισμός κανόνων κωδικού πρόσβασης"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Έλεγχος του μεγέθους και των χαρακτήρων που επιτρέπονται στους κωδικούς πρόσβασης ξεκλειδώματος οθόνης."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Παρακολούθηση προσπαθειών ξεκλειδώματος οθόνης"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 3a08f98..ff26cf4 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"prevent app switches"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Prevents the user from switching to another app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"get current app info"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Allows the holder to retrieve private information about the current application in the foreground of the screen."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitor and control all app launching"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Allows the app to monitor and control how the system launches activities. Malicious apps may completely compromise the system. This permission is only needed for development, never for normal use."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"send package removed broadcast"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Allows the app to configure and connect to Wi-Fi displays."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"control Wi-Fi displays"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Allows the app to control low-level features of Wi-Fi displays."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"capture audio output"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Allows the app to capture and redirect audio output."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"capture video output"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Allows the app to capture and redirect video output."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"capture secure video output"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Allows the app to capture and redirect secure video output."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"change your audio settings"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Allows the app to modify global audio settings such as volume and which speaker is used for output."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"record audio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Allows the holder to bind to the top-level interface of a notification listener service. Should never be needed for normal apps."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"invoke the carrier-provided configuration app"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Allows the holder to invoke the carrier-provided configuration app. Should never be needed for normal apps."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"listen for observations on network conditions"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Allows an application to listen for observations on network conditions. Should never be needed for normal apps."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Set password rules"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Control the length and the characters allowed in screen-unlock passwords."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitor screen-unlock attempts"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 959729b..e477ae8 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"impedir conmutadores de aplicación"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Evita que el usuario cambie a otra aplicación."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obtener información de aplicación actual"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permite que el titular recupere información privada sobre la aplicación actual en el primer plano de la pantalla."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"supervisar y controlar la ejecución de todas las aplicaciones"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permite que la aplicación supervise y controle la manera en la que el sistema inicia actividades. Las aplicaciones maliciosas pueden comprometer el sistema por completo. Este permiso es necesario solo para el desarrollo, nunca para el uso habitual."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar emisión de paquete eliminado"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permite que la aplicación configure y se conecte a pantallas Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controlar pantallas Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permite que la aplicación controle funciones de bajo nivel de las pantallas Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"Capturar salida de audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permite que la aplicación capture y redirija la salida de audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"Capturar salida de video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permite que la aplicación capture y redirija la salida de video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"Capturar salida de video segura"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permite que la aplicación capture y redirija la salida de video segura."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"cambiar tu configuración de audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permite que la aplicación modifique la configuración de audio global, por ejemplo, el volumen y el altavoz de salida."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"grabar audio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permite al propietario vincularse a la interfaz de nivel superior de un servicio de agente de escucha de notificaciones. Las aplicaciones normales no deberían necesitar este permiso."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"ejecutar la aplicación de configuración proporcionada por el proveedor"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permite al propietario ejecutar la aplicación de configuración proporcionada por el proveedor. Las aplicaciones normales no deberían necesitar este permiso."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"Detectar cambios en el estado de la red"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permite que una aplicación detecte cambios en el estado de la red. Las aplicaciones normales no deberían necesitar este permiso."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Establecer reglas de contraseña"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controlar la longitud y los caracteres permitidos en las contraseñas para desbloquear la pantalla"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Supervisa los intentos para desbloquear la pantalla"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index c12cb76..f3c9903 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"evitar cambios de aplicación"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Evita que el usuario cambie a otra aplicación."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obtener información de la aplicación actual"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permite que el titular recupere información privada sobre la aplicación actual en el primer plano de la pantalla."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"supervisar y controlar la ejecución de todas las aplicaciones"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permite que la aplicación supervise y controle la ejecución de las actividades del sistema. Las aplicaciones malintencionadas pueden vulnerar la seguridad del sistema. Este permiso es necesario únicamente para tareas de desarrollo, nunca para el uso habitual."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar emisión eliminada de paquete"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permite que la aplicación configure pantallas Wi-Fi y se conecte a ellas."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controlar pantallas Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permite que la aplicación controle funciones de bajo nivel de pantallas Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"capturar salida de audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permite que la aplicación capture y redirija la salida de audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"capturar salida de vídeo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permite que la aplicación capture y redirija la salida de vídeo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"capturar salida de vídeo segura"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permite que la aplicación capture y redirija la salida de vídeo segura."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"cambiar la configuración de audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permite que la aplicación modifique la configuración de audio global (por ejemplo, el volumen y el altavoz de salida)."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"grabar sonido"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permite enlazar con la interfaz de nivel superior de un servicio de detector de notificaciones. No debe ser necesario para las aplicaciones normales."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"ejecutar la aplicación de configuración proporcionada por el operador"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permite ejecutar la aplicación de configuración proporcionada por el operador. No debe ser necesario para aplicaciones normales."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"detectar cambios en el estado de la red"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permite que una aplicación detecte cambios en el estado de la red. No debe ser necesario para aplicaciones normales."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Establecimiento de reglas de contraseña"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controlar la longitud y los caracteres permitidos en las contraseñas de bloqueo de pantalla"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Control de intentos de bloqueo de pantalla"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 82243c1..bf71a02 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"väldi rakenduste ümberlülitamist"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Takistab kasutaja lülitumist teisele rakendusele."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"aktiivse rakenduse teabe hankimine"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Lubab õiguste saajal hankida privaatset teavet ekraanil esiplaanil oleva aktiivse rakenduse kohta."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"Kõigi rakenduste käivitumise jälgimine ja juhtimine"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Võimaldab rakendusel jälgida ja juhtida, kuidas süsteem tegevusi käivitab. Pahatahtlikud rakendused võivad süsteemi täielikult rikkuda. Seda õigust on vaja ainult arenduseks, mitte tavakasutuse korral."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"saada paketist eemaldatud saade"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Lubab rakendusel seadistada WiFi-ekraane ja nendega ühendus luua."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"WiFi-ekraanide juhtimine"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Lubab rakendusel juhtida WiFi-ekraanide madala taseme funktsioone."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"heliväljundi jäädvustamine"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Lubab rakendusel jäädvustada ja ümber suunata heliväljundit."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"videoväljundi jäädvustamine"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Lubab rakendusel jäädvustada ja ümber suunata videoväljundit."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"kaitstud videoväljundi jäädvustamine"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Lubab rakendusel jäädvustada ja ümber suunata kaitstud videoväljundit."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"muuda heliseadeid"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Võimaldab rakendusel muuta üldiseid heliseadeid, näiteks helitugevust ja seda, millist kõlarit kasutatakse väljundiks."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"salvesta heli"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Võimaldab omanikul siduda märguannete kuulamisteenuse ülemise taseme kasutajaliidese. Seda ei tohiks tavarakenduste puhul kunagi vaja olla."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"operaatoripoolse konfiguratsioonirakenduse aktiveerimine"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Lubab omanikul aktiveerida operaatoripoolse konfiguratsioonirakenduse. Tavarakenduste puhul ei peaks seda kunagi vaja minema."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Parooli reeglite määramine"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontrollige ekraaniluku avamise paroolide pikkust ja tähemärke."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Ekraani avamiskatsed"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 3216d99..8aa97cd 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"ممانعت از جابجایی برنامه"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"اجازه نمیدهد کاربر به برنامه دیگری برود."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"دریافت اطلاعات برنامه فعلی"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"به دارنده اجازه میدهد اطلاعات خصوصی مربوط به برنامه فعلی را در پیش زمینه صفحه بازیابی کند."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"نظارت و کنترل راهاندازی همه برنامه"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"به برنامه اجازه میدهد تا نحوه راهاندازی فعالیتهای سیستم را کنترل کند. برنامههای مخرب میتوانند کاملا با سیستم سازگار شوند. این مجوز فقط برای توسعه نیاز است و برای استفاده عادی نیست."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"ارسال پخش بسته حذف شده"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"به برنامه اجازه میدهد تا اتصال به صفحات نمایش Wi‑Fi را پیکربندی کند."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"کنترل صفحه نمایشهای Wi‑Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"به برنامه اجازه میدهد که ویژگیهای سطح پایین صفحههای نمایش Wi‑Fi را کنترل کند."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"ضبط خروجی صدا"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"به برنامه امکان میدهد خروجی صدا را ضبط و هدایت کند."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"ضبط خروجی ویدیو"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"به برنامه امکان میدهد خروجی ویدیو را ضبط و هدایت کند."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"ضبط خروجی ویدیوی ایمن"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"به برنامه امکان میدهد خروجی ویدیوی ایمن را ضبط و هدایت کند."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"تغییر تنظیمات صوتی"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"به برنامه امکان میدهد تنظیمات صوتی کلی مانند میزان صدا و بلندگوی مورد استفاده برای پخش صدا را اصلاح کند."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ضبط صدا"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"به دارنده اجازه میدهد به یک رابط سطح بالای سرویس شنونده اعلان متصل شود. هرگز نباید برای برنامههای عادی لازم شود."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"لغو برنامه پیکربندی ارائه شده توسط شرکت مخابراتی"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"به دارنده اجازه میدهد که تنظیمات برنامه شرکت مخابراتی را لغو کند. هرگز برای برنامههای معمولی مورد نیاز نیست."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"تنظیم قوانین رمز ورود"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"طول و نویسههای مجاز در گذرواژههای بازکردن قفل صفحه را کنترل کنید."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"نمایش تلاشهای قفل گشایی صفحه"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 86a793f..bdc8797 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"estä sovellusten vaihto"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Estää käyttäjää siirtymästä toiseen sovellukseen."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"hae nykyisen sovelluksen tiedot"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Antaa sovellukselle luvan noutaa nykyistä sovellusta koskevia yksityisiä tietoja ruudun etualalla."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"kaikkien sovellusten käynnistämisen valvonta ja hallinta"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Antaa sovelluksen valvoa ja hallita sitä, miten laite käynnistää toimintoja. Haitalliset sovellukset voivat vaarantaa laitteen käytön. Tätä oikeutta tarvitaan vain kehityskäyttöön eikä koskaan tavalliseen käyttöön."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"lähetä paketeista poistettuja lähetyksiä"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Antaa sovelluksen määrittää wifi-näyttöjä ja muodostaa yhteyden niihin."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"hallitse wifi-näyttöjä"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Antaa sovelluksen hallita wifi-näyttöjen matalan tason ominaisuuksia."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"äänentoiston kaappaus"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Antaa sovellukselle luvan äänentoiston kaappaamiseen ja uudelleenohjaamiseen."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"videokuvan kaappaus"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Antaa sovellukselle luvan videokuvan kaappaamiseen ja uudelleenohjaamiseen"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"suojatun videokuvan kaappaus"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Antaa sovellukselle luvan suojatun videokuvan kaappaamiseen ja uudelleenohjaamiseen."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"muuta ääniasetuksia"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Antaa sovelluksen muokata yleisiä ääniasetuksia, kuten äänenvoimakkuutta ja käytettävää kaiutinta."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"tallentaa ääntä"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Antaa sovelluksen sitoutua ilmoituskuuntelijan ylimmän tason käyttöliittymään. Ei tavallisten sovelluksien käyttöön."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"Palveluntarjoajan määrityssovelluksen käynnistäminen"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Antaa luvanhaltijan käynnistää palveluntarjoajan määrityssovelluksen. Ei tavallisten sovelluksien käyttöön."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"verkon tilahavaintojen kuunteleminen"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Antaa sovellukselle luvan kuunnella verkon tilahavaintoja. Ei tavallisten sovellusten käyttöön."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Aseta salasanasäännöt"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Hallinnoi ruudun lukituksenpoistosalasanoissa sallittuja merkkejä ja salasanan pituutta."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Tarkkaile ruudun lukituksen poistoyrityksiä"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index f71be94..bca53e1 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"empêcher les changements d\'applications"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Empêche l\'utilisateur de changer d\'application."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"Récupérer des informations sur l\'application actuelle"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permet à l\'application autorisée de récupérer des informations confidentielles à propos de l\'application exécutée au premier plan sur l\'écran."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"suivre et contrôler le lancement de toutes les applications"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permet à l\'application de surveiller et de contrôler la façon dont le système lance les activités. Des applications malveillantes peuvent exploiter cette fonctionnalité pour totalement compromettre le système. Cette autorisation est uniquement destinée aux développeurs. Elle ne doit jamais être activée dans le cadre d\'une utilisation standard."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"Envoyer une diffusion sans paquet"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Permet à l\'application autorisée de s\'associer à l\'interface de niveau supérieur d\'un service d\'impression. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"accéder à l\'ensemble des tâches d\'impression"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Permet à l\'application autorisée d\'accéder aux tâches d\'impression créées via une autre application. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"s\'associer au service NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Permet à l\'application autorisée de s\'associer aux applications qui reproduisent le fonctionnement des cartes NFC. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"associer à un service de texte"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Permet à l\'application de s\'associer à l\'interface de haut niveau d\'un service de texte (par exemple, SpellCheckerService). Les applications standards ne doivent jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"associer à un service VPN"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permet à l\'application de configurer des écrans Wi-Fi et de s\'y connecter."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"contrôler les écrans Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permet à l\'application de contrôler les fonctionnalités de base des écrans Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"enregistrer les sorties audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Autoriser l\'application à enregistrer et à rediriger les sorties audio"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"enregistrer les sorties vidéo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Autoriser l\'application à enregistrer et à rediriger les sorties vidéo"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"enregistrer les sorties vidéo sécurisées"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Autoriser l\'application à enregistrer et à rediriger les sorties vidéo sécurisées"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"modifier vos paramètres audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permet à l\'application de modifier les paramètres audio généraux, tels que le volume et la sortie audio utilisée."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"Enregistrer des fichiers audio"</string>
@@ -661,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permet à l\'application de s\'associer à l\'interface de niveau supérieur d\'un service d\'écoute des notifications. Ne devrait jamais être nécessaire pour les applications normales."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"faire appel à l\'application de configuration fournie par l\'opérateur"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permet à l\'application autorisée de faire appel à l\'application de configuration fournie par l\'opérateur. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"détecter des observations sur les conditions du réseau"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permet à une application de détecter des observations sur les conditions du réseau. Les applications standards ne devraient pas nécessiter cette autorisation."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Définir les règles du mot de passe"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Choisir le nombre et le type de caractères autorisés dans les mots de passe de déverrouillage de l\'écran"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Gérer les tentatives de déverrouillage de l\'écran"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 31f4cb6..d4f10f1 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"एप्लिकेशन स्विच करने से रोकता है"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"उपयोगकर्ता को दूसरे एप्लिकेशन पर स्विच करने से रोकता है."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"वर्तमान एप्लिकेशन की जानकारी प्राप्त करें"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"धारक को स्क्रीन के अग्रभाग में स्थित वर्तमान एप्लिकेशन के बारे में निजी जानकारी प्राप्त करने देती है."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"सभी एप्लिकेशन की लॉन्चिंग की निगरानी करें और उसे नियंत्रित करें"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"एप्लिकेशन को यह निगरानी और नियंत्रित करने देता है कि सिस्टम कैसे गतिविधियां लॉन्च करता है. दुर्भावनापूर्ण एप्लिकेशन सिस्टम को पूरी तरह से जोखिम में डाल सकते हैं. इस अनुमति की आवश्यकता केवल विकास के लिए है, सामान्य उपयोग के लिए कभी नहीं."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"पैकेज निकाले गए प्रसारण भेजें"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"एप्लिकेशन को कॉन्फ़िगर करने देता है और Wifi डिस्प्ले से कनेक्ट करता है."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Wifi डिस्प्ले को नियंत्रित करें"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"एप्लिकेशन को Wifi डिस्प्ले की निम्न-स्तर की सुविधाएं नियंत्रित करने देता है."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"ऑडियो आउटपुट को कैप्चर करें"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"एप्लिकेशन को ऑडियो आउटपुट को कैप्चर और रीडायरेक्ट करने देता है."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"वीडियो आउटपुट को कैप्चर करें"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"एप्लिकेशन को वीडियो आउटपुट को कैप्चर और रीडायरेक्ट करने देता है."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"सुरक्षित वीडियो आउटपुट को कैप्चर करें"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"एप्लिकेशन को सुरक्षित वीडियो आउटपुट को कैप्चर और रीडायरेक्ट करने देता है."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"अपनी ऑडियो सेटिंग बदलें"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"एप्लिकेशन को वैश्विक ऑडियो सेटिंग, जैसे वॉल्यूम और कौन-सा स्पीकर आउटपुट के लिए उपयोग किया गया, संशोधित करने देता है."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ऑडियो रिकॉर्ड करें"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"धारक को सूचना श्रवणकर्ता सेवा के शीर्ष स्तरीय इंटरफ़ेस से जुड़ने देती है. सामान्य एप्लिकेशन के लिए कभी भी आवश्यक नहीं होनी चाहिए."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"वाहक के द्वारा उपलब्ध कराया गया कॉन्फ़िगरेशन एप्लिकेशन प्रारंभ करें"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"धारक को वाहक के द्वारा उपलब्ध कराया गया कॉन्फ़िगरेशन एप्लिकेशन प्रारंभ करने देता है. सामान्य एप्लिकेशन के लिए कभी भी आवश्यक नहीं होना चाहिए."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"नेटवर्क स्थितियों के अवलोकनों को सुनें"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"एप्लिकेशन को नेटवर्क स्थितियों के अवलोकनों को सुनने देता है. सामान्य एप्लिकेशन के लिए कभी भी आवश्यक नहीं होना चाहिए."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"पासवर्ड नियम सेट करें"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"स्क्रीन-अनलॉक पासवर्ड में अनुमति प्राप्त लंबाई और वर्णों को नियंत्रित करें."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"स्क्रीन-अनलॉक के प्रयासों पर निगरानी रखें"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 88e6a91..0d7d9bf 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"sprečavanje promjene aplikacije"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Sprječava korisnika u prebacivanju na drugu aplikaciju."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"dohvaćanje informacija o trenutačnoj aplikaciji"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Omogućuje nositelju dohvaćanje privatnih informacija o trenutačnoj aplikaciji u prednjem planu na zaslonu."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"praćenje i nadzor svih pokretanja aplikacija"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Omogućuje aplikaciji nadzor i upravljanje načinom na koji sustav pokreće aktivnosti. Zlonamjerne aplikacije mogu posve ugroziti sustav. Ta je dozvola potrebna samo za razvoj, nikada za uobičajenu upotrebu."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"slanje paketno uklonjenog prijenosa"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Omogućuje aplikaciji konfiguriranje i povezivanje s Wi-Fi zaslonima."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"upravljaj Wifi zaslonima"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Omogućuje aplikaciji upravljanje značajkama Wi-Fi zaslona niske razine."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"primanje audioizlaza"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Omogućuje aplikaciji primanje i preusmjeravanje audioizlaza."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"primanje videoizlaza"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Omogućuje aplikaciji primanje i preusmjeravanje videoizlaza."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"primanje sigurnog videoizlaza"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Omogućuje aplikaciji primanje i preusmjeravanje sigurnog videoizlaza."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"promjena postavki zvuka"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Aplikaciji omogućuje izmjenu globalnih postavki zvuka, primjerice glasnoće i zvučnika koji se upotrebljava za izlaz."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"snimanje zvuka"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Nositelju omogućuje vezanje uz sučelje najviše razine usluge slušatelja obavijesti. Ne bi smjelo biti potrebno za uobičajene aplikacije."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"pozovi operaterovu aplikaciju za konfiguraciju"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Dopušta nositelju pozivanje operaterove aplikacije za konfiguraciju. Ne bi smjelo biti potrebno za uobičajene aplikacije."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Postavi pravila zaporke"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Upravljajte duljinom zaporki za otključavanje zaslona i dopuštenim znakovima u tim zaporkama."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Nadgledaj pokušaje otključavanja zaslona"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index ee458b8..d9d570c 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"alkalmazásváltás megakadályozása"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Megakadályozza, hogy a felhasználó átváltson egy másik alkalmazásra."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"az alkalmazás aktuális információinak lekérése"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Lehetővé teszi, hogy a felhasználó privát adatokat kérjen le az aktuális alkalmazásról a képernyő előterében."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"alkalmazásindítások nyomon követése és vezérlése"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Lehetővé teszi az alkalmazás számára, hogy figyelje és vezérelje, hogy a rendszer hogyan indít el tevékenységeket. A rosszindulatú alkalmazások teljesen tönkretehetik a rendszert. Ez az engedély csak fejlesztéshez szükséges, normál használathoz sosem."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"eltávolított csomagú üzenetek küldése"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Lehetővé teszi, hogy az alkalmazás Wi-Fi kijelzőket konfiguráljon, és csatlakozzon hozzájuk."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Wi-Fi kijelzők irányítása"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Lehetővé teszi, hogy az alkalmazás irányítsa a Wi-Fi kijelzők alacsonyabb szintű funkcióit."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"audiokimenet rögzítése"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Engedélyezi az alkalmazásnak a hangkimenet rögzítését és átirányítását."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"videokimenet rögzítése"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Engedélyezi az alkalmazásnak a videokimenet rögzítését és átirányítását."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"biztonságos videokimenet rögzítése"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Engedélyezi az alkalmazásnak a biztonságos videokimenet rögzítését és átirányítását."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"hangbeállítások módosítása"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Lehetővé teszi az alkalmazás számára az általános hangbeállítások, például a hangerő és a használni kívánt kimeneti hangszóró módosítását."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"hanganyag rögzítése"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Lehetővé teszi a használó számára, hogy csatlakozzon egy értesítésfigyelő szolgáltatás legfelső szintű felületéhez. A normál alkalmazásoknak erre soha nincs szükségük."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"a szolgáltatói konfigurációs alkalmazás hívása"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Lehetővé teszi a használó számára a szolgáltató által biztosított konfigurációs alkalmazás hívását. A normál alkalmazásoknak erre soha nincs szükségük."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"hálózati körülményekkel kapcsolatos észrevételek figyelemmel kísérése"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Lehetővé teszi egy alkalmazás számára, hogy figyelemmel kísérje a hálózati körülményekkel kapcsolatos észrevételeket. A normál alkalmazásoknak erre soha nincs szükségük."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Jelszavakkal kapcsolatos szabályok beállítása"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"A képernyőzár-feloldási jelszavakban engedélyezett karakterek és hosszúság vezérlése."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Képernyőzár-feloldási kísérletek figyelése"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index bc8517c..9892d10 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"cegah pergantian aplikasi"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Mencegah pengguna beralih ke apl lain."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"dapatkan info tentang aplikasi yang aktif"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Memungkinkan pemegang mengambil informasi pribadi tentang aplikasi yang aktif di latar depan layar."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"memantau dan mengontrol semua peluncuran apl"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Mengizinkan apl memantau dan mengontrol cara sistem meluncurkan kegiatan. Apl berbahaya dapat meretas sistem sepenuhnya. Izin ini hanya diperlukan untuk pengembangan, tidak pernah diperlukan untuk penggunaan normal."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"kirim siaran paket dihapus"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Memungkinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan pencetakan. Tidak pernah diperlukan oleh aplikasi normal."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"mengakses semua tugas pencetakan"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Memungkinkan pemegang mengakses tugas pencetakan yang dibuat oleh aplikasi lain. Tidak pernah diperlukan aplikasi normal."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"mengikat ke layanan NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Memungkinkan pemegang mengikat ke aplikasi yang meniru kartu NFC. Tidak pernah dibutuhkan untuk aplikasi normal."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"mengikat ke layanan SMS"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan teks (misal: SpellCheckerService). Tidak pernah diperlukan oleh apl normal."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"mengikat ke layanan VPN"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Izinkan aplikasi mengonfigurasi dan terhubung ke tampilan Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"mengontrol tampilan Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Izinkan aplikasi mengontrol fitur tingkat rendah dari tampilan Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"tangkap keluaran audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Memungkinkan aplikasi menangkap dan mengalihkan keluaran audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"tangkap keluaran video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Memungkinkan aplikasi menangkap dan mengalihkan keluaran video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"tangkap keluaran video aman"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Memungkinkan aplikasi menangkap dan mengalihkan keluaran video aman."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"ubah setelan audio Anda"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Memungkinkan aplikasi mengubah setelan audio global, misalnya volume dan pengeras suara mana yang digunakan untuk keluaran."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"rekam audio"</string>
@@ -661,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Memungkinkan pemegang mengikat antarmuka tingkat teratas dari suatu layanan pendengar pemberitahuan. Tidak pernah diperlukan oleh aplikasi normal."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"memanggil aplikasi konfigurasi yang disediakan operator"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Memungkinkan pemegang meminta aplikasi konfigurasi yang disediakan operator. Tidak pernah diperlukan aplikasi normal."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Setel aturan sandi"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontrol panjang dan karakter yang diizinkan dalam sandi pembuka layar."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Upaya pembukaan kunci layar monitor"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 60f40ae..4a5c12b 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"impedire commutazione applicazione"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Impedisce all\'utente di passare a un\'altra applicazione."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"recupero di informazioni sull\'app corrente"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Consente al titolare di recuperare le informazioni private sull\'app correntemente in primo piano sullo schermo."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitoraggio e controllo avvio di tutte le applicazioni"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Consente all\'applicazione di monitorare e controllare l\'avvio delle attività da parte del sistema. Le applicazioni dannose potrebbero compromettere completamente il sistema. Questa autorizzazione è necessaria solo per lo sviluppo, mai per l\'utilizzo normale."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"invio broadcast rimossi dal pacchetto"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Consente all\'applicazione di configurare schermi Wi-Fi e di collegarsi a essi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controllo di schermi Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Consente all\'applicazione di controllare le funzioni di basso livello di schermi Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"acquisizione dell\'uscita audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Consente all\'app di acquisire e reindirizzare l\'uscita audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"acquisizione dell\'uscita video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Consente all\'app di acquisire e reindirizzare l\'uscita video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"acquisizione dell\'uscita video sicura"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Consente all\'app di acquisire e reindirizzare l\'uscita video sicura."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"modifica impostazioni audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Consente all\'applicazione di modificare le impostazioni audio globali, come il volume e quale altoparlante viene utilizzato per l\'uscita."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"registrazione audio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Consente al titolare di vincolarsi all\'interfaccia di primo livello di un servizio listener di notifica. Non dovrebbe mai essere necessaria per le normali applicazioni."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"richiamo dell\'app di configurazione operatore-provider"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Consente al titolare di richiamare l\'app di configurazione dell\'operatore-provider. Non dovrebbe essere mai necessaria per le normali applicazioni."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ascolto delle osservazioni sulle condizioni di rete"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Consente a un\'applicazione di ascoltare le osservazioni sulle condizioni di rete. Da non utilizzare mai con app normali."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Imposta regole password"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controlla la lunghezza e i caratteri ammessi nelle password di sblocco dello schermo."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitora tentativi di sblocco dello schermo"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 2c84060..2c052b7 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"מנע החלפת יישומים"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"מניעת מעבר ליישום אחר על ידי המשתמש."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"קבל פרטים על היישום הנוכחי"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"מאפשר לבעלים לאחזר מידע פרטי לגבי היישום הנוכחי שבקדמת המסך."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"ניהול מעקב ושליטה על כל הפעלות היישומים"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"מאפשר ליישום לנהל מעקב אחר האופן שבו המערכת מפעילה פעילויות, ולשלוט בו. יישומים זדוניים עלולים לסכן את המערכת כולה. הרשאה זו אינה נחוצה לשימוש רגיל, אלא לפיתוח בלבד."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"שלח שידור שהוסר מחבילה"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"מאפשר לאפליקציה להגדיר ולהתחבר לתצוגות Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"שלוט בתצוגות Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"מאפשר לאפליקציה לשלוט בתכונות ברמה נמוכה של תצוגות Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"קליטת פלט אודיו"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"מאפשרת לאפליקציה לקלוט ולהפנות מחדש פלט אודיו."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"קליטת פלט וידאו"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"מאפשרת לאפליקציה לקלוט ולהפנות מחדש פלט וידאו."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"קליטת פלט וידאו מאובטח"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"מאפשרת לאפליקציה לקלוט ולהפנות מחדש פלט וידאו מאובטח."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"שנה את הגדרות האודיו שלך"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"מאפשר ליישום לשנות הגדרות אודיו גלובליות כמו עוצמת קול ובחירת הרמקול המשמש לפלט."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"הקלט אודיו"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"הרשאה זו מאפשרת למשתמש לבצע איגוד לממשק הרמה העליונה של שירות מאזין להתראות. הרשאה זו אף פעם אינה נחוצה ליישומים רגילים."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"הפעלה של אפליקציית תצורה שסופקה על ידי ספק"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"ההרשאה הזו מאפשרת לבעלים להפעיל את אפליקציית התצורה שסופקה על ידי ספק. לעולם לא אמורה להיות נחוצה עבור אפליקציות רגילות."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"קליטת מעקב אחר תנאי רשת"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"מאפשרת לאפליקציה לקלוט מעקב אחר תנאי רשת. לעולם לא אמורה להיות נחוצה עבור אפליקציות רגילות."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"הגדר כללי סיסמה"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"שלוט באורך ובתווים המותרים בסיסמאות לביטול נעילת מסך."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"עקוב אחר ניסיונות לביטול נעילת מסך"</string>
@@ -1125,7 +1122,7 @@
<string name="screen_compat_mode_hint" msgid="1064524084543304459">"אפשר תכונה זו מחדש ב\'הגדרות מערכת\' < Google Apps < \'הורדות\'."</string>
<string name="smv_application" msgid="3307209192155442829">"היישום <xliff:g id="APPLICATION">%1$s</xliff:g> (תהליך <xliff:g id="PROCESS">%2$s</xliff:g>) הפר את מדיניות StrictMode באכיפה עצמית שלו."</string>
<string name="smv_process" msgid="5120397012047462446">"התהליך <xliff:g id="PROCESS">%1$s</xliff:g> הפר את מדיניות StrictMode באכיפה עצמית."</string>
- <string name="android_upgrading_title" msgid="1584192285441405746">"Android מבצע שדרוג..."</string>
+ <string name="android_upgrading_title" msgid="1584192285441405746">"Android מבצע שדרוג…"</string>
<string name="android_upgrading_apk" msgid="7904042682111526169">"מבצע אופטימיזציה של יישום <xliff:g id="NUMBER_0">%1$d</xliff:g> מתוך <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
<string name="android_upgrading_starting_apps" msgid="451464516346926713">"מפעיל יישומים."</string>
<string name="android_upgrading_complete" msgid="1405954754112999229">"מסיים אתחול."</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index d94a978..031d7f1 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"アプリケーションの切り替えを禁止する"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"ユーザーが別のアプリに切り替えられないようにします。"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"現在のアプリ情報の取得"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"画面のフォアグラウンドで現在のアプリに関する非公開情報を取得することを所有者に許可します。"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"すべてのアプリ起動の監視と制御"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"システムによるアクティビティ起動方法を監視し制御することをアプリに許可します。この許可を悪意のあるアプリに利用されると、システム全体のセキュリティが侵害される恐れがあります。この許可は開発時にのみ必要で、通常の使用では不要です。"</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"パッケージ削除ブロードキャストの送信"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Wi-Fiディスプレイを設定して接続することをアプリに許可します。"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Wi-Fiディスプレイの制御"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Wi-Fiディスプレイの低レベル機能を制御することをアプリに許可します。"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"音声出力のキャプチャ"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"音声出力のキャプチャとリダイレクトをアプリに許可します。"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"動画出力のキャプチャ"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"動画出力のキャプチャとリダイレクトをアプリに許可します。"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"セキュリティ保護された動画出力のキャプチャ"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"セキュリティ保護された動画出力のキャプチャとリダイレクトをアプリに許可します。"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"音声設定の変更"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"音声全般の設定(音量、出力に使用するスピーカーなど)の変更をアプリに許可します。"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"録音"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"通知リスナーサービスのトップレベルインターフェースにバインドすることを所有者に許可します。通常のアプリでは不要です。"</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"携帯通信会社が提供する設定アプリの呼び出し"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"携帯通信会社が提供する設定アプリを呼び出すことを所有者に許可します。通常のアプリでは不要です。"</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ネットワーク状況監視のためのリッスン"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"ネットワーク状況を監視するためリッスンすることをアプリに許可します。通常のアプリで必要になることはありません。"</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"パスワードルールの設定"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"画面ロック解除パスワードの長さと使用できる文字を制御します。"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"画面ロック解除試行の監視"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 3d46bb6..7d4e407 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"애플리케이션 전환 방지"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"사용자가 다른 앱으로 전환하지 못하게 합니다."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"현재 앱 정보 얻기"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"권한을 가진 프로그램이 화면의 포그라운드에서 현재 애플리케이션에 대한 비공개 정보를 검색하도록 허용합니다."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"실행 중인 모든 앱 모니터링 및 제어"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"앱이 시스템에서 활동이 시작되는 방식을 모니터링하고 관리할 수 있도록 허용합니다. 이 경우 악성 앱이 이 기능을 이용하여 시스템을 완전히 손상시킬 수 있습니다. 이 권한은 개발 과정에만 필요하며 일반 사용 시에는 필요하지 않습니다."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"패키지 제거 브로드캐스트 보내기"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"권한을 가진 프로그램이 인쇄 서비스에 대한 최상위 인터페이스를 사용하도록 합니다. 일반 앱에는 필요하지 않습니다."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"모든 인쇄 작업에 액세스"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"권한을 가진 프로그램이 다른 앱에서 생성한 인쇄 작업에 액세스하도록 합니다. 일반 앱에는 필요하지 않습니다."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"NFC 서비스 사용"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"권한을 가진 프로그램이 NFC 카드를 에뮬레이션하는 애플리케이션을 사용하도록 허용합니다. 일반 앱에는 필요하지 않습니다."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"텍스트 서비스 연결"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"권한을 가진 프로그램이 텍스트 서비스(예: SpellCheckerService)에 대한 최상위 인터페이스를 사용하도록 허용합니다. 일반 앱에는 필요하지 않습니다."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"VPN 서비스와 연결"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"앱이 Wi-Fi 디스플레이를 설정하고 연결하도록 허용합니다."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Wi-Fi 디스플레이 제어"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"앱이 Wi-Fi 디스플레이의 하위 수준 기능을 제어하도록 허용합니다."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"오디오 출력 캡처"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"앱이 오디오 출력을 캡처하고 리디렉션하도록 허용합니다."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"비디오 출력 캡처"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"앱이 비디오 출력을 캡처하고 리디렉션하도록 허용합니다."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"안전한 비디오 출력 캡처"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"앱이 안전한 비디오 출력을 캡처하고 리디렉션하도록 허용합니다."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"오디오 설정 변경"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"앱이 음량이나 출력을 위해 사용하는 스피커 등 전체 오디오 설정을 변경할 수 있도록 허용합니다."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"오디오 녹음"</string>
@@ -661,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"권한을 가진 프로그램이 알림 수신기 서비스에 대한 최상위 인터페이스를 사용하도록 허용합니다. 일반 앱에는 필요하지 않습니다."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"이동통신사에서 제공한 구성 앱 호출"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"권한을 가진 프로그램이 이동통신사에서 제공한 구성 앱을 호출하도록 합니다. 일반 앱에는 필요하지 않습니다."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"네트워크 상태에 대한 관측 보고 수신"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"애플리케이션이 네트워크 상태에 대한 관측 보고를 수신하도록 허용합니다. 일반 앱에는 필요하지 않습니다."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"비밀번호 규칙 설정"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"화면 잠금해제 비밀번호에 허용되는 길이 및 문자 수를 제어합니다."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"화면 잠금해제 시도 모니터링"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index b802504..544f98b 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"neleisti perjungti programų"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Neleidžiama naudotojui perjungti į kitą programą."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"gauti esamos programos informaciją"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Savininkui leidžiama gauti privačią esamos pirmaeilės ekrano programos informaciją."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"stebėti ir valdyti visų programų paleidimą"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Leidžiama programai stebėti ir valdyti, kaip sistema paleidžia veiklą. Kenkėjiškos programos gali visiškai pažeisti sistemą. Šis leidimas reikalingas tik kuriant ir jo niekada nereikia naudojant įprastai."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"siųsti pašalinto paketo perdavimą"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Leidžiama programai konfigūruoti ir prisijungti prie „Wi-Fi“ pateikčių."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"valdyti „Wi-Fi“ pateiktis"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Leidžiama programai valdyti „Wi-Fi“ pateikčių žemo lygio funkcijas."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"fiksuoti garso įvestį"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Programai leidžiama fiksuoti ir peradresuoti garso išvestį."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"fiksuoti vaizdo išvestį"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Programai leidžiama fiksuoti ir peradresuoti vaizdo išvestį."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"fiksuoti saugią vaizdo išvestį"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Programai leidžiama fiksuoti ir peradresuoti saugią vaizdo išvestį."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"keisti garso nustatymus"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Leidžiama programai keisti visuotinius garso nustatymus, pvz., garsumą ir tai, kuris garsiakalbis naudojamas išvesčiai."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"įrašyti garsą"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Leidžiama turėtojui susisaistyti su pranešimų skaitymo priemonės paslaugos aukščiausio lygio sąsaja. Įprastoms programoms to neturėtų prireikti."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"iškviesti operatoriaus pateiktą konfigūravimo programą"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Turėtojui leidžiama iškviesti operatoriaus pateiktą konfigūravimo programą. Įprastoms programoms to neturėtų prireikti."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Nustatyti slaptažodžio taisykles"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Valdyti leidžiamą ekrano atrakinimo slaptažodžių ilgį ir leidžiamus naudoti simbolius."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Stebėti bandymus atrakinti ekraną"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 479a887..83d3962 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"novērst lietojumprogrammu pārslēgšanu"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Novērš lietotāja pārslēgšanos uz citu lietotni."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"pašreizējās lietotnes informācijas iegūšana"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Ļauj īpašniekam izgūt privātu informāciju par pašreizējo lietojumprogrammu ekrāna priekšplānā."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"pārraudzīt un kontrolēt visu lietotņu atvēršanu"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Ļauj lietotnei pārraudzīt un kontrolēt, kā sistēmā tiek palaistas darbības. Ļaunprātīgas lietotnes var pilnībā uzlauzt sistēmu. Šī atļauja ir nepieciešama tikai izstrādei, taču ne parastai lietošanai."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"sūtīt apraidi par pakotnes noņemšanu"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Ļauj lietotnei konfigurēt Wi-Fi displejus un veidot savienojumu ar tiem."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Wi-Fi displeju vadība"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Ļauj lietotnei kontrolēt zema līmeņa funkcijas Wi-Fi displejos."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"tvert audio izvadi"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Ļauj lietotnei tvert un novirzīt audio izvadi."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"tvert video izvadi"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Ļauj lietotnei tvert un novirzīt video izvadi."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"tvert drošu video izvadi"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Ļauj lietotnei tvert un novirzīt drošu video izvadi."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"mainīt audio iestatījumus"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Ļauj lietotnei mainīt globālos audio iestatījumus, piemēram, skaļumu un izejai izmantoto skaļruni."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ierakstīt audio"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Ļauj īpašniekam izveidot saiti ar paziņojumu uztvērēja pakalpojuma augšējā līmeņa saskarni. Parastajām lietotnēm tas nekad nav nepieciešams."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"Operatora nodrošinātas konfigurācijas lietotnes izsaukšana"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Ļauj īpašniekam izsaukt operatora nodrošināto konfigurācijas lietotni. Parastām lietotnēm tas nekad nav nepieciešams."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Paroles kārtulu iestatīšana"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontrolē ekrāna atbloķēšanas parolē atļautās rakstzīmes un garumu."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Ekrāna atbloķēšanas mēģinājumu pārraudzīšana"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 07aec80..c89ffe8 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"halang pertukaran apl"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Menghalang pengguna daripada bertukar kepada apl lain."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"dapatkan maklumat apl semasa"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Membenarkan pemegang mendapatkan maklumat peribadi tentang permohonan semasa di latar hadapan skrin"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"pantau dan kawal semua pelancaran apl"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Membenarkan apl untuk memantau dan mengawal cara sistem melancarkan aktiviti. Apl hasad boleh menjejaskan sistem sepenuhnya. Kebenaran ini hanya diperlukan untuk pembangunan, tidak sekali-kali untuk penggunaan biasa."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"hantar siaran bahawa pakej telah dialih keluar"</string>
@@ -363,7 +364,7 @@
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"akses semua kerja cetakan"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Membenarkan pemegang mengakses kerja cetakan yang dibuat oleh apl lain. Tidak sekali-kali diperlukan untuk apl biasa."</string>
<string name="permlab_bindNfcService" msgid="2752731300419410724">"terikat kepada perkhidmatan NFC"</string>
- <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Membenarkan pemegang untuk terikat kepada aplikasi yang mengikuti kad NFC. Tidak sekali-kali harus diperlukan untuk apl normal."</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Membenarkan pemegang untuk terikat kepada aplikasi yang mengikut kad NFC. Tidak sekali-kali diperlukan untuk apl normal."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"terikat kepada perkhidmatan teks"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Membenarkan pemegang mengikat kepada antara muka peringkat atasan perkhidmatan teks(mis. PerkhidmatanPenyemakEjaan). Tidak seharusnya diperlukan untuk apl biasa."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"terikat kepada perkhidmatan VPN"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Membenarkan apl mengkonfigurasi dan menyambung ke paparan Wifi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"kawal paparan Wifi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Membenarkan apl mengawal ciri tahap rendah paparan Wifi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"tangkap output audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Membenarkan apl menangkap dan mengubah hala output audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"tangkap output video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Membenarkan apl menangkap dan mengubah hala output video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"tangkap output video selamat"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Membenarkan apl menangkap dan mengubah hala output video selamat."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"tukar tetapan audio anda"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Membenarkan apl untuk mengubah suai tetapan audio global seperti kelantangan dan pembesar suara mana digunakan untuk output."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"rakam audio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Membenarkan pemegang terikat dengan antara muka peringkat tertinggi bagi perkhidmatan pendengar pemberitahuan. Tidak sekali-kali diperlukan untuk apl biasa."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"gunakan apl konfigurasi yang disediakan oleh pembawa"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Membenarkan pemegang menggunakan apl konfigurasi yang diberikan oleh pembawa. Tidak sekali-kali diperlukan untuk apl biasa."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"dengar pemerhatian mengenai keadaan rangkaian"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Membenarkan aplikasi mendengar pemerhantian tentang keadaan rangkaian. Tidak sekali-kali diperlukan untuk apl biasa."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Tetapkan peraturan kata laluan"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Mengawal panjang dan aksara yang dibenarkan dalam kata laluan buka kunci skrin."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Memantau percubaan buka kunci skrin"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 20c4778..75362a4 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -243,27 +243,27 @@
<string name="permdesc_statusBarService" msgid="716113660795976060">"Gir appen tillatelse til å vises i statusfeltet."</string>
<string name="permlab_expandStatusBar" msgid="1148198785937489264">"utvide/slå sammen statusfeltet"</string>
<string name="permdesc_expandStatusBar" msgid="6917549437129401132">"Lar appen utvide eller skjule statuslinjen."</string>
- <string name="permlab_processOutgoingCalls" msgid="3906007831192990946">"omdirigerer utgående anrop"</string>
+ <string name="permlab_processOutgoingCalls" msgid="3906007831192990946">"omdirigere utgående anrop"</string>
<string name="permdesc_processOutgoingCalls" msgid="5331318931937402040">"Lar appen behandle utgående anrop og endre nummeret som skal ringes opp. Denne tillatelsen lar appen overvåke, viderekoble eller hindre utgående anrop."</string>
- <string name="permlab_receiveSms" msgid="8673471768947895082">"mottar tekstmeldinger (SMS)"</string>
+ <string name="permlab_receiveSms" msgid="8673471768947895082">"motta tekstmeldinger (SMS)"</string>
<string name="permdesc_receiveSms" msgid="6424387754228766939">"Lar appen motta og behandle tekstmeldinger. Dette betyr at appen kan overvåke eller slette meldinger som er sendt til enheten din uten at du har sett dem."</string>
- <string name="permlab_receiveMms" msgid="1821317344668257098">"mottar tekstmeldinger (MMS)"</string>
+ <string name="permlab_receiveMms" msgid="1821317344668257098">"motta tekstmeldinger (MMS)"</string>
<string name="permdesc_receiveMms" msgid="533019437263212260">"Lar appen motta og behandle multimediemeldinger. Dette betyr at appen kan overvåke eller slette meldinger som er sendt til enheten din uten at du har sett dem."</string>
<string name="permlab_receiveEmergencyBroadcast" msgid="1803477660846288089">"motta nødkringkastinger"</string>
<string name="permdesc_receiveEmergencyBroadcast" msgid="848524070262431974">"Lar appen motta og behandle nødkringkastingsmeldinger. Denne tillatelsen er bare tilgjengelig for systemapper."</string>
- <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"lesing av kringkastede meldinger"</string>
+ <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"lese kringkastede meldinger"</string>
<string name="permdesc_readCellBroadcasts" msgid="6361972776080458979">"Tillater at appen kan lese kringkastede meldinger enheten din mottar. Kringkastede varsler leveres noen steder for å advare deg om nødsituasjoner. Skadelige apper kan forstyrre ytelsen eller funksjonen til enheten din når en kringkastet nødmelding mottas."</string>
<string name="permlab_sendSms" msgid="5600830612147671529">"sende SMS-meldinger"</string>
<string name="permdesc_sendSms" msgid="7094729298204937667">"Lar appen sende tekstmeldinger. Dette kan resultere i uventede kostnader. Merk at skadelige apper kan påføre deg kostnader ved å sende meldinger uten bekreftelse fra deg."</string>
<string name="permlab_sendRespondViaMessageRequest" msgid="8713889105305943200">"send svar via melding-hendelser"</string>
<string name="permdesc_sendRespondViaMessageRequest" msgid="7107648548468778734">"Lar appen sende forespørsler om håndtering av svar via melding-hendelser for innkommende anrop til andre meldingsapper."</string>
- <string name="permlab_readSms" msgid="8745086572213270480">"leser tekstmeldinger (SMS eller MMS)"</string>
+ <string name="permlab_readSms" msgid="8745086572213270480">"lese tekstmeldinger (SMS eller MMS)"</string>
<string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"Lar appen lese tekstmeldinger lagret på nettbrettet eller SIM-kortet ditt. Dette lar appen lese alle tekstmeldingene dine, uavhengig av innhold og konfidensialitet."</string>
<string name="permdesc_readSms" product="default" msgid="3695967533457240550">"Lar appen lese tekstmeldinger lagret på telefonen eller SIM-kortet ditt. Dette lar appen lese alle tekstmeldingene dine, uavhengig av innhold og konfidensialitet."</string>
<string name="permlab_writeSms" msgid="3216950472636214774">"redigerer tekstmeldingene dine (SMS eller MMS)"</string>
<string name="permdesc_writeSms" product="tablet" msgid="5160413947794501538">"Lar appen skrive til SMS-meldinger som er lagret på nettbrettet eller SIM-kortet ditt. Ondsinnede apper kan komme til å slette meldingene dine."</string>
<string name="permdesc_writeSms" product="default" msgid="7268668709052328567">"Lar appen skrive til SMS-meldinger som er lagret på telefonen eller SIM-kortet ditt. Ondsinnede apper kan komme til å slette meldingene dine."</string>
- <string name="permlab_receiveWapPush" msgid="5991398711936590410">"mottar tekstmeldinger (WAP)"</string>
+ <string name="permlab_receiveWapPush" msgid="5991398711936590410">"motta tekstmeldinger (WAP)"</string>
<string name="permdesc_receiveWapPush" msgid="748232190220583385">"Lar appen motta og behandle WAP-meldinger. Dette betyr at appen kan overvåke eller slette meldinger som er sendt til deg uten at du har sett dem."</string>
<string name="permlab_getTasks" msgid="6466095396623933906">"hente apper som kjører"</string>
<string name="permdesc_getTasks" msgid="7454215995847658102">"Lar appen hente informasjon om oppgaver som kjører og som nylig har kjørt. Dette kan tillate appen å oppdage informasjon om hvilke apper som brukes på enheten."</string>
@@ -281,17 +281,17 @@
<string name="permdesc_removeTasks" msgid="1394714352062635493">"Lar appen fjerne oppgaver og avslutte apper. Ondsinnede apper kan forstyrre atferden til andre apper."</string>
<string name="permlab_manageActivityStacks" msgid="7391191384027303065">"administrering av aktivitetsstabler"</string>
<string name="permdesc_manageActivityStacks" msgid="1615881933034084440">"Gir appen tillatelse til å legge til, fjerne og endre aktivitetsstablene som andre apper kjøres i. Skadelige apper kan skape problemer i atferden til andre apper."</string>
- <string name="permlab_startAnyActivity" msgid="2918768238045206456">"igangsetting av aktiviteter"</string>
+ <string name="permlab_startAnyActivity" msgid="2918768238045206456">"sette i gang aktiviteter"</string>
<string name="permdesc_startAnyActivity" msgid="997823695343584001">"Tillater at appen kan starte en aktivitet, uavhengig av tillatelsesbeskyttelse og eksportstatus."</string>
<string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"angi skjermkompatibilitet"</string>
<string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"Lar appen kontrollere modus for skjermkompatibilitet i andre apper. Skadelige apper kan ødelegge funksjoner i andre apper."</string>
- <string name="permlab_setDebugApp" msgid="3022107198686584052">"aktivere feilsøking av app"</string>
+ <string name="permlab_setDebugApp" msgid="3022107198686584052">"aktivere feilsøking av apper"</string>
<string name="permdesc_setDebugApp" msgid="4474512416299013256">"Lar appen slå av feilsøking for andre apper. Ondsinnede apper kan bruke dette til å avslutte andre apper."</string>
<string name="permlab_changeConfiguration" msgid="4162092185124234480">"endrer systemets skjerminnstillinger"</string>
<string name="permdesc_changeConfiguration" msgid="4372223873154296076">"Lar appen endre den nåværende konfigurasjonen, som for eksempel språk eller generell skriftstørrelse."</string>
- <string name="permlab_enableCarMode" msgid="5684504058192921098">"aktiver bilmodus"</string>
+ <string name="permlab_enableCarMode" msgid="5684504058192921098">"aktivere bilmodus"</string>
<string name="permdesc_enableCarMode" msgid="4853187425751419467">"Lar appen aktivere bilmodus."</string>
- <string name="permlab_killBackgroundProcesses" msgid="3914026687420177202">"lukker andre apper"</string>
+ <string name="permlab_killBackgroundProcesses" msgid="3914026687420177202">"lukke andre apper"</string>
<string name="permdesc_killBackgroundProcesses" msgid="4593353235959733119">"Lar appen avslutte andre appers bakgrunnsprosesser. Dette kan føre til at andre apper slutter å kjøre."</string>
<string name="permlab_forceStopPackages" msgid="2329627428832067700">"tvinge andre apper til å stoppe"</string>
<string name="permdesc_forceStopPackages" msgid="5253157296183940812">"Lar appen tvinge andre apper til å stoppe."</string>
@@ -299,9 +299,9 @@
<string name="permdesc_forceBack" msgid="3892295830419513623">"Lar appen tvinge alle aktiviteter som kjører i forgrunnen til å lukkes og flyttes til bakgrunnen. Skal aldri være nødvendig for vanlige apper."</string>
<string name="permlab_dump" msgid="1681799862438954752">"hente intern systemtilstand"</string>
<string name="permdesc_dump" msgid="1778299088692290329">"Lar appen hente ut informasjon om systemets indre tilstand. Ondsinnede apper kan hente et bredt spekter av privat og sikker informasjon som de vanligvis aldri burde ha behov for."</string>
- <string name="permlab_retrieve_window_content" msgid="8022588608994589938">"hent av skjerminnhold"</string>
+ <string name="permlab_retrieve_window_content" msgid="8022588608994589938">"hente skjerminnhold"</string>
<string name="permdesc_retrieve_window_content" msgid="3193269069469700265">"Lar appen hente ut innholdet i det aktive vinduet. Ondsinnede apper kan hente ut hele vindusinnholdet og undersøke all teksten, med unntak av passord."</string>
- <string name="permlab_temporary_enable_accessibility" msgid="2312612135127310254">"Aktiver tilgjengelighet midlertidig"</string>
+ <string name="permlab_temporary_enable_accessibility" msgid="2312612135127310254">"aktivere tilgjengelighet midlertidig"</string>
<string name="permdesc_temporary_enable_accessibility" msgid="8079456293182975464">"Lar en app midlertidig aktivere tilgjengelighet på enheten. Skadelige apper kan aktivere tilgjengelighet uten bekreftelse fra brukeren."</string>
<string name="permlab_retrieve_window_info" msgid="8532295199112519378">"hente vindusinformasjon"</string>
<string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"Lar appen hente informasjon om vinduene fra vindusbehandleren. Skadelige apper kan hente informasjon som ikke er ment for intern systembruk."</string>
@@ -310,12 +310,13 @@
<string name="permlab_magnify_display" msgid="5973626738170618775">"forstørre visningen"</string>
<string name="permdesc_magnify_display" msgid="7121235684515003792">"Lar apper forstørre innholdet på en skjerm. Skadelige apper kan endre skjerminnhold på en måte som gjør at enheten blir ubrukelig."</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"delvis avslutning"</string>
- <string name="permdesc_shutdown" msgid="7046500838746291775">"Lar applikasjonen sette aktivitetshåndtereren i avslutningstilstand. Slår ikke systemet helt av."</string>
- <string name="permlab_stopAppSwitches" msgid="4138608610717425573">"forhindre applikasjonsbytte"</string>
+ <string name="permdesc_shutdown" msgid="7046500838746291775">"Lar appen sette aktivitetshåndtereren i avslutningstilstand. Slår ikke systemet helt av."</string>
+ <string name="permlab_stopAppSwitches" msgid="4138608610717425573">"forhindre bytte mellom apper"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Hindrer brukeren i å bytte til en annen app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"få informasjon om appen"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Tillater brukeren å få tilgang til privat informasjon om den aktuelle appen i forgrunnen på skjermen."</string>
- <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"avervåke og kontrollere all oppstart av apper"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
+ <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"overvåke og kontrollere all oppstart av apper"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Lar appen overvåke og kontrollere hvordan systemet starter opp aktiviteter. Ondsinnede apper kan utsette hele systemet for sikkerhetsbrudd. Denne tillatelsen er bare nødvendig for utviklere, aldri for vanlig bruk."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"kringkaste melding om fjernet pakke"</string>
<string name="permdesc_broadcastPackageRemoved" msgid="6621901216207931089">"Lar appen kringkaste et varsel om at en app-pakke har blitt fjernet. Ondsinnede apper kan bruke dette til å avslutte alle andre apper som kjører."</string>
@@ -325,7 +326,7 @@
<string name="permdesc_broadcastWapPush" msgid="4783402525039442729">"Lar appen kringkaste et varsel om at en WAP-PUSH-melding er mottatt. Ondsinnede apper kan bruke dette til å forfalske MMS-meldingskvitteringer, eller ubemerket erstatte innholdet av alle slags nettsider med ondsinnede varianter."</string>
<string name="permlab_setProcessLimit" msgid="2451873664363662666">"begrense antallet kjørende prosesser"</string>
<string name="permdesc_setProcessLimit" msgid="7318061314040879542">"Lar appen kontrollere det maksimale antallet prosesser som kjører. Aldri nødvendig for vanlige apper."</string>
- <string name="permlab_setAlwaysFinish" msgid="550958507798796965">"tvinger bakgrunnsapper til å lukkes"</string>
+ <string name="permlab_setAlwaysFinish" msgid="550958507798796965">"tvinge bakgrunnsapper til å lukkes"</string>
<string name="permdesc_setAlwaysFinish" msgid="7471310652868841499">"Lar appen kontrollere hvorvidt aktiviteter alltid er fullført så snart de flyttes til bakgrunnen. Aldri nødvendig for vanlige apper."</string>
<string name="permlab_batteryStats" msgid="2789610673514103364">"lese batteristatistikk"</string>
<string name="permdesc_batteryStats" msgid="5897346582882915114">"Lar apper lese gjeldende data på lavt nivå om batteribruk. Kan også la appen finne ut detaljert informasjon om hvilke apper du bruker."</string>
@@ -339,7 +340,7 @@
<string name="permdesc_backup" msgid="6912230525140589891">"Lar appen kontrollere systemets mekanisme for sikkerhetskopiering og gjenoppretting. Ikke beregnet på vanlige apper."</string>
<string name="permlab_confirm_full_backup" msgid="5557071325804469102">"bekrefte en fullstendig sikkerhetskopi, eller gjenopprette driften"</string>
<string name="permdesc_confirm_full_backup" msgid="1748762171637699562">"Lar appen starte det fullstendige grensesnittet for bekreftelse av sikkerhetskopiering. Skal ikke måtte brukes av noen apper."</string>
- <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserte vinduer"</string>
+ <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vise uautoriserte vinduer"</string>
<string name="permdesc_internalSystemWindow" msgid="7458387759461466397">"Lar appen opprette vinduer som er ment for å brukes av brukergrensesnittet til det interne systemet. Ikke beregnet på vanlige apper."</string>
<string name="permlab_systemAlertWindow" msgid="3543347980839518613">"overstyre andre apper"</string>
<string name="permdesc_systemAlertWindow" msgid="8584678381972820118">"Lar appen være aktiv over andre apper eller deler av brukergrensesnittet. Dette kan virke inn på bruken din av grensesnittet i andre apper, eller endre det du tror du ser i andre apper."</string>
@@ -352,7 +353,7 @@
<string name="permlab_injectEvents" msgid="1378746584023586600">"trykke taster og kontrolknapper"</string>
<string name="permdesc_injectEvents" product="tablet" msgid="206352565599968632">"Lar appen levere sine egne inndatahendelser (tastetrykk osv.) til andre apper. Ondsinnede apper kan bruke dette til å ta over nettbrettet."</string>
<string name="permdesc_injectEvents" product="default" msgid="653128057572326253">"Lar appen levere sine egne inndatahendelser (tastetrykk osv.) til andre apper. Ondsinnede apper kan bruke dette til å ta over telefonen."</string>
- <string name="permlab_readInputState" msgid="469428900041249234">"ta opp hva som skrives og gjøres"</string>
+ <string name="permlab_readInputState" msgid="469428900041249234">"ta opp det du skriver og gjør"</string>
<string name="permdesc_readInputState" msgid="8387754901688728043">"Lar appen se hvilke taster du trykker på, selv når du samhandler med en annen app (f.eks. skriver inn et passord). Skal aldri være nødvendig for vanlige apper."</string>
<string name="permlab_bindInputMethod" msgid="3360064620230515776">"binde til en inndatametode"</string>
<string name="permdesc_bindInputMethod" msgid="3250440322807286331">"Lar innehaveren binde det øverste nivået av grensesnittet til en inndatametode. Skal aldri være nødvendig for normale apper."</string>
@@ -368,11 +369,11 @@
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Lar innehaveren binde seg til øverste grensesnittnivå for en teksttjeneste (f.eks. SpellCheckerService). Skal aldri være nødvendig for vanlige apper."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"binde deg til en VPN-tjeneste"</string>
<string name="permdesc_bindVpnService" msgid="2067845564581693905">"Lar innehaveren binde seg til det øverste nivået av grensesnittet for en VPN-tjeneste. Skal aldri være nødvendig for vanlige apper."</string>
- <string name="permlab_bindWallpaper" msgid="8716400279937856462">"bind til bakgrunnsbilde"</string>
+ <string name="permlab_bindWallpaper" msgid="8716400279937856462">"binde til bakgrunnsbilde"</string>
<string name="permdesc_bindWallpaper" msgid="7108428692595491668">"Lar innehaveren binde det øverste nivået av grensesnittet til en bakgrunn. Skal aldri være nødvendig for vanlige apper."</string>
- <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"bind til modultjenste"</string>
+ <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"binde til modultjenste"</string>
<string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Lar innehaveren binde seg til det øverste nivået av grensesnittet for en modultjeneste. Skal aldri være nødvendig for vanlige apper."</string>
- <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommuniser med enhetsadministrator"</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommunisere med enhetsadministrator"</string>
<string name="permdesc_bindDeviceAdmin" msgid="569715419543907930">"Lar innehaveren sende hensikter til en enhetsadministrator. Skal aldri være nødvendig for normale apper."</string>
<string name="permlab_manageDeviceAdmins" msgid="4248828900045808722">"legge til eller fjerne en enhetsadministrator"</string>
<string name="permdesc_manageDeviceAdmins" msgid="5025608167709942485">"Tillater innehaveren å legge til eller fjerne aktive enhetsadministratorer. Dette skal aldri være nødvendig for vanlige apper."</string>
@@ -416,39 +417,39 @@
<string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Lar programmer gi eller trekke tilbake spesielle tillatelser for eget bruk eller for andre programmer. Skadelige programmer kan bruke dette for å få tilgang til funksjoner de ikke skal ha tilgang til."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"angi foretrukne apper"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Lar appen endre de foretrukne appene dine. Ondsinnede apper kan ubemerket endre apper som kjøres, og forfalske eksisterende apper til å samle private data fra deg."</string>
- <string name="permlab_writeSettings" msgid="2226195290955224730">"endrer systeminnstillingene"</string>
+ <string name="permlab_writeSettings" msgid="2226195290955224730">"endre systeminnstillingene"</string>
<string name="permdesc_writeSettings" msgid="7775723441558907181">"Lar appen endre dataene i systeminnstillingene. Ondsinnede apper kan bruke dette til å skade systemkonfigurasjonen."</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"endre sikre systeminnstillinger"</string>
<string name="permdesc_writeSecureSettings" msgid="8159535613020137391">"Lar appen endre dataene for systemets sikre innstillinger. Ikke beregnet på vanlige apper."</string>
<string name="permlab_writeGservices" msgid="2149426664226152185">"redigere Google-tjenestekartet"</string>
<string name="permdesc_writeGservices" msgid="1287309437638380229">"Lar appen endre Google-tjenestekartet. Ikke beregnet på vanlige apper."</string>
- <string name="permlab_receiveBootCompleted" msgid="5312965565987800025">"kjører fra oppstart"</string>
+ <string name="permlab_receiveBootCompleted" msgid="5312965565987800025">"kjøre ved oppstart"</string>
<string name="permdesc_receiveBootCompleted" product="tablet" msgid="7390304664116880704">"Lar appen starte seg selv så snart systemet har startet opp. Dette kan føre til lengre oppstartstid for nettbrettet, i tillegg til at nettbrettet kan bli generelt tregere av at appen alltid kjører."</string>
<string name="permdesc_receiveBootCompleted" product="default" msgid="513950589102617504">"Lar appen starte seg selv så snart systemet har startet opp. Dette kan føre til lengre oppstartstid for telefonen, i tillegg til at telefonen kan bli generelt tregere av at appen alltid kjører."</string>
<string name="permlab_broadcastSticky" msgid="7919126372606881614">"sende varige kringkastinger"</string>
<string name="permdesc_broadcastSticky" product="tablet" msgid="7749760494399915651">"Lar appen sende faste kringkastinger («sticky broadcasts») som blir værende etter at kringkastingen er over. Overdreven bruk kan gjøre nettbrettet tregt eller ustabilt ved å bruke for mye minne."</string>
<string name="permdesc_broadcastSticky" product="default" msgid="2825803764232445091">"Lar appen sende faste kringkastinger («sticky broadcasts») som blir værende etter at kringkastingen er over. Overdreven bruk kan gjøre telefonen treg eller ustabil ved å bruke for mye minne."</string>
- <string name="permlab_readContacts" msgid="8348481131899886131">"leser kontaktene dine"</string>
+ <string name="permlab_readContacts" msgid="8348481131899886131">"lese kontaktene dine"</string>
<string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"Lar appen lese informasjon om kontaktene lagret på nettbrettet ditt, inkludert hvor ofte du har ringt, sendt e-post til, eller på andre måter kommunisert med spesifikke personer. Denne tillatelsen lar apper lagre kontaktdata. Merk at skadelige apper kan dele disse dataene uten at du vet om det."</string>
<string name="permdesc_readContacts" product="default" msgid="8440654152457300662">"Lar appen lese informasjon om kontaktene lagret på telefonen din, inkludert hvor ofte du har ringt, sendt e-post til eller på andre måter kommunisert med spesifikke personer. Denne tillatelsen lar apper lagre kontaktdata. Merk at skadelige apper kan dele disse dataene uten at du vet om det."</string>
- <string name="permlab_writeContacts" msgid="5107492086416793544">"endrer kontaktene dine"</string>
+ <string name="permlab_writeContacts" msgid="5107492086416793544">"endre kontaktene dine"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="897243932521953602">"Lar appen endre informasjon om kontaktene lagret på nettbrettet ditt, inkludert hvor ofte du har ringt, sendt e-post til eller på andre måter kommunisert med bestemte kontakter. Denne tillatelsen lar apper slette kontaktdata."</string>
<string name="permdesc_writeContacts" product="default" msgid="589869224625163558">"Lar appen endre informasjon om kontaktene lagret på telefonen din, inkludert hvor ofte du har ringt, sendt e-post til eller på andre måter kommunisert med bestemte kontakter. Denne tillatelsen lar apper slette kontaktdata."</string>
- <string name="permlab_readCallLog" msgid="3478133184624102739">"lar appen lese anropsloggen"</string>
+ <string name="permlab_readCallLog" msgid="3478133184624102739">"lese anropsloggen"</string>
<string name="permdesc_readCallLog" product="tablet" msgid="3700645184870760285">"Lar appen lese samtaleloggen på nettbrettet ditt. Dette omfatter informasjon om innkommende og utgående anrop. Denne tillatelsen lar apper lagre all samtaleinformasjonen din. Merk at skadelige apper kan dele informasjonen uten at du har samtykket."</string>
<string name="permdesc_readCallLog" product="default" msgid="5777725796813217244">"Lar appen lese samtaleloggen på telefonen din. Dette omfatter informasjon om innkommende og utgående anrop. Denne tillatelsen lar apper lagre all samtaleinformasjonen din. Merk at skadelige apper kan dele informasjonen uten at du har samtykket."</string>
- <string name="permlab_writeCallLog" msgid="8552045664743499354">"lar appen endre samtaleloggen"</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"endre anropsloggen"</string>
<string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Lar appen endre nettbrettets samtalelogg, inkludert data om innkommende og utgående anrop. Skadelige apper kan utnytte denne tillatelsen til å slette eller endre samtaleloggen din."</string>
<string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Lar appen endre telefonens samtalelogg, inkludert data om innkommende og utgående anrop. Skadelige apper kan utnytte denne tillatelsen til å slette eller endre samtaleloggen din."</string>
- <string name="permlab_readProfile" msgid="4701889852612716678">"leser ditt eget kontaktkort"</string>
+ <string name="permlab_readProfile" msgid="4701889852612716678">"lese ditt eget kontaktkort"</string>
<string name="permdesc_readProfile" product="default" msgid="5462475151849888848">"Lar appen lese personlig profilinformasjon som er lagret på enheten, som for eksempel navn og kontaktinformasjon. Dette betyr at appen kan identifisere deg og sende profilinformasjonen din til andre."</string>
- <string name="permlab_writeProfile" msgid="907793628777397643">"endrer ditt eget kontaktkort"</string>
+ <string name="permlab_writeProfile" msgid="907793628777397643">"endre ditt eget kontaktkort"</string>
<string name="permdesc_writeProfile" product="default" msgid="5552084294598465899">"Lar appen endre eller legge til personlig profilinformasjon som er lagret på enheten din, som for eksempel navn og kontaktinformasjon. Dette betyr at appen kan identifisere deg og sende profilinformasjonen din til andre."</string>
<string name="permlab_readSocialStream" product="default" msgid="1268920956152419170">"lese din sosiale strøm"</string>
<string name="permdesc_readSocialStream" product="default" msgid="4255706027172050872">"Lar appen lese og synkronisere sosiale oppdateringer fra deg selv og vennene dine. Vær forsiktig når du deler informasjon - med denne tillatelsen kan appen lese kommunikasjon mellom deg og vennene dine på sosiale nettverk, uavhengig av konfidensialitet. Vær oppmerksom på at denne tillatelsen kanskje ikke gjelder for alle sosiale nettverk."</string>
<string name="permlab_writeSocialStream" product="default" msgid="3504179222493235645">"skrive i din sosiale strøm"</string>
<string name="permdesc_writeSocialStream" product="default" msgid="3086557552204114849">"Lar appen vise sosiale oppdateringer fra vennene dine. Vær forsiktig når du deler informasjon - med denne tillatelsen kan appen lage meldinger som ser ut som om de kommer fra en venn. Vær oppmerksom på at denne tillatelsen kanskje ikke gjelder på alle sosiale nettverk."</string>
- <string name="permlab_readCalendar" msgid="5972727560257612398">"les kalenderhendelser og konfidensiell informasjon"</string>
+ <string name="permlab_readCalendar" msgid="5972727560257612398">"lese kalenderhendelser og konfidensiell informasjon"</string>
<string name="permdesc_readCalendar" product="tablet" msgid="4216462049057658723">"Lar appen lese alle kalenderaktivitetene lagret på nettbrettet ditt, inkludert aktiviteter for venner eller kolleger. Dette kan gjøre at appen deler eller lagrer kalenderinformasjonen din uavhengig av konfidensialitet og sensitivitet."</string>
<string name="permdesc_readCalendar" product="default" msgid="7434548682470851583">"Lar appen lese alle kalenderaktivitetene lagret på telefonen din, inkludert aktiviteter for venner eller kolleger. Dette kan gjøre at appen deler eller lagrer kalenderinformasjonen din uavhengig av konfidensialitet og sensitivitet."</string>
<string name="permlab_writeCalendar" msgid="8438874755193825647">"legge til eller endre kalenderhendelser og sende e-post til gjester uten eiernes viten"</string>
@@ -456,7 +457,7 @@
<string name="permdesc_writeCalendar" product="default" msgid="2324469496327249376">"Lar appen legge til, fjerne og endre aktiviteter du kan redigere på telefonen din, inkludert aktiviteter for venner eller kolleger. Dette kan gjøre at appen sender meldinger som ser ut som om de kommer fra kalendereiere eller endre aktiviteter uten at eierne vet om det."</string>
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"lage simulerte posisjonskilder for testing"</string>
<string name="permdesc_accessMockLocation" msgid="5808711039482051824">"Opprette fiktive posisjonskilder for testing eller installere en ny posisjonsangiver. Dette gjør at appen kan overstyre posisjonen eller statusen som rapporteres av ekte posisjonskilder, som for eksempel GPS eller posisjonsangivere."</string>
- <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"få tilgang til ekstra posisjonskommandoer"</string>
+ <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"bruke ekstra posisjonskommandoer"</string>
<string name="permdesc_accessLocationExtraCommands" msgid="5945166642335800763">"Lar appen få tilgang til flere kommandoer fra posisjonsangivere. Dette kan gjøre at appen forstyrrer GPS-funksjonen eller andre posisjonskilder."</string>
<string name="permlab_installLocationProvider" msgid="6578101199825193873">"installere posisjonskilder"</string>
<string name="permdesc_installLocationProvider" msgid="9066146120470591509">"Opprette fiktive posisjonskilder for testing eller installere en ny posisjonsangiver. Dette gjør at appen kan overstyre posisjonen eller statusen som rapporteres av ekte posisjonskilder, som for eksempel GPS eller posisjonsangivere."</string>
@@ -464,9 +465,9 @@
<string name="permdesc_accessFineLocation" msgid="5295047563564981250">"Lar appen se den nøyaktige posisjonen din ved hjelp av GPS (Global Positioning System) eller posisjonstjenester for nettverk, som for eksempel basestasjoner og Wi-Fi. Disse posisjonstjenestene må være slått på og tilgjengelig for enheten din, for at appen skal kunne bruke dem. Apper kan bruke dette til å fastslå hvor du er, og funksjonen kan medføre økt batteribruk."</string>
<string name="permlab_accessCoarseLocation" msgid="4887895362354239628">"omtrentlig posisjon (nettverksbasert)"</string>
<string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"Lar appen se den omtrentlige posisjonen din. Denne posisjonen hentes fra posisjonstjenester som benytter posisjonskilder som for eksempel basestasjoner og Wi-Fi. Disse posisjonstjenestene må være slått på og tilgjengelig for enheten din, for at appen skal kunne bruke dem. Apper kan bruke dette til å finne ut omtrent hvor du er."</string>
- <string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"få tilgang til SurfaceFlinger"</string>
+ <string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"bruke SurfaceFlinger"</string>
<string name="permdesc_accessSurfaceFlinger" msgid="1041619516733293551">"Lar appen bruke grunnleggende SurfaceFlinger-funksjoner."</string>
- <string name="permlab_readFrameBuffer" msgid="6690504248178498136">"lese skjermbufferet"</string>
+ <string name="permlab_readFrameBuffer" msgid="6690504248178498136">"lese skjermbufferen"</string>
<string name="permdesc_readFrameBuffer" msgid="4937405521809454680">"Lar appen lese innholdet i rammebufferen."</string>
<string name="permlab_accessInputFlinger" msgid="5348635270689553857">"tilgang til InputFlinger"</string>
<string name="permdesc_accessInputFlinger" msgid="2104864941201226616">"Lar appen bruke grunnleggende InputFlinger-funksjoner."</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Tillater appen å konfigurere og koble til Wi-Fi-skjermer."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"kontrollere Wi-Fi-skjermer"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Tillater appen å kontrollere lavnivåfunksjoner i Wi-Fi-skjermer."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"ta opp fra lydutdata"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Lar appen ta opp og omdirigere lydutdata."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"ta opp fra videoutdata"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Lar appen ta opp og omdirigere videoutdata."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"ta opp fra sikre videoutdata"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Lar appen ta opp og omdirigere sikre videoutdata."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"endre lydinnstillinger"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Lar appen endre globale lydinnstillinger slik som volum og hvilken høyttaler som brukes for lydavspilling."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ta opp lyd"</string>
@@ -494,37 +489,37 @@
<string name="permdesc_camera" msgid="8497216524735535009">"Lar appen ta bilder og filme med kameraet. Denne tillatelsen gjør at appen kan bruke kameraet når som helst uten bekreftelse fra deg."</string>
<string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"deaktiver LED-lyset for indikering av overføring når kameraet er i bruk"</string>
<string name="permdesc_cameraDisableTransmitLed" msgid="4764585465480295341">"Tillater at forhåndsinnstallerte systemapper deaktiverer LED-indikatoren for kamerabruk."</string>
- <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"deaktiver nettbrett permanent"</string>
+ <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"deaktivere nettbrettet permanent"</string>
<string name="permlab_brick" product="default" msgid="8337817093326370537">"deaktivere telefonen permanent"</string>
<string name="permdesc_brick" product="tablet" msgid="4334818808001699530">"Lar appen deaktivere hele nettbrettet permanent. Dette er svært risikabelt."</string>
<string name="permdesc_brick" product="default" msgid="5788903297627283099">"Lar appen deaktivere hele telefonen permanent. Dette er svært risikabelt."</string>
- <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"tvungen omstart av nettbrettet"</string>
+ <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"tvinge omstart av nettbrettet"</string>
<string name="permlab_reboot" product="default" msgid="2898560872462638242">"tvinge omstart av telefon"</string>
<string name="permdesc_reboot" product="tablet" msgid="8172056180063700741">"Lar appen fremtvinge omstart av nettbrettet."</string>
<string name="permdesc_reboot" product="default" msgid="5326008124289989969">"Lar appen fremtvinge omstart av telefonen."</string>
- <string name="permlab_mount_unmount_filesystems" product="nosdcard" msgid="2927361537942591841">"får tilgang til filsystemet til USB-lagring"</string>
+ <string name="permlab_mount_unmount_filesystems" product="nosdcard" msgid="2927361537942591841">"bruke filsystemet for USB-lagring"</string>
<string name="permlab_mount_unmount_filesystems" product="default" msgid="4402305049890953810">"får tilgang til filsystemet til SD-kort"</string>
<string name="permdesc_mount_unmount_filesystems" msgid="1829290701658992347">"Lar appen koble til og fra filsystemer for flyttbar lagring."</string>
- <string name="permlab_mount_format_filesystems" product="nosdcard" msgid="6227819582624904972">"tømmer USB-lagring"</string>
- <string name="permlab_mount_format_filesystems" product="default" msgid="262582698639274056">"tømmer SD-kort"</string>
+ <string name="permlab_mount_format_filesystems" product="nosdcard" msgid="6227819582624904972">"tømme USB-lagring"</string>
+ <string name="permlab_mount_format_filesystems" product="default" msgid="262582698639274056">"tømme SD-kort"</string>
<string name="permdesc_mount_format_filesystems" msgid="8784268246779198627">"Lar appen formatere flyttbare lagringsmedier."</string>
<string name="permlab_asec_access" msgid="3411338632002193846">"få informasjon om intern lagring"</string>
<string name="permdesc_asec_access" msgid="3094563844593878548">"Lar appen innhente informasjon om intern lagring."</string>
- <string name="permlab_asec_create" msgid="6414757234789336327">"opprett intern lagring"</string>
+ <string name="permlab_asec_create" msgid="6414757234789336327">"opprette intern lagring"</string>
<string name="permdesc_asec_create" msgid="4558869273585856876">"Lar appen opprette intern lagring."</string>
- <string name="permlab_asec_destroy" msgid="526928328301618022">"slett intern lagring"</string>
+ <string name="permlab_asec_destroy" msgid="526928328301618022">"ødelegge intern lagring"</string>
<string name="permdesc_asec_destroy" msgid="7218749286145526537">"Lar appen slette intern lagring."</string>
<string name="permlab_asec_mount_unmount" msgid="8877998101944999386">"koble til eller fra intern lagring"</string>
<string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Lar appen koble intern lagring til eller fra."</string>
<string name="permlab_asec_rename" msgid="7496633954080472417">"gi nytt navn til intern lagring"</string>
<string name="permdesc_asec_rename" msgid="1794757588472127675">"Lar appen gi nytt navn til intern lagring."</string>
- <string name="permlab_vibrate" msgid="7696427026057705834">"kontrollerer vibrasjon"</string>
+ <string name="permlab_vibrate" msgid="7696427026057705834">"kontrollere vibreringen"</string>
<string name="permdesc_vibrate" msgid="6284989245902300945">"Lar appen kontrollere vibreringsfunksjonen."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontrollere lommelykten"</string>
<string name="permdesc_flashlight" msgid="6522284794568368310">"Lar appen kontrollere lommelykten."</string>
<string name="permlab_manageUsb" msgid="1113453430645402723">"administrere innstillinger og tillatelser for USB-enheter"</string>
<string name="permdesc_manageUsb" msgid="7776155430218239833">"Lar appen administrere innstillinger og tillatelser for USB-enheter."</string>
- <string name="permlab_accessMtp" msgid="4953468676795917042">"implementer MTP-protokoll"</string>
+ <string name="permlab_accessMtp" msgid="4953468676795917042">"implementere MTP-protokoll"</string>
<string name="permdesc_accessMtp" msgid="6532961200486791570">"Tillater tilgang til kjerne-MTP-driver for implementering av MTP USB-protokollen."</string>
<string name="permlab_hardware_test" msgid="4148290860400659146">"teste maskinvare"</string>
<string name="permdesc_hardware_test" msgid="6597964191208016605">"Lar appen styre ulike eksterne enheter for å teste maskinvare."</string>
@@ -532,18 +527,18 @@
<string name="permdesc_callPhone" msgid="3740797576113760827">"Lar appen ringe telefonnumre uten at du gjør noe. Dette kan resultere i uventede oppringninger og kostnader. Appen kan imidlertid ikke ringe nødnumre. Merk at skadelige apper kan påføre deg kostnader ved å ringe uten bekreftelse fra deg."</string>
<string name="permlab_callPrivileged" msgid="4198349211108497879">"ringe vilkårlige telefonnummer direkte"</string>
<string name="permdesc_callPrivileged" msgid="1689024901509996810">"Lar appen ringe alle slags telefonnumre, deriblant nødnumre, uten din innvirkning. Ondsinnede apper kan foreta unødvendige og ulovlige anrop til nødtjenestene."</string>
- <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"start CDMA-nettbrettoppsett direkte"</string>
+ <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"starte CDMA-nettbrettoppsett direkte"</string>
<string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"begynne CDMA-telefonoppsett direkte"</string>
<string name="permdesc_performCdmaProvisioning" msgid="1994193538802314186">"Lar appen starte CDMA-oppsett. Ondsinnede apper kan bruke dette til å starte CDMA-oppsett uten grunn."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"kontrollere varsling for plasseringsendring"</string>
<string name="permdesc_locationUpdates" msgid="1120741557891438876">"Lar appen aktivere og deaktivere varsler om posisjonsoppdatering fra radioen. Ikke beregnet på vanlige apper."</string>
- <string name="permlab_checkinProperties" msgid="7855259461268734914">"få tilgang til egenskaper for innsjekking"</string>
+ <string name="permlab_checkinProperties" msgid="7855259461268734914">"bruke innsjekking"</string>
<string name="permdesc_checkinProperties" msgid="4024526968630194128">"Gir appen lese- og skrivetilgang til egenskaper som er lastet opp av innsjekkingstjenesten. Ikke beregnet på vanlige apper."</string>
- <string name="permlab_bindGadget" msgid="776905339015863471">"velg gadgeter"</string>
+ <string name="permlab_bindGadget" msgid="776905339015863471">"velge moduler"</string>
<string name="permdesc_bindGadget" msgid="8261326938599049290">"Lar appen fortelle systemet hvilke moduler som kan brukes av hvilke apper. En app som har denne tillatelsen kan gi andre apper tilgang til personlige data. Ikke beregnet på vanlige apper."</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"endre telefontilstand"</string>
<string name="permdesc_modifyPhoneState" msgid="1029877529007686732">"Lar appen kontrollere telefonfunksjonene til enheten. En app som har denne tillatelsen kan bytte nettverk, slå telefonens radio på og av og lignende, uten å varsle deg i det hele tatt."</string>
- <string name="permlab_readPhoneState" msgid="9178228524507610486">"leser telefonstatus og -identitet"</string>
+ <string name="permlab_readPhoneState" msgid="9178228524507610486">"lese telefonstatus og -identitet"</string>
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Lar appen bruke enhetens telefonfunksjoner. Med denne tillatelsen kan appen finne telefonnummer og enhets-ID-er, registrere om en samtale pågår, og se det eksterne nummeret det opprettes en forbindelse med via oppringing."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"hindre nettbrettet fra å gå over til sovemodus"</string>
<string name="permlab_wakeLock" product="default" msgid="573480187941496130">"forhindre telefonen fra å sove"</string>
@@ -558,7 +553,7 @@
<string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Kjøre som en lavnivås produsenttest, med full tilgang til telefonens maskinvare. Kun tilgjengelig når telefonen kjører i produsenttestmodus."</string>
<string name="permlab_setWallpaper" msgid="6627192333373465143">"endre bakgrunnsbilde"</string>
<string name="permdesc_setWallpaper" msgid="7373447920977624745">"Lar appen angi systembakgrunnen."</string>
- <string name="permlab_setWallpaperHints" msgid="3278608165977736538">"endrer størrelsen på bakgrunnsbildet"</string>
+ <string name="permlab_setWallpaperHints" msgid="3278608165977736538">"endre størrelsen på bakgrunnsbildet"</string>
<string name="permdesc_setWallpaperHints" msgid="8235784384223730091">"Lar appen angi størrelsestips for systembakgrunnen."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"tilbakestille systemet til fabrikkinnstillinger"</string>
<string name="permdesc_masterClear" msgid="3665380492633910226">"Lar appen gjennomføre fullstendig tilbakestilling til fabrikkstandard, noe som sletter alle data, konfigurasjoner og installerte apper."</string>
@@ -583,7 +578,7 @@
<string name="permdesc_accessNetworkState" msgid="8318964424675960975">"Lar appen se informasjon om nettverkstilkoblinger, slik som hvilke nettverk som finnes og er tilkoblet."</string>
<string name="permlab_createNetworkSockets" msgid="8018758136404323658">"full nettverkstilgang"</string>
<string name="permdesc_createNetworkSockets" msgid="3403062187779724185">"Lar appen opprette nettverkskontakter og bruke tilpassede nettverksprotokoller. Nettleseren og andre apper gjør det mulig å sende data til Internett, så denne tillatelsen er ikke nødvendig for å kunne sende data til Internett."</string>
- <string name="permlab_writeApnSettings" msgid="505660159675751896">"endre eller avskjær nettverksinnstillinger og -trafikk"</string>
+ <string name="permlab_writeApnSettings" msgid="505660159675751896">"endre eller avskjære nettverksinnstillinger og -trafikk"</string>
<string name="permdesc_writeApnSettings" msgid="5333798886412714193">"Lar appen endre nettverksinnstillinger og avbryte eller undersøke all nettverkstrafikk, for eksempel for å endre mellomtjener og port for alle navn på tilgangspunkt (APN). Ondsinnede apper kan overvåke, viderekoble eller endre nettverkspakker uten at du vet om det."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"endre nettverkskonnektivitet"</string>
<string name="permdesc_changeNetworkState" msgid="6789123912476416214">"Lar appen endre innstillingene for nettverkstilknytning."</string>
@@ -591,14 +586,14 @@
<string name="permdesc_changeTetherState" msgid="1524441344412319780">"Lar appen endre innstillingene for nettverkstilknytning via tethering."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"endre innstilling for bakgrunnsdata"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="5347729578468744379">"Lar appen endre innstillingene for bakgrunnsdatabruk."</string>
- <string name="permlab_accessWifiState" msgid="5202012949247040011">"ser Wi-Fi-tilkoblinger"</string>
+ <string name="permlab_accessWifiState" msgid="5202012949247040011">"se Wi-Fi-tilkoblinger"</string>
<string name="permdesc_accessWifiState" msgid="5002798077387803726">"Lar appen se informasjon om Wi-Fi-nettverk, f.eks. hvorvidt Wi-Fi er aktivert og navn på tilkoblede Wi-Fi-enheter."</string>
- <string name="permlab_changeWifiState" msgid="6550641188749128035">"kobler til og fra Wi-Fi"</string>
+ <string name="permlab_changeWifiState" msgid="6550641188749128035">"koble til og fra Wi-Fi"</string>
<string name="permdesc_changeWifiState" msgid="7137950297386127533">"Lar appen koble til og fra Wi-Fi-tilgangspunkter, og å gjøre endringer i enhetens konfigurasjon for Wi-Fi-nettverk."</string>
- <string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"tillat multicast for trådløse nettverk"</string>
+ <string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"tillate multicast for trådløse nettverk"</string>
<string name="permdesc_changeWifiMulticastState" product="tablet" msgid="7969774021256336548">"Lar appen motta pakker som sendes til alle enhetene på et Wi-Fi-nettverk ved hjelp av multikastingsadresser, Dette bruker mer strøm enn modusen uten multikasting."</string>
<string name="permdesc_changeWifiMulticastState" product="default" msgid="6851949706025349926">"Lar appen motta pakker som sendes til alle enhetene på et Wi-Fi-nettverk ved hjelp av multikastingsadresser, Dette bruker mer strøm enn modusen uten multikasting."</string>
- <string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"endrer Bluetooth-innstillinger"</string>
+ <string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"endre Bluetooth-innstillinger"</string>
<string name="permdesc_bluetoothAdmin" product="tablet" msgid="6921177471748882137">"Lar appen konfigurere det lokale Bluetooth-nettbrettet, samt oppdage og koble sammen med eksterne enheter."</string>
<string name="permdesc_bluetoothAdmin" product="default" msgid="8931682159331542137">"Lar appen konfigurere den lokale Bluetooth-telefonen, samt oppdage og koble sammen med eksterne enheter."</string>
<string name="permlab_accessWimaxState" msgid="4195907010610205703">"koble til eller fra WiMAX"</string>
@@ -606,12 +601,12 @@
<string name="permlab_changeWimaxState" msgid="2405042267131496579">"Endre WiMAX-status"</string>
<string name="permdesc_changeWimaxState" product="tablet" msgid="3156456504084201805">"Lar appen koble nettbrettet til og fra WiMAX-nettverk."</string>
<string name="permdesc_changeWimaxState" product="default" msgid="697025043004923798">"Lar appen koble telefonen til og fra WiMAX-nettverk."</string>
- <string name="permlab_bluetooth" msgid="6127769336339276828">"kobler til Bluetooth-enheter"</string>
+ <string name="permlab_bluetooth" msgid="6127769336339276828">"koble til Bluetooth-enheter"</string>
<string name="permdesc_bluetooth" product="tablet" msgid="3480722181852438628">"Lar appen se Bluetooth-konfigurasjonen på nettbrettet, samt opprette og godta tilkoblinger med sammenkoblede enheter."</string>
<string name="permdesc_bluetooth" product="default" msgid="3207106324452312739">"Lar appen se Bluetooth-konfigurasjonen på telefonen, samt opprette og godta tilkoblinger med sammenkoblede enheter."</string>
<string name="permlab_nfc" msgid="4423351274757876953">"kontroller overføring av data med NFC-teknologi"</string>
<string name="permdesc_nfc" msgid="7120611819401789907">"Lar appen kommunisere med etiketter, kort og lesere som benytter NFC-teknologi."</string>
- <string name="permlab_disableKeyguard" msgid="3598496301486439258">"deaktiverer skjermlåsen"</string>
+ <string name="permlab_disableKeyguard" msgid="3598496301486439258">"deaktivere skjermlåsen"</string>
<string name="permdesc_disableKeyguard" msgid="6034203065077122992">"Lar appen deaktivere tastelåsen og eventuell tilknyttet passordsikkerhet. Et eksempel er at telefonen deaktiverer tastelåsen når du mottar et innkommende anrop, og deretter aktiverer tastelåsen igjen når samtalen er ferdig."</string>
<string name="permlab_readSyncSettings" msgid="6201810008230503052">"lese synkroniseringsinnstillinger"</string>
<string name="permdesc_readSyncSettings" msgid="2706745674569678644">"Lar appen lese synkroniseringsinnstillingene for en konto. For eksempel kan den finne ut om Personer-appen er synkronisert med en konto."</string>
@@ -623,7 +618,7 @@
<string name="permdesc_subscribedFeedsRead" msgid="5557058907906144505">"Lar appen hente inn detaljer om strømmer som er synkroniserte for øyeblikket."</string>
<string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"endre abonnement på nyhetskilder"</string>
<string name="permdesc_subscribedFeedsWrite" msgid="6928930188826089413">"Lar appen endre strømmer som er synkronisert for øyeblikket. Ondsinnede apper kan endre de synkroniserte strømmene dine."</string>
- <string name="permlab_readDictionary" msgid="4107101525746035718">"leser uttrykkene du har lagt til i ordboken"</string>
+ <string name="permlab_readDictionary" msgid="4107101525746035718">"lese ord du har lagt til i ordboken"</string>
<string name="permdesc_readDictionary" msgid="659614600338904243">"Lar appen lese alle ord, navn og uttrykk som brukeren har lagret i brukerordlisten."</string>
<string name="permlab_writeDictionary" msgid="2183110402314441106">"legge til ord i brukerdefinert ordliste"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Lar appen skrive nye ord i brukerordlisten."</string>
@@ -641,11 +636,11 @@
<string name="permdesc_manageDocs" product="default" msgid="8704323176914121484">"Lar appen administrere dokumentlagring."</string>
<string name="permlab_sdcardAccessAll" msgid="8150613823900460576">"åpne eksternlagring for alle brukere"</string>
<string name="permdesc_sdcardAccessAll" msgid="3215208357415891320">"Tillater appen å åpne eksternlagring for alle brukere."</string>
- <string name="permlab_cache_filesystem" msgid="5656487264819669824">"tilgang til bufrede filer"</string>
+ <string name="permlab_cache_filesystem" msgid="5656487264819669824">"bruke bufrede filer"</string>
<string name="permdesc_cache_filesystem" msgid="5578967642265550955">"Lar appen lese og skrive til det bufrede filsystemet."</string>
<string name="permlab_use_sip" msgid="5986952362795870502">"foreta/motta Internett-anrop"</string>
<string name="permdesc_use_sip" msgid="4717632000062674294">"Lar appen bruke SIP-tjenesten til å foreta og motta Internett-anrop."</string>
- <string name="permlab_readNetworkUsageHistory" msgid="7862593283611493232">"les tidligere nettverksbruk"</string>
+ <string name="permlab_readNetworkUsageHistory" msgid="7862593283611493232">"lese tidligere nettverksbruk"</string>
<string name="permdesc_readNetworkUsageHistory" msgid="7689060749819126472">"Lar appen lese tidligere nettverksbruk for bestemte nettverk og apper."</string>
<string name="permlab_manageNetworkPolicy" msgid="2562053592339859990">"administrer retningslinjene for nettverk"</string>
<string name="permdesc_manageNetworkPolicy" msgid="7537586771559370668">"Lar appen administrere retningslinjene for nettverket og definere appspesifikke regler."</string>
@@ -653,12 +648,14 @@
<string name="permdesc_modifyNetworkAccounting" msgid="5443412866746198123">"Lar appen endre hvordan nettverksbruk regnes ut for apper. Ikke beregnet på vanlige apper."</string>
<string name="permlab_markNetworkSocket" msgid="3658527214914959749">"endring av kontaktmerker"</string>
<string name="permdesc_markNetworkSocket" msgid="7655568433696356578">"Gir appen tillatelse til å endre kontaktmerker for ruting"</string>
- <string name="permlab_accessNotifications" msgid="7673416487873432268">"varseltilgang"</string>
+ <string name="permlab_accessNotifications" msgid="7673416487873432268">"tilgang til varsler"</string>
<string name="permdesc_accessNotifications" msgid="458457742683431387">"Lar appen hente, gjennomgå og fjerne varsler, inkludert de som sendes fra andre apper."</string>
<string name="permlab_bindNotificationListenerService" msgid="7057764742211656654">"binding til en varsellyttertjeneste"</string>
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Lar innehaveren binde seg til det øverste grensesnittnivået for en varsellyttertjeneste. Skal aldri være nødvendig for vanlige apper."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"starte konfigurasjonsappen som ble levert av operatøren"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Gir innehaveren tillatelse til å kalle opp den konfigurasjonsappen som ble levert av operatøren. Dette skal ikke være nødvendig for vanlige apper."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"lytte etter observasjoner om nettverksforhold"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Gir appen tillatelse til å lytte etter observasjoner om nettverksforhold. Dette skal ikke være nødvendig for vanlige apper."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Angi passordregler"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontroller tillatt lengde og tillatte tegn i passord for opplåsing av skjerm."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Overvåk forsøk på opplåsing av skjerm"</string>
@@ -924,22 +921,22 @@
<string name="autofill_parish" msgid="8202206105468820057">"Sogn"</string>
<string name="autofill_area" msgid="3547409050889952423">"Område"</string>
<string name="autofill_emirate" msgid="2893880978835698818">"Emirat"</string>
- <string name="permlab_readHistoryBookmarks" msgid="3775265775405106983">"leser nettbokmerkene og nettloggen din"</string>
+ <string name="permlab_readHistoryBookmarks" msgid="3775265775405106983">"lese nettbokmerkene og nettloggen din"</string>
<string name="permdesc_readHistoryBookmarks" msgid="8462378226600439658">"Lar appen lese loggen for alle nettadressene nettleseren har besøkt, og alle bokmerkene i nettleseren. Vær oppmerksom på at denne tillatelsen kanskje ikke benyttes av tredjepartsnettlesere eller andre apper med mulighet for nettsurfing."</string>
- <string name="permlab_writeHistoryBookmarks" msgid="3714785165273314490">"skriver nettbokmerker og nettlogg"</string>
+ <string name="permlab_writeHistoryBookmarks" msgid="3714785165273314490">"skrive nettbokmerker og nettlogg"</string>
<string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="6825527469145760922">"Lar appen endre nettleserens logg eller bokmerker lagret på nettbrettet ditt. Dette kan føre til at appen sletter eller endrer nettleserdata. Vær oppmerksom på at denne tillatelsen kanskje ikke benyttes av tredjepartsnettlesere eller andre apper med mulighet for nettsurfing."</string>
<string name="permdesc_writeHistoryBookmarks" product="default" msgid="8497389531014185509">"Lar appen endre nettleserens logg eller bokmerker lagret på telefonen din. Dette kan føre til at appen sletter eller endrer nettleserdata. Vær oppmerksom på at denne tillatelsen kanskje ikke benyttes av tredjepartsnettlesere eller andre apper med mulighet for nettsurfing."</string>
- <string name="permlab_setAlarm" msgid="1379294556362091814">"angir alarm"</string>
+ <string name="permlab_setAlarm" msgid="1379294556362091814">"stille alarm"</string>
<string name="permdesc_setAlarm" msgid="316392039157473848">"Lar appen stille inn alarmen for en installert alarmklokke-app. Enkelte alarmklokke-apper implementerer kanskje ikke denne funksjonen."</string>
- <string name="permlab_addVoicemail" msgid="5525660026090959044">"legg til talepost"</string>
+ <string name="permlab_addVoicemail" msgid="5525660026090959044">"legge til talepost"</string>
<string name="permdesc_addVoicemail" msgid="6604508651428252437">"Lar appen legge til meldinger i talepostkassen din."</string>
<string name="permlab_writeGeolocationPermissions" msgid="5962224158955273932">"endre nettleserens tillatelser for geoposisjonering"</string>
<string name="permdesc_writeGeolocationPermissions" msgid="1083743234522638747">"Lar appen endre nettleserens tillatelser for geoposisjonering. Ondsinnede apper kan bruke dette for å tillate sending av posisjonsinformasjon til vilkårlige nettsteder."</string>
- <string name="permlab_packageVerificationAgent" msgid="5568139100645829117">"bekreft pakker"</string>
+ <string name="permlab_packageVerificationAgent" msgid="5568139100645829117">"bekrefte pakker"</string>
<string name="permdesc_packageVerificationAgent" msgid="8437590190990843381">"Lar appen bekrefte om en pakke kan installeres."</string>
<string name="permlab_bindPackageVerifier" msgid="4187786793360326654">"bind til en pakkeverifikator"</string>
<string name="permdesc_bindPackageVerifier" msgid="3180741773233862126">"Lar innehaveren sende forespørsler om pakkeverifikatorer. Skal aldri være nødvendig for normale apper."</string>
- <string name="permlab_serialPort" msgid="546083327654631076">"tilgang til serielle porter"</string>
+ <string name="permlab_serialPort" msgid="546083327654631076">"bruke serieporter"</string>
<string name="permdesc_serialPort" msgid="2991639985224598193">"Gir innehaveren tilgang til serielle porter ved hjelp av SerialManager API."</string>
<string name="permlab_accessContentProvidersExternally" msgid="5077774297943409285">"gå til innholdsleverandører eksternt"</string>
<string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"Lar innehaveren gå til innholdsleverandører fra kommandovinduet. Skal aldri være nødvendig for vanlige apper."</string>
@@ -1279,9 +1276,9 @@
<string name="ext_media_nomedia_notification_message" product="nosdcard" msgid="6921126162580574143">"USB-lagring fjernet. Sett inn et nytt medium."</string>
<string name="ext_media_nomedia_notification_message" product="default" msgid="3870120652983659641">"Minnekortet ble fjernet. Sett inn et nytt."</string>
<string name="activity_list_empty" msgid="1675388330786841066">"Finner ingen samsvarende aktiviteter."</string>
- <string name="permlab_pkgUsageStats" msgid="8787352074326748892">"oppdater statistikk over komponentbruk"</string>
+ <string name="permlab_pkgUsageStats" msgid="8787352074326748892">"oppdatere statistikk over komponentbruk"</string>
<string name="permdesc_pkgUsageStats" msgid="1106612424254277630">"Lar appen endre innsamlet bruksstatistikk om komponenter. Ikke beregnet på vanlige apper."</string>
- <string name="permlab_copyProtectedData" msgid="4341036311211406692">"kopiére innhold"</string>
+ <string name="permlab_copyProtectedData" msgid="4341036311211406692">"kopiere innhold"</string>
<string name="permdesc_copyProtectedData" msgid="4390697124288317831">"Lar appen påkalle standard meldingsbeholdertjeneste for kopiering av innhold. Ikke beregnet på vanlige apper."</string>
<string name="permlab_route_media_output" msgid="1642024455750414694">"Videresending av medieutdata"</string>
<string name="permdesc_route_media_output" msgid="4932818749547244346">"Lar en app videresende medieutdata til andre eksterne enheter."</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 8399369..9c4e213 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"schakelen tussen apps voorkomen"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Hiermee wordt voorkomen dat de gebruiker overschakelt naar een andere app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"huidige appgegevens ophalen"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"De houder kan hiermee persoonlijke gegevens ophalen over de applicatie die momenteel op de voorgrond wordt weergegeven."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"alle startende apps bijhouden en beheren"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Hiermee kan de app de manier bijhouden en beheren waarop het systeem activiteiten start. Schadelijke apps kunnen het systeem volledig in gevaar brengen. Deze machtiging is alleen voor ontwikkeling vereist, nooit voor normaal gebruik."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"melding verzenden dat pakket is verwijderd"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"De app toestaan wifi-displays te configureren en hiermee verbinding te maken."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"wifi-displays beheren"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"De app toestaan minder belangrijke functies van wifi-displays te beheren."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"audio-uitvoer vastleggen"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Hiermee kan de app audio-uitvoer vastleggen en verwerken."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"video-uitvoer vastleggen"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Hiermee kan de app video-uitvoer vastleggen en verwerken."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"beveiligde video-uitvoer vastleggen"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Hiermee kan de app beveiligde video-uitvoer vastleggen en verwerken."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"uw audio-instellingen wijzigen"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Hiermee kan de app algemene audio-instellingen wijzigen zoals het volume en welke luidspreker wordt gebruikt voor de uitvoer."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"audio opnemen"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Hiermee kan de houder koppelen aan de hoofdinterface van een listener-service voor meldingen. Nooit vereist voor normale apps."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"de door de provider geleverde configuratie-app aanroepen"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Hiermee kan de houder de door de provider geleverde configuratie-app aanroepen. Nooit vereist voor normale apps."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"controleren op waarnemingen met betrekking tot netwerkomstandigheden"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Hiermee kan een app controleren op waarnemingen met betrekking tot netwerkomstandigheden. Nooit vereist voor normale apps."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Wachtwoordregels instellen"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"De lengte en tekens beheren die zijn toegestaan in wachtwoorden voor schermontgrendeling."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Pogingen voor schermontgrendeling bijhouden"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 21e3228..d4a5761 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"zapobieganie przełączaniu aplikacji"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Uniemożliwia użytkownikowi przełączenie na inną aplikację."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"pobierz informacje o bieżącej aplikacji"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Zezwala posiadaczowi na pobieranie prywatnych informacji o bieżącej aplikacji i wyświetlanie ich na pierwszym planie ekranu."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitorowanie i kontrolowanie wszystkich uruchamianych aplikacji"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Pozwala aplikacji na monitorowanie i kontrolowanie sposobu uruchamiania działań przez system. Złośliwe aplikacje mogą całkowicie naruszyć zabezpieczenia systemu. To uprawnienie nigdy nie jest potrzebne podczas normalnego użytkowania, a jedynie podczas programowania."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"wysyłanie transmisji informującej o usuniętym pakiecie"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Zezwala aplikacji na konfigurację wyświetlaczy Wi-Fi i łączenie z nimi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"zarządzanie wyświetlaczami Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Zezwala aplikacji na zarządzanie niskopoziomowymi funkcjami wyświetlaczy Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"przechwyć wyjście audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Zezwala aplikacji na przechwytywanie i przekierowywanie wyjścia audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"przechwyć wyjście wideo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Zezwala aplikacji na przechwytywanie i przekierowywanie wyjścia wideo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"przechwyć bezpieczne wyjście wideo"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Zezwala aplikacji na przechwytywanie i przekierowywanie bezpiecznego wyjścia wideo."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"zmienianie ustawień audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Pozwala aplikacji na modyfikowanie globalnych ustawień dźwięku, takich jak głośność oraz urządzenie wyjściowe."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"nagrywanie dźwięku"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Zezwala na tworzenie powiązania z interfejsem najwyższego poziomu usługi odbiornika powiadomień. Nie powinno być nigdy potrzebne dla zwykłych aplikacji."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"wywoływanie aplikacji konfiguracyjnej udostępnionej przez operatora"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Zezwala na wywoływanie aplikacji konfiguracyjnej udostępnionej przez operatora. Nieprzeznaczone dla zwykłych aplikacji."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"śledź stan sieci"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Pozwala aplikacji śledzić stan sieci. Nieprzeznaczone dla zwykłych aplikacji."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Określ reguły hasła"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontrolowanie długości haseł odblokowania ekranu i dozwolonych w nich znaków"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitoruj próby odblokowania ekranu"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 021ebac..2db7a18 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"impedir trocas de aplicações"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Impede que o utilizador mude para outra aplicação."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obter informações da aplicação atual"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permite ao titular recuperar informações privadas acerca da aplicação atual no primeiro plano do ecrã."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitorizar e controlar a iniciação de todas as aplicações"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permite que uma aplicação monitorize e controle a forma como o sistema inicia atividades. As aplicações maliciosas podem comprometer totalmente o sistema. Esta autorização só é necessária para programação, nunca para utilização normal."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar difusão de pacote removido"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permite que a aplicação se configure e se ligue a visores Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controlar visores Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permite que a aplicação controle funcionalidades de baixo nível em visores Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"capturar saída de áudio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permite à aplicação capturar e redirecionar a saída de áudio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"capturar saída de vídeo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permite à aplicação capturar e redirecionar a saída de vídeo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"capturar saída de vídeo segura"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permite à aplicação capturar e redirecionar a saída de vídeo segura."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"alterar as suas definições de áudio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permite que a aplicação modifique definições de áudio globais, tais como o volume e qual o altifalante utilizado para a saída de som."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"gravar áudio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permite que o titular vincule a interface de nível superior de um serviço de escuta de notificações. Nunca deverá ser necessário para aplicações normais."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"invocar a aplicação de configuração fornecida pela operadora"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permite que o titular invoque a aplicação de configuração fornecida pela operadora. Nunca deverá ser necessário para aplicações normais."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ouvir observações sobre as condições da rede"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permite que uma aplicação ouça observações sobre as condições da rede. Nunca deverá ser necessário para aplicações normais."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Definir regras de palavra-passe"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controlar o comprimento e os caracteres permitidos nas palavras-passe de desbloqueio do ecrã."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitorizar tentativas de desbloqueio do ecrã"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 9f206a6..2fbb511 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"evitar trocas de aplicativo"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Impede que o usuário alterne para outro aplicativo."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obter informações do aplicativo atual"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permite ao titular recuperar informações particulares sobre o aplicativo atual em primeiro plano na tela."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitorar e controlar todos os aplicativos que estão sendo iniciados"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permite que o aplicativo monitore e controle a forma como o sistema inicia atividades. Aplicativos maliciosos podem comprometer completamente o sistema. Esta permissão só é necessária para o desenvolvimento, nunca para o uso normal."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar transmissão removida do pacote"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permite que o aplicativo configure e conecte a monitores Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controlar monitores Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permite que o aplicativo controle recursos de baixo nível de monitores Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"capturar saída de áudio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permite que o aplicativo capture e redirecione a saída de áudio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"capturar saída de vídeo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permite que o aplicativo capture e redirecione a saída de vídeo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"capturar saída de vídeo segura"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permite que o aplicativo capture e redirecione a saída de vídeo segura."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"alterar as suas configurações de áudio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permite que o aplicativo modifique configurações de áudio globais como volume e alto-falantes de saída."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"gravar áudio"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permite que o proprietário sujeite a interface de nível superior a um serviço ouvinte de notificações. Não deve ser necessário para aplicativos comuns."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"invocar o aplicativo de configuração fornecido pela operadora"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permite que o proprietário invoque o aplicativo de configuração fornecido pela operadora. Não deve ser necessário para aplicativos comuns."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"detectar observações nas condições da rede"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permite que o aplicativo detecte observações nas condições da rede. Não deve ser necessário para aplicativos comuns."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Definir regras para senha"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Controle o tamanho e os caracteres permitidos nas senhas de desbloqueio de tela."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitorar tentativas de desbloqueio da tela"</string>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index e6d9783..363fb94 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -479,7 +479,7 @@
<skip />
<!-- no translation found for permlab_getTopActivityInfo (2537922311411546016) -->
<skip />
- <!-- no translation found for permdesc_getTopActivityInfo (2512448855496067131) -->
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
<skip />
<!-- no translation found for permlab_runSetActivityWatcher (892239094867182656) -->
<skip />
@@ -1104,6 +1104,10 @@
<skip />
<!-- no translation found for permdesc_invokeCarrierSetup (4159549152529111920) -->
<skip />
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<!-- no translation found for policylab_limitPassword (4497420728857585791) -->
<skip />
<!-- no translation found for policydesc_limitPassword (3252114203919510394) -->
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 539762a..11f4b5f 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"împiedicare comutare între aplicaţii"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Împiedică trecerea utilizatorului la o altă aplicaţie."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"obținere informații despre aplicația curentă"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Permite proprietarului să preia informațiile private despre aplicația curentă în prim-planul ecranului."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"monitorizare şi control asupra lansării tuturor aplicaţiilor"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Permite aplicaţiei să monitorizeze şi să controleze modul în care sistemul lansează activităţi. Aplicaţiile rău intenţionate pot să compromită sistemul în întregime. Această permisiune este necesară doar pentru dezvoltare şi niciodată pentru utilizarea normală."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"trimitere mesaj difuzat privind extragerea din pachet"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Permite proprietarului să se conecteze la interfața de nivel superior a unui serviciu de printare. Nu ar trebui să fie necesară pentru aplicațiile obișnuite."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"acces la toate procesele de printare"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Permite proprietarului să acceseze procesele de printare create de o altă aplicație. Nu ar trebui să fie necesară pentru aplicațiile obișnuite."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"conectare la serviciul NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Permite aplicației autorizate să se asocieze cu aplicații care emulează carduri NFC. Nu ar trebui să fie necesară pentru aplicațiile obișnuite."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"conectare la un serviciu text"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Permite proprietarului să se conecteze la o interfaţă de nivel superior a unui serviciu text (de ex., SpellCheckerService). Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"conectare la un serviciu VPN"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Permite aplicaţiei să configureze şi să se conecteze la afişaje Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"controlează afişaje Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Permite aplicaţiei să controleze funcţiile de nivel redus ale afişajelor Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"capturați ieșirea audio"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Permite aplicației să captureze și să redirecționeze ieșirea audio."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"capturați ieșirea video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Permite aplicației să captureze și să redirecționeze ieșirea video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"capturați ieșirea video securizată"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Permite aplicației să captureze și să redirecționeze ieșirea video securizată."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"modificare setări audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Permite aplicaţiei să modifice setările audio globale, cum ar fi volumul şi difuzorul care este utilizat pentru ieşire."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"înregistrare audio"</string>
@@ -661,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Permite proprietarului să se conecteze la interfața de nivel superior a unui serviciu de citire a notificărilor. În mod normal aplicațiile nu ar trebui să aibă nevoie de această permisiune."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"apelarea aplicației de configurare furnizată de operator"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Permite proprietarului să apeleze aplicația de configurare furnizată de operator. Nu ar trebui să fie necesară pentru aplicațiile obișnuite."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ascultați observații despre starea rețelei"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Permite unei aplicații să asculte observații despre starea rețelei. Nu ar trebui să fie necesară pentru aplicațiile obișnuite."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Setaţi reguli pentru parolă"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Stabiliţi lungimea şi tipul de caractere permise în parolele pentru deblocarea ecranului."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Monitorizaţi încercările de deblocare a ecranului"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 361e9a4..1629be3 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"Защита от переключения приложений"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Запрещает пользователям переключаться между приложениями."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"Показ информации о текущем приложении"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"На экране будут отображаться сведения о текущем приложении."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"Отслеживание и управление запуском всех приложений"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Приложение сможет отслеживать запуск системных процессов и управлять им. Вредоносные программы смогут получить полный контроль над системой. Это разрешение необходимо только для разработки и не нужно в обычном режиме."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"Отправка оповещений об удалении пакетов"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Приложение сможет подключаться к базовому интерфейсу службы печати. Это разрешение не используется обычными приложениями."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"Доступ к заданиям печати"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Владелец сможет просматривать задания печати, созданные другими приложениями. Это разрешение не используется обычными приложениями."</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"подключаться к службе NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Приложение сможет подключаться к программам с имитацией карт NFC. Это разрешение не используется обычными приложениями."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"Подключение к службе текстовых сообщений"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Позволяет подключаться к базовому интерфейсу службы текстовых сообщений (например, SpellCheckerService). Это разрешение не используется обычными приложениями."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"Подключение к VPN-службе"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Приложение сможет подключаться к экранам с помощью Wi-Fi и настраивать их."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Управление мониторами, подключенными через Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Приложение сможет управлять низкоуровневыми функциями экранов, подключенных через Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"захват аудиосигнала"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Приложение сможет захватывать и перенаправлять аудиосигнал."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"захват видеосигнала"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Приложение сможет захватывать и перенаправлять видеосигнал."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"захват защищенного видеосигнала"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Приложение сможет захватывать и перенаправлять защищенный видеосигнал."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"Изменение настроек аудио"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Приложение сможет изменять системные настройки звука, например уровень громкости и активный динамик."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"Запись аудио"</string>
@@ -661,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Приложение сможет подключаться к базовому интерфейсу службы просмотра уведомлений. Это разрешение не используется обычными приложениями."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"Запуск приложения настроек, предоставленного оператором"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Владелец сможет запускать приложение настроек, предоставленное оператором. Это разрешение не используется обычными приложениями."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Правила выбора паролей"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Контролировать длину и символы при вводе паролей для снятия блокировки экрана."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Отслеживать попытки снятия блокировки экрана"</string>
@@ -1481,8 +1478,7 @@
<string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Экран HDMI"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Наложение № <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> х <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> тчк/дюйм"</string>
- <!-- no translation found for display_manager_overlay_display_secure_suffix (6022119702628572080) -->
- <skip />
+ <string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", безопасный"</string>
<string name="wifi_display_notification_title" msgid="2223050649240326557">"Беспроводной проектор подключен"</string>
<string name="wifi_display_notification_message" msgid="4498802012464170685">"Изображение передается на другое устройство"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Отключить"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index de6785c..8eb65a6 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"zabrániť prepínaniu aplikácií"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Zabráni používateľovi prepnúť na inú aplikáciu."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"získať informácie o aktuálnej aplikácii"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Umožňuje držiteľovi povolenia načítať súkromné informácie o aktuálnej aplikácii v popredí obrazovky."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"sledovať a ovládať všetky spustenia aplikácií"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Umožňuje aplikácii sledovať a ovládať spúšťanie aktivít systémom. Škodlivé aplikácie môžu systém úplne ovládnuť. Toto povolenie je potrebné len na účely vývoja, nikdy nie na bežné používanie."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"odoslanie vysielania o odstránení balíčka"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Umožňuje aplikácii konfigurovať displeje a pripojiť sa k nim cez siete Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"ovládať displeje cez sieť Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Umožňuje aplikácii ovládať základné funkcie displejov cez siete Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"zachytiť výstup zvuku"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Umožňuje aplikácii zachytiť a presmerovať výstup zvuku."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"zachytiť výstup videa"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Umožňuje aplikácii zachytiť a presmerovať výstup videa."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"zachytiť zabezpečený výstup videa"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Umožňuje aplikácii zachytiť a presmerovať zabezpečený výstup videa."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"zmeny vašich nastavení zvuku"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Umožňuje aplikácii upraviť globálne nastavenia zvuku, ako je hlasitosť, alebo určiť, z ktorého reproduktora bude zvuk vychádzať."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"záznam zvuku"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Umožňuje držiteľovi naviazať sa na najvyššiu úroveň služby na počúvanie upozornení. Bežné aplikácie by toto nastavenie nemali nikdy požadovať."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"vyvolanie aplikácie pre konfiguráciu poskytnutú operátorom"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Umožňuje držiteľovi vyvolať aplikáciu pre konfiguráciu poskytnutú operátorom. Bežné aplikácie by toto povolenie nemali nikdy potrebovať."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"zachytávať informácie o stave siete"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Umožňuje aplikácii zachytávať informácie o stave siete. Bežné aplikácie by toto povolenie nemali nikdy potrebovať."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Nastaviť pravidlá pre heslo"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Ovládanie dĺžky hesiel na odomknutie obrazovky a v nich používané znaky."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Sledovať pokusy o odomknutie obrazovky"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index a14a080..6ee87fc 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"preprečevanje preklopa programov"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Uporabniku preprečuje preklop v drug program."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"pridobivanje podatkov o trenutni aplikaciji"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Omogoča imetniku pridobivanje zasebnih podatkov o trenutni aplikaciji v ospredju zaslona."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"spremljanje in nadzor vseh zagonov programov"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Programu omogoča spremljanje in nadziranje načina, kako sistem zažene dejavnosti. Zlonamerni programi lahko v celoti ogrozijo varnost sistema. To dovoljenje je potrebno samo za razvoj, vendar nikoli za običajno uporabo."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"pošiljanje oddaje brez paketa"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Omogoča aplikaciji konfiguriranje zaslonov Wi-Fi in povezovanje z njimi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"nadzor zaslonov Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Omogoča aplikaciji nadzor osnovnih funkcij zaslonov Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"zajem avdioizhoda"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Omogoči aplikaciji, da zajame in preusmeri avdioizhod."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"zajem videoizhoda"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Omogoči aplikaciji, da zajame in preusmeri videoizhod."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"zajem varnega videoizhoda"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Omogoči aplikaciji, da zajame in preusmeri varni videoizhod."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"spreminjanje nastavitev zvoka"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Aplikaciji omogoča spreminjanje splošnih zvočnih nastavitev, na primer glasnost in kateri zvočnik se uporablja."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"snemanje zvoka"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Lastniku omogoča povezovanje z vmesnikom storitve poslušalca obvestil najvišje ravni. Tega nikoli ni treba uporabiti za navadne aplikacije."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"sprožitev operaterjeve aplikacije za konfiguracijo"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Lastniku omogoča sproženje operaterjeve aplikacije za konfiguracijo. Tega nikoli ni treba uporabiti za navadne aplikacije."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"spremljanje razmer v omrežju"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Aplikaciji omogoča spremljanje razmer v omrežju. Pri navadnih aplikacijah to ne bi smelo biti potrebno."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Nastavitev pravil za geslo"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Nadzor nad dolžino in znaki, ki so dovoljeni v geslih za odklepanje zaslona."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"nadzor nad poskusi odklepanja zaslona"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 1f253cf..85bac70 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"спречавање пребацивања са једне апликације на другу"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Спречава да корисник пређе на другу апликацију."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"преузимање информација о актуелној апликацији"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Дозвољава власнику да преузима приватне информације о актуелној апликацији у првом плану екрана."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"надгледање и контрола покретања свих апликација"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Дозвољава апликацији да прати начин на који систем покреће активности и да њиме управља. Злонамерне апликације могу у потпуности да угрозе систем. Ова дозвола је потребна само за програмирање, а никада за уобичајено коришћење."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"слање емитовања уклоњеног пакета"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Дозвољава апликацији да конфигурише Wi-Fi екране и повезује се са њима."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"контрола Wi-Fi екрана"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Дозвољава апликацији да контролише функције Wi-Fi екрана ниског нивоа."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"снимање аудио садржаја"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Дозвољава апликацији да снима и преусмерава аудио садржај."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"снимање видео садржаја"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Дозвољава апликацији да снима и преусмерава видео садржај."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"снимање безбедног видео садржаја"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Дозвољава апликацији да снима и преусмерава безбедан видео садржај."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"промена аудио подешавања"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Дозвољава апликацији да мења глобална аудио подешавања као што су јачина звука и избор звучника који се користи као излаз."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"снимање аудио записа"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Дозвољава власнику да се повеже са интерфејсом услуге монитора обавештења највишег нивоа. Уобичајене апликације никада не би требало да је користе."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"позивање апликације са конфигурацијом коју одређује оператер"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Дозвољава власнику да позива апликацију са конфигурацијом коју одређује оператер. Уобичајене апликације никада не би требало да је користе."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Подешавање правила за лозинку"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Контролишите дужину и знакове дозвољене у лозинкама за откључавање екрана."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Надгледање покушаја откључавања екрана"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 63ddfea..763653d 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"förhindrar programbyten"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Hindrar användaren från att byta till en annan app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"hämta information om aktuell app"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Innehavaren tillåts att hämta privat information om den app som för tillfället är i förgrunden på skärmen."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"övervaka och styra alla appar som öppnas"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Tillåter att appen övervakar och styr hur systemet startar aktiviteter. Skadliga appar kan kompromettera systemet helt. Den här behörigheten behövs bara för programmering, aldrig för vanlig användning."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"skicka meddelande om borttaget paket"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Tillåter att appen konfigurerar och ansluter till Wi-Fi-skärmar."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"kontrollerar Wi-Fi-skärmar"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Tillåter att appen kontrollerar grundläggande funktioner för Wi-Fi-skärmar."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"fånga upp ljudutgång"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Tillåt att appen fångar upp och omdirigerar ljudutgången."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"fånga upp videoutgång"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Tillåt att appen fångar upp och omdirigerar videoutgången."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"fånga upp säker videoutgång"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Tillåt att appen fångar upp och omdirigerar säker videoutgång."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"ändra dina ljudinställningar"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Tillåter att appen ändrar globala ljudinställningar som volym och vilken högtalarutgång som används."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"spela in ljud"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Innehavaren tillåts att binda till den översta nivåns gränssnitt för en meddelandelyssnare. Ska inte behövas för vanliga appar."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"anropa konfigurationsappen från operatören"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Innehavaren tillåts att anropa konfigurationsappen från operatören. Ska inte behövas för vanliga appar."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"lyssna efter information om nätverksförhållanden"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Tillåter att appen lyssnar efter information om nätverksförhållanden. Vanliga appar bör aldrig behöva den här behörigheten."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Ange lösenordsregler"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Bestäm hur många och vilka tecken som är tillåtna i skärmlåsets lösenord."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Övervaka försök att låsa upp skärmen"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 0c36baf..23ca2dd 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"zuia swichi za app"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Huzuia mtumiaji dhidi ya kubadilisha na kwenda kwa programu nyingine."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"pata maelezo ya sasa kuhusu programu"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Huruhusu mmiliki kurejesha maelezo ya faragha kuhusu programu ya sasa katika mandharimbele ya skrini."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"Fuatilia na kudhibiti uzinduzi wote wa programu"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Inaruhusu programu kufuatilia na kudhibiti jinsi mfumo unazindua shughuli. Programu hasidi zinaweza kutia mfumo hatarini. Ruhusa inahitajika tu kwa usanidi, kamwe sio kwa matumizi ya kawaida."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"furushi lililotumwa limeondoa tangazo"</string>
@@ -362,8 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"Inaruhusu kishikiliaji kujifungilia kiolesura cha kiwango cha juu cha huduma ya kuchapisha. Haipaswi kuhitajika kwa programu za kawaida."</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"fikia kazi zote za kuchapisha"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"Huruhusu mmiliki kufikia kazi za kuchapisha zilizoundwa na programu nyingine. Haipaswi kuhitajika kwa programu za kawaida kamwe."</string>
- <string name="permlab_bindNfcService" msgid="2752731300419410724">"funga kwa huduma ya NFC"</string>
- <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Huruhusu mmiliki kufunga kwa programu zinazoiga kadi za NFC. Haipaswi kuhitaji kamwe kwa programu za kawaida."</string>
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"funga kwenye huduma za NFC"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"Huruhusu mmiliki kufunga kwa programu zinazoiga kadi za NFC. Haipaswi kuhitajika kamwe kwa programu za kawaida."</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"Imefungwa kwa huduma ya maandishi"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Inaruhusu kishikiliaji kushurutisha kusano ya kiwango cha juu ya huduma ya matini(k.m.SpellCheckerService). Haipaswi kuhitajika kwa programu za kawaida."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"funga kwa huduma ya VPN"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Inaruhusu programu kusanidi na kuunganika kwenye maonyesho ya Wifi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"dhibiti maonyesho ya Wifi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Inaruhusu programu kudhibiti vipengele vya kiwango cha chini vya maonyesho ya Wifi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"nasa sauti"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Inaruhusu programu kunasa na kuelekeza sauti kwingine."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"nasa sauti ya video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Inaruhusu programu kunasa na kuelekeza video kwingine."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"nasa sauti ya video kwa usalama"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Inaruhusu programu kunasa na kuelekeza video kwingine kwa usalama."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"badilisha mipangilio yako ya sauti"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Inaruhusu programu kurekebisha mipangilio ya sauti kila mahali kama vile sauti na ni kipaza sauti kipi ambacho kinatumika kwa kutoa."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"rekodi sauti"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Inaruhusu kishikilizi kuunganishwa kwenye kusano cha kiwango cha juu cha huduma ya kisikilizi cha arifa. Haipaswi kuhitajika tena kwa programu za kawaida."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"omba programu ya usakinishaji inayotolewa na mtoa huduma."</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Inaruhusu kishikiliaji kuomba programu ya usakinishaji inayotolewa na mto huduma. Haipaswi kuhitajika kwa programu za kawaida."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Weka kanuni za nenosiri"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Dhibiti urefu na vibambo vinavyoruhusiwa katika manenosiri ya kufungua skrini."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Chunguza majaribio ya kutofun gua skrini"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index d4b08c8..98b9950 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"ป้องกันการเปลี่ยนแอปพลิเคชัน"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"ป้องกันไม่ให้ผู้ใช้สลับไปใช้แอปพลิเคชันอื่น"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"รับข้อมูลแอปพลิเคชันปัจจุบัน"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"ช่วยให้เจ้าของสามารถดึงข้อมูลส่วนตัวเกี่ยวกับแอปพลิเคชันปัจจุบันในส่วนหน้าของหน้าจอ"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"ตรวจสอบและควบคุมแอปพลิเคชันทั้งหมดที่เปิดใช้งาน"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"อนุญาตให้แอปพลิเคชันตรวจสอบและควบคุมวิธีการที่ระบบเปิดกิจกรรมต่างๆ แอปพลิเคชันที่เป็นอันตรายอาจทำอันตรายแก่ระบบได้อย่างสิ้นเชิง การอนุญาตนี้จำเป็นสำหรับการพัฒนาเท่านั้น ไม่ใช้สำหรับแอปพลิเคชันทั่วไปโดยเด็ดขาด"</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"ส่งการกระจายข้อมูลว่ามีการนำแพคเกจออก"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"อนุญาตให้แอปกำหนดค่าและเชื่อมต่อกับจอแสดงผล WiFi ได้"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"ควบคุมการแสดงผลด้วย WiFi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"อนุญาตให้แอปควบคุมคุณลักษณะต่างๆ ในระดับล่างของการแสดงผลด้วย WiFi"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"บันทึกเอาต์พุตเสียง"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"อนุญาตให้แอปบันทึกและเปลี่ยนเส้นทางเอาต์พุตเสียง"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"บันทึกเอาต์พุตวิดีโอ"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"อนุญาตให้แอปบันทึกและเปลี่ยนเส้นทางเอาต์พุตวิดีโอ"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"บันทึกเอาต์พุตเสียงที่ปลอดภัย"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"อนุญาตให้แอปบันทึกและเปลี่ยนเส้นทางเอาต์พุตของวิดีโอที่ปลอดภัย"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"เปลี่ยนการตั้งค่าเสียงของคุณ"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"อนุญาตให้แอปพลิเคชันปรับเปลี่ยนการตั้งค่าเสียงทั้งหมดได้ เช่น ระดับเสียงและลำโพงที่จะใช้งาน"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"บันทึกเสียง"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"อนุญาตให้เจ้าของเชื่อมโยงกับอินเตอร์เฟซระดับสูงสุดของบริการตัวฟังการแจ้งเตือน ซึ่งไม่มีความจำเป็นสำหรับแอปธรรมดา"</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"เรียกใช้แอปการกำหนดค่าของผู้ให้บริการ"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"อนุญาตให้ผู้ใช้สามารถเรียกใช้แอปการกำหนดค่าของผู้ให้บริการ ซึ่งแอปทั่วไปไม่จำเป็นต้องใช้"</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"ตั้งค่ากฎรหัสผ่าน"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"ควบคุมความยาวและอักขระที่อนุญาตให้ใช้ในรหัสผ่านการปลดล็อกหน้าจอ"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"ตรวจสอบความพยายามในการปลดล็อกหน้าจอ"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 7f33245..01aab09 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"pigilan ang mga paglipat ng app"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Pinipigilan ang mga user sa paglipat sa isa pang app."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"kunin ang impormasyon ng kasalukuyang app"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Pinapayagan ang may-ari na bawiin ang pribadong impormasyon tungkol sa kasalukuyang application sa foreground ng screen."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"subaybayan at kontrolin ang lahat ng paglunsad ng app"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Pinapayagan ang app na subaybayan at kontrolin kung paano naglulunsad ng mga aktibidad ang system. Maaaring ganap na ikompromiso ng nakakahamak na apps ang system. Kinakailangan lamang ang pahintulot na ito para sa pagpapabuti, hindi kailanman para sa normal na paggamit."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"magpadala ng package inalis ang broadcast"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Pinapayagan ang app na mag-configure at kumonekta sa mga Wifi display."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"magkontrol ng mga Wifi display"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Pinapayagan ang app na magkontrol ng mga tampok sa mababang antas ng mga dispay ng Wifi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"kumuha ng audio output"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Pinapayagan ang app na kumuha at mag-redirect ng audio output."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"kumuha ng video output"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Pinapayagan ang app na kumuha at mag-redirect ng video output."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"kumuha ng secure na video output"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Pinapayagan ang app na kumuha at mag-redirect ng secure na video output."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"baguhin ang mga setting ng iyong audio"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Pinapayagan ang app na baguhin ang mga pandaigdigang setting ng audio gaya ng volume at kung aling speaker ang ginagamit para sa output."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"mag-record ng audio"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Nagbibigay-daan sa may-ari na mapailalim sa interface sa tuktok na antas ng isang serbisyo ng notification listener. Hindi dapat kailanganin para sa karaniwang apps kahit kailan."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"paganahin ang app ng configuration na ibinigay ng carrier"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Nagbibigay-daan sa may-ari na paganahin ang app ng configuration na ibinigay ng carrier. Hindi dapat kailanganin para sa normal na apps kahit kailan."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Magtakda ng mga panuntunan sa password"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kontrolin ang haba at mga character na pinapayagan sa mga password sa pag-unlock ng screen."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Subaybayan ang mga pagsubok sa pag-unlock ng screen"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index d682d37..1c8b640 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"uygulama değişimlerini engelle"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Kullanıcının başka bir uygulamaya geçiş yapmasını engeller."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"geçerli uygulama bilgilerini al"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"İzin sahibine, ekranın ön planındaki geçerli uygulama hakkında gizli bilgileri alma olanağı verir."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"tüm uygulama başlatma işlemlerini izle ve denetle"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Uygulamaya, sistemin etkinlikleri nasıl başlattığını izleme ve denetleme izni verir. Kötü amaçlı uygulamalar sistemi tamamen tehlikeye atabilir. Bu izin normal kullanım için değildir, sadece geliştirme süreçlerinde kullanılır."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"paket ile kaldırılan yayını gönder"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Uygulamaya kablosuz ekranları yapılandırma ve bunlara bağlanma izni verir."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"Kablosuz ekranları denetle"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Uygulamaya kablosuz ekranların alt düzey özelliklerini kontrol etme izni verir."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"ses çıkışını yakala"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Uygulamaya, ses çıkışını yakalayıp yönlendirme izni verir."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"video çıkışını yakala"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Uygulamaya, video çıkışını yakalayıp yönlendirme izni verir."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"güvenli video çıkışını yakala"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Uygulamaya, güvenli video çıkışını yakalayıp yönlendirme izni verir."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"ses ayarlarınızı değiştirin"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Uygulamaya ses düzeyi ve ses çıkışı için kullanılan hoparlör gibi genel ses ayarlarını değiştirme izni verir."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ses kaydet"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"İzin sahibine bir bildirim dinleyici hizmetinin en üst düzey arayüzüne bağlanma izni verir. Normal uygulamalarda hiçbir zaman gerek duyulmaz."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"operatör tarafından sağlanan yapılandırma uygulamasını çalıştır"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"İzin sahibine, operatör tarafından sağlanan yapılandırma uygulamasını çalıştırma izni verir. Normal uygulamalarda hiçbir zaman gerek duyulmaz."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ağ koşullarındaki gözlemleri dinle"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Bir uygulamaya, ağ koşullarındaki gözlemleri dinleme izni verir. Normal uygulamalar için hiçbir zaman gerekmez."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Şifre kuralları ayarla"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Ekran kilidini açma şifrelerinde izin verilen uzunluğu ve karakterleri denetleme."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Ekran kilidini açma denemelerini izle"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index b41171b..e87a400 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"запобіг. зміні програм"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Запобігати переходу користувача до іншої програми."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"отримати інформацію про поточну програму"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Дозволяє власникові отримувати приватну інформацію про поточну програму на передньому плані екрана."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"відстежувати та контролювати запуски всіх програм"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Дозволяє програмі відстежувати та контролювати, як саме система запускає дії. Шкідливі програми можуть отримати повний контроль над системою. Цей дозвіл потрібний лише для розробки, а не для звичайного користування."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"надсил. запис про видал. пакета"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Дозволяє програмі налаштовувати екрани Wi-Fi і під’єднуватися до них."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"керувати екранами Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Дозволяє програмі керувати низькорівневими функціями екранів Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"отримувати доступ до аудіовиходу"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Дозволяє програмі отримувати доступ до аудіовиходу й переспрямовувати його."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"отримувати доступ до відеовиходу"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Дозволяє програмі отримувати доступ до відеовиходу й переспрямовувати його."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"отримувати доступ до захищеного відеовиходу"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Дозволяє програмі отримувати доступ до захищеного відеовиходу й переспрямовувати його."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"змінювати налаштув-ня звуку"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Дозволяє програмі змінювати загальні налаштування звуку, як-от гучність і динамік, який використовується для виводу сигналу."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"запис-ти аудіо"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Дозволяє власнику прив’язуватися до інтерфейсу верхнього рівня служби читання сповіщень. Ніколи не застосовується для звичайних програм."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"викликати надану оператором програму конфігурації"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Дозволяє власнику викликати надану оператором програму конфігурації. Ніколи не застосовується для звичайних програм."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"прослуховувати дані спостережень за станом мережі"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Дозволяє програмі прослуховувати дані спостережень за станом мережі. Ніколи не застосовується для звичайних програм."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Устан. правила пароля"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Контролювати довжину паролів для розблокування екрана та дозволені в них символи."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Відстежув. спроби розблок. екрана"</string>
@@ -1479,7 +1476,7 @@
<string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Екран HDMI"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Накладання №<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>х<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
- <string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", фіксована"</string>
+ <string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", безпечний"</string>
<string name="wifi_display_notification_title" msgid="2223050649240326557">"Бездротовий екран під’єднано"</string>
<string name="wifi_display_notification_message" msgid="4498802012464170685">"Цей екран відображається на іншому пристрої"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Від’єднати"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 9e5b36c..2e95cd1 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"ngăn chuyển đổi ứng dụng"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Ngăn người dùng chuyển sang ứng dụng khác."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"truy cập thông tin ứng dụng hiện tại"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Cho phép chủ sở hữu truy xuất thông tin cá nhân về ứng dụng hiện tại ở nền trước của màn hình."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"giám sát và kiểm soát tất cả hoạt động khởi chạy ứng dụng"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Cho phép ứng dụng giám sát và kiểm soát cách hệ thống khởi chạy các hoạt động. Ứng dụng độc hại hoàn toàn có thể làm tổn hại hệ thống. Quyền này chỉ cần cho mục đích phát triển, không dành cho mục đích sử dụng thông thường."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"gửi truyền phát đã xóa của gói"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Cho phép ứng dụng định cấu hình và kết nối với màn hình Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"kiểm soát màn hình Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Cho phép ứng dụng kiểm soát các tính năng cấp thấp của màn hình Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"thu thập dữ liệu đầu ra âm thanh"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Cho phép ứng dụng thu thập và chuyển hướng dữ liệu đầu ra âm thanh."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"thu thập dữ liệu đầu ra video"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Cho phép ứng dụng thu thập và chuyển hướng dữ liệu đầu ra video."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"thu thập dữ liệu đầu ra video an toàn"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Cho phép ứng dụng thu thập và chuyển hướng dữ liệu đầu ra video an toàn."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"thay đổi cài đặt âm thanh của bạn"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Cho phép ứng dụng sửa đổi cài đặt âm thanh chung chẳng hạn như âm lượng và loa nào được sử dụng cho thiết bị ra."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"ghi âm"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Cho phép chủ sở hữu liên kết với giao diện cấp cao nhất của dịch vụ trình xử lý thông báo. Không cần thiết cho các ứng dụng thông thường."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"gọi ra ứng dụng cấu hình do nhà cung cấp dịch vụ cung cấp"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Cho phép chủ sở hữu gọi ra ứng dụng cấu hình do nhà cung cấp dịch vụ cung cấp. Không cần thiết cho các ứng dụng thông thường."</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"Đặt quy tắc mật khẩu"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Kiểm soát độ dài và ký tự được phép trong mật khẩu mở khóa màn hình."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Giám sát những lần thử mở khóa màn hình"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index a60b088..a2267a6 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"禁止切换应用"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"阻止用户切换到其他应用。"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"获取当前应用的信息"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"允许应用检索目前在屏幕前台运行的应用专有的信息。"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"监控所有应用的启动"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"允许应用监视和控制系统是如何启动活动的。恶意应用可能会完全破坏系统。此权限只有在进行开发时才需要,正常使用情况下绝不需要。"</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"发送包删除的广播"</string>
@@ -362,10 +363,8 @@
<string name="permdesc_bindPrintService" msgid="7960067623209111135">"允许应用绑定至打印服务的顶级接口。普通应用绝不需要此权限。"</string>
<string name="permlab_accessAllPrintJobs" msgid="1120792468465711159">"查看或修改所有打印作业"</string>
<string name="permdesc_accessAllPrintJobs" msgid="2978185311041864762">"允许应用查看或修改其他应用创建的打印作业。普通应用绝不需要此权限。"</string>
- <!-- no translation found for permlab_bindNfcService (2752731300419410724) -->
- <skip />
- <!-- no translation found for permdesc_bindNfcService (6120647629174066862) -->
- <skip />
+ <string name="permlab_bindNfcService" msgid="2752731300419410724">"绑定到 NFC 服务"</string>
+ <string name="permdesc_bindNfcService" msgid="6120647629174066862">"允许应用绑定到模拟 NFC 卡的应用。普通应用绝不需要此权限。"</string>
<string name="permlab_bindTextService" msgid="7358378401915287938">"绑定至文字服务"</string>
<string name="permdesc_bindTextService" msgid="8151968910973998670">"允许用户绑定至文字服务(如 SpellCheckerService)的顶级接口。普通应用绝不需要此权限。"</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"绑定到 VPN 服务"</string>
@@ -476,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"允许应用配置并连接到 WLAN 显示设备。"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"控制 WLAN 显示设备"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"允许应用控制 WLAN 显示设备的基础功能。"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"捕获音频输出"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"允许该应用捕获和重定向音频输出。"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"捕获视频输出"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"允许该应用捕获和重定向视频输出。"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"捕获安全视频输出"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"允许该应用捕获和重定向安全视频输出。"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"更改您的音频设置"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"允许该应用修改全局音频设置,例如音量和用于输出的扬声器。"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"录音"</string>
@@ -661,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"允许应用绑定到通知侦听器服务的顶级接口(普通应用绝不需要此权限)。"</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"调用运营商提供的配置应用"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"允许应用调用运营商提供的配置应用。普通应用绝不需要此权限。"</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"监听网络状况的观测信息"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"允许应用监听网络状况的观测信息。普通应用绝不需要此权限。"</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"设置密码规则"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"控制屏幕解锁密码所允许的长度和字符。"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"监视屏幕解锁尝试次数"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 2ea03d7..9558319 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"防止切換應用程式"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"防止使用者切換到其他應用程式。"</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"取得目前的應用程式資訊"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"允許應用程式針對目前在螢幕前景運作的應用程式擷取私人資訊。"</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"監視及控制所有應用程式的啟動程序"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"允許應用程式監視和控制系統啟動活動的方式。請注意,惡意應用程式可能利用此功能破壞整個系統。這個權限只有開發人員才需要,一般使用者不需使用這個權限。"</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"傳送程式已移除廣播"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"允許應用程式設定及連接 Wi-Fi 顯示裝置。"</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"控制 Wi-Fi 顯示裝置"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"允許應用程式控制 Wi-Fi 顯示裝置的低階功能。"</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"擷取音訊輸出"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"允許應用程式擷取及重新導向音訊輸出。"</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"擷取視訊輸出"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"允許應用程式擷取及重新導向視訊輸出。"</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"擷取安全視訊輸出"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"允許應用程式擷取及重新導向安全視訊輸出。"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"變更音訊設定"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"允許應用程式修改全域音訊設定,例如音量和用來輸出的喇叭。"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"錄製音訊"</string>
@@ -659,6 +654,10 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"允許應用程式繫結至通知接聽器服務的頂層介面 (一般應用程式不需使用)。"</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"叫用行動通訊業者提供的設定應用程式"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"允許應用程式叫用行動通訊業者提供的設定應用程式 (一般應用程式並不需要)。"</string>
+ <!-- no translation found for permlab_accessNetworkConditions (8206077447838909516) -->
+ <skip />
+ <!-- no translation found for permdesc_accessNetworkConditions (6899102075825272211) -->
+ <skip />
<string name="policylab_limitPassword" msgid="4497420728857585791">"設定密碼規則"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"控制螢幕解鎖密碼所允許的長度和字元。"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"監視螢幕解鎖嘗試次數"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 2e027e1..575ff59 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -314,7 +314,8 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"gwema ukushintsha kohlelo lokusebenza"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"Igwema umsebenzisi ukuthi ashintshele kolunye uhlelo lokusebenza."</string>
<string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"thola ulwazi lohlelo lokusebenza lwamanje"</string>
- <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"Ivumela umphathi ukuthi athole ulwazi oluyimfihlo mayelana nohlelo lokusebenza lwamanje ngaphambili kwesikrini."</string>
+ <!-- no translation found for permdesc_getTopActivityInfo (8153651434145132505) -->
+ <skip />
<string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"qapha futhi ulawule ukuqaliswa kwazo zonke izinsiza"</string>
<string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Ivumela uhlelo lokusebebenza ukuthi luhlole futhi lulawule ukuthi isistimu iziqalisa kanjani imisebenzi. Izinhlelo zokusebenza ezinobungozi zingensa isistimu ibe sebungozini. Le mvume idingakalela intuthuku kuphela hhayi ukusetshenziswa okwejwayelekile."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"thumela iphakheji yomsakazo okhishiwe"</string>
@@ -474,18 +475,12 @@
<string name="permdesc_configureWifiDisplay" msgid="7916815158690218065">"Ivumela uhlelo lokusebenza ukulungisa nokuxhuma ekubukisweni kwe-Wi-Fi."</string>
<string name="permlab_controlWifiDisplay" msgid="393641276723695496">"lawula ukubukwa kwe-Wi-Fi"</string>
<string name="permdesc_controlWifiDisplay" msgid="4543912292681826986">"Uvumela uhlelo lokusebenza ukulawula izici zeleveli ephansi zokuboniswa kwe-Wi-Fi."</string>
- <!-- no translation found for permlab_captureAudioOutput (6857134498402346708) -->
- <skip />
- <!-- no translation found for permdesc_captureAudioOutput (6210597754212208853) -->
- <skip />
- <!-- no translation found for permlab_captureVideoOutput (2246828773589094023) -->
- <skip />
- <!-- no translation found for permdesc_captureVideoOutput (359481658034149860) -->
- <skip />
- <!-- no translation found for permlab_captureSecureVideoOutput (7815398969303382016) -->
- <skip />
- <!-- no translation found for permdesc_captureSecureVideoOutput (2779793064709350289) -->
- <skip />
+ <string name="permlab_captureAudioOutput" msgid="6857134498402346708">"shutha okukhipha umsindo"</string>
+ <string name="permdesc_captureAudioOutput" msgid="6210597754212208853">"Kuvumela uhlelo lokusebenza ukuba lushuthe futhi luqondise kabusha okukhipha umsindo."</string>
+ <string name="permlab_captureVideoOutput" msgid="2246828773589094023">"shutha okokukhipha ividiyo"</string>
+ <string name="permdesc_captureVideoOutput" msgid="359481658034149860">"Kuvumela uhlelo lokusebenza ukuba lushuthe futhi luqondise kabusha okukhipha ividiyo."</string>
+ <string name="permlab_captureSecureVideoOutput" msgid="7815398969303382016">"shutha okukhipha ividiyo ephephile"</string>
+ <string name="permdesc_captureSecureVideoOutput" msgid="2779793064709350289">"Kuvumela uhlelo lokusebenza ukuba lushuthe futhi luqondise kabusha okukhipa ividiyo ephephile."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"shintsha izilungiselelo zakho zomsindo"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"Ivumela uhlelo lokusebenza ukushintsha izilungiselelo zomsindo we-global njengevolomu nokuthi isiphi isipika esisetshenziselwa okukhiphayo."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"qopha umsindo"</string>
@@ -659,6 +654,8 @@
<string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"Ivumela umbambi ukubophezela kwisixhumi esibonakalayo sezinga eliphezulu lesevisi yomlaleli wesaziso. Akusoze kwadingeka kwizinhlelo zokusebenza ezivamile."</string>
<string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"buyisela uhlelo lokusebenza lokulungiselelwa okunikezwe yinkampani yenethiwekhi"</string>
<string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"Ivumela umnikazi ukuthi abuyisele uhlelo lokusebenza lokulungiselelwa. Akumele idingelwe izinhlelo zokusebenza ezijwayelekile."</string>
+ <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"Lalela okubonwayo kuzimo zenethiwekhi"</string>
+ <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"Ivumela uhlelo lokusebenza ukuthi lulalele okubonwa kuzimo zenethiwekhi. Akumele idingelwe izinhlelo zokusebenza ezijwayelekile."</string>
<string name="policylab_limitPassword" msgid="4497420728857585791">"Misa imithetho yephasiwedi"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"Lawula ubude nezinhlamvu ezivunyelwe kumaphasiwedi okuvula isikrini"</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"Gaka imizamo yokuvula isikrini"</string>
diff --git a/core/tests/coretests/src/android/animation/AnimatorSetEventsTest.java b/core/tests/coretests/src/android/animation/AnimatorSetEventsTest.java
index d415e4e..7eb32ee 100644
--- a/core/tests/coretests/src/android/animation/AnimatorSetEventsTest.java
+++ b/core/tests/coretests/src/android/animation/AnimatorSetEventsTest.java
@@ -37,14 +37,12 @@
button = (Button) getActivity().findViewById(R.id.animatingButton);
mAnimator = new AnimatorSet();
((AnimatorSet)mAnimator).playSequentially(xAnim, yAnim);
-
super.setUp();
}
@Override
protected long getTimeout() {
- return (xAnim.getDuration() + yAnim.getDuration()) +
- (xAnim.getStartDelay() + yAnim.getStartDelay()) +
+ return (2 * mAnimator.getDuration()) + (2 * mAnimator.getStartDelay()) +
ANIM_DELAY + FUTURE_RELEASE_DELAY;
}
diff --git a/core/tests/coretests/src/android/animation/EventsTest.java b/core/tests/coretests/src/android/animation/EventsTest.java
index 8df711b..28cfe3d 100644
--- a/core/tests/coretests/src/android/animation/EventsTest.java
+++ b/core/tests/coretests/src/android/animation/EventsTest.java
@@ -22,6 +22,7 @@
import android.test.suitebuilder.annotation.SmallTest;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
/**
* Tests for the various lifecycle events of Animators. This abstract class is subclassed by
@@ -42,12 +43,15 @@
protected static final int ANIM_DELAY = 100;
protected static final int ANIM_MID_DURATION = ANIM_DURATION / 2;
protected static final int ANIM_MID_DELAY = ANIM_DELAY / 2;
+ protected static final int ANIM_PAUSE_DURATION = ANIM_DELAY;
+ protected static final int ANIM_PAUSE_DELAY = ANIM_DELAY / 2;
protected static final int FUTURE_RELEASE_DELAY = 50;
+ protected static final int ANIM_FULL_DURATION_SLOP = 100;
private boolean mStarted; // tracks whether we've received the onAnimationStart() callback
protected boolean mRunning; // tracks whether we've started the animator
- private boolean mCanceled; // trackes whether we've canceled the animator
- protected Animator.AnimatorListener mFutureListener; // mechanism for delaying the end of the test
+ private boolean mCanceled; // tracks whether we've canceled the animator
+ protected Animator.AnimatorListener mFutureListener; // mechanism for delaying end of the test
protected FutureWaiter mFuture; // Mechanism for waiting for the UI test to complete
private Animator.AnimatorListener mListener; // Listener that handles/tests the events
@@ -104,6 +108,48 @@
};
/**
+ * Pauses the given animator. Used to delay pausing until some later time (after the
+ * animator has started playing).
+ */
+ static class Pauser implements Runnable {
+ Animator mAnim;
+ FutureWaiter mFuture;
+ public Pauser(Animator anim, FutureWaiter future) {
+ mAnim = anim;
+ mFuture = future;
+ }
+ @Override
+ public void run() {
+ try {
+ mAnim.pause();
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ };
+
+ /**
+ * Resumes the given animator. Used to delay resuming until some later time (after the
+ * animator has paused for some duration).
+ */
+ static class Resumer implements Runnable {
+ Animator mAnim;
+ FutureWaiter mFuture;
+ public Resumer(Animator anim, FutureWaiter future) {
+ mAnim = anim;
+ mFuture = future;
+ }
+ @Override
+ public void run() {
+ try {
+ mAnim.resume();
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ };
+
+ /**
* Releases the given Future object when the listener's end() event is called. Specifically,
* it releases it after some further delay, to give the test time to do other things right
* after an animation ends.
@@ -555,4 +601,114 @@
mFuture.get(getTimeout(), TimeUnit.MILLISECONDS);
}
+ /**
+ * Verify that pausing and resuming an animator ends within
+ * the appropriate timeout duration.
+ */
+ @MediumTest
+ public void testPauseResume() throws Exception {
+ mFutureListener = new FutureReleaseListener(mFuture);
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Handler handler = new Handler();
+ mAnimator.addListener(mFutureListener);
+ mRunning = true;
+ mAnimator.start();
+ handler.postDelayed(new Pauser(mAnimator, mFuture), ANIM_PAUSE_DELAY);
+ handler.postDelayed(new Resumer(mAnimator, mFuture),
+ ANIM_PAUSE_DELAY + ANIM_PAUSE_DURATION);
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ });
+ mFuture.get(getTimeout() + ANIM_PAUSE_DURATION, TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Verify that pausing and resuming a startDelayed animator ends within
+ * the appropriate timeout duration.
+ */
+ @MediumTest
+ public void testPauseResumeDelayed() throws Exception {
+ mAnimator.setStartDelay(ANIM_DELAY);
+ mFutureListener = new FutureReleaseListener(mFuture);
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Handler handler = new Handler();
+ mAnimator.addListener(mFutureListener);
+ mRunning = true;
+ mAnimator.start();
+ handler.postDelayed(new Pauser(mAnimator, mFuture), ANIM_PAUSE_DELAY);
+ handler.postDelayed(new Resumer(mAnimator, mFuture),
+ ANIM_PAUSE_DELAY + ANIM_PAUSE_DURATION);
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ });
+ mFuture.get(getTimeout() + ANIM_PAUSE_DURATION + ANIM_FULL_DURATION_SLOP,
+ TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Verify that pausing an animator without resuming it causes a timeout.
+ */
+ @MediumTest
+ public void testPauseTimeout() throws Exception {
+ mFutureListener = new FutureReleaseListener(mFuture);
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Handler handler = new Handler();
+ mAnimator.addListener(mFutureListener);
+ mRunning = true;
+ mAnimator.start();
+ handler.postDelayed(new Pauser(mAnimator, mFuture), ANIM_PAUSE_DELAY);
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ });
+ try {
+ mFuture.get(getTimeout() + ANIM_PAUSE_DURATION + ANIM_FULL_DURATION_SLOP,
+ TimeUnit.MILLISECONDS);
+ } catch (TimeoutException e) {
+ // Expected behavior, swallow the exception
+ }
+ }
+
+ /**
+ * Verify that pausing a startDelayed animator without resuming it causes a timeout.
+ */
+ @MediumTest
+ public void testPauseTimeoutDelayed() throws Exception {
+ mAnimator.setStartDelay(ANIM_DELAY);
+ mFutureListener = new FutureReleaseListener(mFuture);
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Handler handler = new Handler();
+ mAnimator.addListener(mFutureListener);
+ mRunning = true;
+ mAnimator.start();
+ handler.postDelayed(new Pauser(mAnimator, mFuture), ANIM_PAUSE_DELAY);
+ } catch (junit.framework.AssertionFailedError e) {
+ mFuture.setException(new RuntimeException(e));
+ }
+ }
+ });
+ try {
+ mFuture.get(getTimeout() + ANIM_PAUSE_DURATION + ANIM_FULL_DURATION_SLOP,
+ TimeUnit.MILLISECONDS);
+ } catch (TimeoutException e) {
+ // Expected behavior, swallow the exception
+ }
+ }
}
diff --git a/docs/html/google/gcm/adv.jd b/docs/html/google/gcm/adv.jd
index 1360624..567b12c 100644
--- a/docs/html/google/gcm/adv.jd
+++ b/docs/html/google/gcm/adv.jd
@@ -22,7 +22,12 @@
</ol>
</li>
<li><a href="#retry">Automatic Retry Using Exponential Back-Off</a></li>
-<li><a href="#unreg">How Unregistration Works</a></li>
+<li><a href="#unreg">Unregistration</a>
+ <ol>
+ <li><a href="#unreg-why">Why you should rarely unregister</a></li>
+ <li><a href="#unreg-how">How unregistration works</a></li>
+ </ol>
+</li>
<li><a href="#collapsible">Send-to-Sync vs. Messages with Payload</a>
<ol>
<li><a href="#s2s">Send-to-sync messages</a></li>
@@ -31,7 +36,8 @@
</ol>
</li>
<li><a href="#ttl">Setting an Expiration Date for a Message</a> </li>
-<li><a href="#throttling"></a><a href="#multi-senders">Receiving Messages from Multiple Senders</a></li>
+<li><a href="#throttling"></a><a href="#multi-senders">Receiving Messages from
+Multiple Senders</a></li>
</ol>
</div>
@@ -42,17 +48,56 @@
<h2 id="msg-lifetime">Lifetime of a Message</h2>
-<p>When a 3rd-party server posts a message to GCM and receives a message ID back, it does not mean that the message was already delivered to the device. Rather, it means that it was accepted for delivery. What happens to the message after it is accepted depends on many factors.</p>
-<p>In the best-case scenario, if the device is connected to GCM, the screen is on, and there are no throttling restrictions (see <a href="#throttling">Throttling</a>), the message will be delivered right away.</p>
+<p>When a 3rd-party server posts a message to GCM and receives a message ID back,
+it does not mean that the message was already delivered to the device. Rather, it
+means that it was accepted for delivery. What happens to the message after it is
+accepted depends on many factors.</p>
+
+<p>In the best-case scenario, if the device is connected to GCM, the screen is on,
+and there are no throttling restrictions (see <a href="#throttling">Throttling</a>),
+the message will be delivered right away.</p>
+
<p>If the device is connected but idle, the message will still be
-delivered right away unless the <code>delay_while_idle</code> flag is set to true. Otherwise, it will be stored in the GCM servers until the device is awake. And that's where the <code>collapse_key</code> flag plays a role: if there is already a message with the same collapse key (and registration ID) stored and waiting for delivery, the old message will be discarded and the new message will take its place (that is, the old message will be collapsed by the new one). However, if the collapse key is not set, both the new and old messages are stored for future delivery.</p>
+delivered right away unless the <code>delay_while_idle</code> flag is set to true.
+Otherwise, it will be stored in the GCM servers until the device is awake. And
+that's where the <code>collapse_key</code> flag plays a role: if there is already
+a message with the same collapse key (and registration ID) stored and waiting for
+delivery, the old message will be discarded and the new message will take its place
+(that is, the old message will be collapsed by the new one). However, if the collapse
+key is not set, both the new and old messages are stored for future delivery.
+Collapsible messages are also called <a href="#s2s">send-to-sync messages</a>.</p>
-<p class="note"><strong>Note:</strong> There is a limit on how many messages can be stored without collapsing. That limit is currently 100. If the limit is reached, all stored messages are discarded. Then when the device is back online, it receives a special message indicating that the limit was reached. The application can then handle the situation properly, typically by requesting a full sync.</p>
+<p class="note"><strong>Note:</strong> There is a limit on how many messages can
+be stored without collapsing. That limit is currently 100. If the limit is reached,
+all stored messages are discarded. Then when the device is back online, it receives
+a special message indicating that the limit was reached. The application can then
+handle the situation properly, typically by requesting a full sync.
+<br><br>
+Likewise, there is a limit on how many <code>collapse_key</code>s you can have for
+a particular device. GCM allows a maximum of 4 different collapse keys to be used
+by the GCM server per device
+any given time. In other words, the GCM server can simultaneously store 4 different
+send-to-sync messages, each with a different collapse key. If you exceed this number
+GCM will only keep 4 collapse keys, with no guarantees about which ones they will be.
+See <a href="#s2s">Send-to-sync messages</a> for more information.
+</p>
-<p>If the device is not connected to GCM, the message will be stored until a connection is established (again respecting the collapse key rules). When a connection is established, GCM will deliver all pending messages to the device, regardless of the <code>delay_while_idle</code> flag. If the device never gets connected again (for instance, if it was factory reset), the message will eventually time out and be discarded from GCM storage. The default timeout is 4 weeks, unless the <code>time_to_live</code> flag is set.</p>
+<p>If the device is not connected to GCM, the message will be stored until a
+connection is established (again respecting the collapse key rules). When a connection
+is established, GCM will deliver all pending messages to the device, regardless of
+the <code>delay_while_idle</code> flag. If the device never gets connected again
+(for instance, if it was factory reset), the message will eventually time out and
+be discarded from GCM storage. The default timeout is 4 weeks, unless the
+<code>time_to_live</code> flag is set.</p>
-<p>Finally, when GCM attempts to deliver a message to the device and the application was uninstalled, GCM will discard that message right away and invalidate the registration ID. Future attempts to send a message to that device will get a <code>NotRegistered</code> error. See <a href="#unreg">How Unregistration Works</a> for more information.</p>
-<p>Although is not possible to track the status of each individual message, the Google APIs Console stats are broken down by messages sent to device, messages collapsed, and messages waiting for delivery.</p>
+<p>Finally, when GCM attempts to deliver a message to the device and the
+application was uninstalled, GCM will discard that message right away and
+invalidate the registration ID. Future attempts to send a message to that device
+will get a <code>NotRegistered</code> error. See <a href="#unreg">
+How Unregistration Works</a> for more information.</p>
+<p>Although is not possible to track the status of each individual message, the
+Google APIs Console stats are broken down by messages sent to device, messages
+collapsed, and messages waiting for delivery.</p>
<h2 id="throttling">Throttling</h2>
<p>To prevent abuse (such as sending a flood of messages to a device) and
@@ -74,107 +119,112 @@
efficiency reasons.</p>
<h2 id="reg-state">Keeping the Registration State in Sync</h2>
-<p>Whenever the application receives a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent with a <code>registration_id</code> extra, it should save the ID for future use, pass it to the 3rd-party server to complete the registration, and keep track of whether the server completed the registration. If the server fails to complete the registration, it should try again or unregister from GCM.</p>
+<p>Whenever the application registers as described in
+<a href="{@docRoot}google/gcm/client.html">Implementing GCM Client</a>,
+it should save the registration ID for future use, pass it to the
+3rd-party server to complete the registration, and keep track of
+whether the server completed the registration. If the server fails
+to complete the registration, it should try again or unregister from GCM.</p>
+
<p>There are also two other scenarios that require special care:</p>
<ul>
<li>Application update</li>
<li>Backup and restore
</li>
</ul>
-<p>When an application is updated, it should invalidate its existing registration ID, as it is not guaranteed to work with the new version. Because there is no lifecycle method called when the application is updated, the best way to achieve this validation is by storing the current application version when a registration ID is stored. Then when the application is started, compare the stored value with the current application version. If they do not match, invalidate the stored data and start the registration process again.</p>
+<p>When an application is updated, it should invalidate its existing registration
+ID, as it is not guaranteed to work with the new version. Because there is no
+lifecycle method called when the application is updated, the best way to achieve
+this validation is by storing the current application version when a registration
+ID is stored. Then when the application is started, compare the stored value with
+the current application version. If they do not match, invalidate the stored data
+and start the registration process again.</p>
-<p>Similarly, you should not save the registration ID when an application is backed up. This is because the registration ID could become invalid by the time the application is restored, which would put the application in an invalid state (that is, the application thinks it is registered, but the server and GCM do not store that registration ID anymore—thus the application will not get more messages).</p>
+<p>Similarly, you should not save the registration ID when an application is
+backed up. This is because the registration ID could become invalid by the time
+the application is restored, which would put the application in an invalid state
+(that is, the application thinks it is registered, but the server and GCM do not
+store that registration ID anymore—thus the application will not get more
+messages).</p>
<h3 id="canonical">Canonical IDs</h3>
-<p>On the server side, as long as the application is behaving well, everything should work normally. However, if a bug in the application triggers multiple registrations for the same device, it can be hard to reconcile state and you might end up with duplicate messages.</p>
-<p>GCM provides a facility called "canonical registration IDs" to easily recover from these situations. A canonical registration ID is defined to be the ID of the last registration requested by your application. This is the ID that the server should use when sending messages to the device.</p>
-<p>If later on you try to send a message using a different registration ID, GCM will process the request as usual, but it will include the canonical registration ID in the <code>registration_id</code> field of the response. Make sure to replace the registration ID stored in your server with this canonical ID, as eventually the ID you're using will stop working.</p>
+<p>On the server side, as long as the application is behaving well, everything
+should work normally. However, if a bug in the application triggers multiple
+registrations for the same device, it can be hard to reconcile state and you might
+end up with duplicate messages.</p>
+<p>GCM provides a facility called "canonical registration IDs" to easily
+recover from these situations. A canonical registration ID is defined to be the ID
+of the last registration requested by your application. This is the ID that the
+server should use when sending messages to the device.</p>
+<p>If later on you try to send a message using a different registration ID, GCM
+will process the request as usual, but it will include the canonical registration
+ID in the <code>registration_id</code> field of the response. Make sure to replace
+the registration ID stored in your server with this canonical ID, as eventually
+the ID you're using will stop working.</p>
<h2 id="retry">Automatic Retry Using Exponential Back-Off</h2>
-<p>When the application receives a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent with the <code>error</code> extra set as <code>SERVICE_NOT_AVAILABLE</code>, it should retry the failed operation (register or unregister).</p>
-<p>In the simplest case, if your application just calls <code>register</code> and GCM is not a fundamental part of the application, the application could simply ignore the error and try to register again the next time it starts. Otherwise, it should retry the previous operation using exponential back-off. In exponential back-off, each time there is a failure, it should wait twice the previous amount of time before trying again. If the register (or unregister) operation was synchronous, it could be retried in a simple loop. However, since it is asynchronous, the best approach is to schedule a pending intent to retry the operation. The following steps describe how to implement this in the <code>MyIntentService</code> example used above:</p>
-<ol>
- <li> Create a random token to verify the origin of the retry intent:
+<p>When registration or unregistration fails, the app should retry the failed operation.</p>
+<p>In the simplest case, if your application attempts to register and GCM is not a
+fundamental part of the application, the application could simply ignore the error
+and try to register again the next time it starts. Otherwise, it should retry the
+previous operation using exponential back-off. In exponential back-off, each time
+there is a failure, it should wait twice the previous amount of time before trying
+again. If the register (or unregister) operation was synchronous, it could be retried
+in a simple loop. However, since it is asynchronous, the best approach is to schedule
+a {@link android.app.PendingIntent} to retry the operation.
-<pre class="prettyprint pretty-java">private static final String TOKEN =
- Long.toBinaryString(new Random().nextLong());
-</pre>
+<h2 id="unreg">Unregistration</h2>
- <li> Change the <code>handleRegistration()</code> method so it creates the pending intent when appropriate:</li>
+<p>This section explains when you should unregister in GCM and what happens
+when you do.</p>
-<pre class="prettyprint pretty-java">...
-if (error != null) {
- if ("SERVICE_NOT_AVAILABLE".equals(error)) {
- long backoffTimeMs = // get back-off time from shared preferences
- long nextAttempt = SystemClock.elapsedRealtime() + backoffTimeMs;
- Intent retryIntent = new Intent("com.example.gcm.intent.RETRY");
- retryIntent.putExtra("token", TOKEN);
- PendingIntent retryPendingIntent =
- PendingIntent.getBroadcast(context, 0, retryIntent, 0);
- AlarmManager am = (AlarmManager)
- context.getSystemService(Context.ALARM_SERVICE);
- am.set(AlarmManager.ELAPSED_REALTIME, nextAttempt, retryPendingIntent);
- backoffTimeMs *= 2; // Next retry should wait longer.
- // update back-off time on shared preferences
- } else {
- // Unrecoverable error, log it
- Log.i(TAG, "Received error: " + error);
-}
-...</pre>
-<p> The back-off time is stored in a shared preference. This ensures that it is persistent across multiple activity launches. The name of the intent does not matter, as long as the same intent is used in the following steps.</p></li>
+<h3 id="unreg-why">Why you should rarely unregister</h3>
- <li> Change the <code>onHandleIntent()</code> method adding an <code>else if</code> case for the retry intent:</li>
+<p>A registration ID (regID) represents a particular Android application running
+on a particular device. You should only need to unregister in rare cases, such as
+if you want an app to stop receiving messages, or if you suspect that the regID has
+been compromised. In general, though, once an app has a regID, you shouldn't need
+to change it.</p>
-<pre class="prettyprint pretty-java">...
-} else if (action.equals("com.example.gcm.intent.RETRY")) {
- String token = intent.getStringExtra("token");
- // make sure intent was generated by this class, not by a malicious app
- if (TOKEN.equals(token)) {
- String registrationId = // get from shared properties
- if (registrationId != null) {
- // last operation was attempt to unregister; send UNREGISTER intent again
- } else {
- // last operation was attempt to register; send REGISTER intent again
- }
-}
-...</pre>
+<p>In particular, you should never unregister your app as a mechanism for
+logout or for switching between users, for the following reasons:</p>
- <li> Create a new instance of <code>MyReceiver</code> in your activity:</li>
+<ul>
+ <li>A regID maps an app to a device. It isn't associated with a particular
+ logged in user. If you unregister and then re-register, GCM may return the same
+ ID or a different ID—there's no guarantee either way.</li>
-<pre class="prettyprint pretty-java">private final MyBroadcastReceiver mRetryReceiver = new MyBroadcastReceiver();
-</pre>
+ <li>Unregistration may take up to 5 minutes to propagate.</li>
+ <li>After unregistration, re-registration may again take up to 5 minutes to
+propagate. During this time messages may be rejected due to the state of being
+unregistered, and after all this, messages may still go to the wrong user.</li>
+</ul>
- <li>In the activity's <code>onCreate()</code> method, register the new instance to receive the <code>com.example.gcm.intent.RETRY</code> intent:
- <pre class="prettyprint pretty-java">...
-IntentFilter filter = new IntentFilter("com.example.gcm.intent.RETRY");
-filter.addCategory(getPackageName());
-registerReceiver(mRetryReceiver, filter);
-...</pre>
-<p class="note"><strong>Note:</strong> You must dynamically create a new instance of the broadcast receiver since the one defined by the manifest can only receive intents with the <code>com.google.android.c2dm.permission.SEND</code> permission. The permission <code>com.google.android.c2dm.permission.SEND</code> is a system permission and as such it cannot be granted to a regular application.</p>
+<p>The solution is to manage your own mapping between users, the regID, and
+individual messages:</p>
-</li>
+<ul>
+ <li>Your app server should maintain a mapping between the current user
+and the regID. This should include information about which user is supposed to
+receive a particular message.</li>
+ <li>The app running on the device should check to ensure that messages it
+receives match the logged in user.</li>
+</ul>
- <li>In the activity's <code>onDestroy()</code> method, unregister the broadcast receiver:</li>
-<pre class="prettyprint pretty-java">unregisterReceiver(mRetryReceiver);</pre>
-</ol>
-<h2 id="unreg">How Unregistration Works</h2>
-<p>There are two ways to unregister a device from GCM: manually and automatically.</p>
-<p>An Android application can manually unregister itself by issuing a <code>com.google.android.c2dm.intent.UNREGISTER</code> intent, which is useful when the application offers a logoff feature (so it can unregister on logoff and register again on logon). See the <a href="gcm.html#unregistering">Architectural Overview</a> for more discussion of this topic. This is the sequence of events when an application unregisters itself:</p>
-<ol>
- <li> The application issues a <code>com.google.android.c2dm.intent.UNREGISTER</code> intent, passing the package name as an extra.</li>
- <li>When the GCM server is done with the unregistration, it sends a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent with the <code>unregistered</code> extra set.</li>
- <li>The application then must contact the 3rd-party server so it can remove the registration ID.</li>
- <li>The application should also clear its registration ID.
- </li>
-</ol>
-<p>An application can be automatically unregistered after it is uninstalled from the device. However, this process does not happens right away, as Android does not provide an uninstall callback. What happens in this scenario is as follows:</p>
+<h3 id="unreg-how">How unregistration works</h3>
+
+<p>An application can be automatically unregistered after it is uninstalled from
+the device. However, this process does not happens right away, as Android does not
+provide an uninstall callback. What happens in this scenario is as follows:</p>
<ol>
<li>The end user uninstalls the application.</li>
<li>The 3rd-party server sends a message to GCM server.</li>
<li>The GCM server sends the message to the device.</li>
- <li>The GCM client receives the message and queries Package Manager about whether there are broadcast receivers configured to receive it, which returns <code>false</code>.
+ <li>The GCM client receives the message and queries Package Manager about
+whether there are broadcast receivers configured to receive it, which returns
+<code>false</code>.
</li>
<li>The GCM client informs the GCM server that the application was uninstalled.</li>
<li>The GCM server marks the registration ID for deletion.</li>
@@ -184,9 +234,16 @@
</li>
</ol>
-<p class ="note"><strong>Note:</strong> The GCM client is the Google Cloud Messaging framework present on the device.</p>
+<p class ="note"><strong>Note:</strong> The GCM client is the Google Cloud
+Messaging framework present on the device.</p>
-<p>Note that it might take a while for the registration ID be completely removed from GCM. Thus it is possible that messages sent during step 7 above gets a valid message ID as response, even though the message will not be delivered to the device. Eventually, the registration ID will be removed and the server will get a <code>NotRegistered</code> error, without any further action being required from the 3rd-party server (this scenario happens frequently while an application is being developed and tested).</p>
+<p>Note that it might take a while for the registration ID be completely removed
+from GCM. Thus it is possible that messages sent during step 7 above gets a valid
+message ID as response, even though the message will not be delivered to the device.
+Eventually, the registration ID will be removed and the server will get a
+<code>NotRegistered</code> error, without any further action being required from
+the 3rd-party server (this scenario happens frequently while an application is
+being developed and tested).</p>
<h2 id="collapsible">Send-to-Sync vs. Messages with Payload</h2>
@@ -196,17 +253,45 @@
<li>By default, it is stored by GCM for 4 weeks.</li>
</ul>
-<p>But despite these similarities, messages can behave very differently depending on their particular settings. One major distinction between messages is whether they are collapsed (where each new message replaces the preceding message) or not collapsed (where each individual message is delivered). Every message sent in GCM is either a "send-to-sync" (collapsible) message or a "message with payload" (non-collapsible message). These concepts are described in more detail in the following sections.</p>
+<p>But despite these similarities, messages can behave very differently depending
+on their particular settings. One major distinction between messages is whether
+they are collapsed (where each new message replaces the preceding message) or not
+collapsed (where each individual message is delivered). Every message sent in GCM
+is either a "send-to-sync" (collapsible) message or a "message with
+payload" (non-collapsible message). These concepts are described in more
+detail in the following sections.</p>
<h3 id="s2s"><strong>Send-to-sync messages</strong></h3>
-<p>A send-to-sync (collapsible) message is often a "tickle" that tells a mobile application to sync data from the server. For example, suppose you have an email application. When a user receives new email on the server, the server pings the mobile application with a "New mail" message. This tells the application to sync to the server to pick up the new email. The server might send this message multiple times as new mail continues to accumulate, before the application has had a chance to sync. But if the user has received 25 new emails, there's no need to preserve every "New mail" message. One is sufficient. Another example would be a sports application that updates users with the latest score. Only the most recent message is relevant, so it makes sense to have each new message replace the preceding message. </p>
+<p>A send-to-sync (collapsible) message is often a "tickle" that tells
+a mobile application to sync data from the server. For example, suppose you have
+an email application. When a user receives new email on the server, the server
+pings the mobile application with a "New mail" message. This tells the
+application to sync to the server to pick up the new email. The server might send
+this message multiple times as new mail continues to accumulate, before the application
+has had a chance to sync. But if the user has received 25 new emails, there's no
+need to preserve every "New mail" message. One is sufficient. Another
+example would be a sports application that updates users with the latest score.
+Only the most recent message is relevant, so it makes sense to have each new
+message replace the preceding message. </p>
-<p>The email and sports applications are cases where you would probably use the GCM <code>collapse_key</code> parameter. A <em>collapse key</em> is an arbitrary string that is used to collapse a group of like messages when the device is offline, so that only the most recent message gets sent to the client. For example, "New mail," "Updates available," and so on</p>
-<p>GCM allows a maximum of 4 different collapse keys to be used by the GCM server at any given time. In other words, the GCM server can simultaneously store 4 different send-to-sync messages, each with a different collapse key. If you exceed this number GCM will only keep 4 collapse keys, with no guarantees about which ones they will be.</p>
+<p>The email and sports applications are cases where you would probably use the
+GCM <code>collapse_key</code> parameter. A <em>collapse key</em> is an arbitrary
+string that is used to collapse a group of like messages when the device is offline,
+so that only the most recent message gets sent to the client. For example,
+"New mail," "Updates available," and so on</p>
+<p>GCM allows a maximum of 4 different collapse keys to be used by the GCM server
+at any given time. In other words, the GCM server can simultaneously store 4
+different send-to-sync messages per device, each with a different collapse key.
+For example, Device A can have A1, A2, A3, and A4. Device B can have B1, B2, B3,
+and B4, and so on. If you exceed this number GCM will only keep 4 collapse keys, with no
+guarantees about which ones they will be.</p>
<h3 id="payload">Messages with payload</h3>
-<p>Unlike a send-to-sync message, every "message with payload" (non-collapsible message) is delivered. The payload the message contains can be up to 4kb. For example, here is a JSON-formatted message in an IM application in which spectators are discussing a sporting event:</p>
+<p>Unlike a send-to-sync message, every "message with payload"
+(non-collapsible message) is delivered. The payload the message contains can be
+up to 4kb. For example, here is a JSON-formatted message in an IM application in
+which spectators are discussing a sporting event:</p>
<pre class="prettyprint pretty-json">{
"registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...",
@@ -217,19 +302,42 @@
},
}</pre>
-<p>A "message with payload" is not simply a "ping" to the mobile application to contact the server to fetch data. In the aforementioned IM application, for example, you would want to deliver every message, because every message has different content. To specify a non-collapsible message, you simply omit the <code>collapse_key</code> parameter. Thus GCM will send each message individually. Note that the order of delivery is not guaranteed.</p>
-<p>GCM will store up to 100 non-collapsible messages. After that, all messages are discarded from GCM, and a new message is created that tells the client how far behind it is. The message is delivered through a regular <code>com.google.android.c2dm.intent.RECEIVE</code> intent, with the following extras:</p>
+<p>A "message with payload" is not simply a "ping" to the
+mobile application to contact the server to fetch data. In the aforementioned IM
+application, for example, you would want to deliver every message, because every
+message has different content. To specify a non-collapsible message, you simply
+omit the <code>collapse_key</code> parameter. Thus GCM will send each message
+individually. Note that the order of delivery is not guaranteed.</p>
+
+<p>GCM will store up to 100 non-collapsible messages. After that, all messages
+are discarded from GCM, and a new message is created that tells the client how
+far behind it is. The message is delivered through a regular
+<code>com.google.android.c2dm.intent.RECEIVE</code> intent, with the following
+extras:</p>
<ul>
- <li> <code>message_type</code>—The value is always the string "deleted_messages".</li>
- <li><code>total_deleted</code>—The value is a string with the number of deleted messages.</li>
+ <li> <code>message_type</code>—The value is always the string
+"deleted_messages".</li>
+ <li><code>total_deleted</code>—The value is a string with the number of
+deleted messages.</li>
</ul>
-<p>The application should respond by syncing with the server to recover the discarded messages. </p>
+<p>The application should respond by syncing with the server to recover the
+discarded messages. </p>
<h3 id="which">Which should I use?</h3>
- <p>If your application does not need to use non-collapsible messages, collapsible messages are a better choice from a performance standpoint, because they put less of a burden on the device battery.</p>
+ <p>If your application does not need to use non-collapsible messages, collapsible
+messages are a better choice from a performance standpoint, because they put less
+of a burden on the device battery. However, if you use collapsible messages, remember that
+<strong>GCM only allows a maximum of 4 different collapse keys to be used by the GCM server
+per device at any given time</strong>. You must not exceed this number, or it could cause
+unpredictable consequences.</p>
<h2 dir="ltr" id="ttl">Setting an Expiration Date for a Message</h2>
-<p>The Time to Live (TTL) feature lets the sender specify the maximum lifespan of a message using the <code>time_to_live</code> parameter in the send request. The value of this parameter must be a duration from 0 to 2,419,200 seconds, and it corresponds to the maximum period of time for which GCM will store and try to deliver the message. Requests that don't contain this field default to the maximum period of 4 weeks.</p>
+<p>The Time to Live (TTL) feature lets the sender specify the maximum lifespan
+of a message using the <code>time_to_live</code> parameter in the send request.
+The value of this parameter must be a duration from 0 to 2,419,200 seconds, and
+it corresponds to the maximum period of time for which GCM will store and try to
+deliver the message. Requests that don't contain this field default to the maximum
+period of 4 weeks.</p>
<p>Here are some possible uses for this feature:</p>
<ul>
<li>Video chat incoming calls</li>
@@ -237,9 +345,29 @@
<li>Calendar events</li>
</ul>
<h3 id="bg">Background </h3>
-<p>GCM will usually deliver messages immediately after they are sent. However, this might not always be possible. For example, the device could be turned off, offline, or otherwise unavailable. In other cases, the sender itself might request that messages not be delivered until the device becomes active by using the <code>delay_while_idle</code> flag. Finally, GCM might intentionally delay messages to prevent an application from consuming excessive resources and negatively impacting battery life.</p>
-<p>When this happens, GCM will store the message and deliver it as soon as it's feasible. While this is fine in most cases, there are some applications for which a late message might as well never be delivered. For example, if the message is an incoming call or video chat notification, it will only be meaningful for a small period of time before the call is terminated. Or if the message is an invitation to an event, it will be useless if received after the event has ended.</p>
-<p>Another advantage of specifying the expiration date for a message is that GCM will never throttle messages with a <code>time_to_live</code> value of 0 seconds. In other words, GCM will guarantee best effort for messages that must be delivered "now or never." Keep in mind that a <code>time_to_live</code> value of 0 means messages that can't be delivered immediately will be discarded. However, because such messages are never stored, this provides the best latency for sending notifications.</p>
+<p>GCM will usually deliver messages immediately after they are sent. However,
+this might not always be possible. For example, the device could be turned off,
+offline, or otherwise unavailable. In other cases, the sender itself might request
+that messages not be delivered until the device becomes active by using the
+<code>delay_while_idle</code> flag. Finally, GCM might intentionally delay messages
+to prevent an application from consuming excessive resources and negatively
+impacting battery life.</p>
+
+<p>When this happens, GCM will store the message and deliver it as soon as it's
+feasible. While this is fine in most cases, there are some applications for which
+a late message might as well never be delivered. For example, if the message is
+an incoming call or video chat notification, it will only be meaningful for a
+small period of time before the call is terminated. Or if the message is an
+invitation to an event, it will be useless if received after the event has ended.</p>
+
+<p>Another advantage of specifying the expiration date for a message is that GCM
+will never throttle messages with a <code>time_to_live</code> value of 0 seconds.
+In other words, GCM will guarantee best effort for messages that must be delivered
+"now or never." Keep in mind that a <code>time_to_live</code> value of
+0 means messages that can't be delivered immediately will be discarded. However,
+because such messages are never stored, this provides the best latency for
+sending notifications.</p>
+
<p>Here is an example of a JSON-formatted request that includes TTL:</p>
<pre class="prettyprint pretty-json">
{
@@ -256,9 +384,23 @@
<h2 id="multi-senders">Receiving Messages from Multiple Senders</h2>
-<p>GCM allows multiple parties to send messages to the same application. For example, suppose your application is an articles aggregator with multiple contributors, and you want each of them to be able to send a message when they publish a new article. This message might contain a URL so that the application can download the article. Instead of having to centralize all sending activity in one location, GCM gives you the ability to let each of these contributors send its own messages.</p>
-<p>To make this possible, all you need to do is have each sender generate its own project number. Then include those IDs in the sender field, separated by commas, when requesting a registration. Finally, share the registration ID with your partners, and they'll be able to send messages to your application using their own authentication keys.</p>
-<p>This code snippet illustrates this feature. Senders are passed as an intent extra in a comma-separated list:</p>
+
+<p>GCM allows multiple parties to send messages to the same application. For
+example, suppose your application is an articles aggregator with multiple
+contributors, and you want each of them to be able to send a message when they
+publish a new article. This message might contain a URL so that the application
+can download the article. Instead of having to centralize all sending activity in
+one location, GCM gives you the ability to let each of these contributors send
+its own messages.</p>
+
+<p>To make this possible, all you need to do is have each sender generate its own
+project number. Then include those IDs in the sender field, separated by commas,
+when requesting a registration. Finally, share the registration ID with your
+partners, and they'll be able to send messages to your application using their
+own authentication keys.</p>
+<p>This code snippet illustrates this feature. Senders are passed as an intent
+extra in a comma-separated list:</p>
+
<pre class="prettyprint pretty-java">Intent intent = new Intent(GCMConstants.INTENT_TO_GCM_REGISTRATION);
intent.setPackage(GSF_PACKAGE);
intent.putExtra(GCMConstants.EXTRA_APPLICATION_PENDING_INTENT,
@@ -269,4 +411,3 @@
</pre>
<p>Note that there is limit of 100 multiple senders.</p>
-
diff --git a/docs/html/google/gcm/ccs.jd b/docs/html/google/gcm/ccs.jd
index 9c5961c..244278e 100644
--- a/docs/html/google/gcm/ccs.jd
+++ b/docs/html/google/gcm/ccs.jd
@@ -1,93 +1,96 @@
-page.title=GCM Cloud Connection Server
+page.title=GCM Cloud Connection Server (XMPP)
@jd:body
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-
-<ul>
-<li>Get an introduction to key CCS terms and concepts.</li>
-<li>Learn how to send and receive both upstream and downstream messages in CCS.</li>
-</ul>
-
<h2>In this document</h2>
<ol class="toc">
- <li><a href="#gcm">CCS vs. GCM HTTP</a> </li>
<li><a href="#usage">How to Use CCS</a>
- <ol>
- <li><a href="#send_msg">Sending Messages</a></li>
- <li><a href="#format">Message Format</a></li>
- <li><a href="#msg_examples">Message Examples</a></li>
+ <ol class="toc">
+ <li><a href="#auth">Authentication</a></li>
+ </ol>
+ </li>
+ <li><a href="#format">Message Format</a>
+ <ol class="toc">
+ <li><a href="#request">Request format</a></li>
+ <li><a href="#response">Response format</a></li>
+ </ol>
+ </li>
+ <li><a href="#upstream">Upstream Messages</a> </li>
+ <li><a href="#flow">Flow Control</a> </li>
+ <li><a href="#implement">Implementing an XMPP-based App Server</a>
+ <ol class="toc">
+ <li><a href="#smack">Java sample using the Smack library</a></li>
+ <li><a href="#python">Python sample</a></li>
</ol>
</li>
- <li><a href="#flow">Flow Control</a> </li>
</ol>
<h2>See Also</h2>
<ol class="toc">
-<li><a href="{@docRoot}google/gcm/gs.html">Getting Started</a></li>
-<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
+<li><a href="{@docRoot}google/play-services/gcm/http.html">HTTP</a></li>
+<li><a href="{@docRoot}google/play-services/gcm/gs.html">Getting Started</a></li>
+<li><a href="{@docRoot}google/play-services/gcm/server.html">Implementing GCM Server</a></li>
+<li><a href="{@docRoot}google/play-services/gcm/client.html">Implementing GCM Client</a></li>
+<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link"
+target="_android">CCS and User Notifications Signup Form</a></li>
</ol>
</div>
</div>
-<p class="note"><strong>Note:</strong> To try out this feature, sign up using <a href="https://services.google.com/fb/forms/gcm/">this form</a>.</p>
+<p class="note"><strong>Note:</strong> To try out this feature, sign up using
+<a href="https://services.google.com/fb/forms/gcm/">this form</a>.</p>
-<p>The GCM Cloud Connection Server (CCS) allows third party servers to communicate with Android devices by establishing a persistent TCP connection with Google servers using the XMPP protocol. This communication is asynchronous and bidirectional.</p>
-<p>You can continue to use the HTTP request mechanism to send messages to GCM servers, side-by-side with CCS which uses XMPP. Some of the benefits of CCS include:</p>
+<p>The GCM Cloud Connection Server (CCS) is a connection server based on XMPP.
+CCS allows 3rd-party app servers (which you're
+responsible for implementing) to communicate
+with Android devices by establishing a persistent TCP connection with Google
+servers using the XMPP protocol. This communication is asynchronous and bidirectional.</p>
+<p>You can continue to use the HTTP request mechanism to send messages to GCM
+servers, side-by-side with CCS which uses XMPP. Some of the benefits of CCS include:</p>
<ul>
- <li>The asynchronous nature of XMPP allows you to send more messages with fewer resources.</li>
- <li>Communication is bidirectional—not only can the server send messages to the device, but the device can send messages back to the server.</li>
-<li>You can send messages back using the same connection used for receiving, thereby improving battery life.</li>
+ <li>The asynchronous nature of XMPP allows you to send more messages with fewer
+resources.</li>
+ <li>Communication is bidirectional—not only can the server send messages
+to the device, but the device can send messages back to the server.</li>
+<li>You can send messages back using the same connection used for receiving,
+thereby improving battery life.</li>
</ul>
-<p>The upstream messaging (device-to-cloud) feature of CCS is part of the Google Play services platform. Upstream messaging is available through the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. To use upstream messaging and the new streamlined registration process, you must <a href="{@docRoot}google/play-services/setup.html">set up</a> the Google Play services SDK.</p>
+<p>The upstream messaging (device-to-cloud) feature of CCS is part of the Google
+Play services platform. Upstream messaging is available through the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a>
+APIs. For examples, see
+<a href="#implement">Implementing an XMPP-based App Server</a>.</p>
-<p class="note"><strong>Note:</strong> For an example of an XMPP server, see <a href="server.html#xmpp">GCM Server</a>.
+<p class="note"><strong>Note:</strong> See
+<a href="server.html#params">Implementing GCM Server</a> for a list of all the message
+parameters and which connection server(s) supports them.</p>
-<h2 id="gcm">CCS vs. GCM HTTP</h2>
-
-<p>CCS messaging differs from GCM HTTP messaging in the following ways:</p>
-<ul>
- <li>Upstream/Downstream messages
- <ul>
- <li>GCM HTTP: Downstream only: cloud-to-device. </li>
- <li>CCS: Upstream and downstream (device-to-cloud, cloud-to-device). </li>
- </ul>
- </li>
- <li>Asynchronous messaging
- <ul>
- <li>GCM HTTP: 3rd-party servers send messages as HTTP POST requests and wait for a response. This mechanism is synchronous and causes the sender to block before sending another message.</li>
- <li>CCS: 3rd-party servers connect to Google infrastructure using a persistent XMPP connection and send/receive messages to/from all their devices at full line speed. CCS sends acknowledgements or failure notifications (in the form of special ACK and NACK JSON-encoded XMPP messages) asynchronously.</li>
- </ul>
- </li>
-
- <li>JSON
- <ul>
- <li>GCM HTTP: JSON messages sent as HTTP POST.</li>
- <li>CCS: JSON messages encapsulated in XMPP messages.</li>
- </ul>
- </li>
-</ul>
-<p>This document describes how to use CCS. For general concepts and information on how to use GCM HTTP, see the <a href="gcm.html">GCM Architectural Overview</a>.</p>
<h2 id="usage">How to Use CCS</h2>
-<p>GCM Cloud Connection Server (CCS) is an XMPP endpoint, running on {@code http://gcm.googleapis.com} port 5235.</p>
+<p>GCM Cloud Connection Server (CCS) is an XMPP endpoint, running on
+{@code http://gcm.googleapis.com} port 5235.</p>
-<p>CCS requires a Transport Layer Security (TLS) connection. That means the XMPP client must initiate a TLS connection.
-For example in smack, you would call {@code setSocketFactory(SSLSocketFactory)}, similar to “old style SSL” XMPP connections and https.</p>
+<p>CCS requires a Transport Layer Security (TLS) connection. That means the XMPP
+client must initiate a TLS connection.
+For example in Java, you would call {@code setSocketFactory(SSLSocketFactory)}.</p>
-<p>CCS requires a SASL PLAIN authentication mechanism using {@code <your_GCM_Sender_Id>@gcm.googleapis.com} (GCM sender ID) and the API key as the password, where the sender ID and API key are the same as described in <a href="gs.html">Getting Started</a>.</p>
+<p>CCS requires a SASL PLAIN authentication mechanism using
+{@code <your_GCM_Sender_Id>@gcm.googleapis.com} (GCM sender ID) and the
+API key as the password, where the sender ID and API key are the same as described
+in <a href="gs.html">Getting Started</a>.</p>
<p> You can use most XMPP libraries to interact with CCS.</p>
-<h3 id="send_msg">Sending messages</h3>
+<h3 id="auth">Authentication</h3>
<p>The following snippets illustrate how to perform authentication in CCS.</p>
<h4>Client</h4>
@@ -108,13 +111,13 @@
<h4>Client</h4>
<pre><auth mechanism="PLAIN"
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">MTI2MjAwMzQ3OTMzQHByb2plY3RzLmdjbS5hb
-mRyb2lkLmNvbQAxMjYyMDAzNDc5FzNAcHJvamVjdHMtZ2EtLmFuZHJvaWQuY29tAEFJe
mFTeUIzcmNaTmtmbnFLZEZiOW1oekNCaVlwT1JEQTJKV1d0dw==</auth>
</pre>
+
<h4>Server</h4>
<pre><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></pre>
-<h3 id="format">Message Format</h3>
+<h2 id="format">Message Format</h2>
<p>CCS uses normal XMPP <code><message></code> stanzas. The body of the message must be:
</p>
<pre>
@@ -123,25 +126,42 @@
</gcm>
</pre>
-<p>The JSON payload for server-to-device is similar to what the GCM http endpoint uses, with these exceptions:</p>
+<p>The JSON payload for server-to-device is similar to what the GCM http endpoint
+uses, with these exceptions:</p>
<ul>
<li>There is no support for multiple recipients.</li>
<li>{@code to} is used instead of {@code registration_ids}.</li>
- <li>CCS adds the field {@code message_id}, which is required. This ID uniquely identifies the message in an XMPP connection. The ACK or NACK from CCS uses the {@code message_id} to identify a message sent from 3rd-party servers to CCS. Therefore, it's important that this {@code message_id} not only be unique, but always present.</li>
+ <li>CCS adds the field {@code message_id}, which is required. This ID uniquely
+identifies the message in an XMPP connection. The ACK or NACK from CCS uses the
+{@code message_id} to identify a message sent from 3rd-party app servers to CCS.
+Therefore, it's important that this {@code message_id} not only be unique, but
+always present.</li>
- <li>For ACK/NACK messages that are special control messages, you also need to include a {@code message_type} field in the JSON message. For example:
+<li>For ACK/NACK messages that are special control messages, you also need to
+include a {@code message_type} field in the JSON message. The value can be either
+'ack' or 'nack'. For example:
-<pre>message_type = ('ack' OR 'nack');</pre>
+<pre>message_type = ('ack');</pre>
</li>
</ul>
-<p>For each message a device sends to the server, you need to send an ACK message. You never need to send a NACK message. If you don't send an ACK for a message, CCS will just resend it.
+<p>For each device message your app server receives from CCS, it needs to send
+an ACK message.
+It never needs to send a NACK message. If you don't send an ACK for a message,
+CCS will just resend it.
</p>
-<p>CCS also sends an ACK or NACK for each server-to-device message. If you do not receive either, it means that the TCP connection was closed in the middle of the operation and your server needs to resend the messages.
+<p>CCS also sends an ACK or NACK for each server-to-device message. If you do not
+receive either, it means that the TCP connection was closed in the middle of the
+operation and your server needs to resend the messages. See
+<a href="#flow">Flow Control</a> for details.
</p>
-<h3 id="msg_examples">Message Examples</h3>
+<p class="note"><strong>Note:</strong> See
+<a href="server.html#params">Implementing GCM Server</a> for a list of all the message
+parameters and which connection server(s) supports them.</p>
-<p>Here is an XMPP stanza containing the JSON message from a 3rd-party server to CCS:
+<h3 id="request">Request format</h3>
+
+<p>Here is an XMPP stanza containing the JSON message from a 3rd-party app server to CCS:
</p>
<pre><message id="">
@@ -160,7 +180,15 @@
</message>
</pre>
-<p>Here is an XMPP stanza containing the ACK/NACK message from CCS to 3rd-party server:
+<h3 id="response">Response format</h3>
+
+<p>A CCS response can have 3 possible forms. The first one is a regular 'ack'
+message. But when the response contains an error, there are 2
+different forms the message can take, described below.</p>
+
+<h4 id="ack">ACK message</h4>
+
+<p>Here is an XMPP stanza containing the ACK/NACK message from CCS to 3rd-party app server:
</p>
<pre><message id="">
<gcm xmlns="google:mobile:data">
@@ -171,24 +199,138 @@
}
</gcm>
</message>
+</pre>
-<message id="">
- <gcm xmlns="google:mobile:data">
+<h4 id="nack">NACK message</h4>
+
+<p>A NACK error is a regular XMPP message in which the {@code message_type} status
+message is "nack". A NACK message contains:</p>
+<ul>
+<li>Nack error code.</li>
+<li>Nack error description.</li>
+</ul>
+
+<p>Below are some examples.</p>
+
+<p>Bad registration:</p>
+<pre><message>
+ <data:gcm xmlns:data="google:mobile:data">
{
- "from":"REGID",
- "message_id":"m-1366082849205"
- "error": ERROR_CODE,
- "message_type":"nack"
+ "error":"BAD_REGISTRATION", // error code
+ "message_id":"msgId1",
+ "from":"PA91bHFOtaQGSwupt5l1og",
+ "message_type":"nack"
}
+ </data:gcm>
+</message></pre>
+
+<p>Invalid "time to live":</p>
+
+<pre><message>
+ <data:gcm xmlns:data="google:mobile:data">
+ {
+ "error":"InvalidJson : INVALID_TTL : Invalid value (-1) for \"time_to_live\": must be between 0 and \"2419200\"\n",
+ "message_id":"msgId1",
+ "from":"APA91bHFOtaQGSwupt5l1og",
+ "message_type":"nack"
+ }
+ </data:gcm>
+</message></pre>
+
+<p>JSON type error:</p>
+
+<pre><message>
+ <data:gcm xmlns:data="google:mobile:data">
+ {
+ "error":"InvalidJson : JSON_TYPE_ERROR : Field \"delay_while_idle\" must be a JSON java.lang.Boolean: not-boolean-user-supplied-value\n",
+ "message_id":"msgId1",
+ "from":"APA91bHFOtaQGSwupt5l1og",
+ "message_type":"nack"
+ }
+ </data:gcm>
+</message></pre>
+
+
+<p>The following table lists some of the more common NACK error codes.</p>
+
+<p class="table-caption" id="table1">
+ <strong>Table 1.</strong> NACK error codes.</p>
+
+<table border="1">
+<tr>
+<th>Error Code</th>
+<th>Description</th>
+</tr>
+<tr>
+<td>{@code BAD_REGISTRATION}</td>
+<td>The device has a registration ID, but it's invalid.</td>
+</tr>
+<tr>
+<td>{@code DEVICE_UNREGISTERED}</td>
+<td>The device is not registered.</td>
+</tr>
+<tr>
+<td>{@code INTERNAL_SERVER_ERROR}</td>
+<td>The server encountered an error while trying to process the request.</td>
+</tr>
+<tr>
+<td>{@code SERVICE_UNAVAILABLE}</td>
+<td>The CCS connection server is temporarily unavailable, try again later
+(using exponential backoff, etc.).</td>
+</tr>
+<tr>
+<td>{@code BAD_ACK}</td>
+<td>The ACK message is improperly formed.</td>
+</tr>
+<tr>
+<td>{@code AUTHENTICATION_FAILED}</td>
+<td>This is a 401 error indicating that there was an error authenticating the sender account.</td>
+</tr>
+<tr>
+<td>{@code INVALID_TTL}</td>
+<td>There was an error in the supplied "time to live" value.</td>
+</tr>
+<tr>
+<td>{@code JSON_TYPE_ERROR}</td>
+<td>There was an error in the supplied JSON data type.</td>
+</tr>
+</table>
+
+<h4 id="stanza">Stanza error</h4>
+
+<p>You can also get a stanza error in certain cases.
+A stanza error contains:</p>
+<ul>
+<li>Stanza error code.</li>
+<li>Stanza error description (free text).</li>
+</ul>
+<p>For example:</p>
+
+<pre><message id="3" type="error" to="123456789@gcm.googleapis.com/ABC">
+ <gcm xmlns="google:mobile:data">
+ {"random": "text"}
</gcm>
+ <error code="400" type="modify">
+ <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
+ <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
+ InvalidJson: JSON_PARSING_ERROR : Missing Required Field: message_id\n
+ </text>
+ </error>
</message>
</pre>
-<h4>Upstream Messages</h4>
-<p>Using CCS and the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API, you can send messages from a user's device to the cloud.</p>
+<h2 id="upstream">Upstream Messages</h2>
-<p>Here is how you send an upstream message using the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API. For a complete example, see <a href="gs.html#gs_example">Getting Started</a>:</p>
+<p>Using CCS and the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a>
+API, you can send messages from a user's device to the cloud.</p>
+
+<p>Here is how you send an upstream message using the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a>
+API. For a complete example, see <a href="client.html">Implementing GCM Client</a>:</p>
<pre>GoogleCloudMessaging gcm = GoogleCloudMessaging.get(context);
String GCM_SENDER_ID = "Your-Sender-ID";
@@ -198,12 +340,15 @@
// Bundle data consists of a key-value pair
data.putString("hello", "world");
// "time to live" parameter
+// This is optional. It specifies a value in seconds up to 4 weeks.
int ttl = [0 seconds, 4 weeks]
gcm.send(GCM_SENDER_ID + "@gcm.googleapis.com", id, ttl, data);
</pre>
-<p>This call generates the necessary XMPP stanza for sending the upstream message. The message goes from the app on the device to CCS to the 3rd-party server. The stanza has the following format:</p>
+<p>This call generates the necessary XMPP stanza for sending the upstream message.
+The message goes from the app on the device to CCS to the 3rd-party app server.
+The stanza has the following format:</p>
<pre><message id="">
<gcm xmlns="google:mobile:data">
@@ -219,7 +364,8 @@
</gcm>
</message></pre>
-<p>Here is the format of the ACK expected by CCS from 3rd-party servers in response to the above message:</p>
+<p>Here is the format of the ACK expected by CCS from 3rd-party app servers in
+response to the above message:</p>
<pre><message id="">
<gcm xmlns="google:mobile:data">
@@ -231,13 +377,478 @@
</gcm>
</message></pre>
-
<h2 id="flow">Flow Control</h2>
-<p>Every message sent to CCS receives either an ACK or a NACK response. Messages that haven't received one of these responses are considered pending. If the pending message count reaches 1000, the 3rd-party server should stop sending new messages and wait for CCS to acknowledge some of the existing pending messages.</p>
+<p>Every message sent to CCS receives either an ACK or a NACK response. Messages
+that haven't received one of these responses are considered pending. If the pending
+message count reaches 1000, the 3rd-party app server should stop sending new messages
+and wait for CCS to acknowledge some of the existing pending messages as illustrated in
+figure 1:</p>
-<p>Conversely, to avoid overloading the 3rd-party server, CCS will stop sending if there are too many unacknowledged messages. Therefore, the 3rd-party server should "ACK" received messages as soon as possible to maintain a constant flow of incoming messages. The aforementioned pending message limit doesn't apply to these ACKs. Even if the pending message count reaches 1000, the 3rd-party server should continue sending ACKs to avoid blocking delivery of new messages.</p>
+<img src="{@docRoot}images/gcm/CCS-ack.png">
-<p>ACKs are only valid within the context of one connection. If the connection is closed before a message can be ACKed, the 3rd-party server should wait for CCS to resend the message before ACKing it again.
+<p class="img-caption">
+ <strong>Figure 1.</strong> Message/ack flow.
</p>
+<p>Conversely, to avoid overloading the 3rd-party app server, CCS will stop sending
+if there are too many unacknowledged messages. Therefore, the 3rd-party app server
+should "ACK" upstream messages, received from the client application via CCS, as soon as possible
+to maintain a constant flow of incoming messages. The aforementioned pending message limit doesn't
+apply to these ACKs. Even if the pending message count reaches 1000, the 3rd-party app server
+should continue sending ACKs for messages received from CCS to avoid blocking delivery of new
+upstream messages.</p>
+
+<p>ACKs are only valid within the context of one connection. If the connection is
+closed before a message can be ACKed, the 3rd-party app server should wait for CCS
+to resend the upstream message before ACKing it again. Similarly, all pending messages for which an
+ACK/NACK was not received from CCS before the connection was closed should be sent again.
+</p>
+
+<h2 id="implement">Implementing an XMPP-based App Server</h2>
+
+<p>This section gives examples of implementing an app server that works with CCS.
+Note that a full GCM implementation requires a client-side implementation, in
+addition to the server. For more information, see <a href="client.html">
+Implementing GCM Client</a>.</a>
+
+<h3 id="smack">Java sample using the Smack library</h3>
+
+<p>Here is a sample app server written in Java, using the
+<a href="http://www.igniterealtime.org/projects/smack/">Smack</a> library.</p>
+
+<pre>import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
+import org.jivesoftware.smack.ConnectionListener;
+import org.jivesoftware.smack.PacketInterceptor;
+import org.jivesoftware.smack.PacketListener;
+import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.filter.PacketTypeFilter;
+import org.jivesoftware.smack.packet.DefaultPacketExtension;
+import org.jivesoftware.smack.packet.Message;
+import org.jivesoftware.smack.packet.Packet;
+import org.jivesoftware.smack.packet.PacketExtension;
+import org.jivesoftware.smack.provider.PacketExtensionProvider;
+import org.jivesoftware.smack.provider.ProviderManager;
+import org.jivesoftware.smack.util.StringUtils;
+import org.json.simple.JSONValue;
+import org.json.simple.parser.ParseException;
+import org.xmlpull.v1.XmlPullParser;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.net.ssl.SSLSocketFactory;
+/**
+ * Sample Smack implementation of a client for GCM Cloud Connection Server.
+ *
+ * <p>For illustration purposes only.
+ */
+public class SmackCcsClient {
+
+ Logger logger = Logger.getLogger("SmackCcsClient");
+
+ public static final String GCM_SERVER = "gcm.googleapis.com";
+ public static final int GCM_PORT = 5235;
+
+ public static final String GCM_ELEMENT_NAME = "gcm";
+ public static final String GCM_NAMESPACE = "google:mobile:data";
+
+ static Random random = new Random();
+ XMPPConnection connection;
+ ConnectionConfiguration config;
+
+ /**
+ * XMPP Packet Extension for GCM Cloud Connection Server.
+ */
+ class GcmPacketExtension extends DefaultPacketExtension {
+ String json;
+
+ public GcmPacketExtension(String json) {
+ super(GCM_ELEMENT_NAME, GCM_NAMESPACE);
+ this.json = json;
+ }
+
+ public String getJson() {
+ return json;
+ }
+
+ @Override
+ public String toXML() {
+ return String.format("<%s xmlns=\"%s\">%s</%s>", GCM_ELEMENT_NAME,
+ GCM_NAMESPACE, json, GCM_ELEMENT_NAME);
+ }
+
+ @SuppressWarnings("unused")
+ public Packet toPacket() {
+ return new Message() {
+ // Must override toXML() because it includes a <body>
+ @Override
+ public String toXML() {
+
+ StringBuilder buf = new StringBuilder();
+ buf.append("<message");
+ if (getXmlns() != null) {
+ buf.append(" xmlns=\"").append(getXmlns()).append("\"");
+ }
+ if (getLanguage() != null) {
+ buf.append(" xml:lang=\"").append(getLanguage()).append("\"");
+ }
+ if (getPacketID() != null) {
+ buf.append(" id=\"").append(getPacketID()).append("\"");
+ }
+ if (getTo() != null) {
+ buf.append(" to=\"").append(StringUtils.escapeForXML(getTo())).append("\"");
+ }
+ if (getFrom() != null) {
+ buf.append(" from=\"").append(StringUtils.escapeForXML(getFrom())).append("\"");
+ }
+ buf.append(">");
+ buf.append(GcmPacketExtension.this.toXML());
+ buf.append("</message>");
+ return buf.toString();
+ }
+ };
+ }
+ }
+
+ public SmackCcsClient() {
+ // Add GcmPacketExtension
+ ProviderManager.getInstance().addExtensionProvider(GCM_ELEMENT_NAME,
+ GCM_NAMESPACE, new PacketExtensionProvider() {
+
+ @Override
+ public PacketExtension parseExtension(XmlPullParser parser)
+ throws Exception {
+ String json = parser.nextText();
+ GcmPacketExtension packet = new GcmPacketExtension(json);
+ return packet;
+ }
+ });
+ }
+
+ /**
+ * Returns a random message id to uniquely identify a message.
+ *
+ * <p>Note:
+ * This is generated by a pseudo random number generator for illustration purpose,
+ * and is not guaranteed to be unique.
+ *
+ */
+ public String getRandomMessageId() {
+ return "m-" + Long.toString(random.nextLong());
+ }
+
+ /**
+ * Sends a downstream GCM message.
+ */
+ public void send(String jsonRequest) {
+ Packet request = new GcmPacketExtension(jsonRequest).toPacket();
+ connection.sendPacket(request);
+ }
+
+ /**
+ * Handles an upstream data message from a device application.
+ *
+ * <p>This sample echo server sends an echo message back to the device.
+ * Subclasses should override this method to process an upstream message.
+ */
+ public void handleIncomingDataMessage(Map<String, Object> jsonObject) {
+ String from = jsonObject.get("from").toString();
+
+ // PackageName of the application that sent this message.
+ String category = jsonObject.get("category").toString();
+
+ // Use the packageName as the collapseKey in the echo packet
+ String collapseKey = "echo:CollapseKey";
+ @SuppressWarnings("unchecked")
+ Map<String, String> payload = (Map<String, String>) jsonObject.get("data");
+ payload.put("ECHO", "Application: " + category);
+
+ // Send an ECHO response back
+ String echo = createJsonMessage(from, getRandomMessageId(), payload, collapseKey, null, false);
+ send(echo);
+ }
+
+ /**
+ * Handles an ACK.
+ *
+ * <p>By default, it only logs a {@code INFO} message, but subclasses could override it to
+ * properly handle ACKS.
+ */
+ public void handleAckReceipt(Map<String, Object> jsonObject) {
+ String messageId = jsonObject.get("message_id").toString();
+ String from = jsonObject.get("from").toString();
+ logger.log(Level.INFO, "handleAckReceipt() from: " + from + ", messageId: " + messageId);
+ }
+
+ /**
+ * Handles a NACK.
+ *
+ * <p>By default, it only logs a {@code INFO} message, but subclasses could override it to
+ * properly handle NACKS.
+ */
+ public void handleNackReceipt(Map<String, Object> jsonObject) {
+ String messageId = jsonObject.get("message_id").toString();
+ String from = jsonObject.get("from").toString();
+ logger.log(Level.INFO, "handleNackReceipt() from: " + from + ", messageId: " + messageId);
+ }
+
+ /**
+ * Creates a JSON encoded GCM message.
+ *
+ * @param to RegistrationId of the target device (Required).
+ * @param messageId Unique messageId for which CCS will send an "ack/nack" (Required).
+ * @param payload Message content intended for the application. (Optional).
+ * @param collapseKey GCM collapse_key parameter (Optional).
+ * @param timeToLive GCM time_to_live parameter (Optional).
+ * @param delayWhileIdle GCM delay_while_idle parameter (Optional).
+ * @return JSON encoded GCM message.
+ */
+ public static String createJsonMessage(String to, String messageId, Map<String, String> payload,
+ String collapseKey, Long timeToLive, Boolean delayWhileIdle) {
+ Map<String, Object> message = new HashMap<String, Object>();
+ message.put("to", to);
+ if (collapseKey != null) {
+ message.put("collapse_key", collapseKey);
+ }
+ if (timeToLive != null) {
+ message.put("time_to_live", timeToLive);
+ }
+ if (delayWhileIdle != null && delayWhileIdle) {
+ message.put("delay_while_idle", true);
+ }
+ message.put("message_id", messageId);
+ message.put("data", payload);
+ return JSONValue.toJSONString(message);
+ }
+
+ /**
+ * Creates a JSON encoded ACK message for an upstream message received from an application.
+ *
+ * @param to RegistrationId of the device who sent the upstream message.
+ * @param messageId messageId of the upstream message to be acknowledged to CCS.
+ * @return JSON encoded ack.
+ */
+ public static String createJsonAck(String to, String messageId) {
+ Map<String, Object> message = new HashMap<String, Object>();
+ message.put("message_type", "ack");
+ message.put("to", to);
+ message.put("message_id", messageId);
+ return JSONValue.toJSONString(message);
+ }
+
+ /**
+ * Connects to GCM Cloud Connection Server using the supplied credentials.
+ *
+ * @param username GCM_SENDER_ID@gcm.googleapis.com
+ * @param password API Key
+ * @throws XMPPException
+ */
+ public void connect(String username, String password) throws XMPPException {
+ config = new ConnectionConfiguration(GCM_SERVER, GCM_PORT);
+ config.setSecurityMode(SecurityMode.enabled);
+ config.setReconnectionAllowed(true);
+ config.setRosterLoadedAtLogin(false);
+ config.setSendPresence(false);
+ config.setSocketFactory(SSLSocketFactory.getDefault());
+
+ // NOTE: Set to true to launch a window with information about packets sent and received
+ config.setDebuggerEnabled(true);
+
+ // -Dsmack.debugEnabled=true
+ XMPPConnection.DEBUG_ENABLED = true;
+
+ connection = new XMPPConnection(config);
+ connection.connect();
+
+ connection.addConnectionListener(new ConnectionListener() {
+
+ @Override
+ public void reconnectionSuccessful() {
+ logger.info("Reconnecting..");
+ }
+
+ @Override
+ public void reconnectionFailed(Exception e) {
+ logger.log(Level.INFO, "Reconnection failed.. ", e);
+ }
+
+ @Override
+ public void reconnectingIn(int seconds) {
+ logger.log(Level.INFO, "Reconnecting in %d secs", seconds);
+ }
+
+ @Override
+ public void connectionClosedOnError(Exception e) {
+ logger.log(Level.INFO, "Connection closed on error.");
+ }
+
+ @Override
+ public void connectionClosed() {
+ logger.info("Connection closed.");
+ }
+ });
+
+ // Handle incoming packets
+ connection.addPacketListener(new PacketListener() {
+
+ @Override
+ public void processPacket(Packet packet) {
+ logger.log(Level.INFO, "Received: " + packet.toXML());
+ Message incomingMessage = (Message) packet;
+ GcmPacketExtension gcmPacket =
+ (GcmPacketExtension) incomingMessage.getExtension(GCM_NAMESPACE);
+ String json = gcmPacket.getJson();
+ try {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> jsonObject =
+ (Map<String, Object>) JSONValue.parseWithException(json);
+
+ // present for "ack"/"nack", null otherwise
+ Object messageType = jsonObject.get("message_type");
+
+ if (messageType == null) {
+ // Normal upstream data message
+ handleIncomingDataMessage(jsonObject);
+
+ // Send ACK to CCS
+ String messageId = jsonObject.get("message_id").toString();
+ String from = jsonObject.get("from").toString();
+ String ack = createJsonAck(from, messageId);
+ send(ack);
+ } else if ("ack".equals(messageType.toString())) {
+ // Process Ack
+ handleAckReceipt(jsonObject);
+ } else if ("nack".equals(messageType.toString())) {
+ // Process Nack
+ handleNackReceipt(jsonObject);
+ } else {
+ logger.log(Level.WARNING, "Unrecognized message type (%s)",
+ messageType.toString());
+ }
+ } catch (ParseException e) {
+ logger.log(Level.SEVERE, "Error parsing JSON " + json, e);
+ } catch (Exception e) {
+ logger.log(Level.SEVERE, "Couldn't send echo.", e);
+ }
+ }
+ }, new PacketTypeFilter(Message.class));
+
+
+ // Log all outgoing packets
+ connection.addPacketInterceptor(new PacketInterceptor() {
+ @Override
+ public void interceptPacket(Packet packet) {
+ logger.log(Level.INFO, "Sent: {0}", packet.toXML());
+ }
+ }, new PacketTypeFilter(Message.class));
+
+ connection.login(username, password);
+ }
+
+ public static void main(String [] args) {
+ final String userName = "Your GCM Sender Id" + "@gcm.googleapis.com";
+ final String password = "API Key";
+
+ SmackCcsClient ccsClient = new SmackCcsClient();
+
+ try {
+ ccsClient.connect(userName, password);
+ } catch (XMPPException e) {
+ e.printStackTrace();
+ }
+
+ // Send a sample hello downstream message to a device.
+ String toRegId = "RegistrationIdOfTheTargetDevice";
+ String messageId = ccsClient.getRandomMessageId();
+ Map<String, String> payload = new HashMap<String, String>();
+ payload.put("Hello", "World");
+ payload.put("CCS", "Dummy Message");
+ payload.put("EmbeddedMessageId", messageId);
+ String collapseKey = "sample";
+ Long timeToLive = 10000L;
+ Boolean delayWhileIdle = true;
+ ccsClient.send(createJsonMessage(toRegId, messageId, payload, collapseKey,
+ timeToLive, delayWhileIdle));
+ }
+}</pre>
+<h3 id="python">Python sample</h3>
+
+<p>Here is an example of a CCS app server written in Python. This sample echo
+server sends an initial message, and for every upstream message received, it sends
+a dummy response back to the application that sent the upstream message. This
+example illustrates how to connect, send, and receive GCM messages using XMPP. It
+shouldn't be used as-is on a production deployment.</p>
+
+<pre>
+#!/usr/bin/python
+import sys, json, xmpp, random, string
+
+SERVER = 'gcm.googleapis.com'
+PORT = 5235
+USERNAME = "Your GCM Sender Id"
+PASSWORD = "API Key"
+REGISTRATION_ID = "Registration Id of the target device"
+
+unacked_messages_quota = 1000
+send_queue = []
+
+# Return a random alphanumerical id
+def random_id():
+ rid = ''
+ for x in range(8): rid += random.choice(string.ascii_letters + string.digits)
+ return rid
+
+def message_callback(session, message):
+ global unacked_messages_quota
+ gcm = message.getTags('gcm')
+ if gcm:
+ gcm_json = gcm[0].getData()
+ msg = json.loads(gcm_json)
+ if not msg.has_key('message_type'):
+ # Acknowledge the incoming message immediately.
+ send({'to': msg['from'],
+ 'message_type': 'ack',
+ 'message_id': msg['message_id']})
+ # Queue a response back to the server.
+ if msg.has_key('from'):
+ # Send a dummy echo response back to the app that sent the upstream message.
+ send_queue.append({'to': msg['from'],
+ 'message_id': random_id(),
+ 'data': {'pong': 1}})
+ elif msg['message_type'] == 'ack' or msg['message_type'] == 'nack':
+ unacked_messages_quota += 1
+
+def send(json_dict):
+ template = ("<message><gcm xmlns='google:mobile:data'>{1}</gcm></message>")
+ client.send(xmpp.protocol.Message(
+ node=template.format(client.Bind.bound[0], json.dumps(json_dict))))
+
+def flush_queued_messages():
+ global unacked_messages_quota
+ while len(send_queue) and unacked_messages_quota > 0:
+ send(send_queue.pop(0))
+ unacked_messages_quota -= 1
+
+client = xmpp.Client('gcm.googleapis.com', debug=['socket'])
+client.connect(server=(SERVER,PORT), secure=1, use_srv=False)
+auth = client.auth(USERNAME, PASSWORD)
+if not auth:
+ print 'Authentication failed!'
+ sys.exit(1)
+
+client.RegisterHandler('message', message_callback)
+
+send_queue.append({'to': REGISTRATION_ID,
+ 'message_id': 'reg_id',
+ 'data': {'message_destination': 'RegId',
+ 'message_id': random_id()}})
+
+while True:
+ client.Process(1)
+ flush_queued_messages()</pre>
diff --git a/docs/html/google/gcm/client.jd b/docs/html/google/gcm/client.jd
index 7604932..df357a2 100644
--- a/docs/html/google/gcm/client.jd
+++ b/docs/html/google/gcm/client.jd
@@ -1,24 +1,663 @@
-page.title=GCM Client
+page.title=Implementing GCM Client
page.tags="cloud","push","messaging"
@jd:body
<div id="qv-wrapper">
<div id="qv">
+
+<h2>In this document</h2>
+
+<ol class="toc">
+<li><a href="#play-services">Set Up Google Play Services</a></li>
+<li><a href="#manifest">Edit Your Application's Manifest</a></li>
+<li><a href="#app">Write Your Application</a>
+ <ol class="toc">
+ <li><a href="#sample-play">Check for Google Play Services APK</a></li>
+ <li><a href="#sample-register">Register for GCM</a></li>
+ <li><a href="#sample-send">Send a message</a></li>
+ <li><a href="#sample-receive">Receive a message</a></li>
+ </ol>
+ <li><a href="#run">Running the Sample</a></li>
+ <li><a href="#stats">Viewing Statistics</a></li>
+</li>
+
+</ol>
+
<h2>See Also</h2>
<ol class="toc">
<li><a href="gs.html">Getting Started</a></li>
-<li><a href="server.html">GCM Server</a></li>
+<li><a href="server.html">Implementing GCM Server</a></li>
</ol>
</div>
</div>
-<p>A GCM client is a GCM-enabled app that runs on an Android device. To write your client code, we recommend that you use the new <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. The client helper library that was offered in previous versions of GCM still works, but it has been superseded by the more efficient <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs.</p>
+<p>A GCM client is a GCM-enabled app that runs on an Android device. To write your
+client code, we recommend that you use the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> APIs.
+The client helper library that was offered in previous versions of GCM still works,
+but it has been superseded by the more efficient
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> APIs.</p>
-<p>A full GCM implementation requires both a client implementation and a server-side implementation. For a step-by-step guide to creating a complete sample implementation that includes both client and server, see <a href="gs.html">Getting Started</a>. </p>
+<p>A full GCM implementation requires both a client implementation and a server
+implementation. For more
+information about implementing the server side, see <a href="server.html">
+Implementing GCM Server</a>.</p>
-<p>
+<p>The following sections walk you through the steps involved in writing a GCM
+client-side application. Your client app can be arbitrarily complex, but at bare
+minimum, a GCM client app must include code to register (and thereby get a
+registration ID), and a broadcast receiver to receive messages sent by GCM.
+</p>
+
+<h2 id="play-services">Step 1: Set Up Google Play Services</h2>
+
+<p>To write your client application, use the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> API.
+To use this API, you must set up your project to use the Google Play services SDK,
+as described in <a href="/google/play-services/setup.html">Setup Google Play
+Services SDK</a>.</p>
+
+<p class="note"><strong>Caution:</strong> When you add the Play Services library to
+your project, be sure to add it <em>with resources</em>, as described in
+<a href="{@docRoot}google/play-services/setup.html#Setup">
+Setup Google Play Services SDK</a>. The key point is that you must
+<em>reference</em> the library—simply adding a {@code .jar} file to
+your Eclipse project will not work. You must follow the directions
+for referencing a library, or your app won't be able to access
+the library's resources, and it won't run properly.
+If you're using Android Studio, this is the string to add to the
+{@code dependency} section of your application's {@code build.gradle} file:</p>
+
+<pre>dependencies {
+ compile: "com.google.android.gms:play-services:3.1.+"
+}
+</pre>
+
+
+<h2 id="manifest">Step 2: Edit Your Application's Manifest</h2>
+
+<p>Add the following to your application's manifest:</p>
+<ul>
+ <li>The <code>com.google.android.c2dm.permission.RECEIVE</code> permission so
+the Android application can register and receive messages.</li>
+ <li>The <code>android.permission.INTERNET</code> permission so the Android
+application can send the registration ID to the 3rd party server.</li>
+ <li>The <code>android.permission.GET_ACCOUNTS</code> permission as GCM requires
+a Google account (necessary only if if the device is running a version lower than
+Android 4.0.4)</li>
+ <li>The <code>android.permission.WAKE_LOCK</code> permission so the application
+can keep the processor from sleeping when a message is received. Optional—use
+only if the app wants to keep the device from sleeping.</li>
+ <li>An <code>applicationPackage + ".permission.C2D_MESSAGE"</code>
+permission to prevent other Android applications from registering and receiving
+the Android application's messages. The permission name must exactly match this
+pattern—otherwise the Android application will not receive the messages.</li>
+ <li>A receiver for <code>com.google.android.c2dm.intent.RECEIVE</code>, with
+the category set
+as <code>applicationPackage</code>. The receiver should require the
+<code>com.google.android.c2dm.SEND</code> permission, so that only the GCM
+Framework can send a message to it. If your app uses an {@link android.app.IntentService}
+(not required, but a common pattern), this receiver should be an instance of
+{@link android.support.v4.content.WakefulBroadcastReceiver}.
+A {@link android.support.v4.content.WakefulBroadcastReceiver} takes care of
+creating and managing a
+<a href="{@docRoot}reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK">
+partial wake lock</a> for your app.</li>
+
+<li>A {@link android.app.Service} (typically an {@link android.app.IntentService})
+to which the {@link android.support.v4.content.WakefulBroadcastReceiver} passes off
+the work of handling the GCM message, while ensuring that the device does not
+go back to sleep in the process. Including an {@link android.app.IntentService} is
+optional—you could choose to process your messages in a regular
+{@link android.content.BroadcastReceiver} instead, but realistically, most apps will
+use a {@link android.app.IntentService}.
+</li>
+ <li>If the GCM feature is critical to the Android application's function, be sure to
+set <code>android:minSdkVersion="8"</code> or higher in the manifest. This
+ensures that the Android application cannot be installed in an environment in which it
+could not run properly. </li>
+</ul>
+
+<p>Here are excerpts from a sample manifest that supports GCM:</p>
+
+<pre class="prettyprint pretty-xml">
+<manifest package="com.example.gcm" ...>
+
+ <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+ <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
+
+ <permission android:name="com.example.gcm.permission.C2D_MESSAGE"
+ android:protectionLevel="signature" />
+ <uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
+
+ <application ...>
+ <receiver
+ android:name=".GcmBroadcastReceiver"
+ android:permission="com.google.android.c2dm.permission.SEND" >
+ <intent-filter>
+ <action android:name="com.google.android.c2dm.intent.RECEIVE" />
+ <category android:name="com.example.gcm" />
+ </intent-filter>
+ </receiver>
+ <service android:name=".GcmIntentService" />
+ </application>
+
+</manifest>
+</pre>
+
+<h2 id="app"> Step 3: Write Your Application</h2>
+
+<p>Finally, write your application. This section features a sample client
+application that illustrates how to use the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> APIs. The sample consists of a main activity
+({@code DemoActivity}), a {@link android.support.v4.content.WakefulBroadcastReceiver}
+({@code GcmBroadcastReceiver}), and an {@link android.app.IntentService}
+({@code GcmIntentService}). You can find the complete source code for this sample at the
+<a href="http://code.google.com/p/gcm">open source site</a>.</p>
+
+<p>Note the following:</p>
+
+<ul>
+ <li>Among other things, the sample illustrates registration and upstream
+(device-to-cloud) messaging. Upstream messaging only applies to apps that are running against a
+<a href="ccs.html">CCS</a> (XMPP) server; HTTP-based servers don't support upstream messaging.</li>
+ <li>The <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+ {@code GoogleCloudMessaging}</a>
+registration APIs replace the old registration process, which was based on the
+now-obsolete client helper library. While the old registration process still works,
+we encourage you to use the newer
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a>
+registration APIs, regardless of your underlying server.</li>
+</ul>
+
+<h3 id="sample-play">Check for Google Play Services APK</h3>
+
+<p>As described in <a href="{@docRoot}google/play-services/setup.html">
+Setup Google Play Services SDK</a>, apps that rely on the Play Services SDK
+should always check the device for a compatible Google Play services APK before
+accessing Google Play services features. In the sample app this check is done in
+two places: in the main activity's {@code onCreate()} method, and in its
+{@code onResume()} method. The check in {@code onCreate()} ensures that the app
+can't be used without a successful check. The check in {@code onResume()} ensures
+that if the user returns to the running app through some other means, such as
+through the back button, the check is still performed. If the
+device doesn't have a compatible Google Play services APK, your app can call
+{@code GooglePlayServicesUtil.getErrorDialog()} to allow users to download the
+APK from the Google Play Store or enable it in the device's system settings.
+For example:</p>
+
+<pre>private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
+...
+@Override
+public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.main);
+ mDisplay = (TextView) findViewById(R.id.display);
+
+ context = getApplicationContext();
+
+ // Check device for Play Services APK.
+ if (checkPlayServices()) {
+ // If this check succeeds, proceed with normal processing.
+ // Otherwise, prompt user to get valid Play Services APK.
+ ...
+ }
+}
+
+// You need to do the Play Services APK check here too.
+@Override
+protected void onResume() {
+ super.onResume();
+ checkPlayServices();
+}
+
+/**
+ * Check the device to make sure it has the Google Play Services APK. If
+ * it doesn't, display a dialog that allows users to download the APK from
+ * the Google Play Store or enable it in the device's system settings.
+ */
+private boolean checkPlayServices() {
+ int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
+ if (resultCode != ConnectionResult.SUCCESS) {
+ if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
+ GooglePlayServicesUtil.getErrorDialog(resultCode, this,
+ PLAY_SERVICES_RESOLUTION_REQUEST).show();
+ } else {
+ Log.i(TAG, "This device is not supported.");
+ finish();
+ }
+ return false;
+ }
+ return true;
+}</pre>
+
+<h3 id="sample-register">Register for GCM</h3>
+<p>An Android application needs to register with GCM servers before it can receive
+messages. When an app registers, it receives a registration ID, which it can then
+store for future use. In the following snippet the {@code onCreate()} method in the sample app's
+main activity checks to see if the app is already registered with GCM and with
+the server:</p>
+
+<pre>/**
+ * Main UI for the demo app.
+ */
+public class DemoActivity extends Activity {
+
+ public static final String EXTRA_MESSAGE = "message";
+ public static final String PROPERTY_REG_ID = "registration_id";
+ private static final String PROPERTY_APP_VERSION = "appVersion";
+ private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
+
+ /**
+ * Substitute you own sender ID here. This is the project number you got
+ * from the API Console, as described in "Getting Started."
+ */
+ String SENDER_ID = "Your-Sender-ID";
+
+ /**
+ * Tag used on log messages.
+ */
+ static final String TAG = "GCMDemo";
+
+ TextView mDisplay;
+ GoogleCloudMessaging gcm;
+ AtomicInteger msgId = new AtomicInteger();
+ SharedPreferences prefs;
+ Context context;
+
+ String regid;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.main);
+ mDisplay = (TextView) findViewById(R.id.display);
+
+ context = getApplicationContext();
+
+ // Check device for Play Services APK. If check succeeds, proceed with
+ // GCM registration.
+ if (checkPlayServices()) {
+ gcm = GoogleCloudMessaging.getInstance(this);
+ regid = getRegistrationId(context);
+
+ if (regid.isEmpty()) {
+ registerInBackground();
+ }
+ } else {
+ Log.i(TAG, "No valid Google Play Services APK found.");
+ }
+ }
+...
+}</pre>
+
+<p>The app calls {@code getRegistrationId()} to see whether there is an existing
+registration ID stored in shared preferences:</p>
+
+<pre>/**
+ * Gets the current registration ID for application on GCM service.
+ * <p>
+ * If result is empty, the app needs to register.
+ *
+ * @return registration ID, or empty string if there is no existing
+ * registration ID.
+ */
+private String getRegistrationId(Context context) {
+ final SharedPreferences prefs = getGCMPreferences(context);
+ String registrationId = prefs.getString(PROPERTY_REG_ID, "");
+ if (registrationId.isEmpty()) {
+ Log.i(TAG, "Registration not found.");
+ return "";
+ }
+ // Check if app was updated; if so, it must clear the registration ID
+ // since the existing regID is not guaranteed to work with the new
+ // app version.
+ int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
+ int currentVersion = getAppVersion(context);
+ if (registeredVersion != currentVersion) {
+ Log.i(TAG, "App version changed.");
+ return "";
+ }
+ return registrationId;
+}
+...
+/**
+ * @return Application's {@code SharedPreferences}.
+ */
+private SharedPreferences getGCMPreferences(Context context) {
+ // This sample app persists the registration ID in shared preferences, but
+ // how you store the regID in your app is up to you.
+ return getSharedPreferences(DemoActivity.class.getSimpleName(),
+ Context.MODE_PRIVATE);
+}</pre>
+
+<p>If the registration ID doesn't exist or the app was updated,
+{@code getRegistrationId()} returns an empty string
+to indicate that the app needs to get a new regID. {@code getRegistrationId()} calls
+the following method to check the app version:</p>
+
+<pre>/**
+ * @return Application's version code from the {@code PackageManager}.
+ */
+private static int getAppVersion(Context context) {
+ try {
+ PackageInfo packageInfo = context.getPackageManager()
+ .getPackageInfo(context.getPackageName(), 0);
+ return packageInfo.versionCode;
+ } catch (NameNotFoundException e) {
+ // should never happen
+ throw new RuntimeException("Could not get package name: " + e);
+ }
+}</pre>
+
+
+<p>If there isn't a valid existing registration ID, {@code DemoActivity} calls the
+following {@code registerInBackground()} method to register. Note that because the GCM
+methods {@code register()} and {@code unregister()} are blocking, this has to
+take place on a background thread. This sample uses {@link android.os.AsyncTask}
+to accomplish this:</p>
+
+<pre>
+/**
+ * Registers the application with GCM servers asynchronously.
+ * <p>
+ * Stores the registration ID and app versionCode in the application's
+ * shared preferences.
+ */
+private void registerInBackground() {
+ new AsyncTask<Void, Void, String>() {
+ @Override
+ protected String doInBackground(Void... params) {
+ String msg = "";
+ try {
+ if (gcm == null) {
+ gcm = GoogleCloudMessaging.getInstance(context);
+ }
+ regid = gcm.register(SENDER_ID);
+ msg = "Device registered, registration ID=" + regid;
+
+ // You should send the registration ID to your server over HTTP,
+ // so it can use GCM/HTTP or CCS to send messages to your app.
+ // The request to your server should be authenticated if your app
+ // is using accounts.
+ sendRegistrationIdToBackend();
+
+ // For this demo: we don't need to send it because the device
+ // will send upstream messages to a server that echo back the
+ // message using the 'from' address in the message.
+
+ // Persist the regID - no need to register again.
+ storeRegistrationId(context, regid);
+ } catch (IOException ex) {
+ msg = "Error :" + ex.getMessage();
+ // If there is an error, don't just keep trying to register.
+ // Require the user to click a button again, or perform
+ // exponential back-off.
+ }
+ return msg;
+ }
+
+ @Override
+ protected void onPostExecute(String msg) {
+ mDisplay.append(msg + "\n");
+ }
+ }.execute(null, null, null);
+ ...
+ /**
+ * Sends the registration ID to your server over HTTP, so it can use GCM/HTTP
+ * or CCS to send messages to your app. Not needed for this demo since the
+ * device sends upstream messages to a server that echoes back the message
+ * using the 'from' address in the message.
+ */
+ private void sendRegistrationIdToBackend() {
+ // Your implementation here.
+ }
+}</pre>
+
+<p>After registering, the app calls {@code storeRegistrationId()} to store the
+registration ID in shared preferences for future use. This is just one way of
+persisting a regID. You might choose to use a different approach in your app:</p>
+
+<pre>/**
+ * Stores the registration ID and app versionCode in the application's
+ * {@code SharedPreferences}.
+ *
+ * @param context application's context.
+ * @param regId registration ID
+ */
+private void storeRegistrationId(Context context, String regId) {
+ final SharedPreferences prefs = getGCMPreferences(context);
+ int appVersion = getAppVersion(context);
+ Log.i(TAG, "Saving regId on app version " + appVersion);
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putString(PROPERTY_REG_ID, regId);
+ editor.putInt(PROPERTY_APP_VERSION, appVersion);
+ editor.commit();
+}</pre>
+
+<h3 id="sample-send">Send a message</h3>
+<p>When the user clicks the app's <strong>Send</strong> button, the app sends an
+upstream message using the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> APIs. In order to receive the upstream message,
+your server should be connected to CCS. You can use one of the demo servers in
+<a href="ccs.html#implement">Implementing an XMPP-based App Server</a> to run the sample and connect
+to CCS.</p>
+
+<pre>public void onClick(final View view) {
+ if (view == findViewById(R.id.send)) {
+ new AsyncTask<Void, Void, String>() {
+ @Override
+ protected String doInBackground(Void... params) {
+ String msg = "";
+ try {
+ Bundle data = new Bundle();
+ data.putString("my_message", "Hello World");
+ data.putString("my_action",
+ "com.google.android.gcm.demo.app.ECHO_NOW");
+ String id = Integer.toString(msgId.incrementAndGet());
+ gcm.send(SENDER_ID + "@gcm.googleapis.com", id, data);
+ msg = "Sent message";
+ } catch (IOException ex) {
+ msg = "Error :" + ex.getMessage();
+ }
+ return msg;
+ }
+
+ @Override
+ protected void onPostExecute(String msg) {
+ mDisplay.append(msg + "\n");
+ }
+ }.execute(null, null, null);
+ } else if (view == findViewById(R.id.clear)) {
+ mDisplay.setText("");
+ }
+}</pre>
+
+<h3 id="sample-receive">Receive a message</h3>
+
+<p>As described above in <a href="#manifest">Step 2</a>, the app includes a
+{@link android.support.v4.content.WakefulBroadcastReceiver} for the <code>com.google.android.c2dm.intent.RECEIVE</code>
+intent. A broadcast receiver is the mechanism GCM uses to deliver messages. When {@code onClick()}
+calls {@code gcm.send()}, it triggers the broadcast receiver's {@code onReceive()}
+method, which has the responsibility of making sure that the GCM message gets handled.</p>
+<p>A {@link android.support.v4.content.WakefulBroadcastReceiver} is a special type of
+broadcast receiver that takes care of
+creating and managing a
+<a href="{@docRoot}reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK">
+partial wake lock</a> for your app.
+It passes off the work of processing the GCM message to a
+{@link android.app.Service} (typically an
+{@link android.app.IntentService}), while ensuring that the device does not
+go back to sleep in the transition. If you don't hold a wake lock while transitioning
+the work to a service, you are effectively allowing the device to go back to sleep before
+the work completes. The net result is that the app might not finish processing
+the GCM message until some arbitrary point in the future, which is not what you want.</p>
+
+<p class="note"><strong>Note:</strong> Using {@link android.support.v4.content.WakefulBroadcastReceiver}
+is not a requirement. If you have a relatively simple app that doesn't require
+a service, you can intercept the GCM message in a regular {@link android.content.BroadcastReceiver}
+and do your processing there. Once you get the intent that GCM passes into
+your broadcast receiver's {@code onReceive()} method, what you do with it
+is up to you.</p>
+
+<p>This snippet starts {@code GcmIntentService} with the method
+{@link android.support.v4.content.WakefulBroadcastReceiver#startWakefulService startWakefulService()}.
+This method is comparable to {@link android.content.Context#startService startService()}, except that
+the {@link android.support.v4.content.WakefulBroadcastReceiver} is holding a
+wake lock when the service starts. The intent that is passed with
+{@link android.support.v4.content.WakefulBroadcastReceiver#startWakefulService startWakefulService()}
+holds an extra identifying the wake lock:</p>
+
+
+<pre>public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ // Explicitly specify that GcmIntentService will handle the intent.
+ ComponentName comp = new ComponentName(context.getPackageName(),
+ GcmIntentService.class.getName());
+ // Start the service, keeping the device awake while it is launching.
+ startWakefulService(context, (intent.setComponent(comp)));
+ setResultCode(Activity.RESULT_OK);
+ }
+}</pre>
+
+<p>The intent service shown below does the actual work of handling the GCM
+message. When the service is finished, it calls
+{@link android.support.v4.content.WakefulBroadcastReceiver#completeWakefulIntent GcmBroadcastReceiver.completeWakefulIntent()}
+to release the wake lock. The
+{@link android.support.v4.content.WakefulBroadcastReceiver#completeWakefulIntent completeWakefulIntent()}
+method has as its parameter the same intent that was
+passed in from the {@link android.support.v4.content.WakefulBroadcastReceiver}.
+</p>
+
+<p>This snippet processes the GCM message based on message type, and posts the
+result in a notification. But what you do with GCM messages in your app is up to
+you—the possibilities are endless. For example, the message might be a ping,
+telling the app to sync to a server to retrieve new content, or it might be a
+chat message that you display in the UI.</p>
+
+<pre>
+public class GcmIntentService extends IntentService {
+ public static final int NOTIFICATION_ID = 1;
+ private NotificationManager mNotificationManager;
+ NotificationCompat.Builder builder;
+
+ public GcmIntentService() {
+ super("GcmIntentService");
+ }
+
+ @Override
+ protected void onHandleIntent(Intent intent) {
+ Bundle extras = intent.getExtras();
+ GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
+ // The getMessageType() intent parameter must be the intent you received
+ // in your BroadcastReceiver.
+ String messageType = gcm.getMessageType(intent);
+
+ if (!extras.isEmpty()) { // has effect of unparcelling Bundle
+ /*
+ * Filter messages based on message type. Since it is likely that GCM
+ * will be extended in the future with new message types, just ignore
+ * any message types you're not interested in, or that you don't
+ * recognize.
+ */
+ if (GoogleCloudMessaging.
+ MESSAGE_TYPE_SEND_ERROR.equals(messageType)) {
+ sendNotification("Send error: " + extras.toString());
+ } else if (GoogleCloudMessaging.
+ MESSAGE_TYPE_DELETED.equals(messageType)) {
+ sendNotification("Deleted messages on server: " +
+ extras.toString());
+ // If it's a regular GCM message, do some work.
+ } else if (GoogleCloudMessaging.
+ MESSAGE_TYPE_MESSAGE.equals(messageType)) {
+ // This loop represents the service doing some work.
+ for (int i=0; i<5; i++) {
+ Log.i(TAG, "Working... " + (i+1)
+ + "/5 @ " + SystemClock.elapsedRealtime());
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ }
+ }
+ Log.i(TAG, "Completed work @ " + SystemClock.elapsedRealtime());
+ // Post notification of received message.
+ sendNotification("Received: " + extras.toString());
+ Log.i(TAG, "Received: " + extras.toString());
+ }
+ }
+ // Release the wake lock provided by the WakefulBroadcastReceiver.
+ GcmBroadcastReceiver.completeWakefulIntent(intent);
+ }
+
+ // Put the message into a notification and post it.
+ // This is just one simple example of what you might choose to do with
+ // a GCM message.
+ private void sendNotification(String msg) {
+ mNotificationManager = (NotificationManager)
+ this.getSystemService(Context.NOTIFICATION_SERVICE);
+
+ PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
+ new Intent(this, DemoActivity.class), 0);
+
+ NotificationCompat.Builder mBuilder =
+ new NotificationCompat.Builder(this)
+ .setSmallIcon(R.drawable.ic_stat_gcm)
+ .setContentTitle("GCM Notification")
+ .setStyle(new NotificationCompat.BigTextStyle()
+ .bigText(msg))
+ .setContentText(msg);
+
+ mBuilder.setContentIntent(contentIntent);
+ mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
+ }
+}</pre>
+
+<h2 id="run">Running the Sample</h2>
+
+<p>To run the sample:</p>
+
+<ol>
+ <li>Follow the instructions in <a href="gs.html">Getting Started</a> to get your sender ID and
+ API key.</li>
+ <li>Implement your client app, as described in this document. You can find the complete source
+ code for the client app at the <a href="http://code.google.com/p/gcm">open source site</a>.</li>
+ <li>Run one of the demo servers (Java or Python) provided in
+<a href="ccs.html#implement">Implementing an XMPP-based App Server</a>. Whichever demo server you
+ choose, don't forget to edit its code before running it to supply
+your sender ID and API key.
+</li>
+
+</ol>
+
+<h2 id="stats">Viewing Statistics</h2>
+
+<p>To view statistics and any error messages for your GCM applications:</p>
+<ol>
+ <li> Go to the <code><a href="http://play.google.com/apps/publish">Developer Console</a></code>.</li>
+ <li>Login with your developer account.
+ <p>You will see a page that has a list of all of your apps.</p></li>
+ <li> Click on the "statistics" link next to the app for which you
+want to view GCM stats.
+ <p>Now you are on the statistics page.</p> </li>
+ <li>Go to the drop-down menu and select the GCM metric you want to view.
+ </li>
+</ol>
+<p class="note"><strong>Note:</strong> Stats on the Google API Console are not
+enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Developer Console</a>.</p>
diff --git a/docs/html/google/gcm/gcm.jd b/docs/html/google/gcm/gcm.jd
index ceb82b0..3c80b5f 100644
--- a/docs/html/google/gcm/gcm.jd
+++ b/docs/html/google/gcm/gcm.jd
@@ -1,48 +1,23 @@
-page.title=GCM Architectural Overview
+page.title=Overview
@jd:body
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-
-<ul>
-<li>Get an introduction to key GCM terms and concepts.</li>
-<li>Learn the basic features of a GCM application.</li>
-<li>Understand the role of the 3rd-party application server, and how to send messages and process results.</li>
-</ul>
-
-
<h2>In this document</h2>
<ol class="toc">
- <li><a href="#intro">Introduction</a> </li>
- <li><a href="#arch">Architectural Overview</a>
- <ol>
- <li><a href="#lifecycle">Lifecycle Flow</a></li>
- <ol>
- <li><a href="#register">Enable GCM</a></li>
- <li><a href="#push-process">Send a message</a></li>
- <li><a href="#receiving">Receive a message</a></li>
- </ol>
- <li><a href="#user">What Does the User See?</a></li>
- </ol>
- </li>
- <li><a href="#server">Role of the 3rd-party Application Server</a>
+ <li><a href="#key">Key Concepts</a></li>
+ <li><a href="#arch">Architectural Overview</a></li>
+ <li><a href="#lifecycle">Lifecycle Flow</a>
<ol class="toc">
- <li><a href="#send-msg">Sending Messages</a>
- <ol>
- <li><a href="#request">Request format</a></li>
- <li><a href="#response">Response format</a></li>
- </ol>
- </li>
+ <li><a href="#register">Enable GCM</a></li>
+ <li><a href="#push-process">Send a message</a></li>
+ <li><a href="#receiving">Receive a message</a></li>
</ol>
- <li><a href="#stats">Viewing Statistics</a>
</li>
</ol>
-
-
</div>
</div>
@@ -50,24 +25,15 @@
developers send data from servers to their Android applications on Android
devices, and upstream messages from the user's device back to the cloud.
This could be a lightweight message telling the Android application
-that there is new data to be fetched from the server (for instance, a movie
-uploaded by a friend), or it could be a message containing up to 4kb of payload
+that there is new data to be fetched from the server (for instance, a "new email"
+notification informing the application that it is out of sync with the back end),
+or it could be a message containing up to 4kb of payload
data (so apps like instant messaging can consume the message directly). The GCM
service handles all aspects of queueing of messages and delivery to the target
Android application running on the target device.</p>
-
-<p>GCM introduces GCM Cloud Connection Server (CCS), which you can use
-in tandem with GCM HTTP service/endpoint/APIs.
-CCS uses XMPP, and it offers asynchronous, bidirectional
-messaging. For more information, see
-<a href="ccs.html">GCM Cloud Connection Server</a>.
-
<p class="note"> To jump right into using GCM with your Android
- applications, see the instructions in <a href="gs.html">Getting Started</a>.</p>
-
-
-<h2 id="intro">Introduction</h2>
+ applications, see <a href="gs.html">Getting Started</a>.</p>
<p>Here are the primary characteristics of Google Cloud
Messaging (GCM):</p>
@@ -75,9 +41,11 @@
<ul>
<li>It allows 3rd-party application servers to send messages to
their Android applications.</li>
- <li>Using the <a href="ccs.html">GCM Cloud Connection Server</a>, you can receive upstream messages from the user's device.</li>
+ <li>Using the <a href="ccs.html">GCM Cloud Connection Server</a>, you can receive
+upstream messages from the user's device.</li>
<li>An Android application on an Android device doesn't need to be running to receive
-messages. The system will wake up the Android application via Intent broadcast when the message arrives, as long as the application is set up with the proper
+messages. The system will wake up the Android application via Intent broadcast
+when the message arrives, as long as the application is set up with the proper
broadcast receiver and permissions.</li>
<li>It does not provide any built-in user interface or other handling for
message data. GCM simply passes raw message data received straight to the
@@ -85,57 +53,67 @@
application might post a notification, display a custom user interface, or
silently sync data.</li>
<li>It requires devices running Android 2.2 or higher that also have the
-Google Play Store application installed, or or an emulator running Android 2.2 with Google APIs. However, you are not limited to deploying your
+Google Play Store application installed, or or an emulator running Android 2.2
+with Google APIs. However, you are not limited to deploying your
Android applications through Google Play Store.</li>
- <li>It uses an existing connection for Google services. For pre-3.0 devices, this requires users to
-set up their Google account on their mobile devices. A Google account is not a requirement on devices running Android 4.0.4 or higher.</li>
+ <li>It uses an existing connection for Google services. For pre-3.0 devices,
+this requires users to
+set up their Google account on their mobile devices. A Google account is not a
+requirement on devices running Android 4.0.4 or higher.</li>
</ul>
-<h2 id="arch">Architectural Overview</h2>
-<p>This section gives an overview of how GCM works. </p>
+
+<h2 id="key">Key Concepts</h2>
+
<p>This table summarizes the key terms and concepts involved in GCM. It is
divided into these categories:</p>
<ul>
- <li><strong>Components</strong> — The physical entities that play a role in
+ <li><strong>Components</strong> — The entities that play a primary role in
GCM.</li>
<li><strong>Credentials</strong> — The IDs and tokens that are used in
different stages of GCM to ensure that all parties have been authenticated, and
that the message is going to the correct place.</li>
</ul>
+<p class="table-caption" id="table1">
+ <strong>Table 1.</strong> GCM components and credentials.</p>
+
<table>
<tr>
<th colspan="2">Components</th>
</tr>
<tr>
- <td width="165"><strong>Mobile Device</strong></td>
- <td width="1176">The device that is running an Android application that uses
-GCM. This must be a 2.2 Android device that has Google Play Store installed, and it must
-have at least one logged in Google account if the device is running a version lower than Android 4.0.4. Alternatively, for testing you can use an emulator running Android 2.2 with Google APIs.</td>
+ <td width="165"><strong>Client App</strong></td>
+ <td width="1176">The GCM-enabled Android application that is running on a
+ device. This must be a 2.2 Android device that has Google Play Store installed, and it must
+have at least one logged in Google account if the device is running a version
+lower than Android 4.0.4. Alternatively, for testing you can use an emulator
+running Android 2.2 with Google APIs.</td>
</tr>
<tr>
<td><strong>3rd-party Application Server</strong></td>
- <td>An application server that developers set up as part of implementing
-GCM in their applications. The 3rd-party application server sends data to an
-Android application on the device via the GCM server.</td>
+ <td>An application server that you write as part of implementing
+GCM. The 3rd-party application server sends data to an
+Android application on the device via the GCM connection server.</td>
</tr>
<tr>
- <td><strong>GCM Servers</strong></td>
- <td>The Google servers involved in taking messages from the 3rd-party
+ <td><strong>GCM Connection Servers</strong></td>
+ <td>The Google-provided servers involved in taking messages from the 3rd-party
application server and sending them to the device. </td>
</tr>
<tr>
- <th colspan="2"><strong>Credentials</strong></th>
+ <th colspan="2">Credentials</th>
</tr>
<tr>
<td><strong>Sender ID</strong></td>
- <td>A project number you acquire from the API console, as described in <a href="gs.html#create-proj">Getting Started</a>. The sender
-ID is used in the <a href="#registering">registration process</a> to identify an
-Android application that is permitted to send messages to the device.</td>
+ <td>A project number you acquire from the API console, as described in
+<a href="gs.html#create-proj">Getting Started</a>. The sender
+ID is used in the <a href="#register">registration process</a> to identify a
+3rd-party application server that is permitted to send messages to the device.</td>
</tr>
<tr>
<td><strong>Application ID</strong></td>
<td>The Android application that is registering to receive messages. The Android application
-is identified by the package name from the <a href="#manifest">manifest</a>.
+is identified by the package name from the <a href="client.html#manifest">manifest</a>.
This ensures that the messages are targeted to the correct Android application.</td>
</tr>
<tr>
@@ -158,7 +136,8 @@
</tr>
<tr>
<td><strong>Google User Account</strong></td>
- <td>For GCM to work, the mobile device must include at least one Google account if the device is running a version lower than Android 4.0.4.</td>
+ <td>For GCM to work, the mobile device must include at least one Google
+account if the device is running a version lower than Android 4.0.4.</td>
</tr>
<tr>
<td><strong>Sender Auth Token</strong></td>
@@ -167,25 +146,46 @@
The API key is included in the header of POST requests that send messages.</td>
</tr>
- <tr>
- <td><strong>Notification Key</strong></td>
- <td>Part of the user notifications feature, which provides a mapping between a user and instances of an app running on multiple devices owned by the user. The {@code notification_key} is the token that GCM uses to fan out notifications to all devices whose registration IDs are associated with the key. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
- </tr>
-
-<tr>
- <td><strong>Notification Key Name</strong></td>
- <td>Part of the user notifications feature. The {@code notification_key_name} is a name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by third parties to group together registration IDs for a single user. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
- </tr>
-
</table>
-<h3 id="lifecycle">Lifecycle Flow</h3>
+<h2 id="arch">Architectural Overview</h2>
+
+<p>A GCM implementation includes a Google-provided
+connection server, a 3rd-party app server that interacts with the connection
+server, and a GCM-enabled client app running on an Android device:</p>
+
+<img src="{@docRoot}images/gcm/GCM-arch.png">
+
+<p class="img-caption">
+ <strong>Figure 1.</strong> GCM Architecture.
+</p>
+
+<p>This is how these components interact:</p>
+<ul>
+ <li>Google-provided <strong>GCM Connection Servers</strong> take messages from
+a 3rd-party application server and send these messages to a
+GCM-enabled Android application (the "client app") running on a device.
+Currently Google provides connection servers for <a href="http.html">HTTP</a>
+and <a href="ccs.html">XMPP</a>.</li>
+ <li>The <strong>3rd-Party Application Server</strong> is a component that you
+implement to work with your chosen GCM connection server(s). App servers send
+messages to a GCM connection server; the connection server enqueues and stores the
+message, and then sends it to the device when the device is online.
+For more information, see <a href="server.html">Implementing GCM Server</a>.</li>
+ <li>The <strong>Client App</strong> is a GCM-enabled Android application running
+on a device. To receive GCM messages, this app must register with GCM and get a
+registration ID. If you are using the <a href="ccs.html">XMPP</a> (CCS) connection
+server, the client app can send "upstream" messages back to the connection server.
+For more information on how to implement the client app, see
+<a href="client.html">Implementing GCM Client</a>.</li>
+</ul>
+
+<h2 id="lifecycle">Lifecycle Flow</h2>
<ul>
<li><a href="#register">Enable GCM</a>. An Android application running on a
mobile device registers to receive messages.</li>
- <li><a href="notifications.html">User Notifications</a>. A 3rd-party server can optionally group multiple registration IDs
-in a {@code notification_key} to send messages to multiple devices owned by a single user.</li>
+
<li><a href="#push-process">Send a message</a>. A 3rd-party application
server sends messages to the device.</li>
<li><a href="#receiving">Receive a message</a>. An Android application
@@ -194,62 +194,18 @@
<p>These processes are described in more detail below.</p>
-<h4 id="register">Enable GCM</h4>
+<h3 id="register">Enable GCM</h3>
-<p>This is the sequence of events that occurs when an Android application
-running on a mobile device registers to receive messages:<span
-class="red-text"></span></p>
-
-<ol>
- <li>The first time the Android application needs to use the messaging service, it
-fires off a registration Intent to a GCM server.
- <p>This registration Intent
-(<code>com.google.android.c2dm.intent.REGISTER</code>) includes the sender ID, and the Android application ID.</p>
-<p class="note"><strong>Note:</strong> Because there is no lifecycle method that is called when the application is run for
-the first time, the registration intent should be sent on <code>onCreate()</code>, but only if the application is not registered yet.
+<p>The first time the Android application needs to use the messaging service, it
+calls the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> method {@code register()}, as discussed in
+<a href="client.html">Implementing GCM Client</a>.
+The {@code register()} method returns a registration ID. The Android
+application should store this ID for later use (for instance,
+to check in <code>onCreate()</code> if it is already registered).
</p>
- </li>
- <li>If the registration is successful, the GCM server broadcasts a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent which gives the Android application a registration
-ID.
- <p>The Android application should store this ID for later use (for instance, to check on <code>onCreate()</code> if it is already registered).
-Note that Google may periodically refresh the registration ID, so you should design your Android application
-with the understanding that the <code>com.google.android.c2dm.intent.REGISTRATION</code> intent may be called
-multiple times. Your Android application needs to be able to respond
-accordingly.</p></li>
- <li>To complete the registration, the Android application sends the registration ID to
-the application server. The application server typically stores the registration
-ID in a database. </li>
-</ol>
-<p>The registration ID lasts until the Android application explicitly unregisters
-itself, or until Google refreshes the registration ID for your Android application.</p>
-
-<p class="note"><strong>Note:</strong> When users uninstall an application, it is not automatically unregistered on GCM. It is only unregistered when the GCM server tries to send a message to the device and the device answers that the application is uninstalled or it does not have a broadcast receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code> intents. At that point, your server should mark the device as unregistered (the server will receive a <code><a href="#unreg_device">NotRegistered</a></code> error).</p>
- <p>
-Note that it might take a few minutes for the registration ID to be completely removed from the GCM server. So if the 3rd-party server sends a message during this time, it will get a valid message ID, even though the message will not be delivered to the device.</p>
-
-
-
-
-<h4 id="push-process">Send a Message</h4>
-
-<p>For an application server to send a message to an Android application, the following things must be in
-place:</p>
-
-<ul>
- <li>The Android application has stored a target that it can specify as the recipient of a message. This can be one of the following:
- <ul>
- <li>A single registration ID (or an array of registration IDs) that allows the app to receive messages
-for a particular device.</li>
- <li>A {@code notification_key} and corresponding {@code notification_key_name}, used to map a single user to multiple registration IDs. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</li>
- </ul>
- </li>
-
-<li>An API key. This is something that the developer must have already
-set up on the application server for the Android application (for more discussion, see
-<a href="#server">Role of the 3rd-party Application Server</a>). Now it will
-get used to send messages to the device. </li>
-</ul>
+<h3 id="push-process">Send a message</h3>
<p>Here is the sequence of events that occurs when the application server sends a
message:</p>
@@ -264,13 +220,14 @@
targeted Android application gets the message. This wakes the Android application up. The
Android application does not need to be running beforehand to receive the message.</li>
<li>The Android application processes the message. If the Android application is doing
-non-trivial processing, you may want to grab a {@link android.os.PowerManager.WakeLock} and do any processing in a Service.</li>
+non-trivial processing, you may want to grab a
+{@link android.os.PowerManager.WakeLock} and do any processing in a service.</li>
</ol>
<p> An Android application can unregister GCM if it no longer wants to receive
messages.</p>
-<h4 id="receiving">Receive a Message</h4>
+<h3 id="receiving">Receive a message</h3>
<p>This is the sequence of events that occurs when an Android application
installed on a mobile device receives a message:</p>
@@ -282,482 +239,8 @@
in a <code>com.google.android.c2dm.intent.RECEIVE</code> Intent as a set of
extras.</li>
<li>The Android application extracts the raw data
-from the <code>com.google.android.c2dm.intent.RECEIVE</code><code> </code>Intent by key and processes the data.</li>
+from the <code>com.google.android.c2dm.intent.RECEIVE</code><code> </code>Intent
+by key and processes the data.</li>
</ol>
-<h3 id="user">What Does the User See?</h3>
-
-<p>When mobile device users install Android applications that include GCM, the Google Play Store will inform them that the Android application
-includes GCM. They must approve the use of this feature to install the
-Android application. </p>
-
-
-<h2 id="server">Role of the 3rd-party Application Server</h2>
-
-<p>Before you can write client Android applications that use the GCM feature, you must
-have an application server that meets the following criteria:</p>
-
-<ul>
- <li>Able to communicate with your client.</li>
- <li>Able to fire off HTTPS requests to the GCM server.</li>
- <li>Able to handle requests and resend them as needed, using <a href="http://en.wikipedia.org/wiki/Exponential_backoff">exponential back-off.</a></li>
- <li>Able to store the API key and client registration IDs. The
-API key is included in the header of POST requests that send
-messages.</li>
-</ul>
-
-<h3 id="send-msg">Sending Messages</h3>
-<p>This section describes how the 3rd-party application server sends messages to one or more mobile devices. Note the following:</p>
-<ul>
- <li>A 3rd-party application server can either send messages to a single device or to multiple devices. A message sent to multiple devices simultaneously is called a <em>multicast message</em>.</li>
- <li>To send a single message to multiple devices owned by a single user, you can use a {@code notification_key}, as described in <a href="notifications.html">User Notifications</a>.
-
- <li>You have 2 choices in how you construct requests and responses: plain text or JSON.</li>
- <li>However, to send multicast messages, you must use JSON. Plain text will not work.</li>
-</ul>
-<p>Before the 3rd-party application server can send a message to an
- Android application, it must have received a registration ID from it.</p>
-<h4 id="request">Request format</h4>
-<p>To send a message, the application server issues a POST request to <code>https://android.googleapis.com/gcm/send</code>.</p>
-<p>A message request is made of 2 parts: HTTP header and HTTP body.</p>
-
-<p>The HTTP header must contain the following headers:</p>
-<ul>
- <li><code>Authorization</code>: key=YOUR_API_KEY</li>
- <li><code>Content-Type</code>: <code>application/json</code> for JSON; <code>application/x-www-form-urlencoded;charset=UTF-8</code> for plain text.
- </li>
-</ul>
-
-<p>For example:
-</p>
-<pre>Content-Type:application/json
-Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
-
-{
- "registration_ids" : ["APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx..."],
- "data" : {
- ...
- },
-}</pre>
-<p class="note">
- <p><strong>Note:</strong> If <code>Content-Type</code> is omitted, the format is assumed to be plain text.</p>
-</p>
-
-<p>The HTTP body content depends on whether you're using JSON or plain text. For JSON, it must contain a string representing a JSON object with the following fields:</p>
-<table>
- <tr>
- <th>Field</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><code>registration_ids</code></td>
- <td>A string array with the list of devices (registration IDs) receiving the message. It must contain at least 1 and at most 1000 registration IDs. To send a multicast message, you must use JSON. For sending a single message to a single device, you could use a JSON object with just 1 registration id, or plain text (see below). A request must include a recipient—this can be either a registration ID, an array of registration IDs, or a {@code notification_key}.</td>
- </tr>
- <tr>
- <td><code>notification_key</code></td>
- <td>A string that maps a single user to multiple registration IDs associated with that user. This
-allows a 3rd-party server to send a single message to multiple app instances (typically on multiple devices) owned by a single user. A 3rd-party server can use {@code notification_key} as the target for a message instead of an individual registration ID (or array of registration IDs). The maximum number of members allowed for a {@code notification_key} is 10. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>. Optional.</td>
- </tr>
-
-<tr>
- <td><code>notification_key_name</code></td>
- <td>A name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by 3rd parties to group together registration IDs for a single user. The <code>notification_key_name</code> should be uniquely named per app in case you have multiple apps for the same project ID. This ensures that notifications only go to the intended target app. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
- </tr>
-
- <tr>
- <td><code>collapse_key</code></td>
- <td>An arbitrary string (such as "Updates Available") that is used to collapse a group of like messages
-when the device is offline, so that only the last message gets sent to the
-client. This is intended to avoid sending too many messages to the phone when it
-comes back online. Note that since there is no guarantee of the order in which
-messages get sent, the "last" message may not actually be the last
-message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional.</td>
- </tr>
- <tr>
- <td><code>data</code></td>
- <td>A JSON object whose fields represents the key-value pairs of the message's payload data. If present, the payload data it will be
-included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>.
-
-There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). The values could be any JSON object, but we recommend using strings, since the values will be converted to strings in the GCM server anyway. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). To complicate things slightly, there are some reserved words (such as <code>collapse_key</code>) that are technically allowed in payload data. However, if the request also contains the word, the value in the request will overwrite the value in the payload data. Hence using words that are defined as field names in this table is not recommended, even in cases where they are technically allowed. Optional.</td>
-
-
- </tr>
- <tr>
- <td><code>delay_while_idle</code></td>
- <td>If included, indicates that the message should not be sent immediately
-if the device is idle. The server will wait for the device to become active, and
-then only the last message for each <code>collapse_key</code> value will be
-sent. Optional. The default value is <code>false</code>, and must be a JSON boolean.</td>
- </tr>
- <tr>
- <td><code>time_to_live</code></td>
- <td>How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number).</td>
- </tr>
-<tr>
- <td><code>restricted_package_name</code></td>
- <td>A string containing the package name of your application. When set, messages will only be sent to registration IDs that match the package name. Optional.
- </td>
-</tr>
-<tr>
- <td><code>dry_run</code></td>
- <td>If included, allows developers to test their request without actually sending a message. Optional. The default value is <code>false</code>, and must be a JSON boolean.
- </td>
-</tr>
-</table>
-
-<p>If you are using plain text instead of JSON, the message fields must be set as HTTP parameters sent in the body, and their syntax is slightly different, as described below:
-<table>
- <tr>
- <th>Field</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><code>registration_id</code></td>
- <td>Must contain the registration ID of the single device receiving the message. Required.</td>
- </tr>
- <tr>
- <td><code>collapse_key</code></td>
- <td>Same as JSON (see previous table). Optional.</td>
- </tr>
- <tr>
- <td><code>data.<key></code></td>
-
- <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with
-<code>google.</code>). To complicate things slightly, there are some reserved words (such as <code>collapse_key</code>) that are technically allowed in payload data. However, if the request also contains the word, the value in the request will overwrite the value in the payload data. Hence using words that are defined as field names in this table is not recommended, even in cases where they are technically allowed. Optional.</td>
-
- </tr>
- <tr>
- <td><code>delay_while_idle</code></td>
- <td>Should be represented as <code>1</code> or <code>true</code> for <code>true</code>, anything else for <code>false</code>. Optional. The default value is <code>false</code>.</td>
- </tr>
- <tr>
- <td><code>time_to_live</code></td>
- <td>Same as JSON (see previous table). Optional.</td>
- </tr>
-<tr>
- <td><code>restricted_package_name</code></td>
- <td>Same as JSON (see previous table). Optional.
- </td>
-</tr>
-<tr>
- <td><code>dry_run</code></td>
- <td>Same as JSON (see previous table). Optional.
- </td>
-</tr>
-</table>
-
-<p>If you want to test your request (either JSON or plain text) without delivering the message to the devices, you can set an optional HTTP or JSON parameter called <code>dry_run</code> with the value <code>true</code>. The result will be almost identical to running the request without this parameter, except that the message will not be delivered to the devices. Consequently, the response will contain fake IDs for the message and multicast fields (see <a href="#response">Response format</a>).</p>
-
- <h4 id="example-requests">Example requests</h4>
- <p>Here is the smallest possible request (a message without any parameters and just one recipient) using JSON:</p>
- <pre class="prettyprint pretty-json">{ "registration_ids": [ "42" ] }</pre>
-
- <p>And here the same example using plain text:</p>
- <pre class="prettyprint">registration_id=42</pre>
-
- <p> Here is a message with a payload and 6 recipients:</p>
- <pre class="prettyprint pretty-HTML">{ "data": {
- "score": "5x1",
- "time": "15:10"
- },
- "registration_ids": ["4", "8", "15", "16", "23", "42"]
-}</pre>
- <p>Here is a message with all optional fields set and 6 recipients:</p>
- <pre class="prettyprint pretty-json">{ "collapse_key": "score_update",
- "time_to_live": 108,
- "delay_while_idle": true,
- "data": {
- "score": "4x8",
- "time": "15:16.2342"
- },
- "registration_ids":["4", "8", "15", "16", "23", "42"]
-}</pre>
- <p>And here is the same message using plain-text format (but just 1 recipient): </p>
-
- <pre class="prettyprint">collapse_key=score_update&time_to_live=108&delay_while_idle=1&data.score=4x8&data.time=15:16.2342&registration_id=42
- </pre>
-
-<p class="note"><strong>Note:</strong> If your organization has a firewall
-that restricts the traffic to or
-from the Internet, you need to configure it to allow connectivity with GCM in order for
-your Android devices to receive messages.
-The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but
-it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs, so you should allow
-your firewall to accept outgoing connections to all IP addresses
-contained in the IP blocks listed in Google's ASN of 15169.</p>
-
-
-<h4 id="response">Response format</h4>
-
-<p>There are two possible outcomes when trying to send a message:</p>
-<ul>
- <li>The message is processed successfully.</li>
- <li>The GCM server rejects the request.</li>
-</ul>
-
-<p>When the message is processed successfully, the HTTP response has a 200 status and the body contains more information about the status of the message (including possible errors). When the request is rejected,
-the HTTP response contains a non-200 status code (such as 400, 401, or 503).</p>
-
-<p>The following table summarizes the statuses that the HTTP response header might contain. Click the troubleshoot link for advice on how to deal with each type of error.</p>
-<table border=1>
- <tr>
- <th>Response</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>200</td>
- <td>Message was processed successfully. The response body will contain more details about the message status, but its format will depend whether the request was JSON or plain text. See <a href="#success">Interpreting a success response</a> for more details.</td>
- </tr>
- <tr>
- <td>400</td>
- <td><span id="internal-source-marker_0.2">Only applies for JSON requests. Indicates that the request could not be parsed as JSON, or it contained invalid fields (for instance, passing a string where a number was expected). The exact failure reason is described in the response and the problem should be addressed before the request can be retried.</td>
- </tr>
- <tr>
- <td>401</td>
- <td>There was an error authenticating the sender account. <a href="#auth_error">Troubleshoot</a></td>
- </tr>
- <tr>
- <td>5xx</td>
- <td>Errors in the 500-599 range (such as 500 or 503) indicate that there was an internal error in the GCM server while trying to process the request, or that the server is temporarily unavailable (for example, because of timeouts). Sender must retry later, honoring any <code>Retry-After</code> header included in the response. Application servers must implement exponential back-off. <a href="#internal_error">Troubleshoot</a></td>
- </tr>
-</table>
-
-<h4 id="success">Interpreting a success response</h4>
-<p>When a JSON request is successful (HTTP status code 200), the response body contains a JSON object with the following fields:</p>
-<table>
- <tr>
- <th>Field</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><code>multicast_id</code></td>
- <td>Unique ID (number) identifying the multicast message.</td>
- </tr>
- <tr>
- <td><code>success</code></td>
- <td>Number of messages that were processed without an error.</td>
- </tr>
- <tr>
- <td><code>failure</code></td>
- <td>Number of messages that could not be processed.</td>
- </tr>
- <tr>
- <td><code>canonical_ids</code></td>
- <td>Number of results that contain a canonical registration ID. See <a href="adv.html#canonical">Advanced Topics</a> for more discussion of this topic.</td>
- </tr>
- <tr>
- <td><code>results</code></td>
- <td>Array of objects representing the status of the messages processed. The objects are listed in the same order as the request (i.e., for each registration ID in the request, its result is listed in the same index in the response) and they can have these fields:<br>
- <ul>
- <li><code>message_id</code>: String representing the message when it was successfully processed.</li>
- <li><code>registration_id</code>: If set, means that GCM processed the message but it has another canonical registration ID for that device, so sender should replace the IDs on future requests (otherwise they might be rejected). This field is never set if there is an error in the request.
- </li>
- <li><code>error</code>: String describing an error that occurred while processing the message for that recipient. The possible values are the same as documented in the above table, plus "Unavailable" (meaning GCM servers were busy and could not process the message for that particular recipient, so it could be retried).</li>
- </ul></td>
- </tr>
-</table>
-<p>If the value of <code>failure</code> and <code>canonical_ids</code> is 0, it's not necessary to parse the remainder of the response. Otherwise, we recommend that you iterate through the results field and do the following for each object in that list:</p>
-<ul>
- <li>If <code>message_id</code> is set, check for <code>registration_id</code>:
- <ul>
- <li>If <code>registration_id</code> is set, replace the original ID with the new value (canonical ID) in your server database. Note that the original ID is not part of the result, so you need to obtain it from the list of <code>registration_ids</code> passed in the request (using the same index).</li>
- </ul>
- </li>
- <li>Otherwise, get the value of <code>error</code>:
- <ul>
- <li>If it is <code>Unavailable</code>, you could retry to send it in another request.</li>
- <li>If it is <code>NotRegistered</code>, you should remove the registration ID from your server database because the application was uninstalled from the device or it does not have a broadcast receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code> intents.</li>
- <li>Otherwise, there is something wrong in the registration ID passed in the request; it is probably a non-recoverable error that will also require removing the registration from the server database. See <a href="#error_codes">Interpreting an error response</a> for all possible error values.</li>
- </ul>
- </li>
-</ul>
-
-<p>When a plain-text request is successful (HTTP status code 200), the response body contains 1 or 2 lines in the form of key/value pairs.
-The first line is always available and its content is either <code>id=<em>ID of sent message</em></code> or <code>Error=<em>GCM error code</em></code>. The second line, if available,
-has the format of <code>registration_id=<em>canonical ID</em></code>. The second line is optional, and it can only be sent if the first line is not an error. We recommend handling the plain-text response in a similar way as handling the JSON response:</p>
-<ul>
- <li>If first line starts with <code>id</code>, check second line:
- <ul>
- <li>If second line starts with <code>registration_id</code>, gets its value and replace the registration IDs in your server database.</li>
- </ul>
- </li>
- <li>Otherwise, get the value of <code>Error</code>:
- <ul>
- <li>If it is <code>NotRegistered</code>, remove the registration ID from your server database.</li>
- <li>Otherwise, there is probably a non-recoverable error (<strong>Note: </strong>Plain-text requests will never return <code>Unavailable</code> as the error code, they would have returned a 500 HTTP status instead).</li>
- </ul>
- </li>
-</ul>
-
-<h4 id="error_codes">Interpreting an error response</h4>
-<p>Here are the recommendations for handling the different types of error that might occur when trying to send a message to a device:</p>
-
-<dl>
-<dt id="missing_reg"><strong>Missing Registration ID</strong></dt>
-<dd>Check that the request contains a registration ID (either in the <code>registration_id</code> parameter in a plain text message, or in the <code>registration_ids</code> field in JSON).
-<br/>Happens when error code is <code>MissingRegistration</code>.</dd>
-
-<dt id="invalid_reg"><strong>Invalid Registration ID</strong></dt>
-<dd>Check the formatting of the registration ID that you pass to the server. Make sure it matches the registration ID the phone receives in the <code>com.google.android.c2dm.intent.REGISTRATION</code> intent and that you're not truncating it or adding additional characters.
-<br/>Happens when error code is <code>InvalidRegistration</code>.</dd>
-
-<dt id="mismatched_sender"><strong>Mismatched Sender</strong></dt>
-<dd>A registration ID is tied to a certain group of senders. When an application registers for GCM usage, it must specify which senders are allowed to send messages. Make sure you're using one of those when trying to send messages to the device. If you switch to a different sender, the existing registration IDs won't work.
-Happens when error code is <code>MismatchSenderId</code>.</dd>
-
-<dt id="unreg_device"><strong>Unregistered Device</strong></dt>
-<dd>An existing registration ID may cease to be valid in a number of scenarios, including:
-<ul>
- <li>If the application manually unregisters by issuing a <span class="prettyprint pretty-java"><code>com.google.android.c2dm.intent.UNREGISTER</code></span><code> </code>intent.</li>
- <li>If the application is automatically unregistered, which can happen (but is not guaranteed) if the user uninstalls the application.</li>
- <li>If the registration ID expires. Google might decide to refresh registration IDs. </li>
- <li>If the application is updated but the new version does not have a broadcast receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code> intents.</li>
-</ul>
-For all these cases, you should remove this registration ID from the 3rd-party server and stop using it to send
-messages.
-<br/>Happens when error code is <code>NotRegistered</code>.</dd>
-
-<dt id="big_msg"><strong>Message Too Big</strong></dt>
- <dd>The total size of the payload data that is included in a message can't exceed 4096 bytes. Note that this includes both the size of the keys as well as the values.
-<br/>Happens when error code is <code>MessageTooBig</code>.</dd>
-
-<dt id="invalid_datakey"><strong>Invalid Data Key</strong></dt>
-<dd>The payload data contains a key (such as <code>from</code> or any value prefixed by <code>google.</code>) that is used internally by GCM in the <code>com.google.android.c2dm.intent.RECEIVE</code> Intent and cannot be used. Note that some words (such as <code>collapse_key</code>) are also used by GCM but are allowed in the payload, in which case the payload value will be overridden by the GCM value.
-<br />
-Happens when the error code is <code>InvalidDataKey</code>.</dd>
-
-<dt id="ttl_error"><strong>Invalid Time To Live</strong></dt>
- <dd>The value for the Time to Live field must be an integer representing a duration in seconds between 0 and 2,419,200 (4 weeks). Happens when error code is <code>InvalidTtl</code>.
-</dd>
-
- <dt id="auth_error"><strong>Authentication Error</strong></dt>
- <dd>The sender account that you're trying to use to send a message couldn't be authenticated. Possible causes are: <ul>
-<li>Authorization header missing or with invalid syntax.</li>
-<li>Invalid project number sent as key.</li>
-<li>Key valid but with GCM service disabled.</li>
-<li>Request originated from a server not whitelisted in the Server Key IPs.</li>
-
-</ul>
-Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project. You can check the validity of your API key by running the following command:<br/>
-
-<pre># api_key=YOUR_API_KEY
-
-# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"ABC\"]}"</pre>
-
-
-
-If you receive a 401 HTTP status code, your API key is not valid. Otherwise you should see something like this:<br/>
-
-<pre>
-{"multicast_id":6782339717028231855,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
-</pre>
-If you want to confirm the validity of a registration ID, you can do so by replacing "ABC" with the registration ID.
-<br/>
-Happens when the HTTP status code is 401.
-
- <dt id="timeout"><strong>Timeout</strong></dt>
-
-<dd>The server couldn't process the request in time. You should retry the
-same request, but you MUST obey the following requirements:
-
-<ul>
-
-<li>Honor the <code>Retry-After</code> header if it's included in the response from the GCM server.</li>
-
-
-<li>Implement exponential back-off in your retry mechanism. This means an
-exponentially increasing delay after each failed retry (e.g. if you waited one
-second before the first retry, wait at least two second before the next one,
-then 4 seconds and so on). If you're sending multiple messages, delay each one
-independently by an additional random amount to avoid issuing a new request for
-all messages at the same time.</li>
-
-
-Senders that cause problems risk being blacklisted.
-<br />
-Happens when the HTTP status code is between 501 and 599, or when the <code>error</code> field of a JSON object in the results array is <code>Unavailable</code>.
-</dd>
-
-<dt id="internal_error"><strong>Internal Server Error</strong></dt>
-
-<dd>
-The server encountered an error while trying to process the request. You
-could retry the same request (obeying the requirements listed in the <a href="#timeout">Timeout</a>
-section), but if the error persists, please report the problem in the <a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a>.
-<br />
-Happens when the HTTP status code is 500, or when the <code>error</code> field of a JSON
-object in the results array is <code>InternalServerError</code>.
-</dd>
-
-<dt id="restricted_package_name"><strong>Invalid Package Name</strong></dt>
-
-<dd>
-A message was addressed to a registration ID whose package name did not match the value passed in the request. Happens when error code is
-<code>InvalidPackageName</code>.
-</dd>
-
-
-</dl>
-<h4>Example responses</h4>
-<p>This section shows a few examples of responses indicating messages that were processed successfully. See <a href="#example-requests">Example requests</a> for the requests these responses are based on.</p>
-<p> Here is a simple case of a JSON message successfully sent to one recipient without canonical IDs in the response:</p>
-<pre class="prettyprint pretty-json">{ "multicast_id": 108,
- "success": 1,
- "failure": 0,
- "canonical_ids": 0,
- "results": [
- { "message_id": "1:08" }
- ]
-}</pre>
-
-<p>Or if the request was in plain-text format:</p>
-<pre class="prettyprint">id=1:08
-</pre>
-
-<p>Here are JSON results for 6 recipients (IDs 4, 8, 15, 16, 23, and 42 respectively) with 3 messages successfully processed, 1 canonical registration ID returned, and 3 errors:</p>
-<pre class="prettyprint pretty-json">{ "multicast_id": 216,
- "success": 3,
- "failure": 3,
- "canonical_ids": 1,
- "results": [
- { "message_id": "1:0408" },
- { "error": "Unavailable" },
- { "error": "InvalidRegistration" },
- { "message_id": "1:1516" },
- { "message_id": "1:2342", "registration_id": "32" },
- { "error": "NotRegistered"}
- ]
-}
-</pre>
-<p> In this example:</p>
-<ul>
- <li>First message: success, not required.</li>
- <li>Second message: should be resent (to registration ID 8).</li>
- <li>Third message: had an unrecoverable error (maybe the value got corrupted in the database).</li>
- <li>Fourth message: success, nothing required.</li>
- <li>Fifth message: success, but the registration ID should be updated in the server database (from 23 to 32).</li>
- <li>Sixth message: registration ID (42) should be removed from the server database because the application was uninstalled from the device.</li>
-</ul>
-<p>Or if just the 4th message above was sent using plain-text format:</p>
-<pre class="prettyprint">Error=InvalidRegistration
-</pre>
-<p>If the 5th message above was also sent using plain-text format:</p>
-<pre class="prettyprint">id=1:2342
-registration_id=32
-</pre>
-
-<h3 id="stats">Viewing Statistics</h3>
-
-<p>To view statistics and any error messages for your GCM applications:</p>
-<ol>
- <li> Go to the <code><a href="http://play.google.com/apps/publish">Developer Console</a></code>.</li>
- <li>Login with your developer account.
- <p>You will see a page that has a list of all of your apps.</p></li>
- <li> Click on the "statistics" link next to the app for which you want to view GCM stats.
- <p>Now you are on the statistics page.</p> </li>
- <li>Go to the drop-down menu and select the GCM metric you want to view.
- </li>
-</ol>
-<p class="note"><strong>Note:</strong> Stats on the Google API Console are not enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Developer Console</a>.</p>
-
diff --git a/docs/html/google/gcm/gs.jd b/docs/html/google/gcm/gs.jd
index 8ceea0cc..f6b7ebe 100644
--- a/docs/html/google/gcm/gs.jd
+++ b/docs/html/google/gcm/gs.jd
@@ -1,4 +1,4 @@
-page.title=Getting Started with GCM
+page.title=Getting Started
page.tags="cloud","push","messaging"
@jd:body
@@ -12,8 +12,7 @@
<li><a href="#create-proj">Creating a Google API Project</a></li>
<li><a href="#gcm-service">Enabling the GCM Service</a></li>
<li><a href="#access-key">Obtaining an API Key</a></li>
-<li><a href="#client">Writing a Client App</a></li>
-<li><a href="#server">Writing the Server Code</a></li>
+<li><a href="#next">Next Steps</a></li>
</ol>
<h2>See Also</h2>
@@ -26,12 +25,12 @@
</div>
</div>
-<p>The sections below guide you through the process of setting up a GCM
+<p>This document tells you how to get started setting up a GCM
implementation.
-Before you start, make sure to <a href="/google/play-services/setup.html">set up
-the Google Play Services SDK</a>. You need this SDK to use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> methods.</p>
-
-<p>Note that a full GCM implementation requires a server-side implementation, in addition to the client implementation in your app. This document offers a complete example that includes both the client and server.</p>
+Before you begin, make sure to <a href="/google/play-services/setup.html">set up
+the Google Play Services SDK</a>. You need this SDK to use the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> methods.</p>
<h2 id="create-proj">Creating a Google API project</h2>
@@ -41,13 +40,17 @@
</li>
<li>If you haven't created an API project yet, this page will prompt you to do so:
<p><img src="{@docRoot}images/gcm/gcm-create-api-proj.png" class="screenshot" /></p>
-<p class="note"><strong>Note:</strong> If you already have existing projects, the first page you see will be the <strong>Dashboard</strong> page. From there you can create a new project by opening the project drop-down menu (upper left corner) and choosing <strong>Other projects > Create</strong>.</p></li>
+<p class="note"><strong>Note:</strong> If you already have existing projects,
+the first page you see will be the <strong>Dashboard</strong> page. From there
+you can create a new project by opening the project drop-down menu (upper left corner)
+and choosing <strong>Other projects > Create</strong>.</p></li>
<li> Click <strong>Create project</strong>.
Your browser URL will change to something like:</li>
<pre> https://code.google.com/apis/console/#project:<strong>4815162342</strong></pre>
- <li> Take note of the value after <code>#project:</code> (4815162342 in this example). This is your project number, and it will be used later on as the GCM sender ID.</li>
+ <li> Take note of the value after <code>#project:</code> (4815162342 in this
+example). This is your project number, and it will be used later on as the GCM sender ID.</li>
</ol>
<h2 id="gcm-service">Enabling the GCM Service</h2>
@@ -61,463 +64,53 @@
<h2 id="access-key">Obtaining an API Key</h2>
<p>To obtain an API key:</p>
<ol>
- <li> In the main Google APIs Console page, select <strong>API Access</strong>. You will see a screen that resembles the following:</li><br />
+ <li> In the main Google APIs Console page, select <strong>API Access</strong>.
+You will see a screen that resembles the following:</li>
-<img src="{@docRoot}images/gcm/gcm-api-access.png" style="width:400px;padding:4px;margin-bottom:0em;">
+<img src="{@docRoot}images/gcm/gcm-api-access.png" style="width:400px;padding:4px;">
+
+ <li>Click <strong>Create new Server key</strong>. Either a server key or a
+browser key should work. The advantage to using a server key is that it allows
+you to whitelist IP addresses. The following screen appears:</li>
- <li>Click <strong>Create new Server key</strong>. Either a server key or a browser key should work. The advantage to using a server key is that it allows you to whitelist IP addresses. The following screen appears:</li><br />
-
-
-<img src="{@docRoot}images/gcm/gcm-config-server-key.png" style="width:400px;padding:4px;margin-bottom:0em;">
+<img src="{@docRoot}images/gcm/gcm-config-server-key.png" style="width:400px;padding:4px;">
- <li>Click <strong>Create</strong>:</li><br />
+ <li>Click <strong>Create</strong>:</li>
-<img src="{@docRoot}images/gcm/gcm-api-key.png" style="width:400px;padding:4px;margin-bottom:0em;">
+<img src="{@docRoot}images/gcm/gcm-api-key.png" style="width:400px;padding:4px;">
</ol>
-<p> Take note of the <strong>API key</strong> value (<code>YourKeyWillBeShownHere</code>) in this example, as it will be used later on.</p>
-<p class="note"><strong>Note:</strong> If you need to rotate the key, click <strong>Generate new key</strong>. A new key will be created while the old one will still be active for up to 24 hours. If you want to get rid of the old key immediately (for example, if you feel it was compromised), click <strong>Delete key</strong>.</p>
+<p> Take note of the <strong>API key</strong> value (<code>YourKeyWillBeShownHere</code>)
+in this example, as it will be used later on.</p>
+<p class="note"><strong>Note:</strong> If you need to rotate the key, click
+<strong>Generate new key</strong>. A new key will be created while the old one
+will still be active for up to 24 hours. If you want to get rid of the old key
+immediately (for example, if you feel it was compromised), click <strong>Delete key</strong>.</p>
-<p>The following sections walk you through the steps of creating client and server-side code.</p>
+<h2 id="next">Next Steps</h2>
-<h2 id="client">Writing a Client App</h2>
+<p>Once you've finished the tasks listed above, you're ready to start
+implementing GCM. Here is an overview of the basic steps:</p>
-<p>This section walks you through the steps involved in writing a client-side application—that is, the GCM-enabled application that runs on an Android device. This client sample is designed to work in conjunction with the server code shown in <a href="#server">Writing the Server Code</a>, below.</p>
-
-
-
-<h3 id="manifest">Step 1: Edit Your App's Manifest</h3>
-<ul>
- <li>The <code>com.google.android.c2dm.permission.RECEIVE</code> permission so the Android application can register and receive messages.</li>
- <li>The <code>android.permission.INTERNET</code> permission so the Android application can send the registration ID to the 3rd party server.</li>
- <li>The <code>android.permission.GET_ACCOUNTS</code> permission as GCM requires a Google account (necessary only if if the device is running a version lower than Android 4.0.4)</li>
- <li>The <code>android.permission.WAKE_LOCK</code> permission so the application can keep the processor from sleeping when a message is received. Optional—use only if the app wants to keep the device from sleeping.</li>
- <li>An <code>applicationPackage + ".permission.C2D_MESSAGE"</code> permission to prevent other Android applications from registering and receiving the Android application's
-messages. The permission name must exactly match this pattern—otherwise the Android application will not receive the messages.</li>
- <li>A receiver for <code>com.google.android.c2dm.intent.RECEIVE</code>, with the category set
-as <code>applicationPackage</code>. The receiver should require the <code>com.google.android.c2dm.SEND</code> permission, so that only the GCM
-Framework can send a message to it. Note that the receiving
-of messages is implemented as an <a href="{@docRoot}guide/components/intents-filters.html">intent</a>.</li>
- <li>An intent service to handle the intents received by the broadcast receiver. Optional.</li>
- <li>If the GCM feature is critical to the Android application's function, be sure to
-set <code>android:minSdkVersion="8"</code> in the manifest. This
-ensures that the Android application cannot be installed in an environment in which it
-could not run properly. </li>
-</ul>
-
-<p>Here are excerpts from a manifest that supports GCM:</p>
-
-<pre class="prettyprint pretty-xml">
-<manifest package="com.example.gcm" ...>
-
- <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <uses-permission android:name="android.permission.WAKE_LOCK" />
- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
-
- <permission android:name="com.example.gcm.permission.C2D_MESSAGE"
- android:protectionLevel="signature" />
- <uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
-
- <application ...>
- <receiver
- android:name=".MyBroadcastReceiver"
- android:permission="com.google.android.c2dm.permission.SEND" >
- <intent-filter>
- <action android:name="com.google.android.c2dm.intent.RECEIVE" />
- <category android:name="com.example.gcm" />
- </intent-filter>
- </receiver>
- <service android:name=".MyIntentService" />
- </application>
-
-</manifest>
-</pre>
-
-
-<h3 id="register">Step 2: Register for GCM</h3>
-
-<p>An Android application running on a mobile device registers to receive messages by calling
-the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> method
-<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#register">{@code register(senderID...)}</a>.
-This method registers the application for GCM and returns the registration ID. This streamlined approach replaces the previous
-GCM registration process. See the example below for details.</p>
-
-<h3 id="app"> Step 3: Write Your Application</h3>
-
-<p>Finally, write your application. GCM offers a variety of ways to get the job done:</p>
-
-<ul>
- <li>For your messaging server, you can either use the new <a href="ccs.html">GCM Cloud Connection Server</a> (CCS), the older <a href="gcm.html">GCM HTTP server</a>, or both in tandem. For more discussion, see see <a href="server.html">GCM Server</a>.</li>
- <li>To write your client application (that is, the GCM-enabled app that runs on an Android device), use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs as shown below. Don't forget to set up your project to use the Google Play services SDK as described in <a href="/google/play-services/setup.html">Setup Google Play Services SDK</a>.</li>
-</ul>
-</li>
-
-</ul>
-
-<h4 id="example">Example</h4>
-
-<p>Here is a sample client application that illustrates how to use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. The sample consists of a main activity ({@code DemoActivity}) and a broadcast receiver ({@code GcmBroadcastReceiver}). You can use this client sample code in conjunction with the server code shown in <a href="#server">Writing the Server Code</a>.</p>
-
-<p>Note the following:</p>
-
-<ul>
- <li>The sample primarily illustrates two things: registration, and upstream messaging. Upstream messaging only applies to apps that are running against a <a href="ccs.html">CCS</a> server; HTTP-based servers don't support upstream messaging.</li>
- <li>The <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> registration APIs replace the old registration process, which was based on the now-obsolete client helper library. While the old registration process still works, we encourage you to use the newer <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> registration APIs, regardless of your underlying server.</li>
-</ul>
-
-<h5>Registering</h5>
-<p>An Android application needs to register with GCM servers before it can receive messages. So in its {@code onCreate()} method, {@code DemoActivity} checks to see whether the app is registered with GCM and with the server:</p>
-
-<pre>/**
- * Main UI for the demo app.
- */
-public class DemoActivity extends Activity {
-
- public static final String EXTRA_MESSAGE = "message";
- public static final String PROPERTY_REG_ID = "registration_id";
- private static final String PROPERTY_APP_VERSION = "appVersion";
- private static final String PROPERTY_ON_SERVER_EXPIRATION_TIME =
- "onServerExpirationTimeMs";
- /**
- * Default lifespan (7 days) of a reservation until it is considered expired.
- */
- public static final long REGISTRATION_EXPIRY_TIME_MS = 1000 * 3600 * 24 * 7;
-
- /**
- * Substitute you own sender ID here.
- */
- String SENDER_ID = "Your-Sender-ID";
-
- /**
- * Tag used on log messages.
- */
- static final String TAG = "GCMDemo";
-
- TextView mDisplay;
- GoogleCloudMessaging gcm;
- AtomicInteger msgId = new AtomicInteger();
- SharedPreferences prefs;
- Context context;
-
- String regid;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.main);
- mDisplay = (TextView) findViewById(R.id.display);
-
- context = getApplicationContext();
- regid = getRegistrationId(context);
-
- if (regid.length() == 0) {
- registerBackground();
- }
- gcm = GoogleCloudMessaging.getInstance(this);
- }
-...
-}</pre>
-
-<p>The app calls {@code getRegistrationId()} to see whether there is an existing registration ID stored in shared preferences:</p>
-
-<pre>/**
- * Gets the current registration id for application on GCM service.
- * <p>
- * If result is empty, the registration has failed.
- *
- * @return registration id, or empty string if the registration is not
- * complete.
- */
-private String getRegistrationId(Context context) {
- final SharedPreferences prefs = getGCMPreferences(context);
- String registrationId = prefs.getString(PROPERTY_REG_ID, "");
- if (registrationId.length() == 0) {
- Log.v(TAG, "Registration not found.");
- return "";
- }
- // check if app was updated; if so, it must clear registration id to
- // avoid a race condition if GCM sends a message
- int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
- int currentVersion = getAppVersion(context);
- if (registeredVersion != currentVersion || isRegistrationExpired()) {
- Log.v(TAG, "App version changed or registration expired.");
- return "";
- }
- return registrationId;
-}
-
-...
-
-/**
- * @return Application's {@code SharedPreferences}.
- */
-private SharedPreferences getGCMPreferences(Context context) {
- return getSharedPreferences(DemoActivity.class.getSimpleName(),
- Context.MODE_PRIVATE);
-}</pre>
-
-<p>If the registration ID doesn't exist, or the app was updated, or the registration ID has expired, {@code getRegistrationId()} returns an empty string to indicate that the app needs to get a new regID. {@code getRegistrationId()} calls the following methods to check the app version and whether the regID has expired:</p>
-
-<pre>/**
- * @return Application's version code from the {@code PackageManager}.
- */
-private static int getAppVersion(Context context) {
- try {
- PackageInfo packageInfo = context.getPackageManager()
- .getPackageInfo(context.getPackageName(), 0);
- return packageInfo.versionCode;
- } catch (NameNotFoundException e) {
- // should never happen
- throw new RuntimeException("Could not get package name: " + e);
- }
-}
-
-/**
- * Checks if the registration has expired.
- *
- * <p>To avoid the scenario where the device sends the registration to the
- * server but the server loses it, the app developer may choose to re-register
- * after REGISTRATION_EXPIRY_TIME_MS.
- *
- * @return true if the registration has expired.
- */
-private boolean isRegistrationExpired() {
- final SharedPreferences prefs = getGCMPreferences(context);
- // checks if the information is not stale
- long expirationTime =
- prefs.getLong(PROPERTY_ON_SERVER_EXPIRATION_TIME, -1);
- return System.currentTimeMillis() > expirationTime;
-}</pre>
-
-
-<p>If there isn't a valid existing registration ID, {@code DemoActivity} calls the following {@code registerBackground()} method to register. Note that because GCM methods are blocking, this has to take place on a background thread. This sample uses {@link android.os.AsyncTask} to accomplish this:</p>
-
-<pre>
-/**
- * Registers the application with GCM servers asynchronously.
- * <p>
- * Stores the registration id, app versionCode, and expiration time in the
- * application's shared preferences.
- */
-private void registerBackground() {
- new AsyncTask<Void, Void, String>() {
- @Override
- protected String doInBackground(Void... params) {
- String msg = "";
- try {
- if (gcm == null) {
- gcm = GoogleCloudMessaging.getInstance(context);
- }
- regid = gcm.register(SENDER_ID);
- msg = "Device registered, registration id=" + regid;
-
- // You should send the registration ID to your server over HTTP,
- // so it can use GCM/HTTP or CCS to send messages to your app.
-
- // For this demo: we don't need to send it because the device
- // will send upstream messages to a server that echo back the message
- // using the 'from' address in the message.
-
- // Save the regid - no need to register again.
- setRegistrationId(context, regid);
- } catch (IOException ex) {
- msg = "Error :" + ex.getMessage();
- }
- return msg;
- }
-
- @Override
- protected void onPostExecute(String msg) {
- mDisplay.append(msg + "\n");
- }
- }.execute(null, null, null);
-}</pre>
-
-<p>After registering, the app calls {@code setRegistrationId()} to store the registration ID in shared preferences for future use:</p>
-
-<pre>/**
- * Stores the registration id, app versionCode, and expiration time in the
- * application's {@code SharedPreferences}.
- *
- * @param context application's context.
- * @param regId registration id
- */
-private void setRegistrationId(Context context, String regId) {
- final SharedPreferences prefs = getGCMPreferences(context);
- int appVersion = getAppVersion(context);
- Log.v(TAG, "Saving regId on app version " + appVersion);
- SharedPreferences.Editor editor = prefs.edit();
- editor.putString(PROPERTY_REG_ID, regId);
- editor.putInt(PROPERTY_APP_VERSION, appVersion);
- long expirationTime = System.currentTimeMillis() + REGISTRATION_EXPIRY_TIME_MS;
-
- Log.v(TAG, "Setting registration expiry time to " +
- new Timestamp(expirationTime));
- editor.putLong(PROPERTY_ON_SERVER_EXPIRATION_TIME, expirationTime);
- editor.commit();
-}</pre>
-
-<h5>Sending a message</h5>
-<p>When the user clicks the app's <strong>Send</strong> button, the app sends an upstream message using the new <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. In order to receive the upstream message, your server should be connected to CCS. You can use the code shown in <a href="#server">Writing the Server Code</a> as a sample XMPP client to connect to CCS.</p>
-
-<pre>public void onClick(final View view) {
- if (view == findViewById(R.id.send)) {
- new AsyncTask<Void, Void, String>() {
- @Override
- protected String doInBackground(Void... params) {
- String msg = "";
- try {
- Bundle data = new Bundle();
- data.putString("hello", "World");
- String id = Integer.toString(msgId.incrementAndGet());
- gcm.send(SENDER_ID + "@gcm.googleapis.com", id, data);
- msg = "Sent message";
- } catch (IOException ex) {
- msg = "Error :" + ex.getMessage();
- }
- return msg;
- }
-
- @Override
- protected void onPostExecute(String msg) {
- mDisplay.append(msg + "\n");
- }
- }.execute(null, null, null);
- } else if (view == findViewById(R.id.clear)) {
- mDisplay.setText("");
- }
-}</pre>
-
-<p>As described above in <a href="#manifest">Step 1</a>, the app includes a broadcast receiver for the <code>com.google.android.c2dm.intent.RECEIVE</code> intent. This is the mechanism GCM uses to deliver messages. When {@code onClick()} calls {@code gcm.send()}, it triggers the broadcast receiver's {@code onReceive()} method, which has the responsibility of handling the GCM message. In this sample the receiver's {@code onReceive()} method calls {@code sendNotification()} to put the message into a notification:</p>
-
-<pre>/**
- * Handling of GCM messages.
- */
-public class GcmBroadcastReceiver extends BroadcastReceiver {
- static final String TAG = "GCMDemo";
- public static final int NOTIFICATION_ID = 1;
- private NotificationManager mNotificationManager;
- NotificationCompat.Builder builder;
- Context ctx;
- @Override
- public void onReceive(Context context, Intent intent) {
- GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);
- ctx = context;
- String messageType = gcm.getMessageType(intent);
- if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) {
- sendNotification("Send error: " + intent.getExtras().toString());
- } else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED.equals(messageType)) {
- sendNotification("Deleted messages on server: " +
- intent.getExtras().toString());
- } else {
- sendNotification("Received: " + intent.getExtras().toString());
- }
- setResultCode(Activity.RESULT_OK);
- }
-
- // Put the GCM message into a notification and post it.
- private void sendNotification(String msg) {
- mNotificationManager = (NotificationManager)
- ctx.getSystemService(Context.NOTIFICATION_SERVICE);
-
- PendingIntent contentIntent = PendingIntent.getActivity(ctx, 0,
- new Intent(ctx, DemoActivity.class), 0);
-
- NotificationCompat.Builder mBuilder =
- new NotificationCompat.Builder(ctx)
- .setSmallIcon(R.drawable.ic_stat_gcm)
- .setContentTitle("GCM Notification")
- .setStyle(new NotificationCompat.BigTextStyle()
- .bigText(msg))
- .setContentText(msg);
-
- mBuilder.setContentIntent(contentIntent);
- mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
- }
-}</pre>
-
-<h2 id="server">Writing the Server Code</h2>
-
-<p>Here is an example of a CCS server written in Python. You can use this in conjunction with the sample client code shown above. This sample echo server sends an initial message, and for every upstream message received, it sends a dummy response back to the application that sent the upstream message. This example illustrates how to connect,
-send, and receive GCM messages using XMPP. It shouldn't be used as-is
-on a production deployment. For examples of HTTP-based servers, see <a href="server.html">GCM Server</a>.</p>
-
-<pre>
-#!/usr/bin/python
-import sys, json, xmpp, random, string
-
-SERVER = 'gcm.googleapis.com'
-PORT = 5235
-USERNAME = ''
-PASSWORD = ''
-REGISTRATION_ID = ''
-
-unacked_messages_quota = 1000
-send_queue = []
-
-# Return a random alphanumerical id
-def random_id():
- rid = ''
- for x in range(8): rid += random.choice(string.ascii_letters + string.digits)
- return rid
-
-def message_callback(session, message):
- global unacked_messages_quota
- gcm = message.getTags('gcm')
- if gcm:
- gcm_json = gcm[0].getData()
- msg = json.loads(gcm_json)
- if not msg.has_key('message_type'):
- # Acknowledge the incoming message immediately.
- send({'to': msg['from'],
- 'message_type': 'ack',
- 'message_id': msg['message_id']})
- # Queue a response back to the server.
- if msg.has_key('from'):
- # Send a dummy echo response back to the app that sent the upstream message.
- send_queue.append({'to': msg['from'],
- 'message_id': random_id(),
- 'data': {'pong': 1}})
- elif msg['message_type'] == 'ack' or msg['message_type'] == 'nack':
- unacked_messages_quota += 1
-
-def send(json_dict):
- template = ("<message><gcm xmlns='google:mobile:data'>{1}</gcm></message>")
- client.send(xmpp.protocol.Message(
- node=template.format(client.Bind.bound[0], json.dumps(json_dict))))
-
-def flush_queued_messages():
- global unacked_messages_quota
- while len(send_queue) and unacked_messages_quota > 0:
- send(send_queue.pop(0))
- unacked_messages_quota -= 1
-
-client = xmpp.Client('gcm.googleapis.com', debug=['socket'])
-client.connect(server=(SERVER,PORT), secure=1, use_srv=False)
-auth = client.auth(USERNAME, PASSWORD)
-if not auth:
- print 'Authentication failed!'
- sys.exit(1)
-
-client.RegisterHandler('message', message_callback)
-
-send_queue.append({'to': REGISTRATION_ID,
- 'message_id': 'reg_id',
- 'data': {'message_destination': 'RegId',
- 'message_id': random_id()}})
-
-while True:
- client.Process(1)
- flush_queued_messages()</pre>
-
+<ol>
+ <li>Decide which Google-provided GCM connection server you want to use—
+ <a href="http.html">HTTP</a> or <a href="ccs.html">XMPP</a> (CCS). GCM connection servers
+take messages from a 3rd-party application
+server (written by you) and send them to a GCM-enabled Android application (the
+"client app," also written by you) running on a device. </li>
+ <li>Implement an application server (the "3rd-party application server") to interact
+with your chosen GCM connection server. The app server sends data to a
+GCM-enabled Android client application via the GCM connection server. For more
+information about implementing the server side, see <a href="server.html">
+Implementing GCM Server</a>.</li>
+<li>Write your client app. This is the GCM-enabled Android application that runs
+on a device. See <a href="client.html">Implementing GCM Client</a> for more information.</li>
+</ol>
diff --git a/docs/html/google/gcm/http.jd b/docs/html/google/gcm/http.jd
new file mode 100644
index 0000000..b8d8659
--- /dev/null
+++ b/docs/html/google/gcm/http.jd
@@ -0,0 +1,618 @@
+page.title=GCM HTTP Connection Server
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+
+<h2>In this document</h2>
+
+<ol class="toc">
+ <li><a href="#auth">Authentication</a> </li>
+ <li><a href="#request">Request Format</a> </li>
+ <li><a href="#response">Response Format</a>
+ <ol class="toc">
+ <li><a href="#success">Interpreting a success response</a>
+ <li><a href="#error_codes">Interpreting an error response</a>
+ <li><a href="#example-responses">Example responses</a>
+ </ol>
+ </li>
+ <li><a href="#app-server">Implementing an HTTP-Based App Server</a>
+</ol>
+
+<h2>See Also</h2>
+
+<ol class="toc">
+<li><a href="gs.html">Getting Started</a></li>
+<li><a href="client.html">Implementing GCM Client</a></li>
+<li><a href="ccs.html">Cloud Connection Server</a></li>
+
+
+</ol>
+
+</div>
+</div>
+
+<p>This document describes the GCM HTTP connection server. Connection servers
+are the Google-provided servers that take messages from the 3rd-party
+application server and sending them to the device.</p>
+
+
+
+<p class="note"><strong>Note:</strong> See
+<a href="server.html#params">Implementing GCM Server</a> for a list of all the message
+parameters and which connection server(s) supports them.</p>
+
+
+<h2 id="auth">Authentication</h2>
+
+<p>To send a message, the application server issues a POST request to
+<code>https://android.googleapis.com/gcm/send</code>.</p>
+<p>A message request is made of 2 parts: HTTP header and HTTP body.</p>
+
+<p>The HTTP header must contain the following headers:</p>
+<ul>
+ <li><code>Authorization</code>: key=YOUR_API_KEY</li>
+ <li><code>Content-Type</code>: <code>application/json</code> for JSON; <code>application/x-www-form-urlencoded;charset=UTF-8</code> for plain text.
+ </li>
+</ul>
+
+<p>For example:
+</p>
+<pre>Content-Type:application/json
+Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
+
+{
+ "registration_ids" : ["APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx..."],
+ "data" : {
+ ...
+ },
+}</pre>
+<p class="note">
+ <p><strong>Note:</strong> If <code>Content-Type</code> is omitted, the format
+is assumed to be plain text.</p>
+</p>
+
+<p>The HTTP body content depends on whether you're using JSON or plain text.
+See
+<a href="server.html#params">Implementing GCM Server</a> for a list of all the
+parameters your JSON or plain text message can contain.</p>
+
+
+ <h2 id="request">Request Format</h2>
+ <p>Here is the smallest possible request (a message without any parameters and
+just one recipient) using JSON:</p>
+ <pre class="prettyprint pretty-json">{ "registration_ids": [ "42" ] }</pre>
+
+ <p>And here the same example using plain text:</p>
+ <pre class="prettyprint">registration_id=42</pre>
+
+ <p> Here is a message with a payload and 6 recipients:</p>
+ <pre class="prettyprint pretty-HTML">{ "data": {
+ "score": "5x1",
+ "time": "15:10"
+ },
+ "registration_ids": ["4", "8", "15", "16", "23", "42"]
+}</pre>
+ <p>Here is a message with all optional fields set and 6 recipients:</p>
+ <pre class="prettyprint pretty-json">{ "collapse_key": "score_update",
+ "time_to_live": 108,
+ "delay_while_idle": true,
+ "data": {
+ "score": "4x8",
+ "time": "15:16.2342"
+ },
+ "registration_ids":["4", "8", "15", "16", "23", "42"]
+}</pre>
+ <p>And here is the same message using plain-text format (but just 1 recipient): </p>
+
+ <pre class="prettyprint">collapse_key=score_update&time_to_live=108&delay_while_idle=1&data.score=4x8&data.time=15:16.2342&registration_id=42
+ </pre>
+
+<p class="note"><strong>Note:</strong> If your organization has a firewall
+that restricts the traffic to or
+from the Internet, you need to configure it to allow connectivity with GCM in order for
+your Android devices to receive messages.
+The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but
+it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs, so you should allow
+your firewall to accept outgoing connections to all IP addresses
+contained in the IP blocks listed in Google's ASN of 15169.</p>
+
+
+
+<h2 id="response">Response format</h2>
+
+<p>There are two possible outcomes when trying to send a message:</p>
+<ul>
+ <li>The message is processed successfully.</li>
+ <li>The GCM server rejects the request.</li>
+</ul>
+
+<p>When the message is processed successfully, the HTTP response has a 200 status
+and the body contains more information about the status of the message
+(including possible errors). When the request is rejected,
+the HTTP response contains a non-200 status code (such as 400, 401, or 503).</p>
+
+<p>The following table summarizes the statuses that the HTTP response header might
+contain. Click the troubleshoot link for advice on how to deal with each type of
+error.</p>
+<table border=1>
+ <tr>
+ <th>Response</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>200</td>
+ <td>Message was processed successfully. The response body will contain more
+details about the message status, but its format will depend whether the request
+was JSON or plain text. See <a href="#success">Interpreting a success response</a>
+for more details.</td>
+ </tr>
+ <tr>
+ <td>400</td>
+ <td><span id="internal-source-marker_0.2">Only applies for JSON requests.
+Indicates that the request could not be parsed as JSON, or it contained invalid
+fields (for instance, passing a string where a number was expected). The exact
+failure reason is described in the response and the problem should be addressed
+before the request can be retried.</td>
+ </tr>
+ <tr>
+ <td>401</td>
+ <td>There was an error authenticating the sender account.
+<a href="#auth_error">Troubleshoot</a></td>
+ </tr>
+ <tr>
+ <td>5xx</td>
+ <td>Errors in the 500-599 range (such as 500 or 503) indicate that there wa
+an internal error in the GCM server while trying to process the request, or that
+the server is temporarily unavailable (for example, because of timeouts). Sender
+must retry later, honoring any <code>Retry-After</code> header included in the
+response. Application servers must implement exponential back-off.
+<a href="#internal_error">Troubleshoot</a></td>
+ </tr>
+</table>
+
+<h3 id="success">Interpreting a success response</h3>
+<p>When a JSON request is successful (HTTP status code 200), the response body
+contains a JSON object with the following fields:</p>
+<table>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><code>multicast_id</code></td>
+ <td>Unique ID (number) identifying the multicast message.</td>
+ </tr>
+ <tr>
+ <td><code>success</code></td>
+ <td>Number of messages that were processed without an error.</td>
+ </tr>
+ <tr>
+ <td><code>failure</code></td>
+ <td>Number of messages that could not be processed.</td>
+ </tr>
+ <tr>
+ <td><code>canonical_ids</code></td>
+ <td>Number of results that contain a canonical registration ID. See
+<a href="adv.html#canonical">Advanced Topics</a> for more discussion of this topic.</td>
+ </tr>
+ <tr>
+ <td><code>results</code></td>
+ <td>Array of objects representing the status of the messages processed. The
+objects are listed in the same order as the request (i.e., for each registration
+ID in the request, its result is listed in the same index in the response) and
+they can have these fields:<br>
+ <ul>
+ <li><code>message_id</code>: String representing the message when it was
+successfully processed.</li>
+ <li><code>registration_id</code>: If set, means that GCM processed the
+message but it has another canonical registration ID for that device, so sender
+should replace the IDs on future requests (otherwise they might be rejected).
+This field is never set if there is an error in the request.
+ </li>
+ <li><code>error</code>: String describing an error that occurred while
+processing the message for that recipient. The possible values are the same as
+documented in the above table, plus "Unavailable" (meaning GCM servers
+were busy and could not process the message for that particular recipient, so
+it could be retried).</li>
+ </ul></td>
+ </tr>
+</table>
+<p>If the value of <code>failure</code> and <code>canonical_ids</code> is 0, it's
+not necessary to parse the remainder of the response. Otherwise, we recommend
+that you iterate through the results field and do the following for each object
+in that list:</p>
+<ul>
+ <li>If <code>message_id</code> is set, check for <code>registration_id</code>:
+ <ul>
+ <li>If <code>registration_id</code> is set, replace the original ID with
+the new value (canonical ID) in your server database. Note that the original ID
+is not part of the result, so you need to obtain it from the list of
+code>registration_ids</code> passed in the request (using the same index).</li>
+ </ul>
+ </li>
+ <li>Otherwise, get the value of <code>error</code>:
+ <ul>
+ <li>If it is <code>Unavailable</code>, you could retry to send it in another
+request.</li>
+ <li>If it is <code>NotRegistered</code>, you should remove the registration
+ID from your server database because the application was uninstalled from the
+device or it does not have a broadcast receiver configured to receive
+<code>com.google.android.c2dm.intent.RECEIVE</code> intents.</li>
+ <li>Otherwise, there is something wrong in the registration ID passed in
+the request; it is probably a non-recoverable error that will also require removing
+the registration from the server database. See <a href="#error_codes">Interpreting
+an error response</a> for all possible error values.</li>
+ </ul>
+ </li>
+</ul>
+
+<p>When a plain-text request is successful (HTTP status code 200), the response
+body contains 1 or 2 lines in the form of key/value pairs.
+The first line is always available and its content is either <code>id=<em>ID of
+sent message</em></code> or <code>Error=<em>GCM error code</em></code>. The second
+line, if available,
+has the format of <code>registration_id=<em>canonical ID</em></code>. The second
+line is optional, and it can only be sent if the first line is not an error. We
+recommend handling the plain-text response in a similar way as handling the
+JSON response:</p>
+<ul>
+ <li>If first line starts with <code>id</code>, check second line:
+ <ul>
+ <li>If second line starts with <code>registration_id</code>, gets its value
+and replace the registration IDs in your server database.</li>
+ </ul>
+ </li>
+ <li>Otherwise, get the value of <code>Error</code>:
+ <ul>
+ <li>If it is <code>NotRegistered</code>, remove the registration ID from
+your server database.</li>
+ <li>Otherwise, there is probably a non-recoverable error (<strong>Note:
+</strong>Plain-text requests will never return <code>Unavailable</code> as the
+error code, they would have returned a 500 HTTP status instead).</li>
+ </ul>
+ </li>
+</ul>
+
+<h3 id="error_codes">Interpreting an error response</h3>
+<p>Here are the recommendations for handling the different types of error that
+might occur when trying to send a message to a device:</p>
+
+<dl>
+<dt id="missing_reg"><strong>Missing Registration ID</strong></dt>
+<dd>Check that the request contains a registration ID (either in the
+<code>registration_id</code> parameter in a plain text message, or in the
+<code>registration_ids</code> field in JSON).
+<br/>Happens when error code is <code>MissingRegistration</code>.</dd>
+
+<dt id="invalid_reg"><strong>Invalid Registration ID</strong></dt>
+<dd>Check the formatting of the registration ID that you pass to the server. Make
+sure it matches the registration ID the phone receives in the
+<code>com.google.android.c2dm.intent.REGISTRATION</code> intent and that you're
+not truncating it or adding additional characters.
+<br/>Happens when error code is <code>InvalidRegistration</code>.</dd>
+
+<dt id="mismatched_sender"><strong>Mismatched Sender</strong></dt>
+<dd>A registration ID is tied to a certain group of senders. When an application
+registers for GCM usage, it must specify which senders are allowed to send messages.
+Make sure you're using one of those when trying to send messages to the device.
+If you switch to a different sender, the existing registration IDs won't work.
+Happens when error code is <code>MismatchSenderId</code>.</dd>
+
+<dt id="unreg_device"><strong>Unregistered Device</strong></dt>
+<dd>An existing registration ID may cease to be valid in a number of scenarios, including:
+<ul>
+ <li>If the application manually unregisters by issuing a
+<span class="prettyprint pretty-java">
+<code>com.google.android.c2dm.intent.UNREGISTER</code></span><code>
+</code>intent.</li>
+ <li>If the application is automatically unregistered, which can happen
+(but is not guaranteed) if the user uninstalls the application.</li>
+ <li>If the registration ID expires. Google might decide to refresh registration
+IDs. </li>
+ <li>If the application is updated but the new version does not have a broadcast
+receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code>
+intents.</li>
+</ul>
+For all these cases, you should remove this registration ID from the 3rd-party
+server and stop using it to send
+messages.
+<br/>Happens when error code is <code>NotRegistered</code>.</dd>
+
+<dt id="big_msg"><strong>Message Too Big</strong></dt>
+ <dd>The total size of the payload data that is included in a message can't
+exceed 4096 bytes. Note that this includes both the size of the keys as well
+as the values.
+<br/>Happens when error code is <code>MessageTooBig</code>.</dd>
+
+<dt id="invalid_datakey"><strong>Invalid Data Key</strong></dt>
+<dd>The payload data contains a key (such as <code>from</code> or any value
+prefixed by <code>google.</code>) that is used internally by GCM in the
+<code>com.google.android.c2dm.intent.RECEIVE</code> Intent and cannot be used.
+Note that some words (such as <code>collapse_key</code>) are also used by GCM
+but are allowed in the payload, in which case the payload value will be
+overridden by the GCM value.
+<br />
+Happens when the error code is <code>InvalidDataKey</code>.</dd>
+
+<dt id="ttl_error"><strong>Invalid Time To Live</strong></dt>
+ <dd>The value for the Time to Live field must be an integer representing
+a duration in seconds between 0 and 2,419,200 (4 weeks). Happens when error code
+is <code>InvalidTtl</code>.
+</dd>
+
+ <dt id="auth_error"><strong>Authentication Error</strong></dt>
+ <dd>The sender account that you're trying to use to send a message couldn't be
+authenticated. Possible causes are: <ul>
+<li>Authorization header missing or with invalid syntax.</li>
+<li>Invalid project number sent as key.</li>
+<li>Key valid but with GCM service disabled.</li>
+<li>Request originated from a server not whitelisted in the Server Key IPs.</li>
+
+</ul>
+Check that the token you're sending inside the <code>Authorization</code> header
+is the correct API key associated with your project. You can check the validity
+of your API key by running the following command:<br/>
+
+<pre># api_key=YOUR_API_KEY
+
+# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"ABC\"]}"</pre>
+
+
+
+If you receive a 401 HTTP status code, your API key is not valid. Otherwise you
+should see something like this:<br/>
+
+<pre>
+{"multicast_id":6782339717028231855,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
+</pre>
+If you want to confirm the validity of a registration ID, you can do so by
+replacing "ABC" with the registration ID.
+<br/>
+Happens when the HTTP status code is 401.
+
+ <dt id="timeout"><strong>Timeout</strong></dt>
+
+<dd>The server couldn't process the request in time. You should retry the
+same request, but you MUST obey the following requirements:
+
+<ul>
+
+<li>Honor the <code>Retry-After</code> header if it's included in the response
+from the GCM server.</li>
+
+
+<li>Implement exponential back-off in your retry mechanism. This means an
+exponentially increasing delay after each failed retry (e.g. if you waited one
+second before the first retry, wait at least two second before the next one,
+then 4 seconds and so on). If you're sending multiple messages, delay each one
+independently by an additional random amount to avoid issuing a new request for
+all messages at the same time.</li>
+
+
+Senders that cause problems risk being blacklisted.
+<br />
+Happens when the HTTP status code is between 501 and 599, or when the
+<code>error</code> field of a JSON object in the results array is <code>Unavailable</code>.
+</dd>
+
+<dt id="internal_error"><strong>Internal Server Error</strong></dt>
+
+<dd>
+The server encountered an error while trying to process the request. You
+could retry the same request (obeying the requirements listed in the <a href="#timeout">Timeout</a>
+section), but if the error persists, please report the problem in the
+<a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a>.
+<br />
+Happens when the HTTP status code is 500, or when the <code>error</code> field of a JSON
+object in the results array is <code>InternalServerError</code>.
+</dd>
+
+<dt id="restricted_package_name"><strong>Invalid Package Name</strong></dt>
+
+<dd>
+A message was addressed to a registration ID whose package name did not match
+the value passed in the request. Happens when error code is
+<code>InvalidPackageName</code>.
+</dd>
+</dl>
+
+<h3 id="example-responses">Example responses</h3>
+<p>This section shows a few examples of responses indicating messages that were
+processed successfully. See <a href="#request">Request Format</a> for
+the requests these responses are based on.</p>
+<p> Here is a simple case of a JSON message successfully sent to one recipient
+without canonical IDs in the response:</p>
+<pre class="prettyprint pretty-json">{ "multicast_id": 108,
+ "success": 1,
+ "failure": 0,
+ "canonical_ids": 0,
+ "results": [
+ { "message_id": "1:08" }
+ ]
+}</pre>
+
+<p>Or if the request was in plain-text format:</p>
+<pre class="prettyprint">id=1:08
+</pre>
+
+<p>Here are JSON results for 6 recipients (IDs 4, 8, 15, 16, 23, and 42 respectively)
+with 3 messages successfully processed, 1 canonical registration ID returned,
+and 3 errors:</p>
+<pre class="prettyprint pretty-json">{ "multicast_id": 216,
+ "success": 3,
+ "failure": 3,
+ "canonical_ids": 1,
+ "results": [
+ { "message_id": "1:0408" },
+ { "error": "Unavailable" },
+ { "error": "InvalidRegistration" },
+ { "message_id": "1:1516" },
+ { "message_id": "1:2342", "registration_id": "32" },
+ { "error": "NotRegistered"}
+ ]
+}
+</pre>
+<p> In this example:</p>
+<ul>
+ <li>First message: success, not required.</li>
+ <li>Second message: should be resent (to registration ID 8).</li>
+ <li>Third message: had an unrecoverable error (maybe the value got corrupted
+in the database).</li>
+ <li>Fourth message: success, nothing required.</li>
+ <li>Fifth message: success, but the registration ID should be updated in the
+server database (from 23 to 32).</li>
+ <li>Sixth message: registration ID (42) should be removed from the server database
+because the application was uninstalled from the device.</li>
+</ul>
+<p>Or if just the 4th message above was sent using plain-text format:</p>
+<pre class="prettyprint">Error=InvalidRegistration
+</pre>
+<p>If the 5th message above was also sent using plain-text format:</p>
+<pre class="prettyprint">id=1:2342
+registration_id=32
+</pre>
+
+
+<h2 id="app-server">Implementing an HTTP-Based App Server</h2>
+
+<p>This section gives examples of implementing an app server that works with the
+GCM HTTP connection server. Note that a full GCM implementation requires a
+client-side implementation, in addition to the server.</a>
+
+
+<p>Requirements</p>
+<p>For the web server:</p>
+<ul>
+ <li> <a href="http://ant.apache.org/">Ant 1.8</a> (it might work with earlier versions, but it's not guaranteed).</li>
+ <li>One of the following:
+ <ul>
+ <li>A running web server compatible with Servlets API version 2.5, such as
+<a href="http://tomcat.apache.org/">Tomcat 6</a> or <a href="http://jetty.codehaus.org/">Jetty</a>, or</li>
+ <li><a href="http://code.google.com/appengine/">Java App Engine SDK</a>
+version 1.6 or later.</li>
+ </ul>
+ </li>
+ <li>A Google account registered to use GCM.</li>
+ <li>The API key for that account.</li>
+</ul>
+<p>For the Android application:</p>
+<ul>
+ <li>Emulator (or device) running Android 2.2 with Google APIs.</li>
+ <li>The Google API project number of the account registered to use GCM.</li>
+</ul>
+
+<h3 id="gcm-setup">Setting Up GCM</h3>
+<p>Before proceeding with the server and client setup, it's necessary to register
+a Google account with the Google API Console, enable Google Cloud Messaging in GCM,
+and obtain an API key from the <a href="https://code.google.com/apis/console">
+Google API Console</a>.</p>
+<p>For instructions on how to set up GCM, see <a href="gs.html">Getting Started</a>.</p>
+
+
+<h3 id="server-setup">Setting Up an HTTP Server</h3>
+<p>This section describes the different options for setting up an HTTP server.</p>
+
+<h4 id="webserver-setup">Using a standard web server</h4>
+<p>To set up the server using a standard, servlet-compliant web server:</p>
+<ol>
+ <li>From the <a href="http://code.google.com/p/gcm">open source site</a>,
+download the following directories: <code>gcm-server</code>,
+<code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
+
+
+ <li>In a text editor, edit the <code>samples/gcm-demo-server/WebContent/WEB-INF/classes/api.key</code> and replace the existing text with the API key obtained above.</li>
+ <li>In a shell window, go to the <code>samples/gcm-demo-server</code> directory.</li>
+ <li>Generate the server's WAR file by running <code>ant war</code>:</li>
+
+ <pre class="prettyprint">$ ant war
+
+Buildfile:build.xml
+
+init:
+ [mkdir] Created dir: build/classes
+ [mkdir] Created dir: dist
+
+compile:
+ [javac] Compiling 6 source files to build/classes
+
+war:
+ [war] Building war: <strong>dist/gcm-demo.war</strong>
+
+BUILD SUCCESSFUL
+Total time: 0 seconds
+</pre>
+
+ <li>Deploy the <code>dist/gcm-demo.war</code> to your running server. For instance, if you're using Jetty, copy <code>gcm-demo.war</code> to the <code>webapps</code> directory of the Jetty installation.</li>
+ <li>Open the server's main page in a browser. The URL depends on the server you're using and your machine's IP address, but it will be something like <code>http://192.168.1.10:8080/gcm-demo/home</code>, where <code>gcm-demo</code> is the application context and <code>/home</code> is the path of the main servlet.
+
+ </li>
+</ol>
+<p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code> on Linux or MacOS, or <code>ipconfig</code> on Windows. </p>
+
+<p> You server is now ready.</p>
+
+<h4 id="appengine-setup">Using App Engine for Java</h4>
+
+<p>To set up the server using a standard App Engine for Java:</p>
+<ol>
+ <li>Get the files from the <a href="http://code.google.com/p/gcm">open source
+site</a>, as described above.</p>
+ </li>
+ <li>In a text editor, edit
+<code>samples/gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java</code>
+and replace the existing text with the API key obtained above.
+
+ <p class="note"><strong>Note:</strong> The API key value set in that class will
+be used just once to create a persistent entity on App Engine. If you deploy
+the application, you can use App Engine's <code>Datastore Viewer</code> to change
+it later.</p>
+
+ </li>
+ <li>In a shell window, go to the <code>samples/gcm-demo-appengine</code> directory.</li>
+ <li>Start the development App Engine server by <code>ant runserver</code>,
+using the <code>-Dsdk.dir</code> to indicate the location of the App Engine SDK
+and <code>-Dserver.host</code> to set your server's hostname or IP address:</li>
+
+<pre class="prettyprint">
+$ ant -Dsdk.dir=/opt/google/appengine-java-sdk runserver -Dserver.host=192.168.1.10
+Buildfile: gcm-demo-appengine/build.xml
+
+init:
+ [mkdir] Created dir: gcm-demo-appengine/dist
+
+copyjars:
+
+compile:
+
+datanucleusenhance:
+ [enhance] DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
+ [enhance] DataNucleus Enhancer completed with success for 0 classes. Timings : input=28 ms, enhance=0 ms, total=28 ms. Consult the log for full details
+ [enhance] DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details
+
+runserver:
+ [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.jetty.JettyLogger info
+ [java] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
+ [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
+ [java] INFO: Successfully processed gcm-demo-appengine/WebContent/WEB-INF/appengine-web.xml
+ [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
+ [java] INFO: Successfully processed gcm-demo-appengine/WebContent/WEB-INF/web.xml
+ [java] Jun 15, 2012 8:46:09 PM com.google.android.gcm.demo.server.ApiKeyInitializer contextInitialized
+ [java] SEVERE: Created fake key. Please go to App Engine admin console, change its value to your API Key (the entity type is 'Settings' and its field to be changed is 'ApiKey'), then restart the server!
+ [java] Jun 15, 2012 8:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
+ [java] INFO: The server is running at http://192.168.1.10:8080/
+ [java] Jun 15, 2012 8:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
+ [java] INFO: The admin console is running at http://192.168.1.10:8080/_ah/admin
+</pre>
+
+ <li>Open the server's main page in a browser. The URL depends on the server
+you're using and your machine's IP address, but it will be something like
+<code>http://192.168.1.10:8080/home</code>, where <code>/home</code>
+is the path of the main servlet.</li>
+
+ <p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code>
+on Linux or MacOS, or <code>ipconfig</code> on Windows.</p>
+
+</ol>
+<p> You server is now ready.</p>
diff --git a/docs/html/google/gcm/notifications.jd b/docs/html/google/gcm/notifications.jd
index 5171850..43a7368 100644
--- a/docs/html/google/gcm/notifications.jd
+++ b/docs/html/google/gcm/notifications.jd
@@ -14,14 +14,15 @@
<h2>In this document</h2>
<ol class="toc">
- <li><a href="#what">What are User Notifications?</a> </li>
- <li><a href="#examples">Examples</a>
- <ol>
- <li><a href="#create">Generate a notification key</a></li>
- <li><a href="#add">Add registration IDs</a></li>
- <li><a href="#remove">Remove registration IDs</a></li>
- <li><a href="#upstream">Send upstream messages</a></li>
- <li><a href="#response">Response formats</a></li>
+ <li><a href="#request">Request Format</a></li>
+ <li><a href="#create">Generate a Notification Key</a></li>
+ <li><a href="#add">Add Registration IDs</a></li>
+ <li><a href="#remove">Remove Registration IDs</a></li>
+ <li><a href="#upstream">Send Upstream Messages</a></li>
+ <li><a href="#response">Response Formats</a>
+ <ol class="toc">
+ <li><a href="#response-create">Create/add/remove operations</a>
+ <li><a href="#response-send">Send operations</a>
</ol>
</li>
</ol>
@@ -38,32 +39,51 @@
<p class="note"><strong>Note:</strong> To try out this feature, sign up using <a href="https://services.google.com/fb/forms/gcm/">this form</a>.</p>
-<p>The upstream messaging (device-to-cloud) feature described in this document is part of the Google Play services platform. Upstream messaging is available through the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> APIs. To use upstream messaging and the new streamlined registration process, you must <a href="{@docRoot}google/play-services/setup.html">set up</a> the Google Play services SDK.</p>
-<h2 id="what">What are User Notifications?</h2>
-
-<p>Third party servers can send a single message to multiple instance of an app running on devices owned by a single user. This feature is called <em>user notifications</em>. User notifications make it possible for every app instance that a user owns to reflect the latest messaging state. For example:</p>
+<p>With user notifications, 3rd-party app servers can send a single message to
+multiple instance of an app running on devices owned by a single user. This feature
+is called <em>user notifications</em>. User notifications make it possible for every
+app instance that a user owns to reflect the latest messaging state. For example:</p>
<ul>
- <li>If a message has been handled on one device, the GCM message on the other devices are dismissed. For example, if a user has handled a calendar notification on one device, the notification will go away on the user's other devices.</li>
- <li>If a message has not been delivered yet to a device and but it has been handled, the GCM server removes it from the unsent queue for the other devices.</li>
- <li>Likewise, a device can send messages to the {@code notification_key}, which is the token that GCM uses to fan out notifications to all devices whose registration IDs are associated with the key.</li>
+ <li>If a message has been handled on one device, the GCM message on the other
+devices are dismissed. For example, if a user has handled a calendar notification
+on one device, the notification will go away on the user's other devices.</li>
+
+ <li>If a message has not been delivered yet to a device and but it has been handled,
+the GCM server removes it from the unsent queue for the other devices.</li>
+
+ <li>Likewise, a device can send messages to the {@code notification_key}, which
+is the token that GCM uses to fan out notifications to all devices whose
+registration IDs are associated with the key.</li>
</ul>
-<p>The way this works is that during registration, the 3rd-party server requests a {@code notification_key}. The {@code notification_key} maps a particular user to all of the user's associated registration IDs (a regID represents a particular Android application running on a particular device). Then instead of sending one message to one regID at a time, the 3rd-party server can send a message to to the {@code notification_key}, which then sends the message to all of the user's regIDs.</p>
+<p>The way this works is that during registration, the 3rd-party server requests
+a {@code notification_key}. The {@code notification_key} maps a particular user
+to all of the user's associated registration IDs (a regID represents a particular
+Android application running on a particular device). Then instead of sending one
+message to one regID at a time, the 3rd-party server can send a message to to the
+{@code notification_key}, which then sends the message to all of the user's regIDs.</p>
-<p class="note"><strong>Note:</strong> A notification dismissal message is like any other upstream message, meaning that it will be delivered to the other devices that belong to the specified {@code notification_key}. You should design your app to handle cases where the app receives a dismissal message, but has not yet displayed the notification that is being dismissed. You can solve this by caching the dismissal and then reconciling it with the corresponding notification.
+<p class="note"><strong>Note:</strong> A notification dismissal message is like any
+other upstream message, meaning that it will be delivered to the other devices that
+belong to the specified {@code notification_key}. You should design your app to
+handle cases where the app receives a dismissal message, but has not yet displayed
+the notification that is being dismissed. You can solve this by caching the dismissal
+and then reconciling it with the corresponding notification.
</p>
-<p>You can use this feature with either the new <a href="ccs.html">GCM Cloud Connection Server</a> (CCS), or the older <a href="gcm.html">GCM HTTP server</a>.</p>
+<p>You can use this feature with either the <a href="ccs.html">XMPP</a> (CCS) or
+<a href="http.html">HTTP</a> connection server.</p>
-<h3 id="examples">Examples</h3>
+<p>The examples below show you how to perform generate/add/remove operations,
+and how to send upstream messages. For generate/add/remove operations, the
+message body is JSON.</p>
-<p>The examples in this section show you how to perform generate/add/remove operations, and how to send upstream messages. For generate/add/remove operations, the message body is JSON.</p>
-
-<h4 id="request">Request format</h4>
-<p>To send a message, the application server issues a POST request to <code>https://android.googleapis.com/gcm/notification</code>.</p>
+<h2 id="request">Request Format</h2>
+<p>To send a message, the application server issues a POST request to
+<code>https://android.googleapis.com/gcm/notification</code>.</p>
<p>Here is the HTTP request header you should use for all create/add/remove operations:</p>
@@ -72,12 +92,22 @@
Header: "Authorization", "key=API_KEY"
</pre>
-<h4 id="create">Generate a notification key</h4>
+<h2 id="create">Generate a Notification Key</h2>
-<p>This example shows how to create a new <code>notification_key</code> for a <code>notification_key_name</code> called <code>appUser-Chris</code>. The {@code notification_key_name} is a name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by third parties to group together registration IDs for a single user. Note that <code>notification_key_name</code> and <code>notification_key</code> are unique to a group of registration IDs. It is also important that <code>notification_key_name</code> be uniquely named per app in case you have multiple apps for the same project ID. This ensures that notifications only go to the intended target app.</p>
+<p>This example shows how to create a new <code>notification_key</code> for a
+<code>notification_key_name</code> called <code>appUser-Chris</code>.
+The {@code notification_key_name} is a name or identifier (can be a username for
+a 3rd-party app) that is unique to a given user. It is used by third parties to
+group together registration IDs for a single user. Note that <code>notification_key_name</code>
+and <code>notification_key</code> are unique to a group of registration IDs. It is also
+important that <code>notification_key_name</code> be uniquely named per app in case
+you have multiple apps for the same project ID. This ensures that notifications
+only go to the intended target app.</p>
-<p>A create operation returns a token (<code>notification_key</code>). Third parties must save this token (as well as its mapping to the <code>notification_key_name</code>) to use in subsequent operations:</p>
+<p>A create operation returns a token (<code>notification_key</code>). Third parties
+must save this token (as well as its mapping to the <code>notification_key_name</code>)
+to use in subsequent operations:</p>
<pre>request:
{
@@ -86,11 +116,14 @@
"registration_ids": ["4", "8", "15", "16", "23", "42"]
}</pre>
-<h4 id="add">Add registration IDs</h4>
+<h2 id="add">Add Registration IDs</h2>
-<p>This example shows how to add registration IDs for a given notification key. The maximum number of members allowed for a {@code notification_key} is 10.</p>
+<p>This example shows how to add registration IDs for a given notification key.
+The maximum number of members allowed for a {@code notification_key} is 10.</p>
-<p>Note that the <code>notification_key_name</code> is not strictly required for adding/removing regIDs. But including it protects you against accidentally using the incorrect <code>notification_key</code>.</p>
+<p>Note that the <code>notification_key_name</code> is not strictly required for
+adding/removing regIDs. But including it protects you against accidentally using
+the incorrect <code>notification_key</code>.</p>
<pre>request:
{
@@ -100,7 +133,7 @@
"registration_ids": ["4", "8", "15", "16", "23", "42"]
}</pre>
-<h4 id="remove">Remove registration IDs</h4>
+<h2 id="remove">Remove Registration IDs</h2>
<p>This example shows how to remove registration IDs for a given notification key:</p>
<pre>request:
@@ -111,9 +144,14 @@
"registration_ids": ["4", "8", "15", "16", "23", "42"]
}</pre>
-<h4 id="upstream">Send upstream messages</h4>
+<h2 id="upstream">Send Upstream Messages</h2>
-<p>To send an upstream (device-to-cloud) message, you must use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API. Specifying a {@code notification_key} as the target for an upstream message allows a user on one device to send a message to other devices in the notification group—for example, to dismiss a notification. Here is an example that shows targeting a {@code notification_key}:</p>
+<p>To send an upstream (device-to-cloud) message, you must use the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
+{@code GoogleCloudMessaging}</a> API. Specifying a {@code notification_key} as the target
+for an upstream message allows a user on one device to send a message to other
+devices in the notification group—for example, to dismiss a notification.
+Here is an example that shows targeting a {@code notification_key}:</p>
<pre>GoogleCloudMessaging gcm = GoogleCloudMessaging.get(context);
String to = NOTIFICATION_KEY;
@@ -125,17 +163,21 @@
gcm.send(to, id, data);
</pre>
-<p>This call generates the necessary XMPP stanza for sending the message. The Bundle data consists of a key-value pair.</p>
+<p>This call generates the necessary XMPP stanza for sending the message. The
+Bundle data consists of a key-value pair.</p>
-<p>For a complete example, see <a href="gs.html#gs_example">Getting Started</a>.
+<p>For a complete example, see <a href="client.html">Implementing GCM Client</a>.
-<h4 id="response">Response formats</h4>
+<h2 id="response">Response Formats</h2>
-<p>This section shows examples of the responses that can be returned for notification key operations.</p>
+<p>This section shows examples of the responses that can be returned for
+notification key operations.</p>
-<h5>Response for create/add/remove operations</h5>
+<h3 id="response-create">Create/add/remove operations</h3>
-<p>When you make a request to create a {@code notification_key} or to add/remove its the wayregIDs, a successful response always returns the <code>notification_key</code>. This is the {@code notification_key} you will use for sending messages:</p>
+<p>When you make a request to create a {@code notification_key} or to add/remove its
+regIDs, a successful response always returns the <code>notification_key</code>.
+his is the {@code notification_key} you will use for sending messages:</p>
<pre>HTTP status: 200
{
@@ -143,18 +185,23 @@
}</pre>
-<h5>Response for send operations</h5>
+<h3 id="response-send">Send operations</h3>
-<p>For a send operation that has a {@code notification_key} as its target, the possible responses are success, partial success, and failure.</p>
+<p>For a send operation that has a {@code notification_key} as its target, the
+possible responses are success, partial success, and failure.</p>
-<p>Here is an example of "success"—the {@code notification_key} has 2 regIDs associated with it, and the message was successfully sent to both of them:</p>
+<p>Here is an example of "success"—the {@code notification_key} has 2 regIDs
+associated with it, and the message was successfully sent to both of them:</p>
<pre>{
"success": 2,
"failure": 0
}</pre>
-<p>Here is an example of "partial success"—the {@code notification_key} has 3 regIDs associated with it. The message was successfully send to 1 of the regIDs, but not to the other 2. The response message lists the regIDs that failed to receive the message:</p>
+<p>Here is an example of "partial success"—the {@code notification_key} has
+3 regIDs associated with it. The message was successfully send to 1 of the regIDs,
+but not to the other 2. The response message lists the regIDs that failed to
+receive the message:</p>
<pre>{
"success":1,
@@ -165,7 +212,9 @@
]
}</pre>
-<p>In the case of failure, the response has HTTP code 503 and no JSON. When a message fails to be delivered to one or more of the regIDs associated with a {@code notification_key}, the 3rd-party server should retry.</p>
+<p>In the case of failure, the response has HTTP code 503 and no JSON. When a message
+fails to be delivered to one or more of the regIDs associated with a {@code notification_key},
+the 3rd-party server should retry.</p>
diff --git a/docs/html/google/gcm/server.jd b/docs/html/google/gcm/server.jd
index 92a1531..b5e6b48 100644
--- a/docs/html/google/gcm/server.jd
+++ b/docs/html/google/gcm/server.jd
@@ -1,36 +1,34 @@
-page.title=GCM Server
+page.title=Implementing GCM Server
@jd:body
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-
-<ul>
-<li>Understand how to set up the server side of a GCM app.</li>
-<li>Become familiar with the <a href="{@docRoot}reference/com/google/android/gcm/server/package-summary.html">GCM server helper library</a>.</li>
-</ul>
-
-
<h2>In this document</h2>
-<ol>
- <li><a href="#requirements">Requirements</a> </li>
- <li><a href="#gcm-setup">Setting Up GCM</a></li>
- <li><a href="#server-setup">Setting Up an HTTP Server</a>
- <ol>
- <li><a href="#webserver-setup">Using a standard web server</a></li>
- <li><a href="#appengine-setup">Using App Engine for Java</a></li>
+<ol class="toc">
+ <li><a href="#choose">Choosing a GCM Connection Server</a></li>
+ <li><a href="#role">Role of the 3rd-party Application Server</a></li>
+ <li><a href="#send-msg">Sending Messages</a>
+ <ol class="toc">
+
+ <li><a href="#target">Target</a></li>
+ <li><a href="#payload">Payload</a></li>
+ <li><a href="#params">Message parameters</a>
</ol>
+ </li>
+ <li><a href="#receive">Receiving Messages</a> </li>
</li>
+
</ol>
<h2>See Also</h2>
<ol class="toc">
<li><a href="gs.html">Getting Started</a></li>
-<li><a href="client.html">GCM Client</a></li>
-<li><a href="ccs.html">Cloud Connection Server</a></li>
+<li><a href="client.html">Implementing GCM Client</a></li>
+<li><a href="ccs.html">Cloud Connection Server (XMPP)</a></li>
+<li><a href="http.html">HTTP Connection Server</a></li>
</ol>
@@ -39,122 +37,342 @@
</div>
-
-
-<p>This document gives examples of GCM server-side code for HTTP. For an example of an XMPP server (<a href="ccs.html">Cloud Connection Server</a>), see <a href="gs.html#server">Getting Started</a>. Note that a full GCM implementation requires a client-side implementation, in addition to the server. For a complete working example that includes client and server-side code, see <a href="gs.html">Getting Started</a>.</a>
-
-<h2 id="requirements">Requirements</h2>
-<p>For the web server:</p>
+<p>The server side of GCM consists of 2 components:</p>
<ul>
- <li> <a href="http://ant.apache.org/">Ant 1.8</a> (it might work with earlier versions, but it's not guaranteed).</li>
- <li>One of the following:
- <ul>
- <li>A running web server compatible with Servlets API version 2.5, such as <a href="http://tomcat.apache.org/">Tomcat 6</a> or <a href="http://jetty.codehaus.org/">Jetty</a>, or</li>
- <li><a href="http://code.google.com/appengine/">Java App Engine SDK</a> version 1.6 or later.</li>
+<li>Google-provided <strong>GCM Connection Servers</strong>
+take messages from a 3rd-party application server and send them to a GCM-enabled
+Android application (the "client app") running on a device. For example,
+Google provides connection servers for <a href="{@docRoot}google/gcm/http.html">
+HTTP</a> and <a href="{@docRoot}google/gcm/ccs.html">CCS</a> (XMPP).</li>
+<li>A <strong>3rd-party application server</strong> that you must implement. This application
+server sends data to a GCM-enabled Android application via the chosen GCM connection server.</li>
+</ul>
+</p>
+
+<p>Here are the basic steps you follow to implement your 3rd-party app server:</p>
+
+<ul>
+ <li>Decide which GCM connection server(s) you want to use. Note that if you want to use
+ upstream messaging from your client applications, you must use CCS. For a more detailed
+ discussion of this, see <a href="#choose">
+ Choosing a GCM Connection Server</a>.</li>
+ <li>Decide how you want to implement your app server. For example:
+ <ul>
+ <li>If you decide to use the HTTP connection server, you can use the
+GCM server helper library and demo app to help in implementing your app server.</li>
+ <li>If you decide to use the XMPP connection server, you can use
+the provided Python or Java <a href="http://www.igniterealtime.org/projects/smack/">
+Smack</a> demo apps as a starting point.</li>
+ <li>Note that Google AppEngine does not support connections to CCS.</li>
+ </ul>
+ </li>
</ul>
</li>
- <li>A Google account registered to use GCM.</li>
- <li>The API key for that account.</li>
</ul>
-<p>For the Android application:</p>
+
+<p>A full GCM implementation requires both a client implementation and a server
+implementation. For more
+information about implementing the client side, see <a href="client.html">
+Implementing GCM Client</a>.</p>
+
+<h2 id="choose">Choosing a GCM Connection Server</h2>
+
+<p>Currently GCM provides two connection servers: <a href="{@docRoot}google/gcm/http.html">
+HTTP</a> and <a href="{@docRoot}google/gcm/ccs.html">CCS</a> (XMPP). You can use them
+separately or in tandem. CCS messaging differs from GCM HTTP messaging in the following ways:</p>
<ul>
- <li>Emulator (or device) running Android 2.2 with Google APIs.</li>
- <li>The Google API project number of the account registered to use GCM.</li>
+ <li>Upstream/Downstream messages
+ <ul>
+ <li>GCM HTTP: Downstream only: cloud-to-device. </li>
+ <li>CCS: Upstream and downstream (device-to-cloud, cloud-to-device). </li>
+ </ul>
+ </li>
+ <li>Asynchronous messaging
+ <ul>
+ <li>GCM HTTP: 3rd-party app servers send messages as HTTP POST requests and
+wait for a response. This mechanism is synchronous and causes the sender to block
+before sending another message.</li>
+ <li>CCS: 3rd-party app servers connect to Google infrastructure using a
+persistent XMPP connection and send/receive messages to/from all their devices
+at full line speed. CCS sends acknowledgment or failure notifications (in the
+form of special ACK and NACK JSON-encoded XMPP messages) asynchronously.</li>
+ </ul>
+ </li>
+
+ <li>JSON
+ <ul>
+ <li>GCM HTTP: JSON messages sent as HTTP POST.</li>
+ <li>CCS: JSON messages encapsulated in XMPP messages.</li>
+ </ul>
+ </li>
</ul>
-<h2 id="gcm-setup">Setting Up GCM</h2>
-<p>Before proceeding with the server and client setup, it's necessary to register a Google account with the Google API Console, enable Google Cloud Messaging in GCM, and obtain an API key from the <a href="https://code.google.com/apis/console">Google API Console</a>.</p>
-<p>For instructions on how to set up GCM, see <a href="gs.html">Getting Started</a>.</p>
+<h2 id="role">Role of the 3rd-party Application Server</h2>
-<h2 id="server-setup">Setting Up an HTTP Server</h2>
-<p>This section describes the different options for setting up an HTTP server.</p>
-<h3 id="webserver-setup">Using a standard web server</h3>
-<p>To set up the server using a standard, servlet-compliant web server:</p>
+<p>Before you can write client Android applications that use the GCM feature, you must
+have an application server that meets the following criteria:</p>
+
+<ul>
+ <li>Able to communicate with your client.</li>
+ <li>Able to fire off properly formatted requests to the GCM server.</li>
+ <li>Able to handle requests and resend them as needed, using
+<a href="http://en.wikipedia.org/wiki/Exponential_backoff">exponential back-off.</a></li>
+ <li>Able to store the API key and client registration IDs. The
+API key is included in the header of POST requests that send
+messages.</li>
+ <li>Able to store the API key and client registration IDs.</li>
+ <li>Able to generate message IDs to uniquely identify each message it sends.</li>
+</ul>
+
+<h2 id="send-msg">Sending Messages</h2>
+
+<p>Here is the general sequence of events that occurs when a 3rd-party application
+server sends a message:</p>
<ol>
- <li>From the <a href="http://code.google.com/p/gcm">open source site</a>, download the following directories: <code>gcm-server</code>, <code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
-
-
- <li>In a text editor, edit the <code>samples/gcm-demo-server/WebContent/WEB-INF/classes/api.key</code> and replace the existing text with the API key obtained above.</li>
- <li>In a shell window, go to the <code>samples/gcm-demo-server</code> directory.</li>
- <li>Generate the server's WAR file by running <code>ant war</code>:</li>
-
- <pre class="prettyprint">$ ant war
-
-Buildfile:build.xml
-
-init:
- [mkdir] Created dir: build/classes
- [mkdir] Created dir: dist
-
-compile:
- [javac] Compiling 6 source files to build/classes
-
-war:
- [war] Building war: <strong>dist/gcm-demo.war</strong>
-
-BUILD SUCCESSFUL
-Total time: 0 seconds
-</pre>
-
- <li>Deploy the <code>dist/gcm-demo.war</code> to your running server. For instance, if you're using Jetty, copy <code>gcm-demo.war</code> to the <code>webapps</code> directory of the Jetty installation.</li>
- <li>Open the server's main page in a browser. The URL depends on the server you're using and your machine's IP address, but it will be something like <code>http://192.168.1.10:8080/gcm-demo/home</code>, where <code>gcm-demo</code> is the application context and <code>/home</code> is the path of the main servlet.
-
- </li>
+ <li>The application server sends a message to GCM servers.</li>
+ <li>Google enqueues and stores the message in case the device is offline.</li>
+ <li>When the device is online, Google sends the message to the device.</li>
+ <li>On the device, the system broadcasts the message to the specified Android
+application via Intent broadcast with proper permissions, so that only the targeted
+ndroid application gets the message. This wakes the Android application up.
+The Android application does not need to be running beforehand to receive the message.</li>
+ <li>The Android application processes the message. </li>
</ol>
-<p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code> on Linux or MacOS, or <code>ipconfig</code> on Windows. </p>
-<p> You server is now ready.</p>
+<p>The following sections describe the basic requirements for
+sending messages.</p>
-<h3 id="appengine-setup">Using App Engine for Java</h3>
+<h3 id="target">Target</h3>
+<p>Required. When your app server sends a message in GCM, it must specify a target.</p>
+<p>For HTTP you must specify the target as one of:</p>
+<ul>
+<li><code>registration_ids</code>: For sending to 1 more more devices (up to 1000).
+When you send a message to multiple registration IDs, that is called a multicast message.</li>
+<li><code>notification_key</code>: For sending to multiple devices owned by a single user.</li>
+</ul>
+<p>For CCS (XMPP):</p>
+<ul>
+<li>You must specify the target as the "to" field, where the "to"
+field may contain a single registration ID or a notification key.
+CCS does not support multicast messaging.</li>
+</ul>
+<h3 id="payload">Payload</h3>
+<p>Optional. If you are including a payload in the message, you use the <code>data</code>
+parameter to include the payload. This applies for both HTTP and CCS.</p>
-<p>To set up the server using a standard App Engine for Java:</p>
+<h3 id="params">Message parameters</h3>
+
+<p>The following table lists the parameters that a 3rd-party app server might
+include in the JSON messages it sends to a connection server. See the "Where Supported"
+column for information about which connection servers support that particular
+parameter.</p>
+
+<p class="table-caption" id="table1">
+ <strong>Table 1.</strong> Message parameters.</p>
+
+<table>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+<th>Where Supported</th>
+</tr>
+ <td><code>to</code></td>
+<td>In CCS, used in place of <code>registration_ids</code> to specify the
+recipient of a message. Its value must be a registration ID.
+The value is a string. Required.</td>
+<td>CCS</td>
+</tr>
+<tr>
+<td><code>message_id</code></td>
+<td>In CCS, uniquely identifies a message in an XMPP connection. The value is a
+string that uniquely identifies the associated message. The value is a string. Required.</td>
+<td>CCS</td>
+</tr>
+<tr>
+<td><code>message_type</code></td>
+<td>In CCS, indicates a special status message, typically sent by the system.
+However, your app server also uses this parameter to send an 'ack' or 'nack'
+message back to the CCS connection server. For more discussion of this topic, see
+<a href="ccs.html">Cloud Connection Server</a>. The value is a string. Optional.</td>
+<td>CCS</td>
+<tr>
+ <td><code>registration_ids</code></td>
+ <td>A string array with the list of devices (registration IDs) receiving the
+message. It must contain at least 1 and at most 1000 registration IDs. To send a
+multicast message, you must use JSON. For sending a single message to a single
+device, you could use a JSON object with just 1 registration id, or plain text
+(see below). A request must include a recipient—this can be either a
+registration ID, an array of registration IDs, or a {@code notification_key}.
+Required.</td>
+<td>HTTP</td>
+</tr>
+ <tr>
+ <td><code>notification_key</code></td>
+ <td>A string that maps a single user to multiple registration IDs associated
+with that user. This allows a 3rd-party server to send a single message to
+multiple app instances (typically on multiple devices) owned by a single user.
+A 3rd-party server can use {@code notification_key} as the target for a message
+instead of an individual registration ID (or array of registration IDs). The maximum
+number of members allowed for a {@code notification_key} is 10. For more discussion
+of this topic, see <a href="notifications.html">User Notifications</a>. Optional.
+</td>
+<td style="width:100px">HTTP. This feature is supported in CCS, but you use it by
+specifying a notification key in the "to" field.</td>
+</tr>
+ <tr>
+ <td><code>collapse_key</code></td>
+ <td>An arbitrary string (such as "Updates Available") that is used
+to collapse a group of like messages
+when the device is offline, so that only the last message gets sent to the
+client. This is intended to avoid sending too many messages to the phone when it
+comes back online. Note that since there is no guarantee of the order in which
+messages get sent, the "last" message may not actually be the last
+message sent by the application server. Collapse keys are also called
+<a href="#s2s">send-to-sync messages</a>.
+<br>
+<strong>Note:</strong> GCM allows a maximum of 4 different collapse keys to be
+used by the GCM server
+at any given time. In other words, the GCM server can simultaneously store 4
+different send-to-sync messages per device, each with a different collapse key.
+If you exceed
+this number GCM will only keep 4 collapse keys, with no guarantees about which
+ones they will be. See <a href="adv.html#collapsible">Advanced Topics</a> for more
+discussion of this topic. Optional.</td>
+<td>CCS, HTTP</td>
+</tr>
+ <tr>
+ <td><code>data</code></td>
+ <td>A JSON object whose fields represents the key-value pairs of the message's
+payload data. If present, the payload data it will be
+included in the Intent as application data, with the key being the extra's name.
+For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra
+named <code>score</code> whose value is the string <code>3x1</code>.
+There is no limit on the number of key/value pairs, though there is a limit on
+the total size of the message (4kb). The values could be any JSON object, but we
+recommend using strings, since the values will be converted to strings in the GCM
+server anyway. If you want to include objects or other non-string data types
+(such as integers or booleans), you have to do the conversion to string yourself.
+Also note that the key cannot be a reserved word (<code>from</code> or any word
+starting with <code>google.</code>). To complicate things slightly, there are
+some reserved words (such as <code>collapse_key</code>) that are technically
+allowed in payload data. However, if the request also contains the word, the
+value in the request will overwrite the value in the payload data. Hence using
+words that are defined as field names in this table is not recommended, even in
+cases where they are technically allowed. Optional.</td>
+<td>CCS, HTTP</td>
+</tr>
+ <tr>
+ <td><code>delay_while_idle</code></td>
+ <td>If included, indicates that the message should not be sent immediately
+if the device is idle. The server will wait for the device to become active, and
+then only the last message for each <code>collapse_key</code> value will be
+sent. The default value is <code>false</code>, and must be a JSON boolean. Optional.</td>
+<td>CCS, HTTP</td>
+</tr>
+ <tr>
+ <td><code>time_to_live</code></td>
+ <td>How long (in seconds) the message should be kept on GCM storage if the
+device is offline. Optional (default time-to-live is 4 weeks, and must be set as
+a JSON number).</td>
+<td>CCS, HTTP</td>
+</tr>
+<tr>
+ <td><code>restricted_package_name</code></td>
+ <td>A string containing the package name of your application. When set, messages
+will only be sent to registration IDs that match the package name. Optional.
+ </td>
+<td>HTTP</td>
+</tr>
+<tr>
+ <td><code>dry_run</code></td>
+ <td>If included, allows developers to test their request without actually
+sending a message. Optional. The default value is <code>false</code>, and must
+be a JSON boolean.
+ </td>
+<td>HTTP</td>
+</tr>
+</table>
+
+<p>If you want to test your request (either JSON or plain text) without delivering
+the message to the devices, you can set an optional HTTP or JSON parameter called
+<code>dry_run</code> with the value <code>true</code>. The result will be almost
+identical to running the request without this parameter, except that the message
+will not be delivered to the devices. Consequently, the response will contain fake
+IDs for the message and multicast fields.</p>
+
+<h3 id="plain-text">Plain text (HTTP only)</h3>
+
+<p>If you are using plain text instead of JSON, the message fields must be set as
+HTTP parameters sent in the body, and their syntax is slightly different, as
+described below:
+<table>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><code>registration_id</code></td>
+ <td>Must contain the registration ID of the single device receiving the message.
+Required.</td>
+ </tr>
+ <tr>
+ <td><code>collapse_key</code></td>
+ <td>Same as JSON (see previous table). Optional.</td>
+ </tr>
+ <tr>
+ <td><code>data.<key></code></td>
+
+ <td>Payload data, expressed as parameters prefixed with <code>data.</code> and
+suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would
+result in an intent extra named <code>score</code> whose value is the string
+<code>3x1</code>. There is no limit on the number of key/value parameters, though
+there is a limit on the total size of the message. Also note that the key cannot
+be a reserved word (<code>from</code> or any word starting with
+<code>google.</code>). To complicate things slightly, there are some reserved words
+(such as <code>collapse_key</code>) that are technically allowed in payload data.
+However, if the request also contains the word, the value in the request will
+overwrite the value in the payload data. Hence using words that are defined as
+field names in this table is not recommended, even in cases where they are
+technically allowed. Optional.</td>
+
+ </tr>
+ <tr>
+ <td><code>delay_while_idle</code></td>
+ <td>Should be represented as <code>1</code> or <code>true</code> for
+<code>true</code>, anything else for <code>false</code>. Optional. The default
+value is <code>false</code>.</td>
+ </tr>
+ <tr>
+ <td><code>time_to_live</code></td>
+ <td>Same as JSON (see previous table). Optional.</td>
+ </tr>
+<tr>
+ <td><code>restricted_package_name</code></td>
+ <td>Same as JSON (see previous table). Optional.
+ </td>
+</tr>
+<tr>
+ <td><code>dry_run</code></td>
+ <td>Same as JSON (see previous table). Optional.
+ </td>
+</tr>
+</table>
+
+<h2 id="receive">Receiving Messages</h2>
+
+<p>This is the sequence of events that occurs when an Android application
+installed on a mobile device receives a message:</p>
+
<ol>
- <li>Get the files from the <a href="http://code.google.com/p/gcm">open source site</a>, as described above.</p>
- </li>
- <li>In a text editor, edit <code>samples/gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java</code> and replace the existing text with the API key obtained above.
-
- <p class="note"><strong>Note:</strong> The API key value set in that class will be used just once to create a persistent entity on App Engine. If you deploy the application, you can use App Engine's <code>Datastore Viewer</code> to change it later.</p>
-
- </li>
- <li>In a shell window, go to the <code>samples/gcm-demo-appengine</code> directory.</li>
- <li>Start the development App Engine server by <code>ant runserver</code>, using the <code>-Dsdk.dir</code> to indicate the location of the App Engine SDK and <code>-Dserver.host</code> to set your server's hostname or IP address:</li>
-
-<pre class="prettyprint">
-$ ant -Dsdk.dir=/opt/google/appengine-java-sdk runserver -Dserver.host=192.168.1.10
-Buildfile: gcm-demo-appengine/build.xml
-
-init:
- [mkdir] Created dir: gcm-demo-appengine/dist
-
-copyjars:
-
-compile:
-
-datanucleusenhance:
- [enhance] DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
- [enhance] DataNucleus Enhancer completed with success for 0 classes. Timings : input=28 ms, enhance=0 ms, total=28 ms. Consult the log for full details
- [enhance] DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details
-
-runserver:
- [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.jetty.JettyLogger info
- [java] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
- [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
- [java] INFO: Successfully processed gcm-demo-appengine/WebContent/WEB-INF/appengine-web.xml
- [java] Jun 15, 2012 8:46:06 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
- [java] INFO: Successfully processed gcm-demo-appengine/WebContent/WEB-INF/web.xml
- [java] Jun 15, 2012 8:46:09 PM com.google.android.gcm.demo.server.ApiKeyInitializer contextInitialized
- [java] SEVERE: Created fake key. Please go to App Engine admin console, change its value to your API Key (the entity type is 'Settings' and its field to be changed is 'ApiKey'), then restart the server!
- [java] Jun 15, 2012 8:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
- [java] INFO: The server is running at http://192.168.1.10:8080/
- [java] Jun 15, 2012 8:46:09 PM com.google.appengine.tools.development.DevAppServerImpl start
- [java] INFO: The admin console is running at http://192.168.1.10:8080/_ah/admin
-</pre>
-
- <li>Open the server's main page in a browser. The URL depends on the server you're using and your machine's IP address, but it will be something like <code>http://192.168.1.10:8080/home</code>, where <code>/home</code> is the path of the main servlet.</li>
-
- <p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code> on Linux or MacOS, or <code>ipconfig</code> on Windows.</p>
-
+ <li>The system receives the incoming message and extracts the raw key/value
+pairs from the message payload, if any.</li>
+ <li>The system passes the key/value pairs to the targeted Android application
+in a <code>com.google.android.c2dm.intent.RECEIVE</code> Intent as a set of
+extras.</li>
+ <li>The Android application extracts the raw data
+from the <code>com.google.android.c2dm.intent.RECEIVE</code><code> </code>Intent
+by key and processes the data.</li>
</ol>
-<p> You server is now ready.</p>
-
+<p>See the documentation for each connection server for more detail on how it
+handles responses.</p>
diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs
index 999c44e..7f76c12 100644
--- a/docs/html/google/google_toc.cs
+++ b/docs/html/google/google_toc.cs
@@ -123,24 +123,27 @@
<span class="en">Google Cloud Messaging</span></a>
</div>
<ul>
+ <li><a href="<?cs var:toroot?>google/gcm/gcm.html">
+ <span class="en">Overview</span></a>
+ </li>
<li><a href="<?cs var:toroot?>google/gcm/gs.html">
<span class="en">Getting Started</span></a>
</li>
- <li><a href="<?cs var:toroot?>google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
+ <li><a href="<?cs var:toroot?>google/gcm/client.html">
+ <span class="en">Implementing GCM Client</span></a>
</li>
- <li><a href="<?cs var:toroot?>google/gcm/ccs.html">
- <span class="en">Cloud Connection Server</span></a>
+ <li class="nav-section"><div class="nav-section-header"><a href="<?cs var:toroot?>google/gcm/server.html">
+ <span class="en">Implementing GCM Server</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot?>google/gcm/ccs.html">
+ <span class="en">CCS (XMPP)</span></a></li>
+ <li><a href="<?cs var:toroot?>google/gcm/http.html">
+ <span class="en">HTTP</span></a></li>
+ </ul>
</li>
<li><a href="<?cs var:toroot?>google/gcm/notifications.html">
<span class="en">User Notifications</span></a>
</li>
- <li><a href="<?cs var:toroot?>google/gcm/client.html">
- <span class="en">GCM Client</span></a>
- </li>
- <li><a href="<?cs var:toroot?>google/gcm/server.html">
- <span class="en">GCM Server</span></a>
- </li>
<li><a href="<?cs var:toroot?>google/gcm/adv.html">
<span class="en">Advanced Topics</span></a>
</li>
diff --git a/docs/html/images/gcm/CCS-ack.png b/docs/html/images/gcm/CCS-ack.png
new file mode 100644
index 0000000..bce2ab2
--- /dev/null
+++ b/docs/html/images/gcm/CCS-ack.png
Binary files differ
diff --git a/docs/html/images/gcm/GCM-arch.png b/docs/html/images/gcm/GCM-arch.png
new file mode 100644
index 0000000..e8ffb15
--- /dev/null
+++ b/docs/html/images/gcm/GCM-arch.png
Binary files differ
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 55664fd..47cf875 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -559,6 +559,7 @@
* @param dstHeight The new bitmap's desired height.
* @param filter true if the source should be filtered.
* @return The new scaled bitmap or the source bitmap if no scaling is required.
+ * @throws IllegalArgumentException if width is <= 0, or height is <= 0
*/
public static Bitmap createScaledBitmap(Bitmap src, int dstWidth, int dstHeight,
boolean filter) {
@@ -611,6 +612,9 @@
* @param width The number of pixels in each row
* @param height The number of rows
* @return A copy of a subset of the source bitmap or the source bitmap itself.
+ * @throws IllegalArgumentException if the x, y, width, height values are
+ * outside of the dimensions of the source bitmap, or width is <= 0,
+ * or height is <= 0
*/
public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height) {
return createBitmap(source, x, y, width, height, null, false);
@@ -637,7 +641,8 @@
* translation.
* @return A bitmap that represents the specified subset of source
* @throws IllegalArgumentException if the x, y, width, height values are
- * outside of the dimensions of the source bitmap.
+ * outside of the dimensions of the source bitmap, or width is <= 0,
+ * or height is <= 0
*/
public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height,
Matrix m, boolean filter) {
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index 331cf6e..69d9916 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -431,6 +431,8 @@
mRasterizer = paint.mRasterizer;
if (paint.mShader != null) {
mShader = paint.mShader.copy();
+ } else {
+ mShader = null;
}
mTypeface = paint.mTypeface;
mXfermode = paint.mXfermode;
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index 1b52b65..42e11d0 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -249,11 +249,16 @@
}
// default empty constructor for bounds, to be overridden in child constructor body
- DrawBoundedOp(SkPaint* paint)
- : DrawOp(paint) {}
+ DrawBoundedOp(SkPaint* paint): DrawOp(paint) { }
bool getLocalBounds(Rect& localBounds) {
localBounds.set(mLocalBounds);
+ if (state.mDrawModifiers.mHasShadow) {
+ Rect shadow(mLocalBounds);
+ shadow.translate(state.mDrawModifiers.mShadowDx, state.mDrawModifiers.mShadowDy);
+ shadow.outset(state.mDrawModifiers.mShadowRadius);
+ localBounds.unionWith(shadow);
+ }
return true;
}
@@ -1442,8 +1447,10 @@
}
virtual status_t applyDraw(OpenGLRenderer& renderer, Rect& dirty) {
+ Rect bounds;
+ getLocalBounds(bounds);
return renderer.drawText(mText, mBytesCount, mCount, mX, mY,
- mPositions, getPaint(renderer), mTotalAdvance, mLocalBounds);
+ mPositions, getPaint(renderer), mTotalAdvance, bounds);
}
virtual status_t multiDraw(OpenGLRenderer& renderer, Rect& dirty,
@@ -1454,6 +1461,8 @@
renderer.restoreDisplayState(ops[i]->state, true); // restore all but the clip
DrawTextOp& op = *((DrawTextOp*)ops[i]);
+ // quickReject() will not occure in drawText() so we can use mLocalBounds
+ // directly, we do not need to account for shadow by calling getLocalBounds()
status |= renderer.drawText(op.mText, op.mBytesCount, op.mCount, op.mX, op.mY,
op.mPositions, op.getPaint(renderer), op.mTotalAdvance, op.mLocalBounds,
drawOpMode);
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index ba4c2a0..90dcf93 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -464,10 +464,12 @@
void DisplayListRenderer::resetShadow() {
addStateOp(new (alloc()) ResetShadowOp());
+ OpenGLRenderer::resetShadow();
}
void DisplayListRenderer::setupShadow(float radius, float dx, float dy, int color) {
addStateOp(new (alloc()) SetupShadowOp(radius, dx, dy, color));
+ OpenGLRenderer::setupShadow(radius, dx, dy, color);
}
void DisplayListRenderer::resetPaintFilter() {
@@ -503,11 +505,17 @@
void DisplayListRenderer::addDrawOp(DrawOp* op) {
Rect localBounds;
+ if (mDrawModifiers.mHasShadow) {
+ op->state.mDrawModifiers = mDrawModifiers;
+ }
if (op->getLocalBounds(localBounds)) {
bool rejected = quickRejectNoScissor(localBounds.left, localBounds.top,
localBounds.right, localBounds.bottom);
op->setQuickRejected(rejected);
}
+ if (mDrawModifiers.mHasShadow) {
+ op->state.mDrawModifiers.reset();
+ }
mHasDrawOps = true;
addOpInternal(op);
}
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 1700473..cb6bb2e 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -234,6 +234,7 @@
Vector<CacheTexture*>* cacheTextures = NULL;
switch (format) {
case SkMask::kA8_Format:
+ case SkMask::kBW_Format:
cacheTextures = &mACacheTextures;
break;
case SkMask::kARGB32_Format:
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 1c3bfdc..54f6d76 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -52,6 +52,14 @@
namespace uirenderer {
struct DrawModifiers {
+ DrawModifiers() {
+ reset();
+ }
+
+ void reset() {
+ memset(this, 0, sizeof(DrawModifiers));
+ }
+
SkiaShader* mShader;
SkiaColorFilter* mColorFilter;
float mOverrideLayerAlpha;
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index 55503ce..cbed3e4 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -233,9 +233,11 @@
bool CacheTexture::fitBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint32_t* retOriginY) {
switch (glyph.fMaskFormat) {
case SkMask::kA8_Format:
+ case SkMask::kBW_Format:
if (mFormat != GL_ALPHA) {
#if DEBUG_FONT_RENDERER
- ALOGD("fitBitmap: kA8_Format glyph cannot fit into texture format %x", mFormat);
+ ALOGD("fitBitmap: texture format %x is inappropriate for monochromatic glyphs",
+ mFormat);
#endif
return false;
}
@@ -243,7 +245,7 @@
case SkMask::kARGB32_Format:
if (mFormat != GL_RGBA) {
#if DEBUG_FONT_RENDERER
- ALOGD("fitBitmap: kARGB32_Format glyph cannot fit into texture format %x", mFormat);
+ ALOGD("fitBitmap: texture format %x is inappropriate for colour glyphs", mFormat);
#endif
return false;
}
diff --git a/location/lib/java/com/android/location/provider/FusedLocationHardware.java b/location/lib/java/com/android/location/provider/FusedLocationHardware.java
index abea9fb..bc5a8a1 100644
--- a/location/lib/java/com/android/location/provider/FusedLocationHardware.java
+++ b/location/lib/java/com/android/location/provider/FusedLocationHardware.java
@@ -9,7 +9,7 @@
*
* 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 CONDITIOS OF ANY KIND, either express or implied.
+ * 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.
*/
@@ -21,20 +21,26 @@
import android.location.Location;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
import android.os.RemoteException;
import android.util.Log;
-import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
/**
* Class that exposes IFusedLocationHardware functionality to unbundled services.
- * Namely this is used by GmsCore Fused Location Provider.
*/
public final class FusedLocationHardware {
private final String TAG = "FusedLocationHardware";
private IFusedLocationHardware mLocationHardware;
- ArrayList<FusedLocationHardwareSink> mSinkList = new ArrayList<FusedLocationHardwareSink>();
+
+ // the list uses a copy-on-write pattern to update its contents
+ HashMap<FusedLocationHardwareSink, DispatcherHandler> mSinkList =
+ new HashMap<FusedLocationHardwareSink, DispatcherHandler>();
private IFusedLocationHardwareSink mInternalSink = new IFusedLocationHardwareSink.Stub() {
@Override
@@ -48,6 +54,9 @@
}
};
+ /**
+ * @hide
+ */
public FusedLocationHardware(IFusedLocationHardware locationHardware) {
mLocationHardware = locationHardware;
}
@@ -55,19 +64,24 @@
/*
* Methods to provide a Facade for IFusedLocationHardware
*/
- public void registerSink(FusedLocationHardwareSink sink) {
- if(sink == null) {
- return;
+ public void registerSink(FusedLocationHardwareSink sink, Looper looper) {
+ if(sink == null || looper == null) {
+ throw new IllegalArgumentException("Parameter sink and looper cannot be null.");
}
- boolean registerSink = false;
+ boolean registerSink;
synchronized (mSinkList) {
// register only on first insertion
registerSink = mSinkList.size() == 0;
// guarantee uniqueness
- if(!mSinkList.contains(sink)) {
- mSinkList.add(sink);
+ if(mSinkList.containsKey(sink)) {
+ return;
}
+
+ HashMap<FusedLocationHardwareSink, DispatcherHandler> newSinkList =
+ new HashMap<FusedLocationHardwareSink, DispatcherHandler>(mSinkList);
+ newSinkList.put(sink, new DispatcherHandler(looper));
+ mSinkList = newSinkList;
}
if(registerSink) {
@@ -81,14 +95,23 @@
public void unregisterSink(FusedLocationHardwareSink sink) {
if(sink == null) {
- return;
+ throw new IllegalArgumentException("Parameter sink cannot be null.");
}
- boolean unregisterSink = false;
+ boolean unregisterSink;
synchronized(mSinkList) {
- mSinkList.remove(sink);
- // unregister after the last sink
- unregisterSink = mSinkList.size() == 0;
+ if(!mSinkList.containsKey(sink)) {
+ //done
+ return;
+ }
+
+ HashMap<FusedLocationHardwareSink, DispatcherHandler> newSinkList =
+ new HashMap<FusedLocationHardwareSink, DispatcherHandler>(mSinkList);
+ newSinkList.remove(sink);
+ //unregister after the last sink
+ unregisterSink = newSinkList.size() == 0;
+
+ mSinkList = newSinkList;
}
if(unregisterSink) {
@@ -176,27 +199,82 @@
}
/*
- * Helper methods
+ * Helper methods and classes
*/
- private void dispatchLocations(Location[] locations) {
- ArrayList<FusedLocationHardwareSink> sinks = null;
- synchronized (mSinkList) {
- sinks = new ArrayList<FusedLocationHardwareSink>(mSinkList);
+ private class DispatcherHandler extends Handler {
+ public static final int DISPATCH_LOCATION = 1;
+ public static final int DISPATCH_DIAGNOSTIC_DATA = 2;
+
+ public DispatcherHandler(Looper looper) {
+ super(looper, null /*callback*/ , true /*async*/);
}
- for(FusedLocationHardwareSink sink : sinks) {
- sink.onLocationAvailable(locations);
+ @Override
+ public void handleMessage(Message message) {
+ MessageCommand command = (MessageCommand) message.obj;
+ switch(message.what) {
+ case DISPATCH_LOCATION:
+ command.dispatchLocation();
+ break;
+ case DISPATCH_DIAGNOSTIC_DATA:
+ command.dispatchDiagnosticData();
+ default:
+ Log.e(TAG, "Invalid dispatch message");
+ break;
+ }
+ }
+ }
+
+ private class MessageCommand {
+ private final FusedLocationHardwareSink mSink;
+ private final Location[] mLocations;
+ private final String mData;
+
+ public MessageCommand(
+ FusedLocationHardwareSink sink,
+ Location[] locations,
+ String data) {
+ mSink = sink;
+ mLocations = locations;
+ mData = data;
+ }
+
+ public void dispatchLocation() {
+ mSink.onLocationAvailable(mLocations);
+ }
+
+ public void dispatchDiagnosticData() {
+ mSink.onDiagnosticDataAvailable(mData);
+ }
+ }
+
+ private void dispatchLocations(Location[] locations) {
+ HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
+ synchronized (mSinkList) {
+ sinks = mSinkList;
+ }
+
+ for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
+ Message message = Message.obtain(
+ entry.getValue(),
+ DispatcherHandler.DISPATCH_LOCATION,
+ new MessageCommand(entry.getKey(), locations, null /*data*/));
+ message.sendToTarget();
}
}
private void dispatchDiagnosticData(String data) {
- ArrayList<FusedLocationHardwareSink> sinks = null;
+ HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
synchronized(mSinkList) {
- sinks = new ArrayList<FusedLocationHardwareSink>(mSinkList);
+ sinks = mSinkList;
}
- for(FusedLocationHardwareSink sink : sinks) {
- sink.onDiagnosticDataAvailable(data);
+ for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
+ Message message = Message.obtain(
+ entry.getValue(),
+ DispatcherHandler.DISPATCH_DIAGNOSTIC_DATA,
+ new MessageCommand(entry.getKey(), null /*locations*/, data));
+ message.sendToTarget();
}
}
}
diff --git a/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java b/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java
index 118b663..2c39fa8 100644
--- a/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java
+++ b/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java
@@ -20,7 +20,6 @@
/**
* Base class for sinks to interact with FusedLocationHardware.
- * This is mainly used by GmsCore Fused Provider.
*/
public abstract class FusedLocationHardwareSink {
/*
diff --git a/location/lib/java/com/android/location/provider/FusedProvider.java b/location/lib/java/com/android/location/provider/FusedProvider.java
index bc9feef..c966ade 100644
--- a/location/lib/java/com/android/location/provider/FusedProvider.java
+++ b/location/lib/java/com/android/location/provider/FusedProvider.java
@@ -28,8 +28,6 @@
*
* <p>IMPORTANT: This class is effectively a public API for unbundled applications, and must remain
* API stable. See README.txt in the root of this package for more information.
- *
- * @hide
*/
public abstract class FusedProvider {
private IFusedProvider.Stub mProvider = new IFusedProvider.Stub() {
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index 8689e19..ae1db87 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -38,6 +38,8 @@
#include <media/stagefright/foundation/AString.h>
#include <media/stagefright/MediaErrors.h>
+#include <nativehelper/ScopedLocalRef.h>
+
#include <system/window.h>
namespace android {
@@ -86,7 +88,7 @@
mLooper->start(
false, // runOnCallingThread
false, // canCallJava
- PRIORITY_DEFAULT);
+ PRIORITY_FOREGROUND);
if (nameIsType) {
mCodec = MediaCodec::CreateByType(mLooper, name, encoder);
@@ -186,9 +188,10 @@
return err;
}
- jclass clazz = env->FindClass("android/media/MediaCodec$BufferInfo");
+ ScopedLocalRef<jclass> clazz(
+ env, env->FindClass("android/media/MediaCodec$BufferInfo"));
- jmethodID method = env->GetMethodID(clazz, "set", "(IIJI)V");
+ jmethodID method = env->GetMethodID(clazz.get(), "set", "(IIJI)V");
env->CallVoidMethod(bufferInfo, method, offset, size, timeUs, flags);
return OK;
@@ -227,29 +230,33 @@
return err;
}
- jclass byteBufferClass = env->FindClass("java/nio/ByteBuffer");
- CHECK(byteBufferClass != NULL);
+ ScopedLocalRef<jclass> byteBufferClass(
+ env, env->FindClass("java/nio/ByteBuffer"));
+
+ CHECK(byteBufferClass.get() != NULL);
jmethodID orderID = env->GetMethodID(
- byteBufferClass,
+ byteBufferClass.get(),
"order",
"(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;");
CHECK(orderID != NULL);
- jclass byteOrderClass = env->FindClass("java/nio/ByteOrder");
- CHECK(byteOrderClass != NULL);
+ ScopedLocalRef<jclass> byteOrderClass(
+ env, env->FindClass("java/nio/ByteOrder"));
+
+ CHECK(byteOrderClass.get() != NULL);
jmethodID nativeOrderID = env->GetStaticMethodID(
- byteOrderClass, "nativeOrder", "()Ljava/nio/ByteOrder;");
+ byteOrderClass.get(), "nativeOrder", "()Ljava/nio/ByteOrder;");
CHECK(nativeOrderID != NULL);
jobject nativeByteOrderObj =
- env->CallStaticObjectMethod(byteOrderClass, nativeOrderID);
+ env->CallStaticObjectMethod(byteOrderClass.get(), nativeOrderID);
CHECK(nativeByteOrderObj != NULL);
*bufArray = (jobjectArray)env->NewObjectArray(
- buffers.size(), byteBufferClass, NULL);
+ buffers.size(), byteBufferClass.get(), NULL);
if (*bufArray == NULL) {
env->DeleteLocalRef(nativeByteOrderObj);
return NO_MEMORY;
@@ -338,11 +345,12 @@
}
static void throwCryptoException(JNIEnv *env, status_t err, const char *msg) {
- jclass clazz = env->FindClass("android/media/MediaCodec$CryptoException");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(
+ env, env->FindClass("android/media/MediaCodec$CryptoException"));
+ CHECK(clazz.get() != NULL);
jmethodID constructID =
- env->GetMethodID(clazz, "<init>", "(ILjava/lang/String;)V");
+ env->GetMethodID(clazz.get(), "<init>", "(ILjava/lang/String;)V");
CHECK(constructID != NULL);
jstring msgObj = env->NewStringUTF(msg != NULL ? msg : "Unknown Error");
@@ -363,7 +371,7 @@
}
jthrowable exception =
- (jthrowable)env->NewObject(clazz, constructID, err, msgObj);
+ (jthrowable)env->NewObject(clazz.get(), constructID, err, msgObj);
env->Throw(exception);
}
@@ -848,51 +856,55 @@
}
static void android_media_MediaCodec_native_init(JNIEnv *env) {
- jclass clazz = env->FindClass("android/media/MediaCodec");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(
+ env, env->FindClass("android/media/MediaCodec"));
+ CHECK(clazz.get() != NULL);
- gFields.context = env->GetFieldID(clazz, "mNativeContext", "I");
+ gFields.context = env->GetFieldID(clazz.get(), "mNativeContext", "I");
CHECK(gFields.context != NULL);
- clazz = env->FindClass("android/media/MediaCodec$CryptoInfo");
- CHECK(clazz != NULL);
+ clazz.reset(env->FindClass("android/media/MediaCodec$CryptoInfo"));
+ CHECK(clazz.get() != NULL);
gFields.cryptoInfoNumSubSamplesID =
- env->GetFieldID(clazz, "numSubSamples", "I");
+ env->GetFieldID(clazz.get(), "numSubSamples", "I");
CHECK(gFields.cryptoInfoNumSubSamplesID != NULL);
gFields.cryptoInfoNumBytesOfClearDataID =
- env->GetFieldID(clazz, "numBytesOfClearData", "[I");
+ env->GetFieldID(clazz.get(), "numBytesOfClearData", "[I");
CHECK(gFields.cryptoInfoNumBytesOfClearDataID != NULL);
gFields.cryptoInfoNumBytesOfEncryptedDataID =
- env->GetFieldID(clazz, "numBytesOfEncryptedData", "[I");
+ env->GetFieldID(clazz.get(), "numBytesOfEncryptedData", "[I");
CHECK(gFields.cryptoInfoNumBytesOfEncryptedDataID != NULL);
- gFields.cryptoInfoKeyID = env->GetFieldID(clazz, "key", "[B");
+ gFields.cryptoInfoKeyID = env->GetFieldID(clazz.get(), "key", "[B");
CHECK(gFields.cryptoInfoKeyID != NULL);
- gFields.cryptoInfoIVID = env->GetFieldID(clazz, "iv", "[B");
+ gFields.cryptoInfoIVID = env->GetFieldID(clazz.get(), "iv", "[B");
CHECK(gFields.cryptoInfoIVID != NULL);
- gFields.cryptoInfoModeID = env->GetFieldID(clazz, "mode", "I");
+ gFields.cryptoInfoModeID = env->GetFieldID(clazz.get(), "mode", "I");
CHECK(gFields.cryptoInfoModeID != NULL);
- clazz = env->FindClass("android/media/MediaCodec$CryptoException");
- CHECK(clazz != NULL);
+ clazz.reset(env->FindClass("android/media/MediaCodec$CryptoException"));
+ CHECK(clazz.get() != NULL);
jfieldID field;
- field = env->GetStaticFieldID(clazz, "ERROR_NO_KEY", "I");
+ field = env->GetStaticFieldID(clazz.get(), "ERROR_NO_KEY", "I");
CHECK(field != NULL);
- gCryptoErrorCodes.cryptoErrorNoKey = env->GetStaticIntField(clazz, field);
+ gCryptoErrorCodes.cryptoErrorNoKey =
+ env->GetStaticIntField(clazz.get(), field);
- field = env->GetStaticFieldID(clazz, "ERROR_KEY_EXPIRED", "I");
+ field = env->GetStaticFieldID(clazz.get(), "ERROR_KEY_EXPIRED", "I");
CHECK(field != NULL);
- gCryptoErrorCodes.cryptoErrorKeyExpired = env->GetStaticIntField(clazz, field);
+ gCryptoErrorCodes.cryptoErrorKeyExpired =
+ env->GetStaticIntField(clazz.get(), field);
- field = env->GetStaticFieldID(clazz, "ERROR_RESOURCE_BUSY", "I");
+ field = env->GetStaticFieldID(clazz.get(), "ERROR_RESOURCE_BUSY", "I");
CHECK(field != NULL);
- gCryptoErrorCodes.cryptoErrorResourceBusy = env->GetStaticIntField(clazz, field);
+ gCryptoErrorCodes.cryptoErrorResourceBusy =
+ env->GetStaticIntField(clazz.get(), field);
}
static void android_media_MediaCodec_native_setup(
diff --git a/media/jni/android_media_Utils.cpp b/media/jni/android_media_Utils.cpp
index e35ace3..54c5e9b 100644
--- a/media/jni/android_media_Utils.cpp
+++ b/media/jni/android_media_Utils.cpp
@@ -24,6 +24,8 @@
#include <media/stagefright/foundation/ABuffer.h>
#include <media/stagefright/foundation/AMessage.h>
+#include <nativehelper/ScopedLocalRef.h>
+
namespace android {
bool ConvertKeyValueArraysToKeyedVector(
@@ -76,33 +78,35 @@
}
static jobject makeIntegerObject(JNIEnv *env, int32_t value) {
- jclass clazz = env->FindClass("java/lang/Integer");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(env, env->FindClass("java/lang/Integer"));
+ CHECK(clazz.get() != NULL);
- jmethodID integerConstructID = env->GetMethodID(clazz, "<init>", "(I)V");
+ jmethodID integerConstructID =
+ env->GetMethodID(clazz.get(), "<init>", "(I)V");
CHECK(integerConstructID != NULL);
- return env->NewObject(clazz, integerConstructID, value);
+ return env->NewObject(clazz.get(), integerConstructID, value);
}
static jobject makeLongObject(JNIEnv *env, int64_t value) {
- jclass clazz = env->FindClass("java/lang/Long");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(env, env->FindClass("java/lang/Long"));
+ CHECK(clazz.get() != NULL);
- jmethodID longConstructID = env->GetMethodID(clazz, "<init>", "(J)V");
+ jmethodID longConstructID = env->GetMethodID(clazz.get(), "<init>", "(J)V");
CHECK(longConstructID != NULL);
- return env->NewObject(clazz, longConstructID, value);
+ return env->NewObject(clazz.get(), longConstructID, value);
}
static jobject makeFloatObject(JNIEnv *env, float value) {
- jclass clazz = env->FindClass("java/lang/Float");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(env, env->FindClass("java/lang/Float"));
+ CHECK(clazz.get() != NULL);
- jmethodID floatConstructID = env->GetMethodID(clazz, "<init>", "(F)V");
+ jmethodID floatConstructID =
+ env->GetMethodID(clazz.get(), "<init>", "(F)V");
CHECK(floatConstructID != NULL);
- return env->NewObject(clazz, floatConstructID, value);
+ return env->NewObject(clazz.get(), floatConstructID, value);
}
static jobject makeByteBufferObject(
@@ -110,15 +114,16 @@
jbyteArray byteArrayObj = env->NewByteArray(size);
env->SetByteArrayRegion(byteArrayObj, 0, size, (const jbyte *)data);
- jclass clazz = env->FindClass("java/nio/ByteBuffer");
- CHECK(clazz != NULL);
+ ScopedLocalRef<jclass> clazz(env, env->FindClass("java/nio/ByteBuffer"));
+ CHECK(clazz.get() != NULL);
jmethodID byteBufWrapID =
- env->GetStaticMethodID(clazz, "wrap", "([B)Ljava/nio/ByteBuffer;");
+ env->GetStaticMethodID(
+ clazz.get(), "wrap", "([B)Ljava/nio/ByteBuffer;");
CHECK(byteBufWrapID != NULL);
jobject byteBufObj = env->CallStaticObjectMethod(
- clazz, byteBufWrapID, byteArrayObj);
+ clazz.get(), byteBufWrapID, byteArrayObj);
env->DeleteLocalRef(byteArrayObj); byteArrayObj = NULL;
@@ -140,14 +145,15 @@
status_t ConvertMessageToMap(
JNIEnv *env, const sp<AMessage> &msg, jobject *map) {
- jclass hashMapClazz = env->FindClass("java/util/HashMap");
+ ScopedLocalRef<jclass> hashMapClazz(
+ env, env->FindClass("java/util/HashMap"));
- if (hashMapClazz == NULL) {
+ if (hashMapClazz.get() == NULL) {
return -EINVAL;
}
jmethodID hashMapConstructID =
- env->GetMethodID(hashMapClazz, "<init>", "()V");
+ env->GetMethodID(hashMapClazz.get(), "<init>", "()V");
if (hashMapConstructID == NULL) {
return -EINVAL;
@@ -155,7 +161,7 @@
jmethodID hashMapPutID =
env->GetMethodID(
- hashMapClazz,
+ hashMapClazz.get(),
"put",
"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
@@ -163,7 +169,7 @@
return -EINVAL;
}
- jobject hashMap = env->NewObject(hashMapClazz, hashMapConstructID);
+ jobject hashMap = env->NewObject(hashMapClazz.get(), hashMapConstructID);
for (size_t i = 0; i < msg->countEntries(); ++i) {
AMessage::Type valueType;
@@ -276,17 +282,16 @@
status_t ConvertKeyValueArraysToMessage(
JNIEnv *env, jobjectArray keys, jobjectArray values,
sp<AMessage> *out) {
- jclass stringClass = env->FindClass("java/lang/String");
- CHECK(stringClass != NULL);
-
- jclass integerClass = env->FindClass("java/lang/Integer");
- CHECK(integerClass != NULL);
-
- jclass floatClass = env->FindClass("java/lang/Float");
- CHECK(floatClass != NULL);
-
- jclass byteBufClass = env->FindClass("java/nio/ByteBuffer");
- CHECK(byteBufClass != NULL);
+ ScopedLocalRef<jclass> stringClass(env, env->FindClass("java/lang/String"));
+ CHECK(stringClass.get() != NULL);
+ ScopedLocalRef<jclass> integerClass(env, env->FindClass("java/lang/Integer"));
+ CHECK(integerClass.get() != NULL);
+ ScopedLocalRef<jclass> longClass(env, env->FindClass("java/lang/Long"));
+ CHECK(longClass.get() != NULL);
+ ScopedLocalRef<jclass> floatClass(env, env->FindClass("java/lang/Float"));
+ CHECK(floatClass.get() != NULL);
+ ScopedLocalRef<jclass> byteBufClass(env, env->FindClass("java/nio/ByteBuffer"));
+ CHECK(byteBufClass.get() != NULL);
sp<AMessage> msg = new AMessage;
@@ -309,7 +314,7 @@
for (jsize i = 0; i < numEntries; ++i) {
jobject keyObj = env->GetObjectArrayElement(keys, i);
- if (!env->IsInstanceOf(keyObj, stringClass)) {
+ if (!env->IsInstanceOf(keyObj, stringClass.get())) {
return -EINVAL;
}
@@ -326,7 +331,7 @@
jobject valueObj = env->GetObjectArrayElement(values, i);
- if (env->IsInstanceOf(valueObj, stringClass)) {
+ if (env->IsInstanceOf(valueObj, stringClass.get())) {
const char *value = env->GetStringUTFChars((jstring)valueObj, NULL);
if (value == NULL) {
@@ -337,29 +342,37 @@
env->ReleaseStringUTFChars((jstring)valueObj, value);
value = NULL;
- } else if (env->IsInstanceOf(valueObj, integerClass)) {
+ } else if (env->IsInstanceOf(valueObj, integerClass.get())) {
jmethodID intValueID =
- env->GetMethodID(integerClass, "intValue", "()I");
+ env->GetMethodID(integerClass.get(), "intValue", "()I");
CHECK(intValueID != NULL);
jint value = env->CallIntMethod(valueObj, intValueID);
msg->setInt32(key.c_str(), value);
- } else if (env->IsInstanceOf(valueObj, floatClass)) {
+ } else if (env->IsInstanceOf(valueObj, longClass.get())) {
+ jmethodID longValueID =
+ env->GetMethodID(longClass.get(), "longValue", "()J");
+ CHECK(longValueID != NULL);
+
+ jlong value = env->CallLongMethod(valueObj, longValueID);
+
+ msg->setInt64(key.c_str(), value);
+ } else if (env->IsInstanceOf(valueObj, floatClass.get())) {
jmethodID floatValueID =
- env->GetMethodID(floatClass, "floatValue", "()F");
+ env->GetMethodID(floatClass.get(), "floatValue", "()F");
CHECK(floatValueID != NULL);
jfloat value = env->CallFloatMethod(valueObj, floatValueID);
msg->setFloat(key.c_str(), value);
- } else if (env->IsInstanceOf(valueObj, byteBufClass)) {
+ } else if (env->IsInstanceOf(valueObj, byteBufClass.get())) {
jmethodID positionID =
- env->GetMethodID(byteBufClass, "position", "()I");
+ env->GetMethodID(byteBufClass.get(), "position", "()I");
CHECK(positionID != NULL);
jmethodID limitID =
- env->GetMethodID(byteBufClass, "limit", "()I");
+ env->GetMethodID(byteBufClass.get(), "limit", "()I");
CHECK(limitID != NULL);
jint position = env->CallIntMethod(valueObj, positionID);
@@ -375,7 +388,7 @@
buffer->size());
} else {
jmethodID arrayID =
- env->GetMethodID(byteBufClass, "array", "()[B");
+ env->GetMethodID(byteBufClass.get(), "array", "()[B");
CHECK(arrayID != NULL);
jbyteArray byteArray =
diff --git a/obex/javax/obex/ClientOperation.java b/obex/javax/obex/ClientOperation.java
index 05b498c..294b502 100644
--- a/obex/javax/obex/ClientOperation.java
+++ b/obex/javax/obex/ClientOperation.java
@@ -723,4 +723,7 @@
}
}
}
+
+ public void noBodyHeader(){
+ }
}
diff --git a/obex/javax/obex/HeaderSet.java b/obex/javax/obex/HeaderSet.java
index b89b707..2b3066f 100644
--- a/obex/javax/obex/HeaderSet.java
+++ b/obex/javax/obex/HeaderSet.java
@@ -464,6 +464,8 @@
return mHttpHeader;
case WHO:
return mWho;
+ case CONNECTION_ID:
+ return mConnectionID;
case OBJECT_CLASS:
return mObjectClass;
case APPLICATION_PARAMETER:
diff --git a/obex/javax/obex/Operation.java b/obex/javax/obex/Operation.java
index 25656ed..5b4d5ac 100644
--- a/obex/javax/obex/Operation.java
+++ b/obex/javax/obex/Operation.java
@@ -178,4 +178,6 @@
void close() throws IOException;
int getMaxPacketSize();
+
+ public void noBodyHeader();
}
diff --git a/obex/javax/obex/ServerOperation.java b/obex/javax/obex/ServerOperation.java
index d1476d2..fc441e0 100644
--- a/obex/javax/obex/ServerOperation.java
+++ b/obex/javax/obex/ServerOperation.java
@@ -88,6 +88,8 @@
private boolean mHasBody;
+ private boolean mSendBodyHeader = true;
+
/**
* Creates new ServerOperation
* @param p the parent that created this object
@@ -364,24 +366,33 @@
* (End of Body) otherwise, we need to send 0x48 (Body)
*/
if ((finalBitSet) || (mPrivateOutput.isClosed())) {
- out.write(0x49);
+ if(mSendBodyHeader == true) {
+ out.write(0x49);
+ bodyLength += 3;
+ out.write((byte)(bodyLength >> 8));
+ out.write((byte)bodyLength);
+ out.write(body);
+ }
} else {
+ if(mSendBodyHeader == true) {
out.write(0x48);
+ bodyLength += 3;
+ out.write((byte)(bodyLength >> 8));
+ out.write((byte)bodyLength);
+ out.write(body);
+ }
}
- bodyLength += 3;
- out.write((byte)(bodyLength >> 8));
- out.write((byte)bodyLength);
- out.write(body);
}
}
if ((finalBitSet) && (type == ResponseCodes.OBEX_HTTP_OK) && (orginalBodyLength <= 0)) {
- out.write(0x49);
- orginalBodyLength = 3;
- out.write((byte)(orginalBodyLength >> 8));
- out.write((byte)orginalBodyLength);
-
+ if(mSendBodyHeader == true) {
+ out.write(0x49);
+ orginalBodyLength = 3;
+ out.write((byte)(orginalBodyLength >> 8));
+ out.write((byte)orginalBodyLength);
+ }
}
mResponseSize = 3;
@@ -711,4 +722,8 @@
public void streamClosed(boolean inStream) throws IOException {
}
+
+ public void noBodyHeader(){
+ mSendBodyHeader = false;
+ }
}
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index 6343d0a..6e34bbb 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -295,10 +295,10 @@
try {
while ((item = pm.nextPackageToClean(item)) != null) {
final UserEnvironment userEnv = new UserEnvironment(item.userId);
- eraseFiles(userEnv.getExternalStorageAppDataDirectory(item.packageName));
- eraseFiles(userEnv.getExternalStorageAppMediaDirectory(item.packageName));
+ eraseFiles(userEnv.buildExternalStorageAppDataDirs(item.packageName));
+ eraseFiles(userEnv.buildExternalStorageAppMediaDirs(item.packageName));
if (item.andCode) {
- eraseFiles(userEnv.getExternalStorageAppObbDirectory(item.packageName));
+ eraseFiles(userEnv.buildExternalStorageAppObbDirs(item.packageName));
}
}
} catch (RemoteException e) {
@@ -306,6 +306,12 @@
}
}
+ void eraseFiles(File[] paths) {
+ for (File path : paths) {
+ eraseFiles(path);
+ }
+ }
+
void eraseFiles(File path) {
if (path.isDirectory()) {
String[] files = path.list();
diff --git a/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java
index 130320b..c116d37 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java
@@ -86,7 +86,7 @@
printJob.getLabel()))
.addAction(R.drawable.stat_notify_cancelling, mContext.getString(R.string.cancel),
createCancelIntent(printJob))
- .setContentText(printJob.getPrinterId().getPrinterName())
+ .setContentText(printJob.getPrinterName())
.setWhen(System.currentTimeMillis())
.setOngoing(true)
.setShowWhen(true);
@@ -119,7 +119,7 @@
intent.setAction(INTENT_ACTION_CANCEL_PRINTJOB + "_" + String.valueOf(printJob.getId()));
intent.putExtra(INTENT_EXTRA_PRINTJOB_ID, printJob.getId());
intent.putExtra(INTENT_EXTRA_PRINTJOB_LABEL, printJob.getLabel());
- intent.putExtra(INTENT_EXTRA_PRINTER_NAME, printJob.getPrinterId().getPrinterName());
+ intent.putExtra(INTENT_EXTRA_PRINTER_NAME, printJob.getPrinterName());
return PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
index 654bb6d..9160b7d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
@@ -34,7 +34,8 @@
import android.os.RemoteException;
import android.print.ILayoutResultCallback;
import android.print.IPrintDocumentAdapter;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionController;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.IWriteResultCallback;
import android.print.PageRange;
import android.print.PrintAttributes;
@@ -42,6 +43,7 @@
import android.print.PrintDocumentAdapter;
import android.print.PrintDocumentInfo;
import android.print.PrintJobInfo;
+import android.print.PrinterCapabilitiesInfo;
import android.print.PrinterId;
import android.print.PrinterInfo;
import android.text.Editable;
@@ -70,6 +72,7 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -133,7 +136,7 @@
private Editor mEditor;
private Document mDocument;
private PrintController mController;
- private PrinterDiscoveryObserver mPrinterDiscoveryObserver;
+ private PrinterDiscoverySessionObserver mPrinterDiscoverySessionObserver;
private int mPrintJobId;
@@ -181,8 +184,9 @@
mController.initialize();
mEditor.initialize();
- mPrinterDiscoveryObserver = new PrinterDiscoveryObserver(mEditor, getMainLooper());
- mSpooler.startPrinterDiscovery(mPrinterDiscoveryObserver);
+ mPrinterDiscoverySessionObserver = new PrinterDiscoverySessionObserver(mEditor,
+ getMainLooper());
+ mSpooler.createPrinterDiscoverySession(mPrinterDiscoverySessionObserver);
}
@Override
@@ -190,9 +194,9 @@
// We can safely do the work in here since at this point
// the system is bound to our (spooler) process which
// guarantees that this process will not be killed.
- mSpooler.stopPrinterDiscovery();
- mPrinterDiscoveryObserver.destroy();
- mPrinterDiscoveryObserver = null;
+ mPrinterDiscoverySessionObserver.close();
+ mPrinterDiscoverySessionObserver.destroy();
+ mPrinterDiscoverySessionObserver = null;
if (mController.hasStarted()) {
mController.finish();
}
@@ -622,14 +626,15 @@
SpinnerItem<PrinterInfo> dstItem = mDestinationSpinnerAdapter.getItem(position);
if (dstItem != null) {
PrinterInfo printer = dstItem.value;
- mSpooler.setPrintJobPrinterIdNoPersistence(mPrintJobId, printer.getId());
- printer.getDefaults(mCurrPrintAttributes);
- if (!printer.hasAllRequiredAttributes()) {
+ mSpooler.setPrintJobPrinterNoPersistence(mPrintJobId, printer);
+ PrinterCapabilitiesInfo capabilities = printer.getCapabilities();
+ if (capabilities == null) {
List<PrinterId> printerIds = new ArrayList<PrinterId>();
printerIds.add(printer.getId());
- mSpooler.onReqeustUpdatePrinters(printerIds);
+ mPrinterDiscoverySessionObserver.requestPrinterUpdate(printer.getId());
//TODO: We need a timeout for the update.
} else {
+ capabilities.getDefaults(mCurrPrintAttributes);
if (!mController.hasStarted()) {
mController.start();
}
@@ -1058,8 +1063,8 @@
final int selectedIndex = mDestinationSpinner.getSelectedItemPosition();
- if (selectedIndex < 0 || !mDestinationSpinnerAdapter.getItem(
- selectedIndex).value.hasAllRequiredAttributes()) {
+ if (selectedIndex < 0 || mDestinationSpinnerAdapter.getItem(
+ selectedIndex).value.getCapabilities() == null) {
// Destination
mDestinationSpinner.setEnabled(false);
@@ -1117,7 +1122,8 @@
} else {
PrintAttributes defaultAttributes = mTempPrintAttributes;
PrinterInfo printer = mDestinationSpinnerAdapter.getItem(selectedIndex).value;
- printer.getDefaults(defaultAttributes);
+ PrinterCapabilitiesInfo capabilities = printer.getCapabilities();
+ printer.getCapabilities().getDefaults(defaultAttributes);
// Destination
if (mDestinationSpinnerAdapter.getCount() > 1) {
@@ -1130,7 +1136,7 @@
mCopiesEditText.setEnabled(true);
// Media size.
- List<MediaSize> mediaSizes = printer.getMediaSizes();
+ List<MediaSize> mediaSizes = capabilities.getMediaSizes();
boolean mediaSizesChanged = false;
final int mediaSizeCount = mediaSizes.size();
if (mediaSizeCount != mMediaSizeSpinnerAdapter.getCount()) {
@@ -1168,7 +1174,7 @@
}
// Color mode.
- final int colorModes = printer.getColorModes();
+ final int colorModes = capabilities.getColorModes();
boolean colorModesChanged = false;
if (Integer.bitCount(colorModes) != mColorModeSpinnerAdapter.getCount()) {
colorModesChanged = true;
@@ -1219,7 +1225,7 @@
}
// Orientation.
- final int orientations = printer.getOrientations();
+ final int orientations = capabilities.getOrientations();
boolean orientationsChanged = false;
if (Integer.bitCount(orientations) != mOrientationSpinnerAdapter.getCount()) {
orientationsChanged = true;
@@ -1345,7 +1351,7 @@
}
if (!duplicate) {
mDestinationSpinnerAdapter.add(new SpinnerItem<PrinterInfo>(
- addedPrinter, addedPrinter.getId().getPrinterName()));
+ addedPrinter, addedPrinter.getName()));
} else {
Log.w(LOG_TAG, "Skipping a duplicate printer: " + addedPrinter);
}
@@ -1470,7 +1476,7 @@
PrinterInfo printerInfo = getItem(position).value;
TextView title = (TextView) convertView.findViewById(R.id.title);
- title.setText(printerInfo.getId().getPrinterName());
+ title.setText(printerInfo.getName());
try {
TextView subtitle = (TextView)
@@ -1489,21 +1495,35 @@
}
}
- private static final class PrinterDiscoveryObserver extends IPrinterDiscoveryObserver.Stub {
- private static final int MSG_ON_PRINTERS_ADDED = 1;
- private static final int MSG_ON_PRINTERS_REMOVED = 2;
- private static final int MSG_ON_PRINTERS_UPDATED = 3;
+ private static final class PrinterDiscoverySessionObserver
+ extends IPrinterDiscoverySessionObserver.Stub {
+ private static final int MSG_SET_CONTROLLER = 1;
+ private static final int MSG_ON_PRINTERS_ADDED = 2;
+ private static final int MSG_ON_PRINTERS_REMOVED = 3;
+ private static final int MSG_ON_PRINTERS_UPDATED = 4;
private Handler mHandler;
private Editor mEditor;
+ private IPrinterDiscoverySessionController mController;
@SuppressWarnings("unchecked")
- public PrinterDiscoveryObserver(Editor editor, Looper looper) {
+ public PrinterDiscoverySessionObserver(Editor editor, Looper looper) {
mEditor = editor;
mHandler = new Handler(looper, null, true) {
@Override
public void handleMessage(Message message) {
switch (message.what) {
+ case MSG_SET_CONTROLLER: {
+ mController = (IPrinterDiscoverySessionController) message.obj;
+ // TODO: This should be cleaned up
+ List<PrinterId> printerIds = Collections.emptyList();
+ try {
+ mController.open(printerIds);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error starting printer discovery");
+ }
+ } break;
+
case MSG_ON_PRINTERS_ADDED: {
List<PrinterInfo> printers = (List<PrinterInfo>) message.obj;
mEditor.addPrinters(printers);
@@ -1523,6 +1543,46 @@
};
}
+ public void open(List<PrinterId> priorityList) {
+ if (mController != null) {
+ try {
+ mController.open(priorityList);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error closing printer discovery session", re);
+ }
+ }
+ }
+
+ public void close() {
+ if (mController != null) {
+ try {
+ mController.close();
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error closing printer discovery session", re);
+ }
+ }
+ }
+
+ public void requestPrinterUpdate(PrinterId printerId) {
+ if (mController != null) {
+ try {
+ mController.requestPrinterUpdate(printerId);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error requestin printer update", re);
+ }
+ }
+ }
+
+ @Override
+ public void setController(IPrinterDiscoverySessionController controller) {
+ synchronized (this) {
+ if (mHandler != null) {
+ mHandler.obtainMessage(MSG_SET_CONTROLLER, controller)
+ .sendToTarget();
+ }
+ }
+ }
+
@Override
public void onPrintersAdded(List<PrinterInfo> printers) {
synchronized (this) {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
index 00e05bb..1b8b81a 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
@@ -21,7 +21,7 @@
import android.os.AsyncTask;
import android.os.ParcelFileDescriptor;
import android.print.IPrintClient;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PageRange;
import android.print.PrintAttributes;
import android.print.PrintAttributes.Margins;
@@ -32,6 +32,7 @@
import android.print.PrintJobInfo;
import android.print.PrintManager;
import android.print.PrinterId;
+import android.print.PrinterInfo;
import android.util.AtomicFile;
import android.util.Log;
import android.util.Slog;
@@ -199,16 +200,8 @@
}
}
- public void startPrinterDiscovery(IPrinterDiscoveryObserver observer) {
- mService.startPrinterDiscovery(observer);
- }
-
- public void stopPrinterDiscovery() {
- mService.stopPrinterDiscovery();
- }
-
- public void onReqeustUpdatePrinters(List<PrinterId> printerIds) {
- mService.onReqeustUpdatePrinters(printerIds);
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
+ mService.createPrinterDiscoverySession(observer);
}
private int generatePrintJobIdLocked() {
@@ -417,11 +410,12 @@
}
}
- public void setPrintJobPrinterIdNoPersistence(int printJobId, PrinterId printerId) {
+ public void setPrintJobPrinterNoPersistence(int printJobId, PrinterInfo printer) {
synchronized (mLock) {
PrintJobInfo printJob = getPrintJobInfo(printJobId, PrintManager.APP_ID_ANY);
if (printJob != null) {
- printJob.setPrinterId(printerId);
+ printJob.setPrinterId(printer.getId());
+ printJob.setPrinterName(printer.getName());
}
}
}
@@ -500,6 +494,7 @@
private static final String ATTR_START = "start";
private static final String ATTR_END = "end";
+ private static final String ATTR_NAME = "name";
private static final String ATTR_PAGE_COUNT = "pageCount";
private static final String ATTR_CONTENT_TYPE = "contentType";
@@ -573,7 +568,7 @@
PrinterId printerId = printJob.getPrinterId();
if (printerId != null) {
serializer.startTag(null, TAG_PRINTER_ID);
- serializer.attribute(null, ATTR_PRINTER_NAME, printerId.getPrinterName());
+ serializer.attribute(null, ATTR_PRINTER_NAME, printerId.getLocalId());
serializer.attribute(null, ATTR_SERVICE_NAME, printerId.getServiceName()
.flattenToString());
serializer.endTag(null, TAG_PRINTER_ID);
@@ -675,6 +670,7 @@
PrintDocumentInfo documentInfo = printJob.getDocumentInfo();
if (documentInfo != null) {
serializer.startTag(null, TAG_DOCUMENT_INFO);
+ serializer.attribute(null, ATTR_NAME, documentInfo.getName());
serializer.attribute(null, ATTR_CONTENT_TYPE, String.valueOf(
documentInfo.getContentType()));
serializer.attribute(null, ATTR_PAGE_COUNT, String.valueOf(
@@ -921,11 +917,13 @@
skipEmptyTextTags(parser);
if (accept(parser, XmlPullParser.START_TAG, TAG_DOCUMENT_INFO)) {
+ String name = parser.getAttributeValue(null, ATTR_NAME);
final int pageCount = Integer.parseInt(parser.getAttributeValue(null,
ATTR_PAGE_COUNT));
final int contentType = Integer.parseInt(parser.getAttributeValue(null,
ATTR_CONTENT_TYPE));
- PrintDocumentInfo info = new PrintDocumentInfo.Builder().setPageCount(pageCount)
+ PrintDocumentInfo info = new PrintDocumentInfo.Builder(name)
+ .setPageCount(pageCount)
.setContentType(contentType).create();
printJob.setDocumentInfo(info);
parser.next();
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
index e5153e7..4fab4f8 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
@@ -32,10 +32,9 @@
import android.print.IPrintSpooler;
import android.print.IPrintSpoolerCallbacks;
import android.print.IPrintSpoolerClient;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintAttributes;
import android.print.PrintJobInfo;
-import android.print.PrinterId;
import android.util.Log;
import android.util.Slog;
@@ -167,20 +166,11 @@
printJob).sendToTarget();
}
- public void onReqeustUpdatePrinters(List<PrinterId> printers) {
- mHandler.obtainMessage(MyHandler.MSG_ON_REQUEST_UPDATE_PRINTERS,
- printers).sendToTarget();
- }
-
- public void startPrinterDiscovery(IPrinterDiscoveryObserver observer) {
- mHandler.obtainMessage(MyHandler.MSG_ON_START_PRINTER_DISCOVERY,
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
+ mHandler.obtainMessage(MyHandler.MSG_CREATE_PRINTER_DISCOVERY_SESSION,
observer).sendToTarget();
}
- public void stopPrinterDiscovery() {
- mHandler.sendEmptyMessage(MyHandler.MSG_ON_STOP_PRINTER_DISCOVERY);
- }
-
public void onAllPrintJobsForServiceHandled(ComponentName service) {
mHandler.obtainMessage(MyHandler.MSG_ON_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED,
service).sendToTarget();
@@ -193,12 +183,10 @@
private final class MyHandler extends Handler {
public static final int MSG_SET_CLIENT = 1;
public static final int MSG_START_PRINT_JOB_CONFIG_ACTIVITY = 2;
- public static final int MSG_ON_START_PRINTER_DISCOVERY = 3;
- public static final int MSG_ON_STOP_PRINTER_DISCOVERY = 4;
+ public static final int MSG_CREATE_PRINTER_DISCOVERY_SESSION = 3;
public static final int MSG_ON_PRINT_JOB_QUEUED = 5;
public static final int MSG_ON_ALL_PRINT_JOBS_FOR_SERIVICE_HANDLED = 6;
public static final int MSG_ON_ALL_PRINT_JOBS_HANDLED = 7;
- public static final int MSG_ON_REQUEST_UPDATE_PRINTERS = 8;
public static final int MSG_CHECK_ALL_PRINTJOBS_HANDLED = 9;
public MyHandler(Looper looper) {
@@ -206,7 +194,6 @@
}
@Override
- @SuppressWarnings("unchecked")
public void handleMessage(Message message) {
switch (message.what) {
case MSG_SET_CLIENT: {
@@ -233,23 +220,14 @@
}
} break;
- case MSG_ON_START_PRINTER_DISCOVERY: {
- IPrinterDiscoveryObserver observer = (IPrinterDiscoveryObserver) message.obj;
+ case MSG_CREATE_PRINTER_DISCOVERY_SESSION: {
+ IPrinterDiscoverySessionObserver observer =
+ (IPrinterDiscoverySessionObserver) message.obj;
if (mClient != null) {
try {
- mClient.onStartPrinterDiscovery(observer);
+ mClient.createPrinterDiscoverySession(observer);
} catch (RemoteException re) {
- Log.e(LOG_TAG, "Error notifying start printer discovery.", re);
- }
- }
- } break;
-
- case MSG_ON_STOP_PRINTER_DISCOVERY: {
- if (mClient != null) {
- try {
- mClient.onStopPrinterDiscovery();
- } catch (RemoteException re) {
- Log.e(LOG_TAG, "Error notifying stop printer discovery.", re);
+ Log.e(LOG_TAG, "Error creating printer discovery session.", re);
}
}
} break;
@@ -287,17 +265,6 @@
}
} break;
- case MSG_ON_REQUEST_UPDATE_PRINTERS: {
- List<PrinterId> printerIds = (List<PrinterId>) message.obj;
- if (mClient != null) {
- try {
- mClient.onRequestUpdatePrinters(printerIds);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error requesting to update pritners.", re);
- }
- }
- } break;
-
case MSG_CHECK_ALL_PRINTJOBS_HANDLED: {
PrintSpooler spooler = PrintSpooler.peekInstance();
if (spooler != null) {
diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java
index 7ebe096..0485334 100644
--- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java
+++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java
@@ -57,7 +57,7 @@
int token, IBackupManager callbackBinder) {
final FileDescriptor outFd = data.getFileDescriptor();
try {
- File obbDir = Environment.getExternalStorageAppObbDirectory(packageName);
+ File obbDir = Environment.buildExternalStorageAppObbDirs(packageName)[0];
if (obbDir != null) {
if (obbDir.exists()) {
ArrayList<File> obbList = allFileContents(obbDir);
@@ -106,7 +106,7 @@
long fileSize, int type, String path, long mode, long mtime,
int token, IBackupManager callbackBinder) {
try {
- File outFile = Environment.getExternalStorageAppObbDirectory(packageName);
+ File outFile = Environment.buildExternalStorageAppObbDirs(packageName)[0];
if (outFile != null) {
outFile = new File(outFile, path);
}
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 05618bd..42ec9c5 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi gekoppel"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Soek vir GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ligging deur GPS gestel"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Verwyder alle kennisgewings."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Programinligting"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Die skerm sal outomaties draai."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Kennisgewings verskyn hier"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Verkry enige tyd toegang tot hulle deur af te sleep.\nSleep weer af vir stelselkontroles."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Sleep rand van skerm om balk te wys"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Sleep van rand van skerm af om stelselbalk te wys"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Sleep rand van skerm om balk te wys"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Sleep van rand van skerm af om stelselbalk te wys"</string>
</resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 1d81ea7..41610a6 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi ተያይዟል"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"ለGPS በመፈለግ ላይ"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"በ GPS የተዘጋጀ ሥፍራ"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"ሁሉንም ማሳወቂያዎች አጽዳ"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"የመተግበሪያ መረጃ"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ማያ ገጽ በራስ ሰር ይዞራል።"</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ራስ-ሰር"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"ማሳወቂያዎች እዚህ ላይ ይታያሉ"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"ወደ ታች በማንሸራተት በማንኛውም ጊዜ ይድረሱባቸው።\nSwipe የስርዓት መቆጣጠሪያዎችን ለማምጣት እንደገና ወደ ታች ያንሸራትቱ።"</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"አሞሌውን ለማሳየት የማያ ገጹን ጠርዝ ላይ ያንሸራትቱ"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"አሞሌውን ለማሳየት ከማያ ገጹ ጠርዝ ጀምረው ያንሸራትቱ"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"አሞሌውን ለማሳየት የማያ ገጹን ጠርዝ ላይ ያንሸራትቱ"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"አሞሌውን ለማሳየት ከማያ ገጹ ጠርዝ ጀምረው ያንሸራትቱ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index c31d6d9..291bcf5 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi متصل"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"جارٍ البحث عن GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"تم تعيين الموقع بواسطة GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"محو جميع الإشعارات."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"معلومات التطبيق"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"سيتم تدوير الشاشة تلقائيًا."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"تلقائي"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"تظهر الإشعارات هنا"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"يمكنك الدخول إليها في أي وقت بالتمرير السريع إلى أسفل.\nيمكنك التمرير السريع إلى أسفل مرة أخرى للوصول إلى عناصر تحكم النظام."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"مرر سريعًا لحافة الشاشة لإظهار الشريط"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"مرر سريعًا من حافة الشاشة لإظهار شريط النظام"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"مرر سريعًا لحافة الشاشة لإظهار الشريط"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"مرر سريعًا من حافة الشاشة لإظهار شريط النظام"</string>
</resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 6608b79..aaca584 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi падключаны"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Пошук GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Месца задана праз GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Выдалiць усе апавяшчэннi."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інфармацыя пра прыкладанне"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран паварочваецца аўтаматычна."</string>
@@ -204,8 +206,8 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АЎТА"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Апавяшчэнні з\'яўляюцца тут"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Атрымлівайце доступ да іх у любы час, праводзячы пальцам уніз.\nПравядзіце пальцам уніз яшчэ раз, каб атрымаць доступ да сродкаў кіравання сістэмай."</string>
- <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+ <!-- no translation found for hiding_navigation_confirmation_message (3227814171674734332) -->
<skip />
- <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+ <!-- no translation found for hiding_navigation_confirmation_message_long (7854368870786524950) -->
<skip />
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 6bf1040..b10f5ff 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi: Има връзка"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Търси се GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Местоположението е зададено от GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Изчистване на всички известия."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Информация за приложението"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екранът ще се завърта автоматично."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТ."</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Известията се показват тук"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Осъществявайте достъп до тях по всяко време, като прекарате пръст надолу.\nНаправете го отново за системните контроли."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Прекарайте пръст по ръба на екрана, за да се покаже лентата"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Прекарайте пръст от ръба на екрана, за да се покаже системната лента"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Прекарайте пръст по ръба на екрана, за да се покаже лентата"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Прекарайте пръст от ръба на екрана, за да се покаже системната лента"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index eddeda3..0a95005 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi: connectada"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"S\'està cercant un GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"S\'ha establert la ubicació per GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Esborra totes les notificacions."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informació de l\'aplicació"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girarà automàticament."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÀTICA"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Les notificacions apareixen aquí"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Accedeix-hi en qualsevol moment: només has de fer lliscar el dit cap avall.\nTorna a fer lliscar el dit cap avall per fer que es mostrin els controls del sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Fes lliscar el dit per la vora de la pantalla perquè es mostri la barra"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Fes lliscar el dit des de la vora de la pantalla perquè es mostri la barra del sistema"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Fes lliscar el dit per la vora de la pantalla perquè es mostri la barra"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Fes lliscar el dit des de la vora de la pantalla perquè es mostri la barra del sistema"</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 87ba67a..f7f56c0 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi: připojeno"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Vyhledávání satelitů GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavena pomocí systému GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazat všechna oznámení."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informace o aplikaci"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka se automaticky otočí."</string>
@@ -184,10 +186,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatické otáčení"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Otáčení je uzamčeno"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Metoda zadávání dat"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"Poloha"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Poloha vypnuta"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Mediální zařízení"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"Pouze tísňová volání"</string>
@@ -204,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Zde se zobrazují oznámení"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Můžete je kdykoli zobrazit tím, že přejedete prstem dolů.\nPřejedete-li prstem dolů ještě jednou, zobrazí se ovládací prvky systému."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Panel zobrazíte přejetím přes okraj obrazovky"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Systémový panel zobrazíte přejetím přes okraj obrazovky"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Panel zobrazíte přejetím přes okraj obrazovky nahoru"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Systémový panel zobrazíte přejetím přes okraj obrazovky"</string>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index af4bb33..1c772b5 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi er forbundet"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Søger efter GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Placeringen er angivet ved hjælp af GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ryd alle meddelelser."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Oplysninger om appen"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skærmen roterer automatisk."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Underretninger vises her"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Få adgang til dem når som helst ved at stryge ned.\nStryg ned igen for at komme til systemindstillingerne."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Stryg kanten af skærmen for at se bjælken"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Stryg fra skærmens kant for at se systembjælken"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Stryg fra skærmkanten for at se bjælken"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Stryg med fingeren fra skærmens kant for at få vist systembjælken"</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 2b59228..86ea82d 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"WLAN verbunden"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS wird gesucht"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Standort durch GPS festgelegt"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Alle Benachrichtigungen löschen"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App-Details"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Bildschirm wird automatisch gedreht."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Benachrichtigungen erscheinen hier"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Greifen Sie jederzeit auf sie zu, indem Sie nach unten wischen.\nWischen Sie für Systemeinstellungen erneut nach unten."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Zum Einblenden der Leiste vom Rand wischen"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Zum Einblenden der Systemleiste vom Display-Rand weg wischen"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Zum Einblenden der Leiste vom Rand weg wischen"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Zum Einblenden der Systemleiste vom Display-Rand weg wischen"</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index ab43081..cfd396e 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi συνδεδεμένο"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Αναζήτηση για GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ρύθμιση τοποθεσίας με GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Εκκαθάριση όλων των ειδοποιήσεων."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Πληροφορίες εφαρμογής"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Θα γίνεται αυτόματη περιστροφή της οθόνης."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ΑΥΤΟΜΑΤΗ"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Οι ειδοποιήσεις εμφανίζονται εδώ"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Μεταβείτε σε αυτές ανά πάσα στιγμή σύροντας προς τα κάτω.\nΣύρετε ξανά προς τα κάτω για τα στοιχεία ελέγχου συστήματος."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Σύρετε από την άκρη της οθόνης για να εμφανίσετε τη γραμμή"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Σύρετε από την άκρη της οθόνης για να εμφανίσετε τη γραμμή συστήματος"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Σύρετε από την άκρη της οθόνης για να εμφανίσετε τη γραμμή"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Σύρετε από την άκρη της οθόνης για να εμφανίσετε τη γραμμή συστήματος"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 6027553f..017844c 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi connected"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Searching for GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Location set by GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Clear all notifications."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App info"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Screen will rotate automatically."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Notifications appear here"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Access them any time by swiping down.\nSwipe down again for system controls."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Swipe edge of screen to reveal bar"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Swipe from edge of screen to reveal system bar"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Swipe edge of screen to reveal bar"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Swipe from edge of screen to reveal system bar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 2a0f1f7..bdd0363 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi conectado"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Buscando GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"La ubicación se estableció por GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Eliminar todas las notificaciones"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Información de la aplicación"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Las notificaciones aparecen aquí."</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Desliza el dedo hacia abajo para acceder al contenido.\nVuelve a deslizar el dedo hacia abajo para acceder a los controles del sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Desliza el dedo desde el borde de la pantalla para mostrar la barra."</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Desliza el dedo desde el borde de la pantalla para mostrar la barra del sistema."</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Desliza el dedo desde el borde de la pantalla para mostrar la barra."</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Desliza el dedo desde el borde de la pantalla para mostrar la barra del sistema."</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 64c3cab..4ae8967 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Con conexión Wi-Fi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Buscando GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ubicación definida por GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Borrar todas las notificaciones"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Información de la aplicación"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Las notificaciones aparecen aquí"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Desliza el dedo hacia abajo para acceder al contenido.\nVuelve a deslizar el dedo hacia abajo para acceder a los controles del sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Desliza el borde de la pantalla para mostrar la barra"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Desliza el borde de la pantalla para mostrar la barra del sistema"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Desliza el borde de la pantalla para mostrar la barra"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Desliza el borde de la pantalla para mostrar la barra del sistema"</string>
</resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 6d9c838..90a9626 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"WiFi on ühendatud"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS-i otsimine"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS-i määratud asukoht"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Kustuta kõik teatised."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Rakenduse teave"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekraani pööramine toimub automaatselt."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAATNE"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Märguanded ilmuvad siia"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Juurdepääs igal ajal sõrmega alla pühkides.\nSüsteemi juhtnuppude jaoks pühkige uuesti alla."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Riba kuvamiseks pühkige ekraani serva"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Süsteemiriba kuvamiseks pühkige ekraani servast"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Riba kuvamiseks pühkige ekraani serva"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Süsteemiriba kuvamiseks pühkige ekraani servast"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 5f35ce6..7fb8a11 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi متصل شد"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"جستجو برای GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"مکان تنظیم شده توسط GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"پاک کردن تمام اعلانها"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"اطلاعات برنامه"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"صفحه به صورت خودکار میچرخد."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"خودکار"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"اعلانها در اینجا نمایش داده میشوند"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"با کشیدن انگشت به طرف پایین به آنها دسترسی پیدا کنید.\nبرای کنترلهای سیستم دوباره انگشت خود را به سمت پایین بکشید."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"برای نمایش نوار، انگشت خود را از لبه صفحه به داخل بکشید"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"برای نمایش نوار سیستم، انگشت خود را از لبه صفحه به داخل بکشید"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"برای نمایش نوار، انگشت خود را از لبه صفحه به داخل بکشید"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"برای نمایش نوار سیستم، انگشت خود را از لبه صفحه به داخل بکشید"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 06e1926..a5f834d 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wifi yhdistetty"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Haetaan GPS-yhteyttä"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Sijainti määritetty GPS:n avulla"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Tyhjennä kaikki ilmoitukset."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Sovelluksen tiedot"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ruutu kääntyy automaattisesti."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Ilmoitukset näkyvät tässä"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Näet ilmoitukset liu\'uttamalla sormea alas ruudulla.\nVoit palauttaa järjestelmän ohjaimet näkyviin liu\'uttamalla sormea alas uudelleen."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Tuo palkki näkyviin liu\'uttamalla ruudun reunasta"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Tuo järjestelmäpalkki näkyviin liu\'uttamalla ruudun reunasta"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Tuo palkki näkyviin liu\'uttamalla ruudun reunasta"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Tuo järjestelmäpalkki näkyviin liu\'uttamalla ruudun reunasta"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 7db07e2..7fe1143 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Connecté au Wi-Fi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Recherche de GPS..."</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Position définie par GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Supprimer toutes les notifications"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informations sur l\'application"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"L\'écran pivote automatiquement."</string>
@@ -184,10 +186,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotation auto"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation bloquée"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Mode de saisie"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"Localisation"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Localisation désactivée"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Appareil multimédia"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"Appels d\'urgence uniquement"</string>
@@ -204,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATIQUE"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Les notifications s’affichent ici"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Accédez-y à tout moment en faisant glisser le doigt vers le bas.\nRépétez l\'opération pour accéder aux commandes du système."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Faites glisser votre doigt sur le côté de l\'écran pour afficher la barre."</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Faites glisser votre doigt à partir d\'un côté de l\'écran pour afficher la barre système."</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Faites glisser le doigt sur le côté de l\'écran pour afficher la barre."</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Faites glisser le doigt à partir d\'un côté de l\'écran pour afficher la barre système."</string>
</resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 862e2ef..c02fc2b 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi कनेक्ट किया गया"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS को खोजा जा रहा है"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS द्वारा सेट किया गया स्थान"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"सभी सूचनाएं साफ़ करें."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"एप्लिकेशन जानकारी"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"स्क्रीन स्वचालित रूप से घूमेगी."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"स्वत:"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"सूचनाएं यहां दिखाई देती हैं"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"नीचे स्वाइप करके उन तक कभी भी पहुंचें.\nसिस्टम नियंत्रणों के लिए पुन: नीचे स्वाइप करें."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"बार दिखाने के लिए स्क्रीन के किनारे को स्वाइप करें"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"सिस्टम बार दिखाने के लिए स्क्रीन के किनारे से स्वाइप करें"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"बार को प्रदर्शित करने के लिए स्क्रीन के किनारे को स्वाइप करें"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"सिस्टम बार को प्रदर्शित करने के लिए स्क्रीन के किनारे से स्वाइप करें"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 631d549..8989d0d 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi povezan"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Traženje GPS-a"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokaciju utvrdio GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Brisanje svih obavijesti."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informacije o aplikaciji"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon će se automatski zakrenuti."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATSKI"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Obavijesti se prikazuju ovdje"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Pristupite im u bilo kojem trenutku tako da prstom trznete prema dolje. \nPonovo prstom trznite prema dolje za kontrole sustava."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Prijeđite prstom po rubu zaslona da bi se prikazala traka"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Prijeđite prstom od ruba zaslona da bi se prikazala traka sustava"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Prijeđite prstom po rubu zaslona da bi se prikazala traka"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Prijeđite prstom od ruba zaslona da bi se prikazala traka sustava"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index c1c9136..567b2fc 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi csatlakoztatva"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS keresése"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"A GPS beállította a helyet"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Minden értesítés törlése"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Alkalmazásinformáció"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A képernyő automatikusan forogni fog."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"automatikus"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Az értesítések itt jelennek meg."</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Bármikor elérheti őket, ha lefelé húzza az ujját.\nHúzza le az ujját még egyszer a rendszerbeállítások eléréséhez."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Csúsztassa ujját a képernyő szélén a sáv megjelenítéséhez"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Csúsztassa ujját a képernyő szélétől a rendszersáv megjelenítéséhez"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Csúsztassa ujját a képernyő szélén a sáv megjelenítéséhez"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Csúsztassa ujját a képernyő szélétől a rendszersáv megjelenítéséhez"</string>
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 6a702b9..013bd99 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi tersambung"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Menelusuri GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi yang disetel oleh GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Menghapus semua pemberitahuan."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info aplikasi"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Layar akan diputar secara otomatis."</string>
@@ -182,10 +184,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotasi Otomatis"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotasi Dikunci"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Metode Masukan"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"Lokasi"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Lokasi Mati"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Perangkat media"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"Panggilan Darurat Saja"</string>
@@ -202,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATIS"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Pemberitahuan muncul di sini"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Akses kapan saja dengan menggesek ke bawah.\nGesek ke bawah sekali lagi untuk kontrol sistem."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Gesek tepi layar untuk membuka bilah"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Gesek dari bagian tepi layar untuk membuka bilah sistem"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Gesek tepi layar untuk membuka bilah"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Gesek dari bagian tepi layar untuk membuka bilah sistem"</string>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index a350d38..5dab6a1 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi connesso"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Ricerca del GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Posizione stabilita dal GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Cancella tutte le notifiche."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informazioni applicazione"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Lo schermo ruoterà automaticamente."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Le notifiche vengono visualizzate qui"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Puoi accedervi in qualsiasi momento scorrendo verso il basso.\nFai scorrere di nuovo verso il basso per visualizzare i controlli del sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Fai scorrere il bordo dello schermo per visualizzare la barra"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Fai scorrere il dito dal bordo dello schermo per visualizzare la barra di sistema"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Fai scorrere il bordo dello schermo per visualizzare la barra"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Fai scorrere il dito dal bordo dello schermo per visualizzare la barra di sistema"</string>
</resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index b274dcc..c80ad7c 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi מחובר"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"מחפש GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"מיקום מוגדר על ידי GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"נקה את כל ההתראות."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"פרטי יישום"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"המסך יסתובב באופן אוטומטי."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"אוטומטי"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"הודעות מופיעות כאן"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"גש אליהם בכל עת על ידי החלקה למטה.\nהחלק למטה שוב למעבר למרכז הבקרה של המערכת."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"החלק מקצה המסך כדי להציג את הסרגל"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"החלק מקצה המסך כדי להציג את סרגל המערכת"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"החלק מקצה המסך כדי להציג את הסרגל"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"החלק מקצה המסך כדי להציג את סרגל המערכת"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 7392ae9..73aa558 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi接続済み"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPSで検索中"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPSにより現在地が設定されました"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"通知をすべて消去。"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"アプリ情報"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"画面は自動的に回転します。"</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"ここに通知が表示されます"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"下にスワイプすると、いつでも通知を表示できます。\nシステムを管理するにはもう一度下にスワイプしてください。"</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"バーを表示するには、画面の端からスワイプします"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"システムバーを表示するには、画面の端からスワイプします"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"バーを表示するには、画面の端からスワイプします"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"システムバーを表示するには、画面の端からスワイプします"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 1437601..403c94b 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi 연결됨"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS 검색 중"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS에서 위치 설정"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"모든 알림 지우기"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"앱 정보"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"화면이 자동으로 회전됩니다."</string>
@@ -182,10 +184,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"자동 회전"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"회전 잠금"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"입력 방법"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"위치"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"위치 사용 중지"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"미디어 기기"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"긴급 통화만 허용"</string>
@@ -202,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"자동"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"알림이 여기에 표시됨"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"아래로 스와이프하여 언제든 액세스하세요.\n한 번 더 아래로 스와이프하면 시스템 관리로 이동합니다."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"화면 가장자리에서 스와이프하여 표시줄 표시"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"화면 가장자리에서 스와이프하여 시스템 표시줄 표시"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"화면 가장자리에서 스와이프하여 표시줄 표시"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"화면 가장자리에서 스와이프하여 시스템 표시줄 표시"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index bf8662a..11b67ed 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Prisij. prie „Wi-Fi“"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Ieškoma GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS nustatyta vieta"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Išvalyti visus pranešimus."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Programos informacija"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekranas bus sukamas automatiškai."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATINIS"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Pranešimai rodomi čia"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Perbraukę žemyn bet kuriuo metu pasieksite pranešimus.\nJei norite naudoti sistemos valdiklius, perbraukite žemyn dar kartą."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Jei norite, kad būtų rodoma juosta, perbraukite ekrano krašte"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Jei norite, kad būtų rodoma sistemos juosta, perbraukite iš ekrano krašto"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Jei norite, kad būtų rodoma juosta, perbraukite ekrano krašte"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Jei norite, kad būtų rodoma sistemos juosta, perbraukite iš ekrano krašto"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index b96a786..85ab3fd 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Izv. sav. ar Wi-Fi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Notiek GPS meklēšana..."</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS iestatītā atrašanās vieta"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Notīrīt visus paziņojumus"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informācija par lietotni"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekrāns tiks pagriezts automātiski."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMĀTISKI"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Šeit tiek rādīti paziņojumi"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Piekļūstiet tiem jebkurā laikā, velkot uz leju.\nVēlreiz velciet, lai tiktu parādītas sistēmas vadīklas."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Velciet no ekrāna malas, lai piekļūtu joslai."</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Velciet no ekrāna malas, lai piekļūtu sistēmas joslai."</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Velciet no ekrāna malas, lai piekļūtu joslai."</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Velciet no ekrāna malas, lai piekļūtu sistēmas joslai."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 498e922..d5becc0 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi disambungkan"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Mencari GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi ditetapkan oleh GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Padamkan semua pemberitahuan."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Maklumat apl"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrin akan berputar secara automatik."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Pemberitahuan dipaparkan di sini"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Akses panel pada bila-bila masa dengan meleret ke bawah.\nLeret ke bawah sekali lagi untuk mendapatkan kawalan sistem."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Leret ke bahagian tepi skrin untuk menampakkan bar"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Leret dari tepi skrin untuk menampakkan bar sistem"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Leret ke bahagian tepi skrin untuk menampakkan bar"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Leret dari tepi skrin untuk menampakkan bar sistem"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 778be83..6f7d727 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi tilkoblet"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Søker etter GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Posisjon angitt av GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Fjern alle varslinger."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info om app"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skjermen roterer automatisk."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Varslene vises her"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Bruk dem når som helst ved å sveipe nedover.\nSveip nedover igjen for å gå til systemkontrollene."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Sveip på kanten av skjermen for å få frem feltet"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Sveip fra kanten på skjermen for å få frem systemfeltet"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Sveip på kanten av skjermen for å få frem feltet"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Sveip fra kanten på skjermen for å få frem systemfeltet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index ab77839..1216bbf 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Verbonden via wifi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Zoeken naar GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Locatie bepaald met GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Alle meldingen wissen."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App-info"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Scherm wordt automatisch geroteerd."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATISCH"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Meldingen worden hier weergegeven"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"U kunt de meldingen op elk gewenst moment openen door met uw vinger omlaag te vegen.\nVeeg nogmaals met uw vinger omlaag om de systeembesturingselementen weer te geven."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Veeg vanaf de rand om balk weer te geven"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Veeg vanaf de rand van het scherm om de systeembalk weer te geven"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Veeg vanaf de rand om balk weer te geven"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Veeg vanaf de rand van het scherm om de systeembalk weer te geven"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index c94cfc8..d17c45e 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi: połączono"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Wyszukiwanie sygnału GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokalizacja z GPSa"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Usuń wszystkie powiadomienia."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"O aplikacji"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran zostanie obrócony automatycznie."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATYCZNA"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Tutaj pokazują się powiadomienia"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Możesz je otworzyć w dowolnej chwili, przesuwając w dół.\nPrzesuń jeszcze raz w dół, by otworzyć ustawienia systemowe."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Przesuń palcem od krawędzi ekranu, by odkryć pasek"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Przesuń palcem od krawędzi ekranu, by odkryć pasek systemu"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Przesuń palcem od krawędzi ekranu, by odkryć pasek"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Przesuń palcem od krawędzi ekranu, by odkryć pasek systemu"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index c106329..b520319 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi ligado"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"A procurar GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Localização definida por GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações da aplicação"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"O ecrã será rodado automaticamente."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"As notificações são apresentadas aqui"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Pode aceder em qualquer altura, deslizando rapidamente para baixo com o dedo.\nDeslize novamente para baixo para aceder aos controlos do sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Deslize da extremidade do ecrã para revelar a barra"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Deslize da extremidade do ecrã para revelar a barra do sistema"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Deslize da extremidade do ecrã para revelar a barra"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Deslize da extremidade do ecrã para revelar a barra do sistema"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 9be0739..2a2f336 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi conectado"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Buscando GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Local definido por GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações do aplicativo"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A tela girará automaticamente."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"As notificações aparecem aqui"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Acesse a qualquer momento deslizando para baixo.\nDeslize para baixo novamente para acessar os controles do sistema."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Deslize a borda da tela para ver a barra"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Deslize a partir da borda da tela ver a barra do sistema"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Deslize a borda da tela para ver a barra"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Deslize a partir da borda da tela ver a barra do sistema"</string>
</resources>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index d7772ed..22a857e 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -298,6 +298,8 @@
<skip />
<!-- no translation found for gps_notification_found_text (4619274244146446464) -->
<skip />
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<!-- no translation found for accessibility_clear_all (5235938559247164925) -->
<skip />
<!-- no translation found for status_bar_notification_inspect_item_title (1163547729015390250) -->
@@ -370,8 +372,8 @@
<skip />
<!-- no translation found for status_bar_help_text (7874607155052076323) -->
<skip />
- <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+ <!-- no translation found for hiding_navigation_confirmation_message (3227814171674734332) -->
<skip />
- <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+ <!-- no translation found for hiding_navigation_confirmation_message_long (7854368870786524950) -->
<skip />
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 42e2d48..375d12c 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi conectat"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Se caută GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Locaţie setată prin GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ștergeţi toate notificările."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informaţii despre aplicaţie"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ecranul se va roti în mod automat."</string>
@@ -182,10 +184,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotire automată"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotire blocată"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Metodă de introducere"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"Locație"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Localizarea este dezactivată"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Dispozitiv media"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"Numai apeluri de urgenţă"</string>
@@ -202,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAT"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Notificările se afişează aici"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Accesaţi-le oricând glisând în jos.\nGlisaţi în jos din nou pentru comenzile sistemului."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Glisați dinspre marginea ecranului pentru a afișa bara"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Glisați dinspre marginea ecranului pentru a afișa bara de sistem"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Glisați dinspre marginea ecranului pentru a afișa bara"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Glisați dinspre marginea ecranului pentru a afișa bara de sistem"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 233fee8a8..15adf90 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi подключено"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Поиск GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Координаты по GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Удалить все уведомления"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"О приложении"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран будет поворачиваться автоматически."</string>
@@ -186,10 +188,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоповорот"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Автоповорот выкл."</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"Способ ввода"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"Местоположение"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Местоположение выкл."</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"Режим медиа"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"Экстр. вызов"</string>
@@ -206,6 +206,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТОНАСТРОЙКА"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Это панель уведомлений"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Ее можно открыть, пролистнув экран вниз.\nЧтобы открыть настройки, проведите пальцем вниз ещё раз."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Чтобы открыть панель, проведите пальцем от края к центру экрана"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Чтобы открыть панель навигации, проведите пальцем от края к центру экрана"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Чтобы открыть панель, проведите пальцем от края к центру экрана"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Чтобы открыть панель навигации, проведите пальцем от края к центру экрана"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index c54540c..bb70f36 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi: pripojené"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Vyhľadávanie satelitov GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavená pomocou GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazať všetky upozornenia."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informácie o aplikácii"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka sa automaticky otočí."</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Tu sa zobrazujú upozornenia"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Môžete ich kedykoľvek zobraziť tak, že posuniete prstom nadol.\nAk posuniete prstom nadol ešte raz, zobrazia sa ovládacie prvky systému."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Panel zobrazíte posunutím cez okraj obrazovky"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Systémový panel zobrazíte posunutím cez okraj obrazovky"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Panel zobrazíte posunutím cez okraj obrazovky"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Systémový panel zobrazíte posunutím cez okraj obrazovky"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 3fc4882..46a5826 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi povezan"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Iskanje GPS-a"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokacija nastavljena z GPS-om"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Izbriši vsa obvestila."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Podatki o aplikaciji"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon se bo samodejno zasukal."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"SAMODEJNO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Obvestila so prikazana tukaj"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Do njih lahko kadar koli dostopate tako, da povlečete navzdol.\nZa prikaz sistemskih kontrolnikov znova povlecite navzdol."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Vrstico prikažete tako, da povlečete z roba zaslona"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Sistemsko vrstico prikažete tako, da povlečete z roba zaslona"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Vrstico prikažete tako, da povlečete z roba zaslona"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Sistemsko vrstico prikažete tako, da povlečete z roba zaslona"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 7ba2da5..350f1dc 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi је повезан"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Тражи се GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Локацију је подесио GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Обриши сва обавештења."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Информације о апликацији"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран ће се аутоматски ротирати."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АУТОМАТСКА"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Обавештења се појављују овде"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Приступите им у било ком тренутку листањем надоле.\nПоново листајте надоле да би се приказале системске контроле."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Превуците по ивици екрана да би се приказала трака"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Превуците од ивице екрана да би се приказала системска трака"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Превуците по ивици екрана да би се приказала трака"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Превуците од ивице екрана да би се приказала системска трака"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 022e2f2..c5335f4 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi-ansluten"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Sökning efter GPS pågår"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Platsen har identifierats av GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ta bort alla meddelanden."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info om appen"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skärmen roteras automatiskt."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Meddelanden visas här"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Du kommer åt dem när som helst genom att dra nedåt.\nDra nedåt igen om du vill visa systemkontroller."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Dra från kanten av skärmen om du vill visa fältet"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Dra från kanten av skärmen om du vill visa systemfältet"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Dra från kanten av skärmen om du vill visa fältet"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Dra från kanten av skärmen om du vill visa systemfältet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index bdfd27d..ab06b3f 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -162,6 +162,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Mtandao-hewa umeunganishwa"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Inatafuta GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Mahali pamewekwa na GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Futa arifa zote."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Taarifa ya programu"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrini itazunguka kiotomatiki."</string>
@@ -198,6 +200,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"KIOTOMATIKI"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Arifa zitaonekana hapa"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Zifikie wakati wowote kwa kutelezesha chini.\nTelezesha chini tena kupata vidhibiti vya mfumo."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Papasa kwa kasi kutoka ukingo wa skrini ili kuonyesha upau"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Papasa kwa kasi kutoka ukingo wa skrini ili kuonyesha upau wa mfumo"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Telezesha kidole kutoka ukingo wa skrini ili kuonyesha upau"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Telezesha kidole kutoka ukingo wa skrini ili kuonyesha upau wa mfumo"</string>
</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index dc643c4..6fef062 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"เชื่อมต่อ WiFi แล้ว"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"กำลังค้นหา GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"ตำแหน่งที่กำหนดโดย GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"ล้างการแจ้งเตือนทั้งหมด"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"ข้อมูลแอป"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"หน้าจอจะหมุนโดยอัตโนมัติ"</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"อัตโนมัติ"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"การแจ้งเตือนจะแสดงขึ้นที่นี่"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"เข้าถึงได้ทุกเมื่อด้วยการกวาดนิ้วลง\nกวาดนิ้วลงอีกครั้งสำหรับการควบคุมระบบ"</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"กวาดขอบของหน้าจอเพื่อแสดงแถบ"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"กวาดจากขอบของหน้าจอเพื่อแสดงแถบระบบ"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"กวาดขอบของหน้าจอเพื่อแสดงแถบ"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"กวาดจากขอบของหน้าจอเพื่อแสดงแถบระบบ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 0053be4..6dc4e9c 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"nakakonekta ang Wi-Fi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Naghahanap ng GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasyong itinatakda ng GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"I-clear ang lahat ng notification."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Impormasyon ng app"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Awtomatikong iikot ang screen."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Dito lumalabas ang mga notification"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"I-access ang mga ito anumang oras sa pamamagitan ng pag-swipe pababa.\nMuling mag-swipe pababa para sa mga kontrol ng system."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Mag-swipe sa gilid ng screen upang ipakita ang bar"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Mag-swipe mula sa gilid ng screen upang ipakita ang system bar"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Mag-swipe sa gilid ng screen upang ipakita ang bar"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Mag-swipe mula sa gilid ng screen upang ipakita ang system bar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 2185b16..f7b34de 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Kablosuz bağlandı"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS aranıyor"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Konum GPS ile belirlendi"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Tüm bildirimleri temizle"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Uygulama bilgileri"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran otomatik olarak dönecektir."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATİK"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Bildirimler burada görünür"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Aşağıya hızlıca kaydırarak bunlara istediğiniz zaman erişebilirsiniz.\nSistem denetimleri için tekrar hızlıca aşağı kaydırın."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Çubuğu görüntülemek için ekranın kenarından hızlıca kaydırın"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Sistem çubuğunu görüntülemek için ekranın kenarından hızlıca kaydırın"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Çubuğu görüntülemek için ekranın kenarından hızlıca kaydırın"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Sistem çubuğunu görüntülemek için ekranın kenarından hızlıca kaydırın"</string>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 18f67a2..23e276b 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi під’єднано"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Виконується пошук GPS-сигналу"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Місцезнаходження встановлено за допомогою GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Очистити всі сповіщення."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інформація про програму"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран обертатиметься автоматично."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТО"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Сповіщення з’являються тут"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Отримуйте до них доступ будь-коли, провівши пальцем униз.\nЗнову проведіть униз, щоб відкрити елементи керування системи."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Гортайте від краю екрана, щоб з’явилась панель"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Проведіть пальцем від краю екрана, щоб з’явилась навігаційна панель"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Гортайте від краю екрана, щоб з’явилась панель"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Проведіть пальцем від краю екрана, щоб з’явилась навігаційна панель"</string>
</resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index acc7e0e..31fc2c8 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Đã kết nối Wi-Fi"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Đang tìm kiếm GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Vị trí đặt bởi GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Xóa tất cả thông báo."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Thông tin về ứng dụng"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Màn hình sẽ xoay tự động."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"TỰ ĐỘNG"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Thông báo xuất hiện tại đây"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Truy cập vào chúng bất kỳ lúc nào bằng cách vuốt xuống.\nVuốt lại xuống để hiển thị các điều khiển hệ thống."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Vuốt cạnh màn hình để hiển thị thanh"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Vuốt từ cạnh màn hình để hiển thị thanh hệ thống"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Vuốt cạnh màn hình để hiển thị thanh"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Vuốt từ cạnh màn hình để hiển thị thanh hệ thống"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 0a62ee3..b8b56c9 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"WLAN 已连接"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"正在搜索 GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"已通过 GPS 确定位置"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"应用信息"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"屏幕会自动旋转。"</string>
@@ -184,10 +186,8 @@
<string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自动旋转"</string>
<string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"屏幕方向已锁定"</string>
<string name="quick_settings_ime_label" msgid="7073463064369468429">"输入法"</string>
- <!-- no translation found for quick_settings_location_label (5011327048748762257) -->
- <skip />
- <!-- no translation found for quick_settings_location_off_label (7464544086507331459) -->
- <skip />
+ <string name="quick_settings_location_label" msgid="5011327048748762257">"位置信息"</string>
+ <string name="quick_settings_location_off_label" msgid="7464544086507331459">"位置信息服务已关闭"</string>
<string name="quick_settings_media_device_label" msgid="1302906836372603762">"媒体设备"</string>
<string name="quick_settings_rssi_label" msgid="7725671335550695589">"RSSI"</string>
<string name="quick_settings_rssi_emergency_only" msgid="2713774041672886750">"只能拨打紧急呼救电话"</string>
@@ -204,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自动"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"通知会显示在这里"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"向下滑动可随时查看通知。\n再次向下滑动可使用系统控制功能。"</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"从边缘向里滑可显示系统栏"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"从屏幕边缘向里滑动即可显示系统栏"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"从屏幕边缘向里滑可显示系统栏"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"从屏幕边缘向里滑动即可显示系统栏"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 2cfdb59..397e23d 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -166,6 +166,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"Wi-Fi 已連線"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"正在搜尋 GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS 已定位"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"應用程式資訊"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"螢幕會自動旋轉。"</string>
@@ -202,6 +204,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"系統會在這裡顯示通知"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"向下滑動即可隨時存取通知。\n再次向下滑動即可使用系統控制項。"</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"滑動螢幕邊緣即可顯示導覽列"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"從螢幕邊緣向內滑動即可顯示導覽列"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"從螢幕邊緣向內滑動即可顯示導覽列"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"從螢幕邊緣向內滑動即可顯示導覽列"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 007d338..1efcbcb 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -164,6 +164,8 @@
<string name="status_bar_settings_signal_meter_wifi_nossid" msgid="6557486452774597820">"I-Wi-Fi ixhunyiwe"</string>
<string name="gps_notification_searching_text" msgid="8574247005642736060">"Isesha i-GPS"</string>
<string name="gps_notification_found_text" msgid="4619274244146446464">"Indawo ihlelwe i-GPS"</string>
+ <!-- no translation found for accessibility_location_active (2427290146138169014) -->
+ <skip />
<string name="accessibility_clear_all" msgid="5235938559247164925">"Susa zonke izaziso."</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Ulwazi lohlelo lokusebenza"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Isikrini sizophenduka ngokuzenzakalela."</string>
@@ -200,6 +202,6 @@
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OKUZENZAKALELAYO"</string>
<string name="status_bar_help_title" msgid="1199237744086469217">"Izaziso zivela lapha"</string>
<string name="status_bar_help_text" msgid="7874607155052076323">"Kufinyelele noma kunini ngokuswayiphela phansi.\nSwayiphela phansi futhi ngezilawuli zesistimu."</string>
- <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Swayipha unqenqema wesikrini ukuze uveze ibha"</string>
- <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Swayipha kusukela kunqenqema ukuze uveze ibha yesistimu"</string>
+ <string name="hiding_navigation_confirmation_message" msgid="3227814171674734332">"Swayipha kunqenqema lwesikrini ukuze uveze ibha"</string>
+ <string name="hiding_navigation_confirmation_message_long" msgid="7854368870786524950">"Swayipha kusuka kunqenqema ukuze uveze ibha yesistimu"</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
index 91ddf0f..fcf04ac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java
@@ -126,12 +126,9 @@
return;
}
final ContentResolver cr = mContext.getContentResolver();
- Settings.Secure.setLocationProviderEnabled(
- cr, LocationManager.GPS_PROVIDER, enabled);
- // When enabling the NETWORK_PROVIDER, a user consent dialog will pop up, and the
- // setting won't actually be enabled until the user accepts the agreement.
- Settings.Secure.setLocationProviderEnabled(
- cr, LocationManager.NETWORK_PROVIDER, enabled);
+ // When enabling location, a user consent dialog will pop up, and the
+ // setting won't be fully enabled until the user accepts the agreement.
+ Settings.Secure.setLocationMasterSwitchEnabled(cr, enabled);
}
/**
@@ -139,11 +136,7 @@
*/
public boolean isLocationEnabled() {
ContentResolver contentResolver = mContext.getContentResolver();
- boolean isGpsEnabled = Settings.Secure.isLocationProviderEnabled(
- contentResolver, LocationManager.GPS_PROVIDER);
- boolean isNetworkEnabled = Settings.Secure.isLocationProviderEnabled(
- contentResolver, LocationManager.NETWORK_PROVIDER);
- return isGpsEnabled || isNetworkEnabled;
+ return Settings.Secure.isLocationMasterSwitchEnabled(contentResolver);
}
/**
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 26f910e..a3bd785 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -67,6 +67,7 @@
import android.view.Gravity;
import android.view.IRotationWatcher;
import android.view.IWindowManager;
+import android.view.InputEvent;
import android.view.InputQueue;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
@@ -79,6 +80,7 @@
import android.view.ViewGroup;
import android.view.ViewManager;
import android.view.ViewParent;
+import android.view.ViewRootImpl;
import android.view.ViewStub;
import android.view.Window;
import android.view.WindowManager;
@@ -1459,6 +1461,27 @@
}
}
+ @Override
+ public void setLocalFocus(boolean hasFocus, boolean inTouchMode) {
+ getViewRootImpl().windowFocusChanged(hasFocus, inTouchMode);
+
+ }
+
+ @Override
+ public void injectInputEvent(InputEvent event) {
+ getViewRootImpl().dispatchInputEvent(event);
+ }
+
+ private ViewRootImpl getViewRootImpl() {
+ if (mDecor != null) {
+ ViewRootImpl viewRootImpl = mDecor.getViewRootImpl();
+ if (viewRootImpl != null) {
+ return viewRootImpl;
+ }
+ }
+ throw new IllegalStateException("view not added");
+ }
+
/**
* Request that key events come to this activity. Use this if your activity
* has no views with focus, but the activity still wants a chance to process
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index a537e99..ad9192a 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -2877,7 +2877,7 @@
// Save associated .obb content if it exists and we did save the apk
// check for .obb and save those too
final UserEnvironment userEnv = new UserEnvironment(UserHandle.USER_OWNER);
- final File obbDir = userEnv.getExternalStorageAppObbDirectory(pkg.packageName);
+ final File obbDir = userEnv.buildExternalStorageAppObbDirs(pkg.packageName)[0];
if (obbDir != null) {
if (MORE_DEBUG) Log.i(TAG, "obb dir: " + obbDir.getAbsolutePath());
File[] obbFiles = obbDir.listFiles();
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 4c81006..43f95c3 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -2378,7 +2378,7 @@
}
@Override
- public boolean setDeviceOwner(String packageName) {
+ public boolean setDeviceOwner(String packageName, String ownerName) {
if (packageName == null
|| !DeviceOwner.isInstalled(packageName, mContext.getPackageManager())) {
throw new IllegalArgumentException("Invalid package name " + packageName
@@ -2386,7 +2386,7 @@
}
synchronized (this) {
if (mDeviceOwner == null && !isDeviceProvisioned()) {
- mDeviceOwner = new DeviceOwner(packageName);
+ mDeviceOwner = new DeviceOwner(packageName, ownerName);
mDeviceOwner.writeOwnerFile();
return true;
} else {
@@ -2415,6 +2415,17 @@
return null;
}
+ @Override
+ public String getDeviceOwnerName() {
+ mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USERS, null);
+ synchronized (this) {
+ if (mDeviceOwner != null) {
+ return mDeviceOwner.getName();
+ }
+ }
+ return null;
+ }
+
private boolean isDeviceProvisioned() {
return Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.DEVICE_PROVISIONED, 0) > 0;
@@ -2488,15 +2499,18 @@
static class DeviceOwner {
private static final String DEVICE_OWNER_XML = "device_owner.xml";
private static final String TAG_DEVICE_OWNER = "device-owner";
+ private static final String ATTR_NAME = "name";
private static final String ATTR_PACKAGE = "package";
private String mPackageName;
+ private String mOwnerName;
DeviceOwner() {
readOwnerFile();
}
- DeviceOwner(String packageName) {
+ DeviceOwner(String packageName, String ownerName) {
this.mPackageName = packageName;
+ this.mOwnerName = ownerName;
}
static boolean isRegistered() {
@@ -2508,6 +2522,10 @@
return mPackageName;
}
+ String getName() {
+ return mOwnerName;
+ }
+
static boolean isInstalled(String packageName, PackageManager pm) {
try {
PackageInfo pi;
@@ -2539,6 +2557,7 @@
"Device Owner file does not start with device-owner tag: found " + tag);
}
mPackageName = parser.getAttributeValue(null, ATTR_PACKAGE);
+ mOwnerName = parser.getAttributeValue(null, ATTR_NAME);
input.close();
} catch (XmlPullParserException xppe) {
Slog.e(TAG, "Error parsing device-owner file\n" + xppe);
@@ -2563,6 +2582,9 @@
out.startDocument(null, true);
out.startTag(null, TAG_DEVICE_OWNER);
out.attribute(null, ATTR_PACKAGE, mPackageName);
+ if (mOwnerName != null) {
+ out.attribute(null, ATTR_NAME, mOwnerName);
+ }
out.endTag(null, TAG_DEVICE_OWNER);
out.endDocument();
out.flush();
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 49746ff..a32699a 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -437,7 +437,10 @@
FusedProxy fusedProxy = FusedProxy.createAndBind(
mContext,
mLocationHandler,
- flpHardwareProvider.getLocationHardware());
+ flpHardwareProvider.getLocationHardware(),
+ com.android.internal.R.bool.config_enableFusedLocationOverlay,
+ com.android.internal.R.string.config_fusedLocationProviderPackageName,
+ com.android.internal.R.array.config_locationProviderPackageNames);
if(fusedProxy == null) {
Slog.e(TAG, "No FusedProvider found.");
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 83739f5..1facb80 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -190,6 +190,8 @@
/** When defined, base template for user-specific {@link StorageVolume}. */
private StorageVolume mEmulatedTemplate;
+ // TODO: separate storage volumes on per-user basis
+
@GuardedBy("mVolumesLock")
private final ArrayList<StorageVolume> mVolumes = Lists.newArrayList();
/** Map from path to {@link StorageVolume} */
@@ -2605,6 +2607,7 @@
@VisibleForTesting
public static String buildObbPath(final String canonicalPath, int userId, boolean forVold) {
// TODO: allow caller to provide Environment for full testing
+ // TODO: extend to support OBB mounts on secondary external storage
// Only adjust paths when storage is emulated
if (!Environment.isExternalStorageEmulated()) {
@@ -2617,10 +2620,10 @@
final UserEnvironment userEnv = new UserEnvironment(userId);
// /storage/emulated/0
- final String externalPath = userEnv.getExternalStorageDirectory().toString();
+ final String externalPath = userEnv.getExternalStorageDirectory().getAbsolutePath();
// /storage/emulated_legacy
final String legacyExternalPath = Environment.getLegacyExternalStorageDirectory()
- .toString();
+ .getAbsolutePath();
if (path.startsWith(externalPath)) {
path = path.substring(externalPath.length() + 1);
@@ -2636,18 +2639,19 @@
path = path.substring(obbPath.length() + 1);
if (forVold) {
- return new File(Environment.getEmulatedStorageObbSource(), path).toString();
+ return new File(Environment.getEmulatedStorageObbSource(), path).getAbsolutePath();
} else {
final UserEnvironment ownerEnv = new UserEnvironment(UserHandle.USER_OWNER);
- return new File(ownerEnv.getExternalStorageObbDirectory(), path).toString();
+ return new File(ownerEnv.buildExternalStorageAndroidObbDirs()[0], path)
+ .getAbsolutePath();
}
}
// Handle normal external storage paths
if (forVold) {
- return new File(Environment.getEmulatedStorageSource(userId), path).toString();
+ return new File(Environment.getEmulatedStorageSource(userId), path).getAbsolutePath();
} else {
- return new File(userEnv.getExternalStorageDirectory(), path).toString();
+ return new File(userEnv.getExternalDirs()[0], path).getAbsolutePath();
}
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 9dba2ed..a6d7e3c 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -36,6 +36,7 @@
import com.android.internal.os.BatteryStatsImpl;
import com.android.internal.os.ProcessCpuTracker;
import com.android.internal.os.TransferPipe;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.MemInfoReader;
@@ -210,7 +211,7 @@
static final boolean DEBUG_BACKGROUND_BROADCAST = DEBUG_BROADCAST || false;
static final boolean DEBUG_CLEANUP = localLOGV || false;
static final boolean DEBUG_CONFIGURATION = localLOGV || false;
- static final boolean DEBUG_FOCUS = true;
+ static final boolean DEBUG_FOCUS = false;
static final boolean DEBUG_IMMERSIVE = localLOGV || false;
static final boolean DEBUG_MU = localLOGV || false;
static final boolean DEBUG_OOM_ADJ = localLOGV || false;
@@ -705,8 +706,8 @@
* to {@link UriPermission#uri} to {@link UriPermission}.
*/
@GuardedBy("this")
- private final SparseArray<HashMap<Uri, UriPermission>>
- mGrantedUriPermissions = new SparseArray<HashMap<Uri, UriPermission>>();
+ private final SparseArray<ArrayMap<Uri, UriPermission>>
+ mGrantedUriPermissions = new SparseArray<ArrayMap<Uri, UriPermission>>();
CoreSettingsObserver mCoreSettingsObserver;
@@ -5446,9 +5447,9 @@
private UriPermission findOrCreateUriPermissionLocked(
String sourcePkg, String targetPkg, int targetUid, Uri uri) {
- HashMap<Uri, UriPermission> targetUris = mGrantedUriPermissions.get(targetUid);
+ ArrayMap<Uri, UriPermission> targetUris = mGrantedUriPermissions.get(targetUid);
if (targetUris == null) {
- targetUris = Maps.newHashMap();
+ targetUris = Maps.newArrayMap();
mGrantedUriPermissions.put(targetUid, targetUris);
}
@@ -5467,7 +5468,7 @@
if (uid == 0) {
return true;
}
- HashMap<Uri, UriPermission> perms = mGrantedUriPermissions.get(uid);
+ ArrayMap<Uri, UriPermission> perms = mGrantedUriPermissions.get(uid);
if (perms == null) return false;
UriPermission perm = perms.get(uri);
if (perm == null) return false;
@@ -5794,7 +5795,7 @@
void removeUriPermissionIfNeededLocked(UriPermission perm) {
if ((perm.modeFlags&(Intent.FLAG_GRANT_READ_URI_PERMISSION
|Intent.FLAG_GRANT_WRITE_URI_PERMISSION)) == 0) {
- HashMap<Uri, UriPermission> perms
+ ArrayMap<Uri, UriPermission> perms
= mGrantedUriPermissions.get(perm.targetUid);
if (perms != null) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG,
@@ -5837,7 +5838,7 @@
final int NS = SEGMENTS.size();
int N = mGrantedUriPermissions.size();
for (int i=0; i<N; i++) {
- HashMap<Uri, UriPermission> perms
+ ArrayMap<Uri, UriPermission> perms
= mGrantedUriPermissions.valueAt(i);
Iterator<UriPermission> it = perms.values().iterator();
toploop:
@@ -6115,6 +6116,51 @@
}
@Override
+ public Uri[] getGrantedUriPermissions(
+ String sourcePackage, String targetPackage, int modeFlags, int modeMask) {
+ enforceNotIsolatedCaller("getGrantedUriPermissions");
+ synchronized (this) {
+ // Verify that caller owns at least one of the requested packages
+ final int uid = Binder.getCallingUid();
+ final IPackageManager pm = AppGlobals.getPackageManager();
+ final String[] callerPackages;
+ try {
+ callerPackages = pm.getPackagesForUid(uid);
+ } catch (RemoteException e) {
+ throw new SecurityException("Failed to find packages for UID " + uid);
+ }
+ final boolean callerOwnsSource = sourcePackage != null
+ && ArrayUtils.contains(callerPackages, sourcePackage);
+ final boolean callerOwnsTarget = targetPackage != null
+ && ArrayUtils.contains(callerPackages, targetPackage);
+ if (!(callerOwnsSource || callerOwnsTarget)) {
+ throw new SecurityException("Caller " + Arrays.toString(callerPackages)
+ + " doesn't own " + sourcePackage + " or " + targetPackage);
+ }
+
+ final ArrayList<Uri> result = Lists.newArrayList();
+ final int size = mGrantedUriPermissions.size();
+ for (int i = 0; i < size; i++) {
+ final ArrayMap<Uri, UriPermission> map = mGrantedUriPermissions.valueAt(i);
+ final int mapSize = map.size();
+ for (int j = 0; j < mapSize; j++) {
+ final UriPermission perm = map.valueAt(j);
+ final boolean sourceMatch = sourcePackage == null
+ || sourcePackage.equals(perm.sourcePkg);
+ final boolean targetMatch = targetPackage == null
+ || targetPackage.equals(perm.targetPkg);
+ final boolean modeMatch = (perm.modeFlags & modeMask) == modeFlags;
+ if (sourceMatch && targetMatch && modeMatch) {
+ result.add(perm.uri);
+ }
+ }
+ }
+
+ return result.toArray(new Uri[result.size()]);
+ }
+ }
+
+ @Override
public void showWaitingForDebugger(IApplicationThread who, boolean waiting) {
synchronized (this) {
ProcessRecord app =
@@ -6830,7 +6876,7 @@
}
}
- HashMap<Uri, UriPermission> perms = mGrantedUriPermissions.get(callingUid);
+ ArrayMap<Uri, UriPermission> perms = mGrantedUriPermissions.get(callingUid);
if (perms != null) {
for (Map.Entry<Uri, UriPermission> uri : perms.entrySet()) {
if (uri.getKey().getAuthority().equals(cpi.authority)) {
@@ -10731,7 +10777,7 @@
if (dumpUid >= -1 && UserHandle.getAppId(uid) != dumpUid) {
continue;
}
- HashMap<Uri, UriPermission> perms
+ ArrayMap<Uri, UriPermission> perms
= mGrantedUriPermissions.valueAt(i);
if (!printed) {
if (needSep) pw.println();
@@ -13830,7 +13876,7 @@
for (int is = app.services.size()-1;
is >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|| schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE
- || procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND);
+ || procState > ActivityManager.PROCESS_STATE_TOP);
is--) {
ServiceRecord s = app.services.valueAt(is);
if (s.startRequested) {
@@ -13871,13 +13917,13 @@
for (int conni = s.connections.size()-1;
conni >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|| schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE
- || procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND);
+ || procState > ActivityManager.PROCESS_STATE_TOP);
conni--) {
ArrayList<ConnectionRecord> clist = s.connections.valueAt(conni);
for (int i = 0;
i < clist.size() && (adj > ProcessList.FOREGROUND_APP_ADJ
|| schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE
- || procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND);
+ || procState > ActivityManager.PROCESS_STATE_TOP);
i++) {
// XXX should compute this based on the max of
// all connected clients.
@@ -13987,8 +14033,16 @@
if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
schedGroup = Process.THREAD_GROUP_DEFAULT;
}
- if (clientProcState <
- ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND) {
+ if (clientProcState <=
+ ActivityManager.PROCESS_STATE_PERSISTENT_UI &&
+ clientProcState >=
+ ActivityManager.PROCESS_STATE_PERSISTENT) {
+ // Persistent processes don't allow us to become top.
+ // However the top process DOES allow us to become top,
+ // because in that case we are running because the current
+ // top process wants us, so we should be counted as part
+ // of the top set and not just running for some random
+ // unknown reason in the background.
clientProcState =
ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
}
@@ -14040,13 +14094,13 @@
for (int provi = app.pubProviders.size()-1;
provi >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|| schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE
- || procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND);
+ || procState > ActivityManager.PROCESS_STATE_TOP);
provi--) {
ContentProviderRecord cpr = app.pubProviders.valueAt(provi);
for (int i = cpr.connections.size()-1;
i >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|| schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE
- || procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND);
+ || procState > ActivityManager.PROCESS_STATE_TOP);
i--) {
ContentProviderConnection conn = cpr.connections.get(i);
ProcessRecord client = conn.client;
@@ -14078,9 +14132,21 @@
app.adjSourceOom = clientAdj;
app.adjTarget = cpr.name;
}
+ if (clientProcState <=
+ ActivityManager.PROCESS_STATE_PERSISTENT_UI &&
+ clientProcState >=
+ ActivityManager.PROCESS_STATE_PERSISTENT) {
+ // Persistent processes don't allow us to become top.
+ // However the top process DOES allow us to become top,
+ // because in that case we are running because the current
+ // top process wants us, so we should be counted as part
+ // of the top set and not just running for some random
+ // unknown reason in the background.
+ clientProcState =
+ ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
+ }
if (procState > clientProcState) {
- procState = clientProcState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- ? clientProcState : ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
+ procState = clientProcState;
}
if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
schedGroup = Process.THREAD_GROUP_DEFAULT;
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java
index 8634929..0808861 100644
--- a/services/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1684,9 +1684,6 @@
setLaunchHomeTaskNextFlag(sourceRecord, null, targetStack);
targetStack.resumeTopActivityLocked(null);
}
- if (r.task == null) Slog.v(TAG,
- "startActivityUncheckedLocked: task left null",
- new RuntimeException("here").fillInStackTrace());
return ActivityManager.START_DELIVERED_TO_TOP;
}
}
diff --git a/services/java/com/android/server/am/ProcessStatsService.java b/services/java/com/android/server/am/ProcessStatsService.java
index 81b5618..4ba26fb 100644
--- a/services/java/com/android/server/am/ProcessStatsService.java
+++ b/services/java/com/android/server/am/ProcessStatsService.java
@@ -103,17 +103,7 @@
public ProcessStats.ServiceState getServiceStateLocked(String packageName, int uid,
String processName, String className) {
- final ProcessStats.PackageState as = mProcessStats.getPackageStateLocked(packageName, uid);
- ProcessStats.ServiceState ss = as.mServices.get(className);
- if (ss != null) {
- ss.makeActive();
- return ss;
- }
- final ProcessStats.ProcessState ps = mProcessStats.getProcessStateLocked(packageName,
- uid, processName);
- ss = new ProcessStats.ServiceState(mProcessStats, packageName, ps);
- as.mServices.put(className, ss);
- return ss;
+ return mProcessStats.getServiceStateLocked(packageName, uid, processName, className);
}
public boolean isMemFactorLowered() {
@@ -271,40 +261,11 @@
}
}
- static byte[] readFully(FileInputStream stream) throws java.io.IOException {
- int pos = 0;
- int avail = stream.available();
- byte[] data = new byte[avail];
- while (true) {
- int amt = stream.read(data, pos, data.length-pos);
- //Log.i("foo", "Read " + amt + " bytes at " + pos
- // + " of avail " + data.length);
- if (amt <= 0) {
- //Log.i("foo", "**** FINISHED READING: pos=" + pos
- // + " len=" + data.length);
- return data;
- }
- pos += amt;
- avail = stream.available();
- if (avail > data.length-pos) {
- byte[] newData = new byte[pos+avail];
- System.arraycopy(data, 0, newData, 0, pos);
- data = newData;
- }
- }
- }
-
boolean readLocked(ProcessStats stats, AtomicFile file) {
try {
FileInputStream stream = file.openRead();
-
- byte[] raw = readFully(stream);
- Parcel in = Parcel.obtain();
- in.unmarshall(raw, 0, raw.length);
- in.setDataPosition(0);
+ stats.read(stream);
stream.close();
-
- stats.readFromParcel(in);
if (stats.mReadError != null) {
Slog.w(TAG, "Ignoring existing stats; " + stats.mReadError);
if (DEBUG) {
@@ -474,6 +435,12 @@
return current.marshall();
}
+ public int getCurrentMemoryState() {
+ synchronized (mAm) {
+ return mLastMemOnlyState;
+ }
+ }
+
static private void dumpHelp(PrintWriter pw) {
pw.println("Process stats (procstats) dump options:");
pw.println(" [--checkin|-c|--csv] [--csv-screen] [--csv-proc] [--csv-mem]");
diff --git a/services/java/com/android/server/connectivity/PacManager.java b/services/java/com/android/server/connectivity/PacManager.java
index 189c626..defe9f0 100644
--- a/services/java/com/android/server/connectivity/PacManager.java
+++ b/services/java/com/android/server/connectivity/PacManager.java
@@ -83,6 +83,12 @@
mContext = context;
mProxyService = IProxyService.Stub.asInterface(
ServiceManager.getService(PROXY_SERVICE));
+ if (mProxyService == null) {
+ // Added because of b10267814 where mako is restarting.
+ Log.e(TAG, "PacManager: no proxy service");
+ } else {
+ Log.d(TAG, "PacManager: mProxyService available");
+ }
mPacRefreshIntent = PendingIntent.getBroadcast(
context, 0, new Intent(ACTION_PAC_REFRESH), 0);
@@ -98,6 +104,10 @@
}
public void setCurrentProxyScriptUrl(ProxyProperties proxy) {
+ if (mProxyService == null) {
+ Log.e(TAG, "setCurrentProxyScriptUrl: no proxy service");
+ return;
+ }
if (!TextUtils.isEmpty(proxy.getPacFileUrl())) {
try {
mProxyService.startPacSystem();
@@ -212,6 +222,10 @@
}
private boolean setCurrentProxyScript(String script) {
+ if (mProxyService == null) {
+ Log.e(TAG, "setCurrentProxyScript: no proxy service");
+ return false;
+ }
try {
if (mProxyService.setPacFile(script) != NO_ERROR) {
Log.e(TAG, "Unable to parse proxy script.");
diff --git a/services/java/com/android/server/location/FlpHardwareProvider.java b/services/java/com/android/server/location/FlpHardwareProvider.java
index 469f7ce..226c18c 100644
--- a/services/java/com/android/server/location/FlpHardwareProvider.java
+++ b/services/java/com/android/server/location/FlpHardwareProvider.java
@@ -28,11 +28,10 @@
import android.content.Context;
import android.os.Bundle;
-import android.os.Handler;
+import android.os.Looper;
import android.os.RemoteException;
import android.os.SystemClock;
import android.util.Log;
-import android.util.Slog;
/**
* This class is an interop layer for JVM types and the JNI code that interacts
@@ -48,6 +47,7 @@
private final static String TAG = "FlpHardwareProvider";
private final Context mContext;
+ private final Object mLocationSinkLock = new Object();
public static FlpHardwareProvider getInstance(Context context) {
if (sSingletonInstance == null) {
@@ -61,7 +61,6 @@
mContext = context;
// register for listening for passive provider data
- Handler handler = new Handler();
LocationManager manager = (LocationManager) mContext.getSystemService(
Context.LOCATION_SERVICE);
manager.requestLocationUpdates(
@@ -69,7 +68,7 @@
0 /* minTime */,
0 /* minDistance */,
new NetworkLocationListener(),
- handler.getLooper());
+ Looper.myLooper());
}
public static boolean isSupported() {
@@ -87,9 +86,13 @@
location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());
}
+ IFusedLocationHardwareSink sink;
+ synchronized (mLocationSinkLock) {
+ sink = mLocationSink;
+ }
try {
- if (mLocationSink != null) {
- mLocationSink.onLocationAvailable(locations);
+ if (sink != null) {
+ sink.onLocationAvailable(locations);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
@@ -98,9 +101,13 @@
// FlpDiagnosticCallbacks members
private void onDataReport(String data) {
+ IFusedLocationHardwareSink sink;
+ synchronized (mLocationSinkLock) {
+ sink = mLocationSink;
+ }
try {
if (mLocationSink != null) {
- mLocationSink.onDiagnosticDataAvailable(data);
+ sink.onDiagnosticDataAvailable(data);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onDiagnosticDataAvailable");
@@ -199,19 +206,24 @@
private final IFusedLocationHardware mLocationHardware = new IFusedLocationHardware.Stub() {
@Override
public void registerSink(IFusedLocationHardwareSink eventSink) {
- // only one sink is allowed at the moment
- if (mLocationSink != null) {
- throw new RuntimeException("IFusedLocationHardware does not support multiple sinks");
- }
+ synchronized (mLocationSinkLock) {
+ // only one sink is allowed at the moment
+ if (mLocationSink != null) {
+ throw new RuntimeException(
+ "IFusedLocationHardware does not support multiple sinks");
+ }
- mLocationSink = eventSink;
+ mLocationSink = eventSink;
+ }
}
@Override
public void unregisterSink(IFusedLocationHardwareSink eventSink) {
- // don't throw if the sink is not registered, simply make it a no-op
- if (mLocationSink == eventSink) {
- mLocationSink = null;
+ synchronized (mLocationSinkLock) {
+ // don't throw if the sink is not registered, simply make it a no-op
+ if (mLocationSink == eventSink) {
+ mLocationSink = null;
+ }
}
}
diff --git a/services/java/com/android/server/location/FusedProxy.java b/services/java/com/android/server/location/FusedProxy.java
index 8278b96..f7fac77 100644
--- a/services/java/com/android/server/location/FusedProxy.java
+++ b/services/java/com/android/server/location/FusedProxy.java
@@ -33,10 +33,8 @@
*/
public final class FusedProxy {
private final String TAG = "FusedProxy";
-
- private ServiceWatcher mServiceWatcher;
-
- private FusedLocationHardwareSecure mLocationHardware;
+ private final ServiceWatcher mServiceWatcher;
+ private final FusedLocationHardwareSecure mLocationHardware;
/**
* Constructor of the class.
@@ -46,7 +44,13 @@
* @param handler The handler needed for construction.
* @param locationHardware The instance of the Fused location hardware assigned to the proxy.
*/
- private FusedProxy(Context context, Handler handler, IFusedLocationHardware locationHardware) {
+ private FusedProxy(
+ Context context,
+ Handler handler,
+ IFusedLocationHardware locationHardware,
+ int overlaySwitchResId,
+ int defaultServicePackageNameResId,
+ int initialPackageNameResId) {
mLocationHardware = new FusedLocationHardwareSecure(
locationHardware,
context,
@@ -63,9 +67,9 @@
context,
TAG,
"com.android.location.service.FusedProvider",
- com.android.internal.R.bool.config_enableFusedLocationOverlay,
- com.android.internal.R.string.config_fusedLocationProviderPackageName,
- com.android.internal.R.array.config_locationProviderPackageNames,
+ overlaySwitchResId,
+ defaultServicePackageNameResId,
+ initialPackageNameResId,
newServiceWork,
handler);
}
@@ -82,9 +86,17 @@
public static FusedProxy createAndBind(
Context context,
Handler handler,
- IFusedLocationHardware locationHardware
- ) {
- FusedProxy fusedProxy = new FusedProxy(context, handler, locationHardware);
+ IFusedLocationHardware locationHardware,
+ int overlaySwitchResId,
+ int defaultServicePackageNameResId,
+ int initialPackageNameResId) {
+ FusedProxy fusedProxy = new FusedProxy(
+ context,
+ handler,
+ locationHardware,
+ overlaySwitchResId,
+ defaultServicePackageNameResId,
+ initialPackageNameResId);
// try to bind the Fused provider
if (!fusedProxy.mServiceWatcher.start()) {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 80e20a5..656080b 100755
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -6794,31 +6794,20 @@
if (mounted) {
final UserEnvironment userEnv = new UserEnvironment(mStats.userHandle);
- final File externalCacheDir = userEnv
- .getExternalStorageAppCacheDirectory(mStats.packageName);
- final long externalCacheSize = mContainerService
- .calculateDirectorySize(externalCacheDir.getPath());
- mStats.externalCacheSize = externalCacheSize;
+ mStats.externalCacheSize = calculateDirectorySize(mContainerService,
+ userEnv.buildExternalStorageAppCacheDirs(mStats.packageName));
- final File externalDataDir = userEnv
- .getExternalStorageAppDataDirectory(mStats.packageName);
- long externalDataSize = mContainerService.calculateDirectorySize(externalDataDir
- .getPath());
+ mStats.externalDataSize = calculateDirectorySize(mContainerService,
+ userEnv.buildExternalStorageAppDataDirs(mStats.packageName));
- if (externalCacheDir.getParentFile().equals(externalDataDir)) {
- externalDataSize -= externalCacheSize;
- }
- mStats.externalDataSize = externalDataSize;
+ // Always subtract cache size, since it's a subdirectory
+ mStats.externalDataSize -= mStats.externalCacheSize;
- final File externalMediaDir = userEnv
- .getExternalStorageAppMediaDirectory(mStats.packageName);
- mStats.externalMediaSize = mContainerService
- .calculateDirectorySize(externalMediaDir.getPath());
+ mStats.externalMediaSize = calculateDirectorySize(mContainerService,
+ userEnv.buildExternalStorageAppMediaDirs(mStats.packageName));
- final File externalObbDir = userEnv
- .getExternalStorageAppObbDirectory(mStats.packageName);
- mStats.externalObbSize = mContainerService.calculateDirectorySize(externalObbDir
- .getPath());
+ mStats.externalObbSize = calculateDirectorySize(mContainerService,
+ userEnv.buildExternalStorageAppObbDirs(mStats.packageName));
}
}
@@ -6840,6 +6829,24 @@
}
}
+ private static long calculateDirectorySize(IMediaContainerService mcs, File[] paths)
+ throws RemoteException {
+ long result = 0;
+ for (File path : paths) {
+ result += mcs.calculateDirectorySize(path.getAbsolutePath());
+ }
+ return result;
+ }
+
+ private static void clearDirectory(IMediaContainerService mcs, File[] paths) {
+ for (File path : paths) {
+ try {
+ mcs.clearDirectory(path.getAbsolutePath());
+ } catch (RemoteException e) {
+ }
+ }
+ }
+
class InstallParams extends HandlerParams {
final IPackageInstallObserver observer;
int flags;
@@ -9291,25 +9298,13 @@
}
final UserEnvironment userEnv = new UserEnvironment(curUser);
- final File externalCacheDir = userEnv
- .getExternalStorageAppCacheDirectory(packageName);
- try {
- conn.mContainerService.clearDirectory(externalCacheDir.toString());
- } catch (RemoteException e) {
- }
+ clearDirectory(conn.mContainerService,
+ userEnv.buildExternalStorageAppCacheDirs(packageName));
if (allData) {
- final File externalDataDir = userEnv
- .getExternalStorageAppDataDirectory(packageName);
- try {
- conn.mContainerService.clearDirectory(externalDataDir.toString());
- } catch (RemoteException e) {
- }
- final File externalMediaDir = userEnv
- .getExternalStorageAppMediaDirectory(packageName);
- try {
- conn.mContainerService.clearDirectory(externalMediaDir.toString());
- } catch (RemoteException e) {
- }
+ clearDirectory(conn.mContainerService,
+ userEnv.buildExternalStorageAppDataDirs(packageName));
+ clearDirectory(conn.mContainerService,
+ userEnv.buildExternalStorageAppMediaDirs(packageName));
}
}
} finally {
diff --git a/services/java/com/android/server/print/RemotePrintService.java b/services/java/com/android/server/print/RemotePrintService.java
index 28a7362..322de6c 100644
--- a/services/java/com/android/server/print/RemotePrintService.java
+++ b/services/java/com/android/server/print/RemotePrintService.java
@@ -24,13 +24,14 @@
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
+import android.os.IBinder.DeathRecipient;
import android.os.Looper;
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.UserHandle;
-import android.os.IBinder.DeathRecipient;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionController;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintJobInfo;
import android.print.PrintManager;
import android.print.PrinterId;
@@ -128,18 +129,18 @@
printJob).sendToTarget();
}
- private void handleOnRequestCancelPrintJob(final PrintJobInfo printJob) {
+ private void handleRequestCancelPrintJob(final PrintJobInfo printJob) {
throwIfDestroyed();
// If we are not bound, then we have no print jobs to handle
// which means that there are no print jobs to be cancelled.
if (isBound()) {
if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserId + "] handleOnRequestCancelPrintJob()");
+ Slog.i(LOG_TAG, "[user: " + mUserId + "] handleRequestCancelPrintJob()");
}
try {
- mPrintService.onRequestCancelPrintJob(printJob);
+ mPrintService.requestCancelPrintJob(printJob);
} catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error canceling pring job.", re);
+ Slog.e(LOG_TAG, "Error canceling a pring job.", re);
}
}
}
@@ -171,85 +172,34 @@
}
}
- public void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer) {
- mHandler.obtainMessage(MyHandler.MSG_ON_START_PRINTER_DISCOVERY, observer).sendToTarget();
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
+ mHandler.obtainMessage(MyHandler.MSG_CREATE_PRINTER_DISCOVERY_SESSION,
+ observer).sendToTarget();
}
- private void handleOnStartPrinterDiscovery(final IPrinterDiscoveryObserver observer) {
+ private void handleCreatePrinterDiscoverySession(
+ final IPrinterDiscoverySessionObserver observer) {
throwIfDestroyed();
if (!isBound()) {
ensureBound();
mPendingCommands.add(new Runnable() {
@Override
public void run() {
- handleOnStartPrinterDiscovery(observer);
+ handleCreatePrinterDiscoverySession(observer);
}
});
} else {
if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserId + "] onStartPrinterDiscovery()");
+ Slog.i(LOG_TAG, "[user: " + mUserId + "] createPrinterDiscoverySession()");
}
try {
- mPrintService.onStartPrinterDiscovery(observer);
+ mPrintService.createPrinterDiscoverySession(observer);
} catch (RemoteException re) {
Slog.e(LOG_TAG, "Error announcing start printer dicovery.", re);
}
}
}
- public void onStopPrinterDiscovery() {
- mHandler.sendEmptyMessage(MyHandler.MSG_ON_STOP_PRINTER_DISCOVERY);
- }
-
- private void handleStopPrinterDiscovery() {
- throwIfDestroyed();
- if (!isBound()) {
- ensureBound();
- mPendingCommands.add(new Runnable() {
- @Override
- public void run() {
- handleStopPrinterDiscovery();
- }
- });
- } else {
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserId + "] onStopPrinterDiscovery()");
- }
- try {
- mPrintService.onStopPrinterDiscovery();
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error announcing stop printer dicovery.", re);
- }
- }
- }
-
- public void onRequestUpdatePrinters(List<PrinterId> printerIds) {
- mHandler.obtainMessage(MyHandler.MSG_ON_REQUEST_UPDATE_PRINTERS,
- printerIds).sendToTarget();
- }
-
- private void handleReqeustUpdatePrinters(final List<PrinterId> printerIds) {
- throwIfDestroyed();
- if (!isBound()) {
- ensureBound();
- mPendingCommands.add(new Runnable() {
- @Override
- public void run() {
- handleReqeustUpdatePrinters(printerIds);
- }
- });
- } else {
- if (DEBUG) {
- Slog.i(LOG_TAG, "[user: " + mUserId + "] handleReqeustUpdatePrinters()");
- }
- try {
- mPrintService.onRequestUpdatePrinters(printerIds);
- } catch (RemoteException re) {
- Slog.e(LOG_TAG, "Error requesting to update printers.", re);
- }
- }
- }
-
private boolean isBound() {
return mPrintService != null;
}
@@ -331,18 +281,15 @@
public static final int MSG_ON_ALL_PRINT_JOBS_HANDLED = 1;
public static final int MSG_ON_REQUEST_CANCEL_PRINT_JOB = 2;
public static final int MSG_ON_PRINT_JOB_QUEUED = 3;
- public static final int MSG_ON_START_PRINTER_DISCOVERY = 4;
- public static final int MSG_ON_STOP_PRINTER_DISCOVERY = 5;
- public static final int MSG_ON_REQUEST_UPDATE_PRINTERS = 6;
- public static final int MSG_DESTROY = 7;
- public static final int MSG_BINDER_DIED = 8;
+ public static final int MSG_CREATE_PRINTER_DISCOVERY_SESSION = 4;
+ public static final int MSG_DESTROY = 6;
+ public static final int MSG_BINDER_DIED = 7;
public MyHandler(Looper looper) {
super(looper, null, false);
}
@Override
- @SuppressWarnings("unchecked")
public void handleMessage(Message message) {
switch (message.what) {
case MSG_ON_ALL_PRINT_JOBS_HANDLED: {
@@ -351,7 +298,7 @@
case MSG_ON_REQUEST_CANCEL_PRINT_JOB: {
PrintJobInfo printJob = (PrintJobInfo) message.obj;
- handleOnRequestCancelPrintJob(printJob);
+ handleRequestCancelPrintJob(printJob);
} break;
case MSG_ON_PRINT_JOB_QUEUED: {
@@ -359,21 +306,13 @@
handleOnPrintJobQueued(printJob);
} break;
- case MSG_ON_START_PRINTER_DISCOVERY: {
- IPrinterDiscoveryObserver observer = (IPrinterDiscoveryObserver) message.obj;
- handleOnStartPrinterDiscovery(new SecurePrinterDiscoveryObserver(
+ case MSG_CREATE_PRINTER_DISCOVERY_SESSION: {
+ IPrinterDiscoverySessionObserver observer =
+ (IPrinterDiscoverySessionObserver) message.obj;
+ handleCreatePrinterDiscoverySession(new SecurePrinterDiscoverySessionObserver(
mComponentName, observer));
} break;
- case MSG_ON_REQUEST_UPDATE_PRINTERS: {
- List<PrinterId> printerIds = (List<PrinterId>) message.obj;
- handleReqeustUpdatePrinters(printerIds);
- } break;
-
- case MSG_ON_STOP_PRINTER_DISCOVERY: {
- handleStopPrinterDiscovery();
- } break;
-
case MSG_DESTROY: {
handleDestroy();
} break;
@@ -464,14 +403,14 @@
}
}
- private static final class SecurePrinterDiscoveryObserver
- extends IPrinterDiscoveryObserver.Stub {
+ private static final class SecurePrinterDiscoverySessionObserver
+ extends IPrinterDiscoverySessionObserver.Stub {
private final ComponentName mComponentName;
- private final IPrinterDiscoveryObserver mDecoratedObsever;
+ private final IPrinterDiscoverySessionObserver mDecoratedObsever;
- public SecurePrinterDiscoveryObserver(ComponentName componentName,
- IPrinterDiscoveryObserver observer) {
+ public SecurePrinterDiscoverySessionObserver(ComponentName componentName,
+ IPrinterDiscoverySessionObserver observer) {
mComponentName = componentName;
mDecoratedObsever = observer;
}
@@ -506,6 +445,15 @@
}
}
+ @Override
+ public void setController(IPrinterDiscoverySessionController controller) {
+ try {
+ mDecoratedObsever.setController(controller);
+ } catch (RemoteException re) {
+ Slog.e(LOG_TAG, "Error setting controller", re);
+ }
+ }
+
private void throwIfPrinterIdsForPrinterInfoTampered(
List<PrinterInfo> printerInfos) {
final int printerInfoCount = printerInfos.size();
diff --git a/services/java/com/android/server/print/RemotePrintSpooler.java b/services/java/com/android/server/print/RemotePrintSpooler.java
index 3a96a5b..c932e9b 100644
--- a/services/java/com/android/server/print/RemotePrintSpooler.java
+++ b/services/java/com/android/server/print/RemotePrintSpooler.java
@@ -32,10 +32,9 @@
import android.print.IPrintSpooler;
import android.print.IPrintSpoolerCallbacks;
import android.print.IPrintSpoolerClient;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintAttributes;
import android.print.PrintJobInfo;
-import android.print.PrinterId;
import android.util.Slog;
import android.util.TimedRemoteCaller;
@@ -92,10 +91,8 @@
public static interface PrintSpoolerCallbacks {
public void onPrintJobQueued(PrintJobInfo printJob);
- public void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer);
- public void onStopPrinterDiscovery();
public void onAllPrintJobsForServiceHandled(ComponentName printService);
- public void onRequestUpdatePrinters(List<PrinterId> printerIds);
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer);
}
public RemotePrintSpooler(Context context, int userId,
@@ -600,38 +597,12 @@
}
@Override
- public void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer) {
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
RemotePrintSpooler spooler = mWeakSpooler.get();
if (spooler != null) {
final long identity = Binder.clearCallingIdentity();
try {
- spooler.mCallbacks.onStartPrinterDiscovery(observer);
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
- }
- }
-
- @Override
- public void onStopPrinterDiscovery() {
- RemotePrintSpooler spooler = mWeakSpooler.get();
- if (spooler != null) {
- final long identity = Binder.clearCallingIdentity();
- try {
- spooler.mCallbacks.onStopPrinterDiscovery();
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
- }
- }
-
- @Override
- public void onRequestUpdatePrinters(List<PrinterId> printerIds) {
- RemotePrintSpooler spooler = mWeakSpooler.get();
- if (spooler != null) {
- final long identity = Binder.clearCallingIdentity();
- try {
- spooler.mCallbacks.onRequestUpdatePrinters(printerIds);
+ spooler.mCallbacks.createPrinterDiscoverySession(observer);
} finally {
Binder.restoreCallingIdentity(identity);
}
diff --git a/services/java/com/android/server/print/UserState.java b/services/java/com/android/server/print/UserState.java
index 00cc2ff..ffcc9c3 100644
--- a/services/java/com/android/server/print/UserState.java
+++ b/services/java/com/android/server/print/UserState.java
@@ -21,9 +21,8 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.print.IPrinterDiscoveryObserver;
+import android.print.IPrinterDiscoverySessionObserver;
import android.print.PrintJobInfo;
-import android.print.PrinterId;
import android.printservice.PrintServiceInfo;
import android.provider.Settings;
import android.text.TextUtils;
@@ -106,7 +105,7 @@
}
@Override
- public void onStartPrinterDiscovery(IPrinterDiscoveryObserver observer) {
+ public void createPrinterDiscoverySession(IPrinterDiscoverySessionObserver observer) {
final List<RemotePrintService> services;
synchronized (mLock) {
throwIfDestroyedLocked();
@@ -118,39 +117,7 @@
final int serviceCount = services.size();
for (int i = 0; i < serviceCount; i++) {
RemotePrintService service = services.get(i);
- service.onStartPrinterDiscovery(observer);
- }
- }
-
- @Override
- public void onStopPrinterDiscovery() {
- final List<RemotePrintService> services;
- synchronized (mLock) {
- throwIfDestroyedLocked();
- if (mActiveServices.isEmpty()) {
- return;
- }
- services = new ArrayList<RemotePrintService>(mActiveServices.values());
- }
- final int serviceCount = services.size();
- for (int i = 0; i < serviceCount; i++) {
- RemotePrintService service = services.get(i);
- service.onStopPrinterDiscovery();
- }
- }
-
- @Override
- public void onRequestUpdatePrinters(List<PrinterId> printerIds) {
- final RemotePrintService service;
- synchronized (mLock) {
- throwIfDestroyedLocked();
- if (mActiveServices.isEmpty()) {
- return;
- }
- service = mActiveServices.get(printerIds.get(0).getServiceName());
- }
- if (service != null) {
- service.onRequestUpdatePrinters(printerIds);
+ service.createPrinterDiscoverySession(observer);
}
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 364b854..8de2fb0 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -194,9 +194,6 @@
static final boolean PROFILE_ORIENTATION = false;
static final boolean localLOGV = DEBUG;
- final static boolean REVERSE_ITERATOR = true;
- final static boolean FORWARD_ITERATOR = false;
-
/** How much to multiply the policy's type layer, to reserve room
* for multiple windows of the same type and Z-ordering adjustment
* with TYPE_LAYER_OFFSET. */
@@ -9574,19 +9571,15 @@
return doRequest;
}
- /** If a window that has an animation specifying a colored background is the current wallpaper
- * target, then the color goes *below* the wallpaper so we don't cause the wallpaper to
+ /** If a window that has an animation specifying a colored background and the current wallpaper
+ * is visible, then the color goes *below* the wallpaper so we don't cause the wallpaper to
* suddenly disappear. */
int adjustAnimationBackground(WindowStateAnimator winAnimator) {
- final WindowState win = winAnimator.mWin;
- if (mWallpaperTarget == win || mLowerWallpaperTarget == win
- || mUpperWallpaperTarget == win) {
- WindowList windows = win.getWindowList();
- for (int i = windows.size() - 1; i >= 0; --i) {
- WindowState testWin = windows.get(i);
- if (testWin.mIsWallpaper) {
- return testWin.mWinAnimator.mAnimLayer;
- }
+ WindowList windows = winAnimator.mWin.getWindowList();
+ for (int i = windows.size() - 1; i >= 0; --i) {
+ WindowState testWin = windows.get(i);
+ if (testWin.mIsWallpaper && testWin.isVisibleNow()) {
+ return testWin.mWinAnimator.mAnimLayer;
}
}
return winAnimator.mAnimLayer;
@@ -10753,7 +10746,7 @@
if (display == null) {
throw new IllegalArgumentException("getDisplayContent: display must not be null");
}
- newDisplayContentLocked(display);
+ getDisplayContentLocked(display.getDisplayId());
}
/**
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 6fa9cd0..73325cb 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -1272,6 +1272,11 @@
if (mIsWallpaper) {
mService.dispatchWallpaperVisibility(w, true);
}
+ // This draw means the difference between unique content and mirroring.
+ // Run another pass through performLayout to set mHasContent in the
+ // LogicalDisplay.
+ mAnimator.setPendingLayoutChanges(w.getDisplayId(),
+ WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM);
} else {
w.mOrientationChanging = false;
}
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java
index 44077ae..252a14e 100644
--- a/test-runner/src/android/test/mock/MockContext.java
+++ b/test-runner/src/android/test/mock/MockContext.java
@@ -577,4 +577,19 @@
public DisplayAdjustments getDisplayAdjustments(int displayId) {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public File[] getExternalFilesDirs(String type) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public File[] getObbDirs() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public File[] getExternalCacheDirs() {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index 98a32a5..d63dcac 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -1406,4 +1406,22 @@
public int getUserId() {
return 0; // not used
}
+
+ @Override
+ public File[] getExternalFilesDirs(String type) {
+ // pass
+ return new File[0];
+ }
+
+ @Override
+ public File[] getObbDirs() {
+ // pass
+ return new File[0];
+ }
+
+ @Override
+ public File[] getExternalCacheDirs() {
+ // pass
+ return new File[0];
+ }
}
diff --git a/wifi/java/android/net/wifi/WifiMonitor.java b/wifi/java/android/net/wifi/WifiMonitor.java
index 92b8e46..f6d5c98 100644
--- a/wifi/java/android/net/wifi/WifiMonitor.java
+++ b/wifi/java/android/net/wifi/WifiMonitor.java
@@ -514,6 +514,12 @@
if (space != -1) {
String iface = eventStr.substring(7,space);
m = mWifiMonitorSingleton.getMonitor(iface);
+ if (m == null && iface.startsWith("p2p-")) {
+ // p2p interfaces are created dynamically, but we have
+ // only one P2p state machine monitoring all of them; look
+ // for it explicitly, and send messages there ..
+ m = mWifiMonitorSingleton.getMonitor("p2p0");
+ }
if (m != null) {
if (m.mMonitoring) {
mStateMachine = m.mWifiStateMachine;