Merge "Adding shell commands for modifying content."
diff --git a/api/current.txt b/api/current.txt
index 97be454..8c0dc14 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -614,8 +614,10 @@
field public static final int layout_height = 16842997; // 0x10100f5
field public static final int layout_margin = 16842998; // 0x10100f6
field public static final int layout_marginBottom = 16843002; // 0x10100fa
+ field public static final int layout_marginEnd = 16843692; // 0x10103ac
field public static final int layout_marginLeft = 16842999; // 0x10100f7
field public static final int layout_marginRight = 16843001; // 0x10100f9
+ field public static final int layout_marginStart = 16843691; // 0x10103ab
field public static final int layout_marginTop = 16843000; // 0x10100f8
field public static final int layout_row = 16843643; // 0x101037b
field public static final int layout_rowSpan = 16843644; // 0x101037c
@@ -711,8 +713,10 @@
field public static final int packageNames = 16843649; // 0x1010381
field public static final int padding = 16842965; // 0x10100d5
field public static final int paddingBottom = 16842969; // 0x10100d9
+ field public static final int paddingEnd = 16843690; // 0x10103aa
field public static final int paddingLeft = 16842966; // 0x10100d6
field public static final int paddingRight = 16842968; // 0x10100d8
+ field public static final int paddingStart = 16843689; // 0x10103a9
field public static final int paddingTop = 16842967; // 0x10100d7
field public static final int panelBackground = 16842846; // 0x101005e
field public static final int panelColorBackground = 16842849; // 0x1010061
@@ -23179,8 +23183,10 @@
method public android.view.View.OnFocusChangeListener getOnFocusChangeListener();
method public int getOverScrollMode();
method public int getPaddingBottom();
+ method public int getPaddingEnd();
method public int getPaddingLeft();
method public int getPaddingRight();
+ method public int getPaddingStart();
method public int getPaddingTop();
method public final android.view.ViewParent getParent();
method public float getPivotX();
@@ -23256,6 +23262,7 @@
method public boolean isLongClickable();
method public boolean isOpaque();
method protected boolean isPaddingOffsetRequired();
+ method public boolean isPaddingRelative();
method public boolean isPressed();
method public boolean isSaveEnabled();
method public boolean isSaveFromParentEnabled();
@@ -23399,6 +23406,7 @@
method public void setOnTouchListener(android.view.View.OnTouchListener);
method public void setOverScrollMode(int);
method public void setPadding(int, int, int, int);
+ method public void setPaddingRelative(int, int, int, int);
method public void setPivotX(float);
method public void setPivotY(float);
method public void setPressed(boolean);
@@ -23843,10 +23851,15 @@
ctor public ViewGroup.MarginLayoutParams(int, int);
ctor public ViewGroup.MarginLayoutParams(android.view.ViewGroup.MarginLayoutParams);
ctor public ViewGroup.MarginLayoutParams(android.view.ViewGroup.LayoutParams);
+ method public int getMarginEnd();
+ method public int getMarginStart();
+ method public boolean isMarginRelative();
method public void setMargins(int, int, int, int);
field public int bottomMargin;
+ field public int endMargin;
field public int leftMargin;
field public int rightMargin;
+ field public int startMargin;
field public int topMargin;
}
diff --git a/cmds/keystore/Android.mk b/cmds/keystore/Android.mk
deleted file mode 100644
index 5a9b979..0000000
--- a/cmds/keystore/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2009 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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := keystore.cpp
-LOCAL_C_INCLUDES := external/openssl/include
-LOCAL_SHARED_LIBRARIES := libcutils libcrypto
-LOCAL_MODULE:= keystore
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := keystore_cli.cpp
-LOCAL_C_INCLUDES := external/openssl/include
-LOCAL_SHARED_LIBRARIES := libcutils libcrypto
-LOCAL_MODULE:= keystore_cli
-LOCAL_MODULE_TAGS := debug
-include $(BUILD_EXECUTABLE)
diff --git a/cmds/keystore/keystore.cpp b/cmds/keystore/keystore.cpp
deleted file mode 100644
index 2c9cb35..0000000
--- a/cmds/keystore/keystore.cpp
+++ /dev/null
@@ -1,810 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <arpa/inet.h>
-
-#include <openssl/aes.h>
-#include <openssl/evp.h>
-#include <openssl/md5.h>
-
-#define LOG_TAG "keystore"
-#include <cutils/log.h>
-#include <cutils/sockets.h>
-#include <private/android_filesystem_config.h>
-
-#include "keystore.h"
-
-/* KeyStore is a secured storage for key-value pairs. In this implementation,
- * each file stores one key-value pair. Keys are encoded in file names, and
- * values are encrypted with checksums. The encryption key is protected by a
- * user-defined password. To keep things simple, buffers are always larger than
- * the maximum space we needed, so boundary checks on buffers are omitted. */
-
-#define KEY_SIZE ((NAME_MAX - 15) / 2)
-#define VALUE_SIZE 32768
-#define PASSWORD_SIZE VALUE_SIZE
-
-struct Value {
- int length;
- uint8_t value[VALUE_SIZE];
-};
-
-/* Here is the encoding of keys. This is necessary in order to allow arbitrary
- * characters in keys. Characters in [0-~] are not encoded. Others are encoded
- * into two bytes. The first byte is one of [+-.] which represents the first
- * two bits of the character. The second byte encodes the rest of the bits into
- * [0-o]. Therefore in the worst case the length of a key gets doubled. Note
- * that Base64 cannot be used here due to the need of prefix match on keys. */
-
-static int encode_key(char* out, uid_t uid, const Value* key) {
- int n = snprintf(out, NAME_MAX, "%u_", uid);
- out += n;
- const uint8_t* in = key->value;
- int length = key->length;
- for (int i = length; i > 0; --i, ++in, ++out) {
- if (*in >= '0' && *in <= '~') {
- *out = *in;
- } else {
- *out = '+' + (*in >> 6);
- *++out = '0' + (*in & 0x3F);
- ++length;
- }
- }
- *out = '\0';
- return n + length;
-}
-
-static int decode_key(uint8_t* out, char* in, int length) {
- for (int i = 0; i < length; ++i, ++in, ++out) {
- if (*in >= '0' && *in <= '~') {
- *out = *in;
- } else {
- *out = (*in - '+') << 6;
- *out |= (*++in - '0') & 0x3F;
- --length;
- }
- }
- *out = '\0';
- return length;
-}
-
-static size_t readFully(int fd, uint8_t* data, size_t size) {
- size_t remaining = size;
- while (remaining > 0) {
- ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, size));
- if (n == -1 || n == 0) {
- return size-remaining;
- }
- data += n;
- remaining -= n;
- }
- return size;
-}
-
-static size_t writeFully(int fd, uint8_t* data, size_t size) {
- size_t remaining = size;
- while (remaining > 0) {
- ssize_t n = TEMP_FAILURE_RETRY(write(fd, data, size));
- if (n == -1 || n == 0) {
- return size-remaining;
- }
- data += n;
- remaining -= n;
- }
- return size;
-}
-
-class Entropy {
-public:
- Entropy() : mRandom(-1) {}
- ~Entropy() {
- if (mRandom != -1) {
- close(mRandom);
- }
- }
-
- bool open() {
- const char* randomDevice = "/dev/urandom";
- mRandom = ::open(randomDevice, O_RDONLY);
- if (mRandom == -1) {
- ALOGE("open: %s: %s", randomDevice, strerror(errno));
- return false;
- }
- return true;
- }
-
- bool generate_random_data(uint8_t* data, size_t size) {
- return (readFully(mRandom, data, size) == size);
- }
-
-private:
- int mRandom;
-};
-
-/* Here is the file format. There are two parts in blob.value, the secret and
- * the description. The secret is stored in ciphertext, and its original size
- * can be found in blob.length. The description is stored after the secret in
- * plaintext, and its size is specified in blob.info. The total size of the two
- * parts must be no more than VALUE_SIZE bytes. The first three bytes of the
- * file are reserved for future use and are always set to zero. Fields other
- * than blob.info, blob.length, and blob.value are modified by encryptBlob()
- * and decryptBlob(). Thus they should not be accessed from outside. */
-
-struct __attribute__((packed)) blob {
- uint8_t reserved[3];
- uint8_t info;
- uint8_t vector[AES_BLOCK_SIZE];
- uint8_t encrypted[0];
- uint8_t digest[MD5_DIGEST_LENGTH];
- uint8_t digested[0];
- int32_t length; // in network byte order when encrypted
- uint8_t value[VALUE_SIZE + AES_BLOCK_SIZE];
-};
-
-class Blob {
-public:
- Blob(uint8_t* value, int32_t valueLength, uint8_t* info, uint8_t infoLength) {
- mBlob.length = valueLength;
- memcpy(mBlob.value, value, valueLength);
-
- mBlob.info = infoLength;
- memcpy(mBlob.value + valueLength, info, infoLength);
- }
-
- Blob(blob b) {
- mBlob = b;
- }
-
- Blob() {}
-
- uint8_t* getValue() {
- return mBlob.value;
- }
-
- int32_t getLength() {
- return mBlob.length;
- }
-
- uint8_t getInfo() {
- return mBlob.info;
- }
-
- ResponseCode encryptBlob(const char* filename, AES_KEY *aes_key, Entropy* entropy) {
- if (!entropy->generate_random_data(mBlob.vector, AES_BLOCK_SIZE)) {
- return SYSTEM_ERROR;
- }
-
- // data includes the value and the value's length
- size_t dataLength = mBlob.length + sizeof(mBlob.length);
- // pad data to the AES_BLOCK_SIZE
- size_t digestedLength = ((dataLength + AES_BLOCK_SIZE - 1)
- / AES_BLOCK_SIZE * AES_BLOCK_SIZE);
- // encrypted data includes the digest value
- size_t encryptedLength = digestedLength + MD5_DIGEST_LENGTH;
- // move info after space for padding
- memmove(&mBlob.encrypted[encryptedLength], &mBlob.value[mBlob.length], mBlob.info);
- // zero padding area
- memset(mBlob.value + mBlob.length, 0, digestedLength - dataLength);
-
- mBlob.length = htonl(mBlob.length);
- MD5(mBlob.digested, digestedLength, mBlob.digest);
-
- uint8_t vector[AES_BLOCK_SIZE];
- memcpy(vector, mBlob.vector, AES_BLOCK_SIZE);
- AES_cbc_encrypt(mBlob.encrypted, mBlob.encrypted, encryptedLength,
- aes_key, vector, AES_ENCRYPT);
-
- memset(mBlob.reserved, 0, sizeof(mBlob.reserved));
- size_t headerLength = (mBlob.encrypted - (uint8_t*) &mBlob);
- size_t fileLength = encryptedLength + headerLength + mBlob.info;
-
- const char* tmpFileName = ".tmp";
- int out = open(tmpFileName, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR);
- if (out == -1) {
- return SYSTEM_ERROR;
- }
- size_t writtenBytes = writeFully(out, (uint8_t*) &mBlob, fileLength);
- if (close(out) != 0) {
- return SYSTEM_ERROR;
- }
- if (writtenBytes != fileLength) {
- unlink(tmpFileName);
- return SYSTEM_ERROR;
- }
- return (rename(tmpFileName, filename) == 0) ? NO_ERROR : SYSTEM_ERROR;
- }
-
- ResponseCode decryptBlob(const char* filename, AES_KEY *aes_key) {
- int in = open(filename, O_RDONLY);
- if (in == -1) {
- return (errno == ENOENT) ? KEY_NOT_FOUND : SYSTEM_ERROR;
- }
- // fileLength may be less than sizeof(mBlob) since the in
- // memory version has extra padding to tolerate rounding up to
- // the AES_BLOCK_SIZE
- size_t fileLength = readFully(in, (uint8_t*) &mBlob, sizeof(mBlob));
- if (close(in) != 0) {
- return SYSTEM_ERROR;
- }
- size_t headerLength = (mBlob.encrypted - (uint8_t*) &mBlob);
- if (fileLength < headerLength) {
- return VALUE_CORRUPTED;
- }
-
- ssize_t encryptedLength = fileLength - (headerLength + mBlob.info);
- if (encryptedLength < 0 || encryptedLength % AES_BLOCK_SIZE != 0) {
- return VALUE_CORRUPTED;
- }
- AES_cbc_encrypt(mBlob.encrypted, mBlob.encrypted, encryptedLength, aes_key,
- mBlob.vector, AES_DECRYPT);
- size_t digestedLength = encryptedLength - MD5_DIGEST_LENGTH;
- uint8_t computedDigest[MD5_DIGEST_LENGTH];
- MD5(mBlob.digested, digestedLength, computedDigest);
- if (memcmp(mBlob.digest, computedDigest, MD5_DIGEST_LENGTH) != 0) {
- return VALUE_CORRUPTED;
- }
-
- ssize_t maxValueLength = digestedLength - sizeof(mBlob.length);
- mBlob.length = ntohl(mBlob.length);
- if (mBlob.length < 0 || mBlob.length > maxValueLength) {
- return VALUE_CORRUPTED;
- }
- if (mBlob.info != 0) {
- // move info from after padding to after data
- memmove(&mBlob.value[mBlob.length], &mBlob.value[maxValueLength], mBlob.info);
- }
- return NO_ERROR;
- }
-
-private:
- struct blob mBlob;
-};
-
-class KeyStore {
-public:
- KeyStore(Entropy* entropy) : mEntropy(entropy), mRetry(MAX_RETRY) {
- if (access(MASTER_KEY_FILE, R_OK) == 0) {
- setState(STATE_LOCKED);
- } else {
- setState(STATE_UNINITIALIZED);
- }
- }
-
- State getState() {
- return mState;
- }
-
- int8_t getRetry() {
- return mRetry;
- }
-
- ResponseCode initialize(Value* pw) {
- if (!generateMasterKey()) {
- return SYSTEM_ERROR;
- }
- ResponseCode response = writeMasterKey(pw);
- if (response != NO_ERROR) {
- return response;
- }
- setupMasterKeys();
- return NO_ERROR;
- }
-
- ResponseCode writeMasterKey(Value* pw) {
- uint8_t passwordKey[MASTER_KEY_SIZE_BYTES];
- generateKeyFromPassword(passwordKey, MASTER_KEY_SIZE_BYTES, pw, mSalt);
- AES_KEY passwordAesKey;
- AES_set_encrypt_key(passwordKey, MASTER_KEY_SIZE_BITS, &passwordAesKey);
- Blob masterKeyBlob(mMasterKey, sizeof(mMasterKey), mSalt, sizeof(mSalt));
- return masterKeyBlob.encryptBlob(MASTER_KEY_FILE, &passwordAesKey, mEntropy);
- }
-
- ResponseCode readMasterKey(Value* pw) {
- int in = open(MASTER_KEY_FILE, O_RDONLY);
- if (in == -1) {
- return SYSTEM_ERROR;
- }
-
- // we read the raw blob to just to get the salt to generate
- // the AES key, then we create the Blob to use with decryptBlob
- blob rawBlob;
- size_t length = readFully(in, (uint8_t*) &rawBlob, sizeof(rawBlob));
- if (close(in) != 0) {
- return SYSTEM_ERROR;
- }
- // find salt at EOF if present, otherwise we have an old file
- uint8_t* salt;
- if (length > SALT_SIZE && rawBlob.info == SALT_SIZE) {
- salt = (uint8_t*) &rawBlob + length - SALT_SIZE;
- } else {
- salt = NULL;
- }
- uint8_t passwordKey[MASTER_KEY_SIZE_BYTES];
- generateKeyFromPassword(passwordKey, MASTER_KEY_SIZE_BYTES, pw, salt);
- AES_KEY passwordAesKey;
- AES_set_decrypt_key(passwordKey, MASTER_KEY_SIZE_BITS, &passwordAesKey);
- Blob masterKeyBlob(rawBlob);
- ResponseCode response = masterKeyBlob.decryptBlob(MASTER_KEY_FILE, &passwordAesKey);
- if (response == SYSTEM_ERROR) {
- return SYSTEM_ERROR;
- }
- if (response == NO_ERROR && masterKeyBlob.getLength() == MASTER_KEY_SIZE_BYTES) {
- // if salt was missing, generate one and write a new master key file with the salt.
- if (salt == NULL) {
- if (!generateSalt()) {
- return SYSTEM_ERROR;
- }
- response = writeMasterKey(pw);
- }
- if (response == NO_ERROR) {
- memcpy(mMasterKey, masterKeyBlob.getValue(), MASTER_KEY_SIZE_BYTES);
- setupMasterKeys();
- }
- return response;
- }
- if (mRetry <= 0) {
- reset();
- return UNINITIALIZED;
- }
- --mRetry;
- switch (mRetry) {
- case 0: return WRONG_PASSWORD_0;
- case 1: return WRONG_PASSWORD_1;
- case 2: return WRONG_PASSWORD_2;
- case 3: return WRONG_PASSWORD_3;
- default: return WRONG_PASSWORD_3;
- }
- }
-
- bool reset() {
- clearMasterKeys();
- setState(STATE_UNINITIALIZED);
-
- DIR* dir = opendir(".");
- struct dirent* file;
-
- if (!dir) {
- return false;
- }
- while ((file = readdir(dir)) != NULL) {
- unlink(file->d_name);
- }
- closedir(dir);
- return true;
- }
-
- bool isEmpty() {
- DIR* dir = opendir(".");
- struct dirent* file;
- if (!dir) {
- return true;
- }
- bool result = true;
- while ((file = readdir(dir)) != NULL) {
- if (isKeyFile(file->d_name)) {
- result = false;
- break;
- }
- }
- closedir(dir);
- return result;
- }
-
- void lock() {
- clearMasterKeys();
- setState(STATE_LOCKED);
- }
-
- ResponseCode get(const char* filename, Blob* keyBlob) {
- return keyBlob->decryptBlob(filename, &mMasterKeyDecryption);
- }
-
- ResponseCode put(const char* filename, Blob* keyBlob) {
- return keyBlob->encryptBlob(filename, &mMasterKeyEncryption, mEntropy);
- }
-
-private:
- static const char* MASTER_KEY_FILE;
- static const int MASTER_KEY_SIZE_BYTES = 16;
- static const int MASTER_KEY_SIZE_BITS = MASTER_KEY_SIZE_BYTES * 8;
-
- static const int MAX_RETRY = 4;
- static const size_t SALT_SIZE = 16;
-
- Entropy* mEntropy;
-
- State mState;
- int8_t mRetry;
-
- uint8_t mMasterKey[MASTER_KEY_SIZE_BYTES];
- uint8_t mSalt[SALT_SIZE];
-
- AES_KEY mMasterKeyEncryption;
- AES_KEY mMasterKeyDecryption;
-
- void setState(State state) {
- mState = state;
- if (mState == STATE_NO_ERROR || mState == STATE_UNINITIALIZED) {
- mRetry = MAX_RETRY;
- }
- }
-
- bool generateSalt() {
- return mEntropy->generate_random_data(mSalt, sizeof(mSalt));
- }
-
- bool generateMasterKey() {
- if (!mEntropy->generate_random_data(mMasterKey, sizeof(mMasterKey))) {
- return false;
- }
- if (!generateSalt()) {
- return false;
- }
- return true;
- }
-
- void setupMasterKeys() {
- AES_set_encrypt_key(mMasterKey, MASTER_KEY_SIZE_BITS, &mMasterKeyEncryption);
- AES_set_decrypt_key(mMasterKey, MASTER_KEY_SIZE_BITS, &mMasterKeyDecryption);
- setState(STATE_NO_ERROR);
- }
-
- void clearMasterKeys() {
- memset(mMasterKey, 0, sizeof(mMasterKey));
- memset(mSalt, 0, sizeof(mSalt));
- memset(&mMasterKeyEncryption, 0, sizeof(mMasterKeyEncryption));
- memset(&mMasterKeyDecryption, 0, sizeof(mMasterKeyDecryption));
- }
-
- static void generateKeyFromPassword(uint8_t* key, ssize_t keySize, Value* pw, uint8_t* salt) {
- size_t saltSize;
- if (salt != NULL) {
- saltSize = SALT_SIZE;
- } else {
- // pre-gingerbread used this hardwired salt, readMasterKey will rewrite these when found
- salt = (uint8_t*) "keystore";
- // sizeof = 9, not strlen = 8
- saltSize = sizeof("keystore");
- }
- PKCS5_PBKDF2_HMAC_SHA1((char*) pw->value, pw->length, salt, saltSize, 8192, keySize, key);
- }
-
- static bool isKeyFile(const char* filename) {
- return ((strcmp(filename, MASTER_KEY_FILE) != 0)
- && (strcmp(filename, ".") != 0)
- && (strcmp(filename, "..") != 0));
- }
-};
-
-const char* KeyStore::MASTER_KEY_FILE = ".masterkey";
-
-/* Here is the protocol used in both requests and responses:
- * code [length_1 message_1 ... length_n message_n] end-of-file
- * where code is one byte long and lengths are unsigned 16-bit integers in
- * network order. Thus the maximum length of a message is 65535 bytes. */
-
-static int recv_code(int sock, int8_t* code) {
- return recv(sock, code, 1, 0) == 1;
-}
-
-static int recv_message(int sock, uint8_t* message, int length) {
- uint8_t bytes[2];
- if (recv(sock, &bytes[0], 1, 0) != 1 ||
- recv(sock, &bytes[1], 1, 0) != 1) {
- return -1;
- } else {
- int offset = bytes[0] << 8 | bytes[1];
- if (length < offset) {
- return -1;
- }
- length = offset;
- offset = 0;
- while (offset < length) {
- int n = recv(sock, &message[offset], length - offset, 0);
- if (n <= 0) {
- return -1;
- }
- offset += n;
- }
- }
- return length;
-}
-
-static int recv_end_of_file(int sock) {
- uint8_t byte;
- return recv(sock, &byte, 1, 0) == 0;
-}
-
-static void send_code(int sock, int8_t code) {
- send(sock, &code, 1, 0);
-}
-
-static void send_message(int sock, uint8_t* message, int length) {
- uint16_t bytes = htons(length);
- send(sock, &bytes, 2, 0);
- send(sock, message, length, 0);
-}
-
-/* Here are the actions. Each of them is a function without arguments. All
- * information is defined in global variables, which are set properly before
- * performing an action. The number of parameters required by each action is
- * fixed and defined in a table. If the return value of an action is positive,
- * it will be treated as a response code and transmitted to the client. Note
- * that the lengths of parameters are checked when they are received, so
- * boundary checks on parameters are omitted. */
-
-static const ResponseCode NO_ERROR_RESPONSE_CODE_SENT = (ResponseCode) 0;
-
-static ResponseCode test(KeyStore* keyStore, int sock, uid_t uid, Value*, Value*) {
- return (ResponseCode) keyStore->getState();
-}
-
-static ResponseCode get(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*) {
- char filename[NAME_MAX];
- encode_key(filename, uid, keyName);
- Blob keyBlob;
- ResponseCode responseCode = keyStore->get(filename, &keyBlob);
- if (responseCode != NO_ERROR) {
- return responseCode;
- }
- send_code(sock, NO_ERROR);
- send_message(sock, keyBlob.getValue(), keyBlob.getLength());
- return NO_ERROR_RESPONSE_CODE_SENT;
-}
-
-static ResponseCode insert(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value* val) {
- char filename[NAME_MAX];
- encode_key(filename, uid, keyName);
- Blob keyBlob(val->value, val->length, NULL, 0);
- return keyStore->put(filename, &keyBlob);
-}
-
-static ResponseCode del(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*) {
- char filename[NAME_MAX];
- encode_key(filename, uid, keyName);
- return (unlink(filename) && errno != ENOENT) ? SYSTEM_ERROR : NO_ERROR;
-}
-
-static ResponseCode exist(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*) {
- char filename[NAME_MAX];
- encode_key(filename, uid, keyName);
- if (access(filename, R_OK) == -1) {
- return (errno != ENOENT) ? SYSTEM_ERROR : KEY_NOT_FOUND;
- }
- return NO_ERROR;
-}
-
-static ResponseCode saw(KeyStore* keyStore, int sock, uid_t uid, Value* keyPrefix, Value*) {
- DIR* dir = opendir(".");
- if (!dir) {
- return SYSTEM_ERROR;
- }
- char filename[NAME_MAX];
- int n = encode_key(filename, uid, keyPrefix);
- send_code(sock, NO_ERROR);
-
- struct dirent* file;
- while ((file = readdir(dir)) != NULL) {
- if (!strncmp(filename, file->d_name, n)) {
- char* p = &file->d_name[n];
- keyPrefix->length = decode_key(keyPrefix->value, p, strlen(p));
- send_message(sock, keyPrefix->value, keyPrefix->length);
- }
- }
- closedir(dir);
- return NO_ERROR_RESPONSE_CODE_SENT;
-}
-
-static ResponseCode reset(KeyStore* keyStore, int sock, uid_t uid, Value*, Value*) {
- return keyStore->reset() ? NO_ERROR : SYSTEM_ERROR;
-}
-
-/* Here is the history. To improve the security, the parameters to generate the
- * master key has been changed. To make a seamless transition, we update the
- * file using the same password when the user unlock it for the first time. If
- * any thing goes wrong during the transition, the new file will not overwrite
- * the old one. This avoids permanent damages of the existing data. */
-
-static ResponseCode password(KeyStore* keyStore, int sock, uid_t uid, Value* pw, Value*) {
- switch (keyStore->getState()) {
- case STATE_UNINITIALIZED: {
- // generate master key, encrypt with password, write to file, initialize mMasterKey*.
- return keyStore->initialize(pw);
- }
- case STATE_NO_ERROR: {
- // rewrite master key with new password.
- return keyStore->writeMasterKey(pw);
- }
- case STATE_LOCKED: {
- // read master key, decrypt with password, initialize mMasterKey*.
- return keyStore->readMasterKey(pw);
- }
- }
- return SYSTEM_ERROR;
-}
-
-static ResponseCode lock(KeyStore* keyStore, int sock, uid_t uid, Value*, Value*) {
- keyStore->lock();
- return NO_ERROR;
-}
-
-static ResponseCode unlock(KeyStore* keyStore, int sock, uid_t uid, Value* pw, Value* unused) {
- return password(keyStore, sock, uid, pw, unused);
-}
-
-static ResponseCode zero(KeyStore* keyStore, int sock, uid_t uid, Value*, Value*) {
- return keyStore->isEmpty() ? KEY_NOT_FOUND : NO_ERROR;
-}
-
-/* Here are the permissions, actions, users, and the main function. */
-
-enum perm {
- TEST = 1,
- GET = 2,
- INSERT = 4,
- DELETE = 8,
- EXIST = 16,
- SAW = 32,
- RESET = 64,
- PASSWORD = 128,
- LOCK = 256,
- UNLOCK = 512,
- ZERO = 1024,
-};
-
-static const int MAX_PARAM = 2;
-
-static const State STATE_ANY = (State) 0;
-
-static struct action {
- ResponseCode (*run)(KeyStore* keyStore, int sock, uid_t uid, Value* param1, Value* param2);
- int8_t code;
- State state;
- uint32_t perm;
- int lengths[MAX_PARAM];
-} actions[] = {
- {test, 't', STATE_ANY, TEST, {0, 0}},
- {get, 'g', STATE_NO_ERROR, GET, {KEY_SIZE, 0}},
- {insert, 'i', STATE_NO_ERROR, INSERT, {KEY_SIZE, VALUE_SIZE}},
- {del, 'd', STATE_ANY, DELETE, {KEY_SIZE, 0}},
- {exist, 'e', STATE_ANY, EXIST, {KEY_SIZE, 0}},
- {saw, 's', STATE_ANY, SAW, {KEY_SIZE, 0}},
- {reset, 'r', STATE_ANY, RESET, {0, 0}},
- {password, 'p', STATE_ANY, PASSWORD, {PASSWORD_SIZE, 0}},
- {lock, 'l', STATE_NO_ERROR, LOCK, {0, 0}},
- {unlock, 'u', STATE_LOCKED, UNLOCK, {PASSWORD_SIZE, 0}},
- {zero, 'z', STATE_ANY, ZERO, {0, 0}},
- {NULL, 0 , STATE_ANY, 0, {0, 0}},
-};
-
-static struct user {
- uid_t uid;
- uid_t euid;
- uint32_t perms;
-} users[] = {
- {AID_SYSTEM, ~0, ~0},
- {AID_VPN, AID_SYSTEM, GET},
- {AID_WIFI, AID_SYSTEM, GET},
- {AID_ROOT, AID_SYSTEM, GET},
- {~0, ~0, TEST | GET | INSERT | DELETE | EXIST | SAW},
-};
-
-static ResponseCode process(KeyStore* keyStore, int sock, uid_t uid, int8_t code) {
- struct user* user = users;
- struct action* action = actions;
- int i;
-
- while (~user->uid && user->uid != uid) {
- ++user;
- }
- while (action->code && action->code != code) {
- ++action;
- }
- if (!action->code) {
- return UNDEFINED_ACTION;
- }
- if (!(action->perm & user->perms)) {
- return PERMISSION_DENIED;
- }
- if (action->state != STATE_ANY && action->state != keyStore->getState()) {
- return (ResponseCode) keyStore->getState();
- }
- if (~user->euid) {
- uid = user->euid;
- }
- Value params[MAX_PARAM];
- for (i = 0; i < MAX_PARAM && action->lengths[i] != 0; ++i) {
- params[i].length = recv_message(sock, params[i].value, action->lengths[i]);
- if (params[i].length < 0) {
- return PROTOCOL_ERROR;
- }
- }
- if (!recv_end_of_file(sock)) {
- return PROTOCOL_ERROR;
- }
- return action->run(keyStore, sock, uid, ¶ms[0], ¶ms[1]);
-}
-
-int main(int argc, char* argv[]) {
- int controlSocket = android_get_control_socket("keystore");
- if (argc < 2) {
- ALOGE("A directory must be specified!");
- return 1;
- }
- if (chdir(argv[1]) == -1) {
- ALOGE("chdir: %s: %s", argv[1], strerror(errno));
- return 1;
- }
-
- Entropy entropy;
- if (!entropy.open()) {
- return 1;
- }
- if (listen(controlSocket, 3) == -1) {
- ALOGE("listen: %s", strerror(errno));
- return 1;
- }
-
- signal(SIGPIPE, SIG_IGN);
-
- KeyStore keyStore(&entropy);
- int sock;
- while ((sock = accept(controlSocket, NULL, 0)) != -1) {
- struct timeval tv;
- tv.tv_sec = 3;
- setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
- setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
-
- struct ucred cred;
- socklen_t size = sizeof(cred);
- int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size);
- if (credResult != 0) {
- ALOGW("getsockopt: %s", strerror(errno));
- } else {
- int8_t request;
- if (recv_code(sock, &request)) {
- State old_state = keyStore.getState();
- ResponseCode response = process(&keyStore, sock, cred.uid, request);
- if (response == NO_ERROR_RESPONSE_CODE_SENT) {
- response = NO_ERROR;
- } else {
- send_code(sock, response);
- }
- ALOGI("uid: %d action: %c -> %d state: %d -> %d retry: %d",
- cred.uid,
- request, response,
- old_state, keyStore.getState(),
- keyStore.getRetry());
- }
- }
- close(sock);
- }
- ALOGE("accept: %s", strerror(errno));
- return 1;
-}
diff --git a/cmds/keystore/keystore.h b/cmds/keystore/keystore.h
deleted file mode 100644
index 5ae3d24..0000000
--- a/cmds/keystore/keystore.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#ifndef __KEYSTORE_H__
-#define __KEYSTORE_H__
-
-// note state values overlap with ResponseCode for the purposes of the state() API
-enum State {
- STATE_NO_ERROR = 1,
- STATE_LOCKED = 2,
- STATE_UNINITIALIZED = 3,
-};
-
-enum ResponseCode {
- NO_ERROR = STATE_NO_ERROR, // 1
- LOCKED = STATE_LOCKED, // 2
- UNINITIALIZED = STATE_UNINITIALIZED, // 3
- SYSTEM_ERROR = 4,
- PROTOCOL_ERROR = 5,
- PERMISSION_DENIED = 6,
- KEY_NOT_FOUND = 7,
- VALUE_CORRUPTED = 8,
- UNDEFINED_ACTION = 9,
- WRONG_PASSWORD_0 = 10,
- WRONG_PASSWORD_1 = 11,
- WRONG_PASSWORD_2 = 12,
- WRONG_PASSWORD_3 = 13, // MAX_RETRY = 4
-};
-
-#endif
diff --git a/cmds/keystore/keystore_cli.cpp b/cmds/keystore/keystore_cli.cpp
deleted file mode 100644
index dcd3bcb..0000000
--- a/cmds/keystore/keystore_cli.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <cutils/sockets.h>
-
-#include "keystore.h"
-
-static const char* responses[] = {
- NULL,
- /* [NO_ERROR] = */ "No error",
- /* [LOCKED] = */ "Locked",
- /* [UNINITIALIZED] = */ "Uninitialized",
- /* [SYSTEM_ERROR] = */ "System error",
- /* [PROTOCOL_ERROR] = */ "Protocol error",
- /* [PERMISSION_DENIED] = */ "Permission denied",
- /* [KEY_NOT_FOUND] = */ "Key not found",
- /* [VALUE_CORRUPTED] = */ "Value corrupted",
- /* [UNDEFINED_ACTION] = */ "Undefined action",
- /* [WRONG_PASSWORD] = */ "Wrong password (last chance)",
- /* [WRONG_PASSWORD + 1] = */ "Wrong password (2 tries left)",
- /* [WRONG_PASSWORD + 2] = */ "Wrong password (3 tries left)",
- /* [WRONG_PASSWORD + 3] = */ "Wrong password (4 tries left)",
-};
-
-int main(int argc, char* argv[])
-{
- if (argc < 2) {
- printf("Usage: %s action [parameter ...]\n", argv[0]);
- return 0;
- }
-
- int sock = socket_local_client("keystore", ANDROID_SOCKET_NAMESPACE_RESERVED,
- SOCK_STREAM);
- if (sock == -1) {
- puts("Failed to connect");
- return 1;
- }
-
- send(sock, argv[1], 1, 0);
- uint8_t bytes[65536];
- for (int i = 2; i < argc; ++i) {
- uint16_t length = strlen(argv[i]);
- bytes[0] = length >> 8;
- bytes[1] = length;
- send(sock, &bytes, 2, 0);
- send(sock, argv[i], length, 0);
- }
- shutdown(sock, SHUT_WR);
-
- uint8_t code;
- if (recv(sock, &code, 1, 0) != 1) {
- puts("Failed to receive");
- return 1;
- }
- printf("%d %s\n", code , responses[code] ? responses[code] : "Unknown");
- int i;
- while ((i = recv(sock, &bytes[0], 1, 0)) == 1) {
- int length;
- int offset;
- if ((i = recv(sock, &bytes[1], 1, 0)) != 1) {
- puts("Failed to receive");
- return 1;
- }
- length = bytes[0] << 8 | bytes[1];
- for (offset = 0; offset < length; offset += i) {
- i = recv(sock, &bytes[offset], length - offset, 0);
- if (i <= 0) {
- puts("Failed to receive");
- return 1;
- }
- }
- fwrite(bytes, 1, length, stdout);
- puts("");
- }
- return 0;
-}
diff --git a/cmds/keystore/keystore_get.h b/cmds/keystore/keystore_get.h
deleted file mode 100644
index 4b4923e..0000000
--- a/cmds/keystore/keystore_get.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-#ifndef __KEYSTORE_GET_H__
-#define __KEYSTORE_GET_H__
-
-#include <stdio.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <cutils/sockets.h>
-
-#define KEYSTORE_MESSAGE_SIZE 65535
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This function is provided for native components to get values from keystore.
- * Users are required to link against libcutils. Keys and values are 8-bit safe.
- * The first two arguments are the key and its length. The third argument
- * specifies the buffer to store the retrieved value, which must be an array of
- * KEYSTORE_MESSAGE_SIZE bytes. This function returns the length of the value or
- * -1 if an error happens. */
-static int keystore_get(const char *key, int length, char *value)
-{
- uint8_t bytes[2] = {length >> 8, length};
- uint8_t code = 'g';
- int sock;
-
- if (length < 0 || length > KEYSTORE_MESSAGE_SIZE) {
- return -1;
- }
- sock = socket_local_client("keystore", ANDROID_SOCKET_NAMESPACE_RESERVED,
- SOCK_STREAM);
- if (sock == -1) {
- return -1;
- }
- if (send(sock, &code, 1, 0) == 1 && send(sock, bytes, 2, 0) == 2 &&
- send(sock, key, length, 0) == length && shutdown(sock, SHUT_WR) == 0 &&
- recv(sock, &code, 1, 0) == 1 && code == /* NO_ERROR */ 1 &&
- recv(sock, &bytes[0], 1, 0) == 1 && recv(sock, &bytes[1], 1, 0) == 1) {
- int offset = 0;
- length = bytes[0] << 8 | bytes[1];
- while (offset < length) {
- int n = recv(sock, &value[offset], length - offset, 0);
- if (n <= 0) {
- length = -1;
- break;
- }
- offset += n;
- }
- } else {
- length = -1;
- }
-
- close(sock);
- return length;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cmds/keystore/test-keystore b/cmds/keystore/test-keystore
deleted file mode 100755
index 3be51b3..0000000
--- a/cmds/keystore/test-keystore
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2011, 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.
-
-set -e
-
-prefix=$0
-log_file=$prefix.log
-baseline_file=$prefix.baseline
-
-function cleanup_output() {
- rm -f $log_file
- rm -f $baseline_file
-}
-
-function log() {
- echo "$@"
- append $log_file \# "$@"
- append $baseline_file \# "$@"
-}
-
-function expect() {
- append $baseline_file "$@"
-}
-
-function append() {
- declare -r file=$1
- shift
- echo "$@" >> $file
-}
-
-function run() {
- # strip out carriage returns from adb
- # strip out date/time from ls -l
- "$@" | tr --delete '\r' | sed -E 's/[0-9]{4}-[0-9]{2}-[0-9]{2} +[0-9]{1,2}:[0-9]{2} //' >> $log_file
-}
-
-function keystore() {
- declare -r user=$1
- shift
- run adb shell su $user keystore_cli "$@"
-}
-
-function list_keystore_directory() {
- run adb shell ls -al /data/misc/keystore
-}
-
-function compare() {
- log "comparing $baseline_file and $log_file"
- diff $baseline_file $log_file || (log $tag FAILED && exit 1)
-}
-
-function test_basic() {
-
- #
- # reset
- #
- log "reset keystore as system user"
- keystore system r
- expect "1 No error"
- list_keystore_directory
-
- #
- # basic tests as system/root
- #
- log "root does not have permission to run test"
- keystore root t
- expect "6 Permission denied"
-
- log "but system user does"
- keystore system t
- expect "3 Uninitialized"
- list_keystore_directory
-
- log "password is now bar"
- keystore system p bar
- expect "1 No error"
- list_keystore_directory
- expect "-rw------- keystore keystore 84 .masterkey"
-
- log "no error implies initialized and unlocked"
- keystore system t
- expect "1 No error"
-
- log "saw with no argument"
- keystore system s
- expect "5 Protocol error"
-
- log "saw nothing"
- keystore system s ""
- expect "1 No error"
-
- log "add key baz"
- keystore system i baz quux
- expect "1 No error"
-
- log "1000 is uid of system"
- list_keystore_directory
- expect "-rw------- keystore keystore 84 .masterkey"
- expect "-rw------- keystore keystore 52 1000_baz"
-
- log "saw baz"
- keystore system s ""
- expect "1 No error"
- expect "baz"
-
- log "get baz"
- keystore system g baz
- expect "1 No error"
- expect "quux"
-
- log "root can read system user keys (as can wifi or vpn users)"
- keystore root g baz
- expect "1 No error"
- expect "quux"
-
- #
- # app user tests
- #
-
- # app_0 has uid 10000, as seen below
- log "other uses cannot see the system keys"
- keystore app_0 g baz
- expect "7 Key not found"
-
- log "app user cannot use reset, password, lock, unlock"
- keystore app_0 r
- expect "6 Permission denied"
- keystore app_0 p
- expect "6 Permission denied"
- keystore app_0 l
- expect "6 Permission denied"
- keystore app_0 u
- expect "6 Permission denied"
-
- log "install app_0 key"
- keystore app_0 i 0x deadbeef
- expect 1 No error
- list_keystore_directory
- expect "-rw------- keystore keystore 84 .masterkey"
- expect "-rw------- keystore keystore 52 10000_0x"
- expect "-rw------- keystore keystore 52 1000_baz"
-
- log "get with no argument"
- keystore app_0 g
- expect "5 Protocol error"
-
- keystore app_0 g 0x
- expect "1 No error"
- expect "deadbeef"
-
- keystore app_0 i fred barney
- expect "1 No error"
-
- keystore app_0 s ""
- expect "1 No error"
- expect "0x"
- expect "fred"
-
- log "note that saw returns the suffix of prefix matches"
- keystore app_0 s fr # fred
- expect "1 No error"
- expect "ed" # fred
-
- #
- # lock tests
- #
- log "lock the store as system"
- keystore system l
- expect "1 No error"
- keystore system t
- expect "2 Locked"
-
- log "saw works while locked"
- keystore app_0 s ""
- expect "1 No error"
- expect "0x"
- expect "fred"
-
- log "...but cannot read keys..."
- keystore app_0 g 0x
- expect "2 Locked"
-
- log "...but they can be deleted."
- keystore app_0 e 0x
- expect "1 No error"
- keystore app_0 d 0x
- expect "1 No error"
- keystore app_0 e 0x
- expect "7 Key not found"
-
- #
- # password
- #
- log "wrong password"
- keystore system u foo
- expect "13 Wrong password (4 tries left)"
- log "right password"
- keystore system u bar
- expect "1 No error"
-
- log "make the password foo"
- keystore system p foo
- expect "1 No error"
-
- #
- # final reset
- #
- log "reset wipes everything for all users"
- keystore system r
- expect "1 No error"
- list_keystore_directory
-
- keystore system t
- expect "3 Uninitialized"
-
-}
-
-function test_4599735() {
- # http://b/4599735
- log "start regression test for b/4599735"
- keystore system r
- expect "1 No error"
-
- keystore system p foo
- expect "1 No error"
-
- keystore system i baz quux
- expect "1 No error"
-
- keystore root g baz
- expect "1 No error"
- expect "quux"
-
- keystore system l
- expect "1 No error"
-
- keystore system p foo
- expect "1 No error"
-
- log "after unlock, regression led to result of '8 Value corrupted'"
- keystore root g baz
- expect "1 No error"
- expect "quux"
-
- keystore system r
- expect "1 No error"
- log "end regression test for b/4599735"
-}
-
-function main() {
- cleanup_output
- log $tag START
- test_basic
- test_4599735
- compare
- log $tag PASSED
- cleanup_output
-}
-
-main
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index cc1efb9..6fbeee3 100755
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -522,8 +522,7 @@
* animations possible.
*
*/
- private static class AnimationHandler extends Handler
- implements Choreographer.OnAnimateListener {
+ private static class AnimationHandler extends Handler implements Runnable {
// The per-thread list of all active animations
private final ArrayList<ValueAnimator> mAnimations = new ArrayList<ValueAnimator>();
@@ -539,7 +538,7 @@
private final ArrayList<ValueAnimator> mReadyAnims = new ArrayList<ValueAnimator>();
private final Choreographer mChoreographer;
- private boolean mIsChoreographed;
+ private boolean mAnimationScheduled;
private AnimationHandler() {
mChoreographer = Choreographer.getInstance();
@@ -644,22 +643,17 @@
// If there are still active or delayed animations, schedule a future call to
// onAnimate to process the next frame of the animations.
- if (!mAnimations.isEmpty() || !mDelayedAnims.isEmpty()) {
- if (!mIsChoreographed) {
- mIsChoreographed = true;
- mChoreographer.addOnAnimateListener(this);
- }
- mChoreographer.scheduleAnimation();
- } else {
- if (mIsChoreographed) {
- mIsChoreographed = false;
- mChoreographer.removeOnAnimateListener(this);
- }
+ if (!mAnimationScheduled
+ && (!mAnimations.isEmpty() || !mDelayedAnims.isEmpty())) {
+ mChoreographer.postAnimationCallback(this);
+ mAnimationScheduled = true;
}
}
+ // Called by the Choreographer.
@Override
- public void onAnimate() {
+ public void run() {
+ mAnimationScheduled = false;
doAnimationFrame();
}
}
diff --git a/core/java/android/net/http/HttpResponseCache.java b/core/java/android/net/http/HttpResponseCache.java
index 21736aa..73f3d7c 100644
--- a/core/java/android/net/http/HttpResponseCache.java
+++ b/core/java/android/net/http/HttpResponseCache.java
@@ -22,8 +22,10 @@
import java.io.IOException;
import java.net.CacheRequest;
import java.net.CacheResponse;
+import java.net.ExtendedResponseCache;
import java.net.HttpURLConnection;
import java.net.ResponseCache;
+import java.net.ResponseSource;
import java.net.URI;
import java.net.URLConnection;
import java.util.List;
@@ -149,7 +151,8 @@
* } catch (Exception httpResponseCacheNotAvailable) {
* }}</pre>
*/
-public final class HttpResponseCache extends ResponseCache implements Closeable {
+public final class HttpResponseCache extends ResponseCache
+ implements Closeable, ExtendedResponseCache {
private final libcore.net.http.HttpResponseCache delegate;
@@ -260,6 +263,21 @@
return delegate.getRequestCount();
}
+ /** @hide */
+ @Override public void trackResponse(ResponseSource source) {
+ delegate.trackResponse(source);
+ }
+
+ /** @hide */
+ @Override public void trackConditionalCacheHit() {
+ delegate.trackConditionalCacheHit();
+ }
+
+ /** @hide */
+ @Override public void update(CacheResponse conditionalCacheHit, HttpURLConnection connection) {
+ delegate.update(conditionalCacheHit, connection);
+ }
+
/**
* Uninstalls the cache and releases any active resources. Stored contents
* will remain on the filesystem.
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index 844ed6a..b816b11 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -75,13 +75,13 @@
public Messenger replyTo;
/** If set message is in use */
- /*package*/ static final int FLAG_IN_USE = 1;
+ /*package*/ static final int FLAG_IN_USE = 1 << 0;
- /** Flags reserved for future use (All are reserved for now) */
- /*package*/ static final int FLAGS_RESERVED = ~FLAG_IN_USE;
+ /** If set message is asynchronous */
+ /*package*/ static final int FLAG_ASYNCHRONOUS = 1 << 1;
/** Flags to clear in the copyFrom method */
- /*package*/ static final int FLAGS_TO_CLEAR_ON_COPY_FROM = FLAGS_RESERVED | FLAG_IN_USE;
+ /*package*/ static final int FLAGS_TO_CLEAR_ON_COPY_FROM = FLAG_IN_USE;
/*package*/ int flags;
@@ -363,6 +363,48 @@
target.sendMessage(this);
}
+ /**
+ * Returns true if the message is asynchronous.
+ *
+ * Asynchronous messages represent interrupts or events that do not require global ordering
+ * with represent to synchronous messages. Asynchronous messages are not subject to
+ * the synchronization barriers introduced by {@link MessageQueue#acquireSyncBarrier()}.
+ *
+ * @return True if the message is asynchronous.
+ *
+ * @see #setAsynchronous(boolean)
+ * @see MessageQueue#acquireSyncBarrier()
+ * @see MessageQueue#releaseSyncBarrier()
+ *
+ * @hide
+ */
+ public boolean isAsynchronous() {
+ return (flags & FLAG_ASYNCHRONOUS) != 0;
+ }
+
+ /**
+ * Sets whether the message is asynchronous.
+ *
+ * Asynchronous messages represent interrupts or events that do not require global ordering
+ * with represent to synchronous messages. Asynchronous messages are not subject to
+ * the synchronization barriers introduced by {@link MessageQueue#acquireSyncBarrier()}.
+ *
+ * @param async True if the message is asynchronous.
+ *
+ * @see #isAsynchronous()
+ * @see MessageQueue#acquireSyncBarrier()
+ * @see MessageQueue#releaseSyncBarrier()
+ *
+ * @hide
+ */
+ public void setAsynchronous(boolean async) {
+ if (async) {
+ flags |= FLAG_ASYNCHRONOUS;
+ } else {
+ flags &= ~FLAG_ASYNCHRONOUS;
+ }
+ }
+
/*package*/ void clearForRecycle() {
flags = 0;
what = 0;
diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java
index a658fc4..11dc124 100644
--- a/core/java/android/os/MessageQueue.java
+++ b/core/java/android/os/MessageQueue.java
@@ -39,6 +39,9 @@
// Indicates whether next() is blocked waiting in pollOnce() with a non-zero timeout.
private boolean mBlocked;
+ // Indicates the barrier nesting level.
+ private int mBarrierNestCount;
+
@SuppressWarnings("unused")
private int mPtr; // used by native code
@@ -93,7 +96,53 @@
mIdleHandlers.remove(handler);
}
}
-
+
+ /**
+ * Acquires a synchronization barrier.
+ *
+ * While a synchronization barrier is active, only asynchronous messages are
+ * permitted to execute. Synchronous messages are retained but are not executed
+ * until the synchronization barrier is released.
+ *
+ * This method is used to immediately postpone execution of all synchronous messages
+ * until a condition is met that releases the barrier. Asynchronous messages are
+ * exempt from the barrier and continue to be executed as usual.
+ *
+ * This call nests and must be matched by an equal number of calls to
+ * {@link #releaseSyncBarrier}.
+ *
+ * @hide
+ */
+ public final void acquireSyncBarrier() {
+ synchronized (this) {
+ mBarrierNestCount += 1;
+ }
+ }
+
+ /**
+ * Releases a synchronization barrier.
+ *
+ * This class undoes one invocation of {@link #acquireSyncBarrier}.
+ *
+ * @throws IllegalStateException if the barrier is not acquired.
+ *
+ * @hide
+ */
+ public final void releaseSyncBarrier() {
+ synchronized (this) {
+ if (mBarrierNestCount == 0) {
+ throw new IllegalStateException("The message queue synchronization barrier "
+ + "has not been acquired.");
+ }
+
+ mBarrierNestCount -= 1;
+ if (!mBlocked || mMessages == null) {
+ return;
+ }
+ }
+ nativeWake(mPtr);
+ }
+
MessageQueue() {
nativeInit();
}
@@ -120,28 +169,49 @@
synchronized (this) {
// Try to retrieve the next message. Return if found.
final long now = SystemClock.uptimeMillis();
- final Message msg = mMessages;
- if (msg != null) {
+
+ Message prevMsg = null;
+ Message msg = mMessages;
+ for (;;) {
+ if (msg == null) {
+ // No more messages.
+ nextPollTimeoutMillis = -1;
+ break;
+ }
+
final long when = msg.when;
- if (now >= when) {
+ if (now < when) {
+ // Next message is not ready. Set a timeout to wake up when it is ready.
+ nextPollTimeoutMillis = (int) Math.min(when - now, Integer.MAX_VALUE);
+ break;
+ }
+
+ if (mBarrierNestCount == 0 || msg.isAsynchronous()) {
+ // Got a message.
mBlocked = false;
- mMessages = msg.next;
+ if (prevMsg != null) {
+ prevMsg.next = msg.next;
+ } else {
+ mMessages = msg.next;
+ }
msg.next = null;
if (false) Log.v("MessageQueue", "Returning message: " + msg);
msg.markInUse();
return msg;
- } else {
- nextPollTimeoutMillis = (int) Math.min(when - now, Integer.MAX_VALUE);
}
- } else {
- nextPollTimeoutMillis = -1;
+
+ // We have a message that we could return except that it is
+ // blocked by the sync barrier. In particular, this means that
+ // we are not idle yet, so we do not want to run the idle handlers.
+ prevMsg = msg;
+ msg = msg.next;
}
- // If first time, then get the number of idlers to run.
- if (pendingIdleHandlerCount < 0) {
+ // If first time idle, then get the number of idlers to run.
+ if (pendingIdleHandlerCount < 0 && msg == mMessages) {
pendingIdleHandlerCount = mIdleHandlers.size();
}
- if (pendingIdleHandlerCount == 0) {
+ if (pendingIdleHandlerCount <= 0) {
// No idle handlers to run. Loop and wait some more.
mBlocked = true;
continue;
@@ -205,10 +275,15 @@
//Log.d("MessageQueue", "Enqueing: " + msg);
Message p = mMessages;
if (p == null || when == 0 || when < p.when) {
+ // New head, wake up the event queue if blocked.
msg.next = p;
mMessages = msg;
- needWake = mBlocked; // new head, might need to wake up
+ needWake = mBlocked;
} else {
+ // Inserted within the middle of the queue. Usually we don't have to wake
+ // up the event queue unless the message is asynchronous and it might be
+ // possible for it to be returned out of sequence relative to an earlier
+ // synchronous message at the head of the queue.
Message prev = null;
while (p != null && p.when <= when) {
prev = p;
@@ -216,7 +291,8 @@
}
msg.next = prev.next;
prev.next = msg;
- needWake = false; // still waiting on head, no need to wake up
+ needWake = mBlocked && mBarrierNestCount != 0 && msg.isAsynchronous()
+ && !mMessages.isAsynchronous();
}
}
if (needWake) {
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java
index 3e2d7fc..a74b737 100644
--- a/core/java/android/view/Choreographer.java
+++ b/core/java/android/view/Choreographer.java
@@ -16,8 +16,6 @@
package android.view;
-import com.android.internal.util.ArrayUtils;
-
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -28,8 +26,8 @@
/**
* Coordinates animations and drawing for UI on a particular thread.
*
- * This object is thread-safe. Other threads can add and remove listeners
- * or schedule work to occur at a later time on the UI thread.
+ * This object is thread-safe. Other threads can post callbacks to run at a later time
+ * on the UI thread.
*
* Ensuring thread-safety is a little tricky because the {@link DisplayEventReceiver}
* can only be accessed from the UI thread so operations that touch the event receiver
@@ -37,14 +35,10 @@
*
* @hide
*/
-public final class Choreographer extends Handler {
+public final class Choreographer {
private static final String TAG = "Choreographer";
private static final boolean DEBUG = false;
- // Amount of time in ms to wait before actually disposing of the display event
- // receiver after all listeners have been removed.
- private static final long DISPOSE_RECEIVER_DELAY = 200;
-
// The default amount of time in ms between animation frames.
// When vsync is not enabled, we want to have some idea of how long we should
// wait before posting the next animation message. It is important that the
@@ -87,25 +81,27 @@
private static final int MSG_DO_ANIMATION = 0;
private static final int MSG_DO_DRAW = 1;
private static final int MSG_DO_SCHEDULE_VSYNC = 2;
- private static final int MSG_DO_DISPOSE_RECEIVER = 3;
private final Object mLock = new Object();
private final Looper mLooper;
+ private final FrameHandler mHandler;
+ private final FrameDisplayEventReceiver mDisplayEventReceiver;
- private OnAnimateListener[] mOnAnimateListeners;
- private OnDrawListener[] mOnDrawListeners;
+ private Callback mCallbackPool;
+
+ private Callback mAnimationCallbacks;
+ private Callback mDrawCallbacks;
private boolean mAnimationScheduled;
private boolean mDrawScheduled;
- private boolean mFrameDisplayEventReceiverNeeded;
- private FrameDisplayEventReceiver mFrameDisplayEventReceiver;
private long mLastAnimationTime;
private long mLastDrawTime;
private Choreographer(Looper looper) {
- super(looper);
mLooper = looper;
+ mHandler = new FrameHandler(looper);
+ mDisplayEventReceiver = USE_VSYNC ? new FrameDisplayEventReceiver(looper) : null;
mLastAnimationTime = Long.MIN_VALUE;
mLastDrawTime = Long.MIN_VALUE;
}
@@ -154,14 +150,77 @@
}
/**
- * Schedules animation (and drawing) to occur on the next frame synchronization boundary.
+ * Posts a callback to run on the next animation cycle and schedules an animation cycle.
+ * The callback only runs once and then is automatically removed.
+ *
+ * @param runnable The callback to run during the next animation cycle.
+ *
+ * @see #removeAnimationCallback
*/
- public void scheduleAnimation() {
+ public void postAnimationCallback(Runnable runnable) {
+ if (runnable == null) {
+ throw new IllegalArgumentException("runnable must not be null");
+ }
synchronized (mLock) {
+ mAnimationCallbacks = addCallbackLocked(mAnimationCallbacks, runnable);
scheduleAnimationLocked();
}
}
+ /**
+ * Removes an animation callback.
+ * Does nothing if the specified animation callback has not been posted or has already
+ * been removed.
+ *
+ * @param runnable The animation callback to remove.
+ *
+ * @see #postAnimationCallback
+ */
+ public void removeAnimationCallback(Runnable runnable) {
+ if (runnable == null) {
+ throw new IllegalArgumentException("runnable must not be null");
+ }
+ synchronized (mLock) {
+ mAnimationCallbacks = removeCallbackLocked(mAnimationCallbacks, runnable);
+ }
+ }
+
+ /**
+ * Posts a callback to run on the next draw cycle and schedules a draw cycle.
+ * The callback only runs once and then is automatically removed.
+ *
+ * @param runnable The callback to run during the next draw cycle.
+ *
+ * @see #removeDrawCallback
+ */
+ public void postDrawCallback(Runnable runnable) {
+ if (runnable == null) {
+ throw new IllegalArgumentException("runnable must not be null");
+ }
+ synchronized (mLock) {
+ mDrawCallbacks = addCallbackLocked(mDrawCallbacks, runnable);
+ scheduleDrawLocked();
+ }
+ }
+
+ /**
+ * Removes a draw callback.
+ * Does nothing if the specified draw callback has not been posted or has already
+ * been removed.
+ *
+ * @param runnable The draw callback to remove.
+ *
+ * @see #postDrawCallback
+ */
+ public void removeDrawCallback(Runnable runnable) {
+ if (runnable == null) {
+ throw new IllegalArgumentException("runnable must not be null");
+ }
+ synchronized (mLock) {
+ mDrawCallbacks = removeCallbackLocked(mDrawCallbacks, runnable);
+ }
+ }
+
private void scheduleAnimationLocked() {
if (!mAnimationScheduled) {
mAnimationScheduled = true;
@@ -173,16 +232,11 @@
// If running on the Looper thread, then schedule the vsync immediately,
// otherwise post a message to schedule the vsync from the UI thread
// as soon as possible.
- if (!mFrameDisplayEventReceiverNeeded) {
- mFrameDisplayEventReceiverNeeded = true;
- if (mFrameDisplayEventReceiver != null) {
- removeMessages(MSG_DO_DISPOSE_RECEIVER);
- }
- }
if (isRunningOnLooperThreadLocked()) {
doScheduleVsyncLocked();
} else {
- sendMessageAtFrontOfQueue(obtainMessage(MSG_DO_SCHEDULE_VSYNC));
+ mHandler.sendMessageAtFrontOfQueue(
+ mHandler.obtainMessage(MSG_DO_SCHEDULE_VSYNC));
}
} else {
final long now = SystemClock.uptimeMillis();
@@ -190,72 +244,26 @@
if (DEBUG) {
Log.d(TAG, "Scheduling animation in " + (nextAnimationTime - now) + " ms.");
}
- sendEmptyMessageAtTime(MSG_DO_ANIMATION, nextAnimationTime);
+ mHandler.sendEmptyMessageAtTime(MSG_DO_ANIMATION, nextAnimationTime);
}
}
}
- /**
- * Returns true if {@link #scheduleAnimation()} has been called but
- * {@link OnAnimateListener#onAnimate() OnAnimateListener.onAnimate()} has
- * not yet been called.
- */
- public boolean isAnimationScheduled() {
- synchronized (mLock) {
- return mAnimationScheduled;
- }
- }
-
- /**
- * Schedules drawing to occur on the next frame synchronization boundary.
- * Must be called on the UI thread.
- */
- public void scheduleDraw() {
- synchronized (mLock) {
- if (!mDrawScheduled) {
- mDrawScheduled = true;
- if (USE_ANIMATION_TIMER_FOR_DRAW) {
- scheduleAnimationLocked();
- } else {
- if (DEBUG) {
- Log.d(TAG, "Scheduling draw immediately.");
- }
- sendEmptyMessage(MSG_DO_DRAW);
+ private void scheduleDrawLocked() {
+ if (!mDrawScheduled) {
+ mDrawScheduled = true;
+ if (USE_ANIMATION_TIMER_FOR_DRAW) {
+ scheduleAnimationLocked();
+ } else {
+ if (DEBUG) {
+ Log.d(TAG, "Scheduling draw immediately.");
}
+ mHandler.sendEmptyMessage(MSG_DO_DRAW);
}
}
}
- /**
- * Returns true if {@link #scheduleDraw()} has been called but
- * {@link OnDrawListener#onDraw() OnDrawListener.onDraw()} has
- * not yet been called.
- */
- public boolean isDrawScheduled() {
- synchronized (mLock) {
- return mDrawScheduled;
- }
- }
-
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MSG_DO_ANIMATION:
- doAnimation();
- break;
- case MSG_DO_DRAW:
- doDraw();
- break;
- case MSG_DO_SCHEDULE_VSYNC:
- doScheduleVsync();
- break;
- case MSG_DO_DISPOSE_RECEIVER:
- doDisposeReceiver();
- break;
- }
- }
-
- private void doAnimation() {
+ void doAnimation() {
doAnimationInner();
if (USE_ANIMATION_TIMER_FOR_DRAW) {
@@ -263,9 +271,9 @@
}
}
- private void doAnimationInner() {
+ void doAnimationInner() {
final long start;
- final OnAnimateListener[] listeners;
+ final Callback callbacks;
synchronized (mLock) {
if (!mAnimationScheduled) {
return; // no work to do
@@ -279,12 +287,14 @@
}
mLastAnimationTime = start;
- listeners = mOnAnimateListeners;
+ callbacks = mAnimationCallbacks;
+ mAnimationCallbacks = null;
}
- if (listeners != null) {
- for (int i = 0; i < listeners.length; i++) {
- listeners[i].onAnimate();
+ if (callbacks != null) {
+ runCallbacks(callbacks);
+ synchronized (mLock) {
+ recycleCallbacksLocked(callbacks);
}
}
@@ -293,9 +303,9 @@
}
}
- private void doDraw() {
+ void doDraw() {
final long start;
- final OnDrawListener[] listeners;
+ final Callback callbacks;
synchronized (mLock) {
if (!mDrawScheduled) {
return; // no work to do
@@ -309,12 +319,14 @@
}
mLastDrawTime = start;
- listeners = mOnDrawListeners;
+ callbacks = mDrawCallbacks;
+ mDrawCallbacks = null;
}
- if (listeners != null) {
- for (int i = 0; i < listeners.length; i++) {
- listeners[i].onDraw();
+ if (callbacks != null) {
+ runCallbacks(callbacks);
+ synchronized (mLock) {
+ recycleCallbacksLocked(callbacks);
}
}
@@ -323,146 +335,15 @@
}
}
- private void doScheduleVsync() {
+ void doScheduleVsync() {
synchronized (mLock) {
doScheduleVsyncLocked();
}
}
private void doScheduleVsyncLocked() {
- if (mFrameDisplayEventReceiverNeeded && mAnimationScheduled) {
- if (mFrameDisplayEventReceiver == null) {
- mFrameDisplayEventReceiver = new FrameDisplayEventReceiver(mLooper);
- }
- mFrameDisplayEventReceiver.scheduleVsync();
- }
- }
-
- private void doDisposeReceiver() {
- synchronized (mLock) {
- if (!mFrameDisplayEventReceiverNeeded && mFrameDisplayEventReceiver != null) {
- mFrameDisplayEventReceiver.dispose();
- mFrameDisplayEventReceiver = null;
- }
- }
- }
-
- /**
- * Adds an animation listener.
- *
- * @param listener The listener to add.
- */
- public void addOnAnimateListener(OnAnimateListener listener) {
- if (listener == null) {
- throw new IllegalArgumentException("listener must not be null");
- }
-
- if (DEBUG) {
- Log.d(TAG, "Adding onAnimate listener: " + listener);
- }
-
- synchronized (mLock) {
- mOnAnimateListeners = ArrayUtils.appendElement(OnAnimateListener.class,
- mOnAnimateListeners, listener);
- }
- }
-
- /**
- * Removes an animation listener.
- *
- * @param listener The listener to remove.
- */
- public void removeOnAnimateListener(OnAnimateListener listener) {
- if (listener == null) {
- throw new IllegalArgumentException("listener must not be null");
- }
-
- if (DEBUG) {
- Log.d(TAG, "Removing onAnimate listener: " + listener);
- }
-
- synchronized (mLock) {
- mOnAnimateListeners = ArrayUtils.removeElement(OnAnimateListener.class,
- mOnAnimateListeners, listener);
- stopTimingLoopIfNoListenersLocked();
- }
- }
-
- /**
- * Adds a draw listener.
- *
- * @param listener The listener to add.
- */
- public void addOnDrawListener(OnDrawListener listener) {
- if (listener == null) {
- throw new IllegalArgumentException("listener must not be null");
- }
-
- if (DEBUG) {
- Log.d(TAG, "Adding onDraw listener: " + listener);
- }
-
- synchronized (mLock) {
- mOnDrawListeners = ArrayUtils.appendElement(OnDrawListener.class,
- mOnDrawListeners, listener);
- }
- }
-
- /**
- * Removes a draw listener.
- * Must be called on the UI thread.
- *
- * @param listener The listener to remove.
- */
- public void removeOnDrawListener(OnDrawListener listener) {
- if (listener == null) {
- throw new IllegalArgumentException("listener must not be null");
- }
-
- if (DEBUG) {
- Log.d(TAG, "Removing onDraw listener: " + listener);
- }
-
- synchronized (mLock) {
- mOnDrawListeners = ArrayUtils.removeElement(OnDrawListener.class,
- mOnDrawListeners, listener);
- stopTimingLoopIfNoListenersLocked();
- }
- }
-
- private void stopTimingLoopIfNoListenersLocked() {
- if (mOnDrawListeners == null && mOnAnimateListeners == null) {
- if (DEBUG) {
- Log.d(TAG, "Stopping timing loop.");
- }
-
- if (mAnimationScheduled) {
- mAnimationScheduled = false;
- if (USE_VSYNC) {
- removeMessages(MSG_DO_SCHEDULE_VSYNC);
- } else {
- removeMessages(MSG_DO_ANIMATION);
- }
- }
-
- if (mDrawScheduled) {
- mDrawScheduled = false;
- if (!USE_ANIMATION_TIMER_FOR_DRAW) {
- removeMessages(MSG_DO_DRAW);
- }
- }
-
- // Post a message to dispose the display event receiver if we haven't needed
- // it again after a certain amount of time has elapsed. Another reason to
- // defer disposal is that it is possible for use to attempt to dispose the
- // receiver while handling a vsync event that it dispatched, which might
- // cause a few problems...
- if (mFrameDisplayEventReceiverNeeded) {
- mFrameDisplayEventReceiverNeeded = false;
- if (mFrameDisplayEventReceiver != null) {
- sendEmptyMessageDelayed(MSG_DO_DISPOSE_RECEIVER, DISPOSE_RECEIVER_DELAY);
- }
- }
+ if (mAnimationScheduled) {
+ mDisplayEventReceiver.scheduleVsync();
}
}
@@ -470,24 +351,90 @@
return Looper.myLooper() == mLooper;
}
- /**
- * Listens for animation frame timing events.
- */
- public static interface OnAnimateListener {
- /**
- * Called to animate properties before drawing the frame.
- */
- public void onAnimate();
+ private Callback addCallbackLocked(Callback head, Runnable runnable) {
+ Callback callback = obtainCallbackLocked(runnable);
+ if (head == null) {
+ return callback;
+ }
+ Callback tail = head;
+ while (tail.next != null) {
+ tail = tail.next;
+ }
+ tail.next = callback;
+ return head;
}
- /**
- * Listens for draw frame timing events.
- */
- public static interface OnDrawListener {
- /**
- * Called to draw the frame.
- */
- public void onDraw();
+ private Callback removeCallbackLocked(Callback head, Runnable runnable) {
+ Callback predecessor = null;
+ for (Callback callback = head; callback != null;) {
+ final Callback next = callback.next;
+ if (callback.runnable == runnable) {
+ if (predecessor != null) {
+ predecessor.next = next;
+ } else {
+ head = next;
+ }
+ recycleCallbackLocked(callback);
+ } else {
+ predecessor = callback;
+ }
+ callback = next;
+ }
+ return head;
+ }
+
+ private void runCallbacks(Callback head) {
+ while (head != null) {
+ head.runnable.run();
+ head = head.next;
+ }
+ }
+
+ private void recycleCallbacksLocked(Callback head) {
+ while (head != null) {
+ final Callback next = head.next;
+ recycleCallbackLocked(head);
+ head = next;
+ }
+ }
+
+ private Callback obtainCallbackLocked(Runnable runnable) {
+ Callback callback = mCallbackPool;
+ if (callback == null) {
+ callback = new Callback();
+ } else {
+ mCallbackPool = callback.next;
+ callback.next = null;
+ }
+ callback.runnable = runnable;
+ return callback;
+ }
+
+ private void recycleCallbackLocked(Callback callback) {
+ callback.runnable = null;
+ callback.next = mCallbackPool;
+ mCallbackPool = callback;
+ }
+
+ private final class FrameHandler extends Handler {
+ public FrameHandler(Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_DO_ANIMATION:
+ doAnimation();
+ break;
+ case MSG_DO_DRAW:
+ doDraw();
+ break;
+ case MSG_DO_SCHEDULE_VSYNC:
+ doScheduleVsync();
+ break;
+ }
+ }
}
private final class FrameDisplayEventReceiver extends DisplayEventReceiver {
@@ -500,4 +447,9 @@
doAnimation();
}
}
+
+ private static final class Callback {
+ public Callback next;
+ public Runnable runnable;
+ }
}
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index 1932c7f..67466a4 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -109,8 +109,12 @@
/**
* Turn on to draw dirty regions every other frame.
+ *
+ * Possible values:
+ * "true", to enable dirty regions debugging
+ * "false", to disable dirty regions debugging
*/
- private static final boolean DEBUG_DIRTY_REGION = false;
+ static final String DEBUG_DIRTY_REGIONS_PROPERTY = "hwui.debug_dirty_regions";
/**
* A process can set this flag to false to prevent the use of hardware
@@ -491,6 +495,8 @@
final boolean mProfileEnabled;
final float[] mProfileData;
int mProfileCurrentFrame = -PROFILE_FRAME_DATA_COUNT;
+
+ final boolean mDebugDirtyRegions;
final int mGlVersion;
final boolean mTranslucent;
@@ -502,17 +508,19 @@
GlRenderer(int glVersion, boolean translucent) {
mGlVersion = glVersion;
mTranslucent = translucent;
+
+ String property;
- final String vsyncProperty = SystemProperties.get(DISABLE_VSYNC_PROPERTY, "false");
- mVsyncDisabled = "true".equalsIgnoreCase(vsyncProperty);
+ property = SystemProperties.get(DISABLE_VSYNC_PROPERTY, "false");
+ mVsyncDisabled = "true".equalsIgnoreCase(property);
if (mVsyncDisabled) {
Log.d(LOG_TAG, "Disabling v-sync");
}
//noinspection PointlessBooleanExpression,ConstantConditions
if (!ViewDebug.DEBUG_LATENCY) {
- final String profileProperty = SystemProperties.get(PROFILE_PROPERTY, "false");
- mProfileEnabled = "true".equalsIgnoreCase(profileProperty);
+ property = SystemProperties.get(PROFILE_PROPERTY, "false");
+ mProfileEnabled = "true".equalsIgnoreCase(property);
if (mProfileEnabled) {
Log.d(LOG_TAG, "Profiling hardware renderer");
}
@@ -525,6 +533,12 @@
} else {
mProfileData = null;
}
+
+ property = SystemProperties.get(DEBUG_DIRTY_REGIONS_PROPERTY, "false");
+ mDebugDirtyRegions = "true".equalsIgnoreCase(property);
+ if (mDebugDirtyRegions) {
+ Log.d(LOG_TAG, "Debugging dirty regions");
+ }
}
@Override
@@ -981,8 +995,12 @@
// Shouldn't reach here
view.draw(canvas);
}
+ } finally {
+ callbacks.onHardwarePostDraw(canvas);
+ canvas.restoreToCount(saveCount);
+ view.mRecreateDisplayList = false;
- if (DEBUG_DIRTY_REGION) {
+ if (mDebugDirtyRegions) {
if (mDebugPaint == null) {
mDebugPaint = new Paint();
mDebugPaint.setColor(0x7fff0000);
@@ -991,10 +1009,6 @@
canvas.drawRect(dirty, mDebugPaint);
}
}
- } finally {
- callbacks.onHardwarePostDraw(canvas);
- canvas.restoreToCount(saveCount);
- view.mRecreateDisplayList = false;
}
onPostDraw();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 87104f4..363c30d 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -3788,6 +3788,11 @@
onFocusChanged(false, 0, null);
refreshDrawableState();
+
+ // The view cleared focus and invoked the callbacks, so now is the
+ // time to give focus to the the first focusable from the top to
+ // ensure that the gain focus is announced after clear focus.
+ getRootView().requestFocus(FOCUS_FORWARD);
}
}
@@ -6818,8 +6823,8 @@
if ((changed & VISIBILITY_MASK) != 0) {
if (mParent instanceof ViewGroup) {
- ((ViewGroup) mParent).onChildVisibilityChanged(this, (changed & VISIBILITY_MASK),
- (flags & VISIBILITY_MASK));
+ ((ViewGroup) mParent).onChildVisibilityChanged(this,
+ (changed & VISIBILITY_MASK), (flags & VISIBILITY_MASK));
((View) mParent).invalidate(true);
} else if (mParent != null) {
mParent.invalidateChild(this, null);
@@ -12244,8 +12249,6 @@
* @param top the top padding in pixels
* @param end the end padding in pixels
* @param bottom the bottom padding in pixels
- *
- * @hide
*/
public void setPaddingRelative(int start, int top, int end, int bottom) {
mUserPaddingRelative = true;
@@ -12300,8 +12303,6 @@
* scrollbars as well.
*
* @return the start padding in pixels
- *
- * @hide
*/
public int getPaddingStart() {
return (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
@@ -12325,8 +12326,6 @@
* scrollbars as well.
*
* @return the end padding in pixels
- *
- * @hide
*/
public int getPaddingEnd() {
return (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
@@ -12340,8 +12339,6 @@
* @attr ref android.R.styleable#View_paddingEnd
*
* @return true if the padding is relative or false if it is not.
- *
- * @hide
*/
public boolean isPaddingRelative() {
return mUserPaddingRelative;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index bc147ac..e6a8334 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -675,11 +675,14 @@
*/
@Override
public void clearFocus() {
- super.clearFocus();
-
- // clear any child focus if it exists
- if (mFocused != null) {
+ if (DBG) {
+ System.out.println(this + " clearFocus()");
+ }
+ if (mFocused == null) {
+ super.clearFocus();
+ } else {
mFocused.clearFocus();
+ mFocused = null;
}
}
@@ -691,12 +694,12 @@
if (DBG) {
System.out.println(this + " unFocus()");
}
-
- super.unFocus();
- if (mFocused != null) {
+ if (mFocused == null) {
+ super.unFocus();
+ } else {
mFocused.unFocus();
+ mFocused = null;
}
- mFocused = null;
}
/**
@@ -3601,130 +3604,135 @@
// through
final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
- if (dirty == null) {
- if (child.mLayerType != LAYER_TYPE_NONE) {
- mPrivateFlags |= INVALIDATED;
- mPrivateFlags &= ~DRAWING_CACHE_VALID;
- child.mLocalDirtyRect.setEmpty();
- }
- do {
- View view = null;
- if (parent instanceof View) {
- view = (View) parent;
- if (view.mLayerType != LAYER_TYPE_NONE) {
- view.mLocalDirtyRect.setEmpty();
- if (view.getParent() instanceof View) {
- final View grandParent = (View) view.getParent();
- grandParent.mPrivateFlags |= INVALIDATED;
- grandParent.mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ //noinspection PointlessBooleanExpression
+ if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
+ if (dirty == null) {
+ if (child.mLayerType != LAYER_TYPE_NONE) {
+ mPrivateFlags |= INVALIDATED;
+ mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ child.mLocalDirtyRect.setEmpty();
+ }
+ do {
+ View view = null;
+ if (parent instanceof View) {
+ view = (View) parent;
+ if (view.mLayerType != LAYER_TYPE_NONE) {
+ view.mLocalDirtyRect.setEmpty();
+ if (view.getParent() instanceof View) {
+ final View grandParent = (View) view.getParent();
+ grandParent.mPrivateFlags |= INVALIDATED;
+ grandParent.mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ }
+ }
+ if ((view.mPrivateFlags & DIRTY_MASK) != 0) {
+ // already marked dirty - we're done
+ break;
}
}
- if ((view.mPrivateFlags & DIRTY_MASK) != 0) {
- // already marked dirty - we're done
- break;
+
+ if (drawAnimation) {
+ if (view != null) {
+ view.mPrivateFlags |= DRAW_ANIMATION;
+ } else if (parent instanceof ViewRootImpl) {
+ ((ViewRootImpl) parent).mIsAnimating = true;
+ }
}
- }
-
- if (drawAnimation) {
- if (view != null) {
- view.mPrivateFlags |= DRAW_ANIMATION;
- } else if (parent instanceof ViewRootImpl) {
- ((ViewRootImpl) parent).mIsAnimating = true;
- }
- }
-
- if (parent instanceof ViewRootImpl) {
- ((ViewRootImpl) parent).invalidate();
- parent = null;
- } else if (view != null) {
- if ((view.mPrivateFlags & DRAWN) == DRAWN ||
- (view.mPrivateFlags & DRAWING_CACHE_VALID) == DRAWING_CACHE_VALID) {
- view.mPrivateFlags &= ~DRAWING_CACHE_VALID;
- view.mPrivateFlags |= DIRTY;
- parent = view.mParent;
- } else {
+
+ if (parent instanceof ViewRootImpl) {
+ ((ViewRootImpl) parent).invalidate();
parent = null;
+ } else if (view != null) {
+ if ((view.mPrivateFlags & DRAWN) == DRAWN ||
+ (view.mPrivateFlags & DRAWING_CACHE_VALID) == DRAWING_CACHE_VALID) {
+ view.mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ view.mPrivateFlags |= DIRTY;
+ parent = view.mParent;
+ } else {
+ parent = null;
+ }
}
- }
- } while (parent != null);
- } else {
- // Check whether the child that requests the invalidate is fully opaque
- // Views being animated or transformed are not considered opaque because we may
- // be invalidating their old position and need the parent to paint behind them.
- Matrix childMatrix = child.getMatrix();
- final boolean isOpaque = child.isOpaque() && !drawAnimation &&
- child.getAnimation() == null && childMatrix.isIdentity();
- // Mark the child as dirty, using the appropriate flag
- // Make sure we do not set both flags at the same time
- int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;
-
- if (child.mLayerType != LAYER_TYPE_NONE) {
- mPrivateFlags |= INVALIDATED;
- mPrivateFlags &= ~DRAWING_CACHE_VALID;
- child.mLocalDirtyRect.union(dirty);
+ } while (parent != null);
}
- final int[] location = attachInfo.mInvalidateChildLocation;
- location[CHILD_LEFT_INDEX] = child.mLeft;
- location[CHILD_TOP_INDEX] = child.mTop;
- if (!childMatrix.isIdentity()) {
- RectF boundingRect = attachInfo.mTmpTransformRect;
- boundingRect.set(dirty);
- //boundingRect.inset(-0.5f, -0.5f);
- childMatrix.mapRect(boundingRect);
- dirty.set((int) (boundingRect.left - 0.5f),
- (int) (boundingRect.top - 0.5f),
- (int) (boundingRect.right + 0.5f),
- (int) (boundingRect.bottom + 0.5f));
- }
-
- do {
- View view = null;
- if (parent instanceof View) {
- view = (View) parent;
- if (view.mLayerType != LAYER_TYPE_NONE &&
- view.getParent() instanceof View) {
- final View grandParent = (View) view.getParent();
- grandParent.mPrivateFlags |= INVALIDATED;
- grandParent.mPrivateFlags &= ~DRAWING_CACHE_VALID;
- }
- }
-
- if (drawAnimation) {
- if (view != null) {
- view.mPrivateFlags |= DRAW_ANIMATION;
- } else if (parent instanceof ViewRootImpl) {
- ((ViewRootImpl) parent).mIsAnimating = true;
- }
- }
-
- // If the parent is dirty opaque or not dirty, mark it dirty with the opaque
- // flag coming from the child that initiated the invalidate
- if (view != null) {
- if ((view.mViewFlags & FADING_EDGE_MASK) != 0 &&
- view.getSolidColor() == 0) {
- opaqueFlag = DIRTY;
- }
- if ((view.mPrivateFlags & DIRTY_MASK) != DIRTY) {
- view.mPrivateFlags = (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag;
- }
- }
-
- parent = parent.invalidateChildInParent(location, dirty);
- if (view != null) {
- // Account for transform on current parent
- Matrix m = view.getMatrix();
- if (!m.isIdentity()) {
- RectF boundingRect = attachInfo.mTmpTransformRect;
- boundingRect.set(dirty);
- m.mapRect(boundingRect);
- dirty.set((int) boundingRect.left, (int) boundingRect.top,
- (int) (boundingRect.right + 0.5f),
- (int) (boundingRect.bottom + 0.5f));
- }
- }
- } while (parent != null);
+ return;
}
+
+ // Check whether the child that requests the invalidate is fully opaque
+ // Views being animated or transformed are not considered opaque because we may
+ // be invalidating their old position and need the parent to paint behind them.
+ Matrix childMatrix = child.getMatrix();
+ final boolean isOpaque = child.isOpaque() && !drawAnimation &&
+ child.getAnimation() == null && childMatrix.isIdentity();
+ // Mark the child as dirty, using the appropriate flag
+ // Make sure we do not set both flags at the same time
+ int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;
+
+ if (child.mLayerType != LAYER_TYPE_NONE) {
+ mPrivateFlags |= INVALIDATED;
+ mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ child.mLocalDirtyRect.union(dirty);
+ }
+
+ final int[] location = attachInfo.mInvalidateChildLocation;
+ location[CHILD_LEFT_INDEX] = child.mLeft;
+ location[CHILD_TOP_INDEX] = child.mTop;
+ if (!childMatrix.isIdentity()) {
+ RectF boundingRect = attachInfo.mTmpTransformRect;
+ boundingRect.set(dirty);
+ //boundingRect.inset(-0.5f, -0.5f);
+ childMatrix.mapRect(boundingRect);
+ dirty.set((int) (boundingRect.left - 0.5f),
+ (int) (boundingRect.top - 0.5f),
+ (int) (boundingRect.right + 0.5f),
+ (int) (boundingRect.bottom + 0.5f));
+ }
+
+ do {
+ View view = null;
+ if (parent instanceof View) {
+ view = (View) parent;
+ if (view.mLayerType != LAYER_TYPE_NONE &&
+ view.getParent() instanceof View) {
+ final View grandParent = (View) view.getParent();
+ grandParent.mPrivateFlags |= INVALIDATED;
+ grandParent.mPrivateFlags &= ~DRAWING_CACHE_VALID;
+ }
+ }
+
+ if (drawAnimation) {
+ if (view != null) {
+ view.mPrivateFlags |= DRAW_ANIMATION;
+ } else if (parent instanceof ViewRootImpl) {
+ ((ViewRootImpl) parent).mIsAnimating = true;
+ }
+ }
+
+ // If the parent is dirty opaque or not dirty, mark it dirty with the opaque
+ // flag coming from the child that initiated the invalidate
+ if (view != null) {
+ if ((view.mViewFlags & FADING_EDGE_MASK) != 0 &&
+ view.getSolidColor() == 0) {
+ opaqueFlag = DIRTY;
+ }
+ if ((view.mPrivateFlags & DIRTY_MASK) != DIRTY) {
+ view.mPrivateFlags = (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag;
+ }
+ }
+
+ parent = parent.invalidateChildInParent(location, dirty);
+ if (view != null) {
+ // Account for transform on current parent
+ Matrix m = view.getMatrix();
+ if (!m.isIdentity()) {
+ RectF boundingRect = attachInfo.mTmpTransformRect;
+ boundingRect.set(dirty);
+ m.mapRect(boundingRect);
+ dirty.set((int) boundingRect.left, (int) boundingRect.top,
+ (int) (boundingRect.right + 0.5f),
+ (int) (boundingRect.bottom + 0.5f));
+ }
+ }
+ } while (parent != null);
}
}
@@ -5120,20 +5128,19 @@
/**
* The start margin in pixels of the child.
- *
- * @hide
- *
+ * Call {@link ViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
+ * to this field.
*/
@ViewDebug.ExportedProperty(category = "layout")
- protected int startMargin = DEFAULT_RELATIVE;
+ public int startMargin = DEFAULT_RELATIVE;
/**
* The end margin in pixels of the child.
- *
- * @hide
+ * Call {@link ViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
+ * to this field.
*/
@ViewDebug.ExportedProperty(category = "layout")
- protected int endMargin = DEFAULT_RELATIVE;
+ public int endMargin = DEFAULT_RELATIVE;
/**
* The default start and end margin.
@@ -5265,8 +5272,6 @@
* @attr ref android.R.styleable#ViewGroup_MarginLayout_layout_marginStart
*
* @return the start margin in pixels.
- *
- * @hide
*/
public int getMarginStart() {
return startMargin;
@@ -5278,8 +5283,6 @@
* @attr ref android.R.styleable#ViewGroup_MarginLayout_layout_marginEnd
*
* @return the end margin in pixels.
- *
- * @hide
*/
public int getMarginEnd() {
return endMargin;
@@ -5292,8 +5295,6 @@
* @attr ref android.R.styleable#ViewGroup_MarginLayout_layout_marginEnd
*
* @return true if either marginStart or marginEnd has been set
- *
- * @hide
*/
public boolean isMarginRelative() {
return (startMargin != DEFAULT_RELATIVE) || (endMargin != DEFAULT_RELATIVE);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1c3bbfa..fbcb423 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -97,8 +97,7 @@
*/
@SuppressWarnings({"EmptyCatchBlock", "PointlessBooleanExpression"})
public final class ViewRootImpl extends Handler implements ViewParent,
- View.AttachInfo.Callbacks, HardwareRenderer.HardwareDrawCallbacks,
- Choreographer.OnDrawListener {
+ View.AttachInfo.Callbacks, HardwareRenderer.HardwareDrawCallbacks {
private static final String TAG = "ViewRootImpl";
private static final boolean DBG = false;
private static final boolean LOCAL_LOGV = false;
@@ -174,6 +173,7 @@
View mView;
View mFocusedView;
View mRealFocusedView; // this is not set to null in touch mode
+ View mOldFocusedView;
int mViewVisibility;
boolean mAppVisible = true;
int mOrigWindowType = -1;
@@ -462,8 +462,6 @@
public void setView(View view, WindowManager.LayoutParams attrs, View panelParentView) {
synchronized (this) {
if (mView == null) {
- mChoreographer.addOnDrawListener(this);
-
mView = view;
mFallbackEventHandler.setView(view);
mWindowAttributes.copyFrom(attrs);
@@ -840,7 +838,7 @@
public void scheduleTraversals() {
if (!mTraversalScheduled) {
mTraversalScheduled = true;
- mChoreographer.scheduleDraw();
+ scheduleFrame();
}
}
@@ -848,8 +846,21 @@
mTraversalScheduled = false;
}
- @Override
- public void onDraw() {
+ void scheduleFrame() {
+ if (!mFrameScheduled) {
+ mChoreographer.postDrawCallback(mFrameRunnable);
+ mFrameScheduled = true;
+ }
+ }
+
+ void unscheduleFrame() {
+ if (mFrameScheduled) {
+ mFrameScheduled = false;
+ mChoreographer.removeDrawCallback(mFrameRunnable);
+ }
+ }
+
+ void doFrame() {
if (mInputEventReceiver != null) {
mInputEventReceiver.consumeBatchedInputEvents();
}
@@ -2272,32 +2283,33 @@
public void requestChildFocus(View child, View focused) {
checkThread();
- if (mFocusedView != focused) {
- mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(mFocusedView, focused);
- scheduleTraversals();
+
+ if (DEBUG_INPUT_RESIZE) {
+ Log.v(TAG, "Request child focus: focus now " + focused);
}
+
+ mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(mOldFocusedView, focused);
+ scheduleTraversals();
+
mFocusedView = mRealFocusedView = focused;
- if (DEBUG_INPUT_RESIZE) Log.v(TAG, "Request child focus: focus now "
- + mFocusedView);
}
public void clearChildFocus(View child) {
checkThread();
- View oldFocus = mFocusedView;
-
- if (DEBUG_INPUT_RESIZE) Log.v(TAG, "Clearing child focus");
- mFocusedView = mRealFocusedView = null;
- if (mView != null && !mView.hasFocus()) {
- // If a view gets the focus, the listener will be invoked from requestChildFocus()
- if (!mView.requestFocus(View.FOCUS_FORWARD)) {
- mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(oldFocus, null);
- }
- } else if (oldFocus != null) {
- mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(oldFocus, null);
+ if (DEBUG_INPUT_RESIZE) {
+ Log.v(TAG, "Clearing child focus");
}
- }
+ mOldFocusedView = mFocusedView;
+
+ // Invoke the listener only if there is no view to take focus
+ if (focusSearch(null, View.FOCUS_FORWARD) == null) {
+ mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(mOldFocusedView, null);
+ }
+
+ mFocusedView = mRealFocusedView = null;
+ }
public void focusableViewAvailable(View v) {
checkThread();
@@ -2374,7 +2386,7 @@
mInputChannel = null;
}
- mChoreographer.removeOnDrawListener(this);
+ unscheduleFrame();
}
void updateConfiguration(Configuration config, boolean force) {
@@ -2770,6 +2782,7 @@
mView.unFocus();
mAttachInfo.mTreeObserver.dispatchOnGlobalFocusChange(focused, null);
mFocusedView = null;
+ mOldFocusedView = null;
return true;
}
}
@@ -3920,6 +3933,16 @@
}
}
+ final class FrameRunnable implements Runnable {
+ @Override
+ public void run() {
+ mFrameScheduled = false;
+ doFrame();
+ }
+ }
+ final FrameRunnable mFrameRunnable = new FrameRunnable();
+ boolean mFrameScheduled;
+
final class WindowInputEventReceiver extends InputEventReceiver {
public WindowInputEventReceiver(InputChannel inputChannel, Looper looper) {
super(inputChannel, looper);
@@ -3932,7 +3955,7 @@
@Override
public void onBatchedInputEventPending() {
- mChoreographer.scheduleDraw();
+ scheduleFrame();
}
}
WindowInputEventReceiver mInputEventReceiver;
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 7171b58..f79ac93 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -355,8 +355,10 @@
if (mServedView != null && mServedView.isFocused()) {
mServedConnecting = true;
}
+ if (mActive) {
+ startInputInner();
+ }
}
- startInputInner();
}
return;
}
@@ -1135,20 +1137,26 @@
* @hide
*/
public void checkFocus() {
+ if (checkFocusNoStartInput()) {
+ startInputInner();
+ }
+ }
+
+ private boolean checkFocusNoStartInput() {
// This is called a lot, so short-circuit before locking.
if (mServedView == mNextServedView && !mNextServedNeedsStart) {
- return;
+ return false;
}
InputConnection ic = null;
synchronized (mH) {
if (mServedView == mNextServedView && !mNextServedNeedsStart) {
- return;
+ return false;
}
if (DEBUG) Log.v(TAG, "checkFocus: view=" + mServedView
+ " next=" + mNextServedView
+ " restart=" + mNextServedNeedsStart);
-
+
mNextServedNeedsStart = false;
if (mNextServedView == null) {
finishInputLocked();
@@ -1156,22 +1164,22 @@
// but no longer do. We should make sure the input method is
// no longer shown, since it serves no purpose.
closeCurrentInput();
- return;
+ return false;
}
-
+
ic = mServedInputConnection;
-
+
mServedView = mNextServedView;
mCurrentTextBoxAttribute = null;
mCompletions = null;
mServedConnecting = true;
}
-
+
if (ic != null) {
ic.finishComposingText();
}
-
- startInputInner();
+
+ return true;
}
void closeCurrentInput() {
@@ -1200,7 +1208,7 @@
focusInLocked(focusedView != null ? focusedView : rootView);
}
- checkFocus();
+ boolean startInput = checkFocusNoStartInput();
synchronized (mH) {
try {
@@ -1209,6 +1217,9 @@
mService.windowGainedFocus(mClient, rootView.getWindowToken(),
focusedView != null, isTextEditor, softInputMode, first,
windowFlags);
+ if (startInput) {
+ startInputInner();
+ }
} catch (RemoteException e) {
}
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 332a0eb..9cd51d0 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -5555,7 +5555,7 @@
return false;
}
- if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
+ if (isEnterActionKey(keyCode)) {
switchOutDrawHistory();
boolean wantsKeyEvents = nativeCursorNodePointer() == 0
|| nativeCursorWantsKeyEvents();
@@ -5704,33 +5704,35 @@
return true; // discard press if copy in progress
}
- // perform the single click
- Rect visibleRect = sendOurVisibleRect();
- // Note that sendOurVisibleRect calls viewToContent, so the
- // coordinates should be in content coordinates.
- if (!nativeCursorIntersects(visibleRect)) {
- return false;
- }
- WebViewCore.CursorData data = cursorData();
- mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE, data);
- playSoundEffect(SoundEffectConstants.CLICK);
- if (nativeCursorIsTextInput()) {
- rebuildWebTextView();
- centerKeyPressOnTextField();
- if (inEditingMode()) {
- mWebTextView.setDefaultSelection();
+ if (!sDisableNavcache) {
+ // perform the single click
+ Rect visibleRect = sendOurVisibleRect();
+ // Note that sendOurVisibleRect calls viewToContent, so the
+ // coordinates should be in content coordinates.
+ if (!nativeCursorIntersects(visibleRect)) {
+ return false;
}
- return true;
- }
- clearTextEntry();
- nativeShowCursorTimed();
- if (mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) {
- return true;
- }
- if (nativeCursorNodePointer() != 0 && !nativeCursorWantsKeyEvents()) {
- mWebViewCore.sendMessage(EventHub.CLICK, data.mFrame,
- nativeCursorNodePointer());
- return true;
+ WebViewCore.CursorData data = cursorData();
+ mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE, data);
+ playSoundEffect(SoundEffectConstants.CLICK);
+ if (nativeCursorIsTextInput()) {
+ rebuildWebTextView();
+ centerKeyPressOnTextField();
+ if (inEditingMode()) {
+ mWebTextView.setDefaultSelection();
+ }
+ return true;
+ }
+ clearTextEntry();
+ nativeShowCursorTimed();
+ if (mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) {
+ return true;
+ }
+ if (nativeCursorNodePointer() != 0 && !nativeCursorWantsKeyEvents()) {
+ mWebViewCore.sendMessage(EventHub.CLICK, data.mFrame,
+ nativeCursorNodePointer());
+ return true;
+ }
}
}
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 8a9c12d..14ecfbd 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -333,6 +333,15 @@
}
/**
+ * Called by JNI when the focus node changed.
+ */
+ private void focusNodeChanged(WebKitHitTest hitTest) {
+ if (mWebView == null) return;
+ mWebView.mPrivateHandler.obtainMessage(WebView.HIT_TEST_RESULT, hitTest)
+ .sendToTarget();
+ }
+
+ /**
* Called by JNI. Open a file chooser to upload a file.
* @param acceptType The value of the 'accept' attribute of the
* input tag associated with this file picker.
@@ -614,7 +623,6 @@
int x, int y);
private native String nativeRetrieveImageSource(int nativeClass,
int x, int y);
- private native void nativeStopPaintingCaret(int nativeClass);
private native void nativeTouchUp(int nativeClass,
int touchGeneration, int framePtr, int nodePtr, int x, int y);
@@ -1530,9 +1538,6 @@
nativeMoveMouseIfLatest(mNativeClass,
cData.mMoveGeneration,
cData.mFrame, cData.mX, cData.mY);
- if (msg.arg1 == 1) {
- nativeStopPaintingCaret(mNativeClass);
- }
break;
case REQUEST_CURSOR_HREF: {
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index f7a6b272..de11fe9 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -1031,7 +1031,9 @@
public void ensureImeVisible(boolean visible) {
mPopup.setInputMethodMode(visible
? ListPopupWindow.INPUT_METHOD_NEEDED : ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
- showDropDown();
+ if (mPopup.isDropDownAlwaysVisible() || (mFilter != null && enoughToFilter())) {
+ showDropDown();
+ }
}
/**
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 7db8a1e..13798ef 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4637,19 +4637,25 @@
// Alpha is supported if and only if the drawing can be done in one pass.
// TODO text with spans with a background color currently do not respect this alpha.
if (getBackground() == null) {
- mCurrentAlpha = alpha;
- final Drawables dr = mDrawables;
- if (dr != null) {
- if (dr.mDrawableLeft != null) dr.mDrawableLeft.mutate().setAlpha(alpha);
- if (dr.mDrawableTop != null) dr.mDrawableTop.mutate().setAlpha(alpha);
- if (dr.mDrawableRight != null) dr.mDrawableRight.mutate().setAlpha(alpha);
- if (dr.mDrawableBottom != null) dr.mDrawableBottom.mutate().setAlpha(alpha);
- if (dr.mDrawableStart != null) dr.mDrawableStart.mutate().setAlpha(alpha);
- if (dr.mDrawableEnd != null) dr.mDrawableEnd.mutate().setAlpha(alpha);
+ if (mCurrentAlpha != alpha) {
+ mCurrentAlpha = alpha;
+ final Drawables dr = mDrawables;
+ if (dr != null) {
+ if (dr.mDrawableLeft != null) dr.mDrawableLeft.mutate().setAlpha(alpha);
+ if (dr.mDrawableTop != null) dr.mDrawableTop.mutate().setAlpha(alpha);
+ if (dr.mDrawableRight != null) dr.mDrawableRight.mutate().setAlpha(alpha);
+ if (dr.mDrawableBottom != null) dr.mDrawableBottom.mutate().setAlpha(alpha);
+ if (dr.mDrawableStart != null) dr.mDrawableStart.mutate().setAlpha(alpha);
+ if (dr.mDrawableEnd != null) dr.mDrawableEnd.mutate().setAlpha(alpha);
+ }
+ mTextDisplayListIsValid = false;
}
return true;
}
+ if (mCurrentAlpha != 255) {
+ mTextDisplayListIsValid = false;
+ }
mCurrentAlpha = 255;
return false;
}
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 6893ffb..acc3c1c 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -857,11 +857,6 @@
* @return Whether biometric weak lock is installed and that the front facing camera exists
*/
public boolean isBiometricWeakInstalled() {
- // Check that the system flag was set
- if (!OPTION_ENABLE_FACELOCK.equals(getString(LOCKSCREEN_OPTIONS))) {
- return false;
- }
-
// Check that it's installed
PackageManager pm = mContext.getPackageManager();
try {
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
index c2e4b78..cb08eed 100644
--- a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
index 51b839f..ea065c3 100644
--- a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..d3ba98c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..153c6ad
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..ec6bc54
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..9fd4f33
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 19398cf..840323e 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -975,9 +975,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kon nie aan Wi-Fikoppel nie"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" het \'n swak internetverbinding."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Begin Wi-Fi Direct. Dit sal die Wi-Fi-kliënt/warmkol afskakel."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Kon nie Wi-Fi Direct begin nie."</string>
<string name="accept" msgid="1645267259272829559">"Aanvaar"</string>
<string name="decline" msgid="2112225451706137894">"Weier"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Uitnodiging gestuur"</string>
@@ -986,8 +983,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Aan:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Voer die vereiste PIN in:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direk is aan"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Raak vir instellings"</string>
<string name="select_character" msgid="3365550120617701745">"Voeg karakter in"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Onbekend program"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Stuur SMS-boodskappe"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 8f7b70f..905b90c 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"ወደ Wi-Fi ለማያያዝ አልተቻለም"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ደካማ የበይነመረብ ግንኙነት ኣለው።"</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi ቀጥታ"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"የWi-Fi በቀጥታ ጀምር።ይህ የWi-Fi ደንበኛ /ድረስ ነጥብ ያጠፋል።"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"በቀጥታ Wi-Fi ማስጀመር አልተቻለም።"</string>
<string name="accept" msgid="1645267259272829559">"ተቀበል"</string>
<string name="decline" msgid="2112225451706137894">"ውድቅ አድርግ"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"ግብዣ ተልኳል"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"ለ፦"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"የሚፈለገውን ፒን ተይብ፦"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"ፒን፦"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"የWi-Fi ቀጥታ በርቷል"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"ለቅንብሮች ንካ"</string>
<string name="select_character" msgid="3365550120617701745">"ቁምፊ አስገባ"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"ያልታወቀ መተግበሪያ"</string>
<string name="sms_control_title" msgid="7296612781128917719">"የSMS መልዕክቶች መበላክ ላይ"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index c9de7de..a7c37e7 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"تعذر الاتصال بـ Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" لديها اتصال إنترنت رديء."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"اتصال Wi-Fi مباشر"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"ابدأ Wi-Fi Direct. يؤدي هذا إلى إيقاف عميل/نقطة اتصال Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"تعذر بدء Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"قبول"</string>
<string name="decline" msgid="2112225451706137894">"رفض"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"تم إرسال الدعوة"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"إلى:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"اكتب رقم التعريف الشخصي المطلوب:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"رقم التعريف الشخصي:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"تم تشغيل اتصال Wi-Fi المباشر"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"المس للحصول على الإعدادات"</string>
<string name="select_character" msgid="3365550120617701745">"إدراج حرف"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"تطبيق غير معروف"</string>
<string name="sms_control_title" msgid="7296612781128917719">"إرسال رسائل قصيرة SMS"</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index adb1338..4a226a1 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Немагчыма падключыцца да Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" дрэннае падключэнне да Інтэрнэту."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Пачаць работу Wi-Fi Direct. Гэта адключыць кліента або кропку доступу Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Немагчыма запусціць Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Прыняць"</string>
<string name="decline" msgid="2112225451706137894">"Адхіліць"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Запрашэнне адпраўлена"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Каму:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Увядзіце патрэбны PIN-код:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-код"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct уключаны"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Дакраніцеся, каб наладзіць"</string>
<string name="select_character" msgid="3365550120617701745">"Уставіць сімвал"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Невядомае прыкладанне"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Адпраўка SMS"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 0a22133..f311a28 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Не можа да се свърже с Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" има лоша връзка с интернет."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Стартиране на Wi-Fi Direct. Това ще изключи клиентската програма/точката за достъп до Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct не можа да се стартира."</string>
<string name="accept" msgid="1645267259272829559">"Приемам"</string>
<string name="decline" msgid="2112225451706137894">"Отхвърлям"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Поканата е изпратена"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"До:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Въведете задължителния ПИН:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"ПИН:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct е включено"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Докоснете за настройки"</string>
<string name="select_character" msgid="3365550120617701745">"Вмъкване на знак"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Неизвестно приложение"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Изпращане на SMS съобщения"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 460fcb7..95dae9d 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"No s\'ha pogut connectar a la Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" té una mala connexió a Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Inicia Wi-Fi Direct. Això desactivarà el client/la zona Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"No s\'ha pogut iniciar Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Accepta"</string>
<string name="decline" msgid="2112225451706137894">"Rebutja"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"S\'ha enviat la invitació"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Per a:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Introdueix el PIN sol·licitat:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct està activat"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Toca per accedir a la configuració"</string>
<string name="select_character" msgid="3365550120617701745">"Insereix un caràcter"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicació desconeguda"</string>
<string name="sms_control_title" msgid="7296612781128917719">"S\'estan enviant missatges SMS"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 545d957..c01526d 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Připojení k síti Wi-Fi se nezdařilo"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" má pomalé připojení k internetu."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Přímé připojení sítě Wi-Fi"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Spustit přímé připojení sítě Wi-Fi. Tato možnost vypne provoz sítě Wi-Fi v režimu klient/hotspot."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Přímé připojení sítě Wi-Fi se nepodařilo spustit."</string>
<string name="accept" msgid="1645267259272829559">"Přijmout"</string>
<string name="decline" msgid="2112225451706137894">"Odmítnout"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pozvánka odeslána."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Komu:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Zadejte požadovaný kód PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Přímé připojení sítě Wi-Fi je zapnuto"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Nastavení otevřete dotykem"</string>
<string name="select_character" msgid="3365550120617701745">"Vkládání znaků"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Neznámá aplikace"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Odesílání zpráv SMS"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 65d7cdc..4904a99 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kunne ikke oprette forbindelse til Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" har en dårlig internetforbindelse."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Start Wi-Fi Direct. Dette slår Wi-Fi-klient/hotspot fra."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct kunne ikke startes."</string>
<string name="accept" msgid="1645267259272829559">"Accepter"</string>
<string name="decline" msgid="2112225451706137894">"Afvis"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitationen er sendt"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Til:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Skriv den påkrævede pinkode:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Pinkode:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct er slået til"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tryk for indstillinger"</string>
<string name="select_character" msgid="3365550120617701745">"Indsæt tegn"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Ukendt app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Sender sms-beskeder"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index dbe8137..20ef4d7 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Es konnte keine WLAN-Verbindung hergestellt werden."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" hat eine schlechte Internetverbindung."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Direct-Betrieb starten. Hierdurch wird der WLAN-Client-/-Hotspot-Betrieb deaktiviert."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Starten von Wi-Fi Direct nicht möglich"</string>
<string name="accept" msgid="1645267259272829559">"Akzeptieren"</string>
<string name="decline" msgid="2112225451706137894">"Ablehnen"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Einladung gesendet"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"An:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Geben Sie die erforderliche PIN ein:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct ist aktiviert."</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Zum Aufrufen der Einstellungen berühren"</string>
<string name="select_character" msgid="3365550120617701745">"Zeichen einfügen"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Unbekannte App"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Kurznachrichten werden gesendet"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 154ca55..200f702 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -215,10 +215,8 @@
<string name="permdesc_reorderTasks" msgid="4175137612205663399">"Επιτρέπει στην εφαρμογή τη μετακίνηση εργασιών στο προσκήνιο και στο φόντο. Τυχόν κακόβουλες εφαρμογές μπορούν να προωθηθούν στο προσκήνιο χωρίς να μπορείτε να τις ελέγξετε."</string>
<string name="permlab_removeTasks" msgid="6821513401870377403">"διακοπή εκτέλεσης εφαρμογών"</string>
<string name="permdesc_removeTasks" msgid="1394714352062635493">"Επιτρέπει στην εφαρμογή την κατάργηση ενεργειών και την απομάκρυνση των εφαρμογών τους. Τυχόν κακόβουλες εφαρμογές ενδέχεται να διαταράξουν τη λειτουργία άλλων εφαρμογών."</string>
- <!-- no translation found for permlab_setScreenCompatibility (6975387118861842061) -->
- <skip />
- <!-- no translation found for permdesc_setScreenCompatibility (692043618693917374) -->
- <skip />
+ <string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"ρύθμιση συμβατότητας οθόνης"</string>
+ <string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"Επιτρέπει στην εφαρμογή να ελέγξει τη λειτουργία συμβατότητας της οθόνης με άλλες εφαρμογές. Οι κακόβουλες εφαρμογές μπορεί να επηρεάσουν τη συμπεριφορά άλλων εφαρμογών."</string>
<string name="permlab_setDebugApp" msgid="3022107198686584052">"ενεργοποίηση εντοπισμού σφαλμάτων εφαρμογής"</string>
<string name="permdesc_setDebugApp" msgid="4474512416299013256">"Επιτρέπει στην εφαρμογή να ενεργοποιήσει τον εντοπισμό σφαλμάτων για μια άλλη εφαρμογή. Τυχόν κακόβουλες εφαρμογές ενδέχεται να χρησιμοποιήσουν αυτήν τη δυνατότητα για τον τερματισμό άλλων εφαρμογών."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"αλλαγή των ρυθμίσεων του UI"</string>
@@ -975,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Δεν είναι δυνατή η σύνδεση στο Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" έχει κακή σύνδεση στο Διαδίκτυο."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Ξεκινήστε τη λειτουργία Wi-Fi Direct. Θα απενεργοποιηθεί η λειτουργία πελάτη/φορητού σημείου πρόσβασης Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Δεν ήταν δυνατή η εκκίνηση του Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Αποδοχή"</string>
<string name="decline" msgid="2112225451706137894">"Απόρριψη"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Η πρόσκληση στάλθηκε"</string>
@@ -986,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Προς:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Πληκτρολογήστε τον απαιτούμενο κωδικό PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Το Wi-Fi Direct έχει ενεργοποιηθεί"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Αγγίξτε για ρυθμίσεις"</string>
<string name="select_character" msgid="3365550120617701745">"Εισαγωγή χαρακτήρα"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Άγνωστη εφαρμογή"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Αποστολή μηνυμάτων SMS"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 0429c8b..2859942 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Couldn\'t connect to Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" has a poor Internet connection."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Start Wi-Fi Direct. This will turn off Wi-Fi client/hotspot."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Couldn\'t start Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Accept"</string>
<string name="decline" msgid="2112225451706137894">"Decline"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitation sent"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"To:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Type the required PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct is on"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Touch for settings"</string>
<string name="select_character" msgid="3365550120617701745">"Insert character"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Unknown app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Sending SMS messages"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index ad3e949..dbc96e7 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -215,8 +215,8 @@
<string name="permdesc_reorderTasks" msgid="4175137612205663399">"Permite que la aplicación mueva tareas al primero o segundo plano. Las aplicaciones maliciosas pueden forzar su paso al primer plano sin que tú las controles."</string>
<string name="permlab_removeTasks" msgid="6821513401870377403">"detener las aplicaciones en ejecución"</string>
<string name="permdesc_removeTasks" msgid="1394714352062635493">"Permite que la aplicación elimine tareas y cierre sus aplicaciones. Las aplicaciones malintencionadas pueden usar este permiso para interferir en el comportamiento de otras aplicaciones."</string>
- <string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"Configurar el modo de la compatibilidad de otras pantalla"</string>
- <string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"Permite a la aplicación controlar el modo de la compatibilidad de las pantallas de otras aplicaciones. Las aplicaciones malintencionadas pueden interrumpir el funcionamiento de otras aplicaciones."</string>
+ <string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"Definir compatibilidad de pantalla"</string>
+ <string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"Permite a la aplicación controlar el modo de compatibilidad de las pantallas de otras aplicaciones. Las aplicaciones malintencionadas pueden interrumpir el funcionamiento de otras aplicaciones."</string>
<string name="permlab_setDebugApp" msgid="3022107198686584052">"activar depuración de aplicación"</string>
<string name="permdesc_setDebugApp" msgid="4474512416299013256">"Permite que la aplicación active la depuración de otra aplicación. Las aplicaciones malintencionadas pueden usar este permiso para interrumpir la ejecución de otras aplicaciones."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"cambiar tu configuración de la interfaz de usuario"</string>
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"No se pudo conectar a la red Wi-Fi."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" tiene una mala conexión a Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Iniciar Wi-Fi Direct. Se desactivará el funcionamiento de la zona o del cliente Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"No se pudo iniciar Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Aceptar"</string>
<string name="decline" msgid="2112225451706137894">"Rechazar"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Se envió la invitación."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Para:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Escribe el PIN solicitado:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Se activó Wi-Fi Direct."</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tocar para ajustar los parámetros de configuración"</string>
<string name="select_character" msgid="3365550120617701745">"Insertar caracteres"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicación desconocida"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Enviando mensajes SMS"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 1bd13bd..d3c55a6 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"No se ha podido establecer conexión con la red Wi-Fi."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" tiene una conexión inestable a Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Iniciar Wi-Fi Direct. Se desactivará el funcionamiento de la zona o del cliente Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"No se ha podido iniciar Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Aceptar"</string>
<string name="decline" msgid="2112225451706137894">"Rechazar"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitación enviada"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Para:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Escribe el PIN solicitado:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct activado"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Toca para acceder a Ajustes"</string>
<string name="select_character" msgid="3365550120617701745">"Insertar carácter"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicación desconocida"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Enviando mensajes SMS..."</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 2f42a70..c3a6169 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Ei saanud WiFi-ga ühendust"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" on halb Interneti-ühendus."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"WiFi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Käivitage WiFi otseühendus. See lülitab välja WiFi kliendi/leviala."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"WiFi otseühenduse käivitamine ebaõnnestus."</string>
<string name="accept" msgid="1645267259272829559">"Nõustu"</string>
<string name="decline" msgid="2112225451706137894">"Keeldu"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Kutse on saadetud"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Saaja:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Sisestage nõutav PIN-kood:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-kood:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"WiFi Direct on sees"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Puuted seadete jaoks"</string>
<string name="select_character" msgid="3365550120617701745">"Sisesta tähemärk"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Tundmatu rakendus"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS-sõnumite saatmine"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index fd7a771..87eee68 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"اتصال به Wi-Fi ممکن نیست"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" اتصال اینترنتی ضعیفی دارد."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Direct را شروع کنید. این کار نقطه اتصال/سرویس گیرنده Wi-Fi را غیرفعال خواهد کرد."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct شروع نشد."</string>
<string name="accept" msgid="1645267259272829559">"پذیرش"</string>
<string name="decline" msgid="2112225451706137894">"عدم پذیرش"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"دعوتنامه ارسال شد"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"به:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"پین لازم را تایپ کنید:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"پین:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct روشن است"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"لمس کردن برای تنظیمات"</string>
<string name="select_character" msgid="3365550120617701745">"درج نویسه"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"برنامه ناشناخته"</string>
<string name="sms_control_title" msgid="7296612781128917719">"ارسال پیامک ها"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 9cf18ec..5ab7158 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Wifi-yhteyden muodostaminen epäonnistui"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" : huono internetyhteys."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Suora wifi-yhteys"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Käynnistä suora wifi-yhteys. Wifi-asiakas/-hotspot poistetaan käytöstä."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Suoran wifi-yhteyden käynnistäminen epäonnistui."</string>
<string name="accept" msgid="1645267259272829559">"Hyväksy"</string>
<string name="decline" msgid="2112225451706137894">"Hylkää"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Kutsu lähetetty."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kohde:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Kirjoita pyydetty PIN-koodi:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-koodi:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct on käytössä"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tarkastele asetuksia koskettamalla"</string>
<string name="select_character" msgid="3365550120617701745">"Lisää merkki"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Tuntematon sovellus"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Tekstiviestien lähettäminen"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 33b0f45..6067350 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Impossible de se connecter au Wi-Fi."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" dispose d\'une mauvaise connexion Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Lancer le Wi-Fi Direct. Cela désactive le fonctionnement du Wi-Fi client ou via un point d\'accès."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Impossible d\'activer le Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Accepter"</string>
<string name="decline" msgid="2112225451706137894">"Refuser"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitation envoyée"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"À :"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Saisissez le code PIN requis :"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Code PIN :"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct activé"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Appuyez pour accéder aux paramètres."</string>
<string name="select_character" msgid="3365550120617701745">"Insérer un caractère"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Application inconnue"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Envoi de messages SMS"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 91ac5a3..1aaedbd 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Wi-Fi से कनेक्ट नहीं हो सका"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" के पास एक कमज़ोर इंटरनेट कनेक्शन है."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi प्रत्यक्ष"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi डायरेक्ट प्रारंभ करें. इससे Wi-Fi क्लाइंट/हॉटस्पॉट कार्यवाही बंद हो जाएगी."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi डायरेक्ट प्रारंभ नहीं किया जा सका."</string>
<string name="accept" msgid="1645267259272829559">"स्वीकार करें"</string>
<string name="decline" msgid="2112225451706137894">"अस्वीकार करें"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"आमंत्रण भेजा गया"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"प्रति:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"आवश्यक पिन लिखें:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"पिन:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi प्रत्यक्ष चालू है"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"सेटिंग के लिए स्पर्श करें"</string>
<string name="select_character" msgid="3365550120617701745">"वर्ण सम्मिलित करें"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"अज्ञात एप्लिकेशन"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS संदेश भेज रहा है"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index a60dcfa..0775984 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Ne može se spojiti na Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ima lošu internetsku vezu."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Izravni Wi-Fi"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Pokreni izravan rad s Wi-Fi mrežom. To će isključiti rad s Wi-Fi klijentom/žarišnom točkom."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Pokretanje izravne Wi-Fi veze nije moguće."</string>
<string name="accept" msgid="1645267259272829559">"Prihvaćam"</string>
<string name="decline" msgid="2112225451706137894">"Odbaci"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pozivnica je poslana"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Prima:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Upišite potreban PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct uključen"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Dodirnite za postavke"</string>
<string name="select_character" msgid="3365550120617701745">"Umetni znak"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Nepoznata aplikacija"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Slanje SMS poruka"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 6b789ea..e125ba8 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nem sikerült csatlakozni a Wi-Fi hálózathoz"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" rossz internetkapcsolattal rendelkezik."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Direct elindítása. A Wi-Fi kliens/hotspot ettől leáll."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Nem sikerült elindítani a Wi-Fi Direct kapcsolatot."</string>
<string name="accept" msgid="1645267259272829559">"Elfogadás"</string>
<string name="decline" msgid="2112225451706137894">"Elutasítás"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Meghívó elküldve"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Címzett:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Adja meg a szükséges PIN kódot:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN kód:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"A Wi-Fi Direct be van kapcsolva"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"A beállításokhoz érintse meg"</string>
<string name="select_character" msgid="3365550120617701745">"Karakter beszúrása"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Ismeretlen alkalmazás"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS-ek küldése"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 6ed5c0e..72fcb50 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Tidak dapat tersambung ke Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" memiliki sambungan internet yang buruk."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Langsung"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Memulai Wi-Fi Langsung. Opsi ini akan mematikan hotspot/klien Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Tidak dapat memulai Wi-Fi Langsung."</string>
<string name="accept" msgid="1645267259272829559">"Terima"</string>
<string name="decline" msgid="2112225451706137894">"Tolak"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Undangan terkirim"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kepada:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Ketik PIN yang diminta:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Langsung aktif"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Sentuh untuk setelan"</string>
<string name="select_character" msgid="3365550120617701745">"Sisipkan huruf"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Apl tak dikenal"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Mengirim pesan SMS"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 8af1f5e..ec9457b 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Impossibile connettersi alla rete Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ha una connessione Internet debole."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Avvia Wi-Fi Direct. Verrà disattivato il client/hotspot Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Avvio di Wi-Fi Direct non riuscito."</string>
<string name="accept" msgid="1645267259272829559">"Accetto"</string>
<string name="decline" msgid="2112225451706137894">"Rifiuto"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invito inviato"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"A:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Inserisci il PIN richiesto:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct è attivo"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tocca per le impostazioni"</string>
<string name="select_character" msgid="3365550120617701745">"Inserisci carattere"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Applicazione sconosciuta"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Invio SMS"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 5d5b9da..5fc15c7 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"אין אפשרות להתחבר ל-Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" אינו מחובר היטב לאינטרנט."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi ישיר"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"הפעל Wi-Fi ישיר. פעולה זו תכבה את הלקוח/הנקודה החמה של ה-Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"לא ניתן להפעיל Wi-Fi ישיר"</string>
<string name="accept" msgid="1645267259272829559">"קבל"</string>
<string name="decline" msgid="2112225451706137894">"דחה"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"ההזמנה נשלחה"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"אל:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"הקלד את קוד ה-PIN הנדרש."</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi ישיר מופעל"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"גע עבור הגדרות"</string>
<string name="select_character" msgid="3365550120617701745">"הוסף תו"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"יישום לא ידוע"</string>
<string name="sms_control_title" msgid="7296612781128917719">"שולח הודעות SMS"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index cadf935..63b8c73 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Wi-Fiに接続できませんでした"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" はインターネット接続に問題があります。"</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Directを開始します。これによりWi-Fiクライアント/アクセスポイントがOFFになります。"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Directを開始できませんでした。"</string>
<string name="accept" msgid="1645267259272829559">"同意する"</string>
<string name="decline" msgid="2112225451706137894">"同意しない"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"招待状を送信しました"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"To:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"必要なPINを入力してください:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi DirectはONです"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"設定を表示するにはタップしてください"</string>
<string name="select_character" msgid="3365550120617701745">"文字を挿入"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"不明なアプリ"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMSメッセージの送信中"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 031e9f5..f97cbdc 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Wi-Fi에 연결할 수 없습니다"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" 인터넷 연결 상태가 좋지 않습니다."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Direct 작업을 시작합니다. 이 작업을 하면 Wi-Fi 클라이언트/핫스팟 작업이 중지됩니다."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct를 시작하지 못했습니다."</string>
<string name="accept" msgid="1645267259272829559">"동의"</string>
<string name="decline" msgid="2112225451706137894">"거부"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"초대장을 보냈습니다."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"받는사람:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"필수 PIN 입력:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct 켜짐"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"설정으로 이동하려면 터치하세요."</string>
<string name="select_character" msgid="3365550120617701745">"문자 삽입"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"알 수 없는 앱"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS 메시지를 보내는 중"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 22830ac..a1694af 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nepavyko prisijungti prie „Wi-Fi“"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" turi prastą interneto ryšį."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Tiesioginis „Wi-Fi“ ryšys"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Paleiskite „Wi-Fi Direct“. Bus išjungta „Wi-Fi“ programa / viešosios interneto prieigos taškas."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Nepavyko paleisti „Wi-Fi Direct“."</string>
<string name="accept" msgid="1645267259272829559">"Sutikti"</string>
<string name="decline" msgid="2112225451706137894">"Atmesti"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pakvietimas išsiųstas"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Skirta:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Įveskite reikiamą PIN kodą:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN kodas:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"„Wi-Fi Direct“ įjungta"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Jei norite peržiūrėti nustatymus, palieskite"</string>
<string name="select_character" msgid="3365550120617701745">"Įterpti simbolį"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Nežinoma programa"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS pranešimų siuntimas"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index f716cb9..aeec70b 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nevarēja izveidot savienojumu ar Wi-Fi."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ir slikts interneta savienojums."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Palaist programmu Wi-Fi Direct. Tādējādi tiks izslēgta Wi-Fi klienta/tīklāja darbība."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Nevarēja palaist programmu Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Piekrist"</string>
<string name="decline" msgid="2112225451706137894">"Noraidīt"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Ielūgums ir nosūtīts."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kam:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Ierakstiet pieprasīto PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct ir ieslēgts"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Pieskarieties, lai piekļūtu iestatījumiem."</string>
<string name="select_character" msgid="3365550120617701745">"Ievietojiet rakstzīmi"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Nezināma lietotne"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Īsziņu sūtīšana"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 6aa9e4c..0610e88 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Tidak boleh menyambung kepada Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" mempunyai sambungan internet yang kurang baik."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Langsung"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Mulakan Wi-Fi Langsung. Hal ini akan mematikan pengendalian klien/liputan Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Tidak dapat memulakan Wi-Fi Langsung."</string>
<string name="accept" msgid="1645267259272829559">"Terima"</string>
<string name="decline" msgid="2112225451706137894">"Tolak"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Jemputan dihantar"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kepada:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Taipkan PIN yang diperlukan:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct dihidupkan"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Sentuh untuk tetapan"</string>
<string name="select_character" msgid="3365550120617701745">"Masukkan aksara"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Apl tidak diketahui"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Menghantar mesej SMS"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index b1b3cbe..e82718e 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kan ikke koble til Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" har en dårlig Internett-tilkobling."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Start Wi-Fi Direct. Dette deaktiverer Wi-Fi-klienten/-sonen."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Kunne ikke starte Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Godta"</string>
<string name="decline" msgid="2112225451706137894">"Avslå"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitasjonen er sendt"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Til:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Skriv inn påkrevd PIN-kode:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct er slått på"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Berør for å se innstillinger"</string>
<string name="select_character" msgid="3365550120617701745">"Sett inn tegn"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Ukjent app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Sender SMS-meldinger"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 9409445..ef4dd6a 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kan geen verbinding maken met Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" heeft een slechte internetverbinding."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wifi Direct starten. Hierdoor wordt de wifi-client/hotspot uitgeschakeld."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Kan Wifi Direct niet starten."</string>
<string name="accept" msgid="1645267259272829559">"Accepteren"</string>
<string name="decline" msgid="2112225451706137894">"Weigeren"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Uitnodiging verzonden"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Naar:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Voer de gewenste pincode in:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Pincode"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct is actief"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Aanraken voor instellingen"</string>
<string name="select_character" msgid="3365550120617701745">"Teken invoegen"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Onbekende app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS-berichten verzenden"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 8564dc7..f231d89 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nie można połączyć się z siecią Wi-Fi."</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ma powolne połączenie internetowe."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Uruchom Wi-Fi Direct. Spowoduje to wyłączenie klienta lub punktu dostępu Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Nie można uruchomić Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Akceptuj"</string>
<string name="decline" msgid="2112225451706137894">"Odrzuć"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Wysłano zaproszenie"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Do:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Wpisz wymagany kod PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Kod PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct włączone"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Dotknij, aby zmienić ustawienia"</string>
<string name="select_character" msgid="3365550120617701745">"Wstaw znak"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Nieznana aplikacja"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Wysyłanie wiadomości SMS"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index a162aa0..f3f060090 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Não foi possível ligar a Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" tem uma ligação à internet fraca."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Iniciar o Wi-Fi Direct. Esta opção desativará o cliente/zona Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Não foi possível iniciar o Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Aceitar"</string>
<string name="decline" msgid="2112225451706137894">"Recusar"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Convite enviado"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Para:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Introduza o PIN solicitado:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"O Wi-Fi Direct está ativado"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Toque para aceder às definições"</string>
<string name="select_character" msgid="3365550120617701745">"Introduzir carácter"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicação desconhecida"</string>
<string name="sms_control_title" msgid="7296612781128917719">"A enviar mensagens SMS"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 5c16708..b49c36b 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Não foi possível se conectar a redes Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" tem uma conexão de baixa qualidade com a Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Iniciar o Wi-Fi Direct. Isso desativará o ponto de acesso/cliente Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Não foi possível iniciar o Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Aceitar"</string>
<string name="decline" msgid="2112225451706137894">"Recusar"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Convite enviado"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Para:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Digite o PIN obrigatório:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct ativado"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tocar para acessar configurações"</string>
<string name="select_character" msgid="3365550120617701745">"Inserir caractere"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicativo desconhecido"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Enviando mensagens SMS"</string>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index 57daee7..1447c0e 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -1418,12 +1418,6 @@
<skip />
<!-- no translation found for wifi_watchdog_network_disabled_detailed (5548780776418332675) -->
<skip />
- <!-- no translation found for wifi_p2p_dialog_title (97611782659324517) -->
- <skip />
- <!-- no translation found for wifi_p2p_turnon_message (2909250942299627244) -->
- <skip />
- <!-- no translation found for wifi_p2p_failed_message (3763669677935623084) -->
- <skip />
<!-- no translation found for accept (1645267259272829559) -->
<skip />
<!-- no translation found for decline (2112225451706137894) -->
@@ -1440,10 +1434,6 @@
<skip />
<!-- no translation found for wifi_p2p_show_pin_message (8530563323880921094) -->
<skip />
- <!-- no translation found for wifi_p2p_enabled_notification_title (2068321881673734886) -->
- <skip />
- <!-- no translation found for wifi_p2p_enabled_notification_message (1638949953993894335) -->
- <skip />
<string name="select_character" msgid="3365550120617701745">"Inserir in caracter"</string>
<!-- no translation found for sms_control_default_app_name (3058577482636640465) -->
<skip />
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index fe3687f..f241e8e 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nu se poate conecta la Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" are o conexiune la internet slabă."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Porniţi Wi-Fi Direct. Acest lucru va dezactiva clientul/hotspotul Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct nu a putut porni."</string>
<string name="accept" msgid="1645267259272829559">"Acceptaţi"</string>
<string name="decline" msgid="2112225451706137894">"Refuzaţi"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Invitaţia a fost trimisă."</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Către:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Introduceţi codul PIN necesar:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Cod PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct este activat"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Atingeţi pentru setări"</string>
<string name="select_character" msgid="3365550120617701745">"Introduceţi caracterul"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Aplicaţie necunoscută"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Se trimit mesaje SMS"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 55468a0..809da83 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Не удалось подключиться к сети Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" – плохое интернет-соединение."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Начать соединение через Wi-Fi Direct. Модуль Wi-Fi будет отключен."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Не удалось запустить Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Принять"</string>
<string name="decline" msgid="2112225451706137894">"Отклонить"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Приглашение отправлено"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Кому:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Введите PIN-код:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-код:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct включен"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Нажмите, чтобы открыть настройки"</string>
<string name="select_character" msgid="3365550120617701745">"Введите символ"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Неизвестное приложение"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Отправка SMS-сообщений"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 7d1aa78..7d75949 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nepodarilo sa pripojiť k sieti Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" má nekvalitné internetové pripojenie."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Priame pripojenie Wi-Fi"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Spustiť priame pripojenie siete Wi-Fi. Táto možnosť vypne sieť Wi-Fi v režime klient alebo hotspot."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Priame pripojenie siete Wi-Fi sa nepodarilo spustiť"</string>
<string name="accept" msgid="1645267259272829559">"Prijať"</string>
<string name="decline" msgid="2112225451706137894">"Odmietnuť"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pozvánka bola odoslaná"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Komu:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Zadajte požadovaný kód PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Priame pripojenie siete Wi-Fi je zapnuté"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Nastavenia otvoríte dotykom"</string>
<string name="select_character" msgid="3365550120617701745">"Vkladanie znakov"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Neznáma aplikácia"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Odosielanie správ SMS"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index dfedb9a..e152a2f 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Z omrežjem Wi-Fi se ni mogoče povezati"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ima slabo internetno povezavo."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Zaženite Wi-Fi Direct. S tem boste izklopili odjemalca/dostopno točko Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct ni bilo mogoče zagnati."</string>
<string name="accept" msgid="1645267259272829559">"Sprejmi"</string>
<string name="decline" msgid="2112225451706137894">"Zavrni"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Povabilo je poslano"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Za:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Vnesite zahtevano kodo PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct je vklopljen"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Dotaknite se za nastavitve"</string>
<string name="select_character" msgid="3365550120617701745">"Vstavljanje znaka"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Neznan program"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Pošiljanje sporočil SMS"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 2a2104fc..7f1dbcd 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Није било могуће повезати са Wi-Fi мрежом"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" има лошу интернет везу."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Покрените Wi-Fi Direct. Тиме ћете искључити клијента/хотспот за Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Није могуће покренути Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Прихвати"</string>
<string name="decline" msgid="2112225451706137894">"Одбиј"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Позивница је послата"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Коме:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Унесите потребни PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct је укључен"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Додирните за подешавања"</string>
<string name="select_character" msgid="3365550120617701745">"Уметање знака"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Непозната апликација"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Слање SMS порука"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 0067a12..10ecffc 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Det gick inte att ansluta till Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" har en dålig Internetanslutning."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi direkt"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Starta direkt Wi-Fi-användning. Detta inaktiverar Wi-Fi-användning med klient/trådlös surfzon."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Det gick inte att starta Wi-Fi direkt."</string>
<string name="accept" msgid="1645267259272829559">"Godkänn"</string>
<string name="decline" msgid="2112225451706137894">"Avvisa"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Inbjudan har skickats"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Till:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Ange den obligatoriska PIN-koden:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-kod:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct är aktiverat"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Tryck om du vill visa inställningar"</string>
<string name="select_character" msgid="3365550120617701745">"Infoga tecken"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Okänd app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Skickar SMS"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 369853c..d245685 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Haikuweza kuunganisha kwa Mtandao-Hewa"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ina muunganisho duni wa Mtandao."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Mtandao hewa Moja kwa moja"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Anzisha Wi-Fi Moja kwa Moja. Hii itazima mteja/mtandao-hewa wa Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Haikuweza kuanzisha Wi-Fi Moja kwa Moja."</string>
<string name="accept" msgid="1645267259272829559">"Kubali"</string>
<string name="decline" msgid="2112225451706137894">"Kataa"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Mwaliko umetumwa"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kwa:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Charaza PIN inayohitajika:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi ya Moja kwa Moja imewashwa"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Gusa kwa ajili ya mipangilio"</string>
<string name="select_character" msgid="3365550120617701745">"Ingiza kibambo"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Programu isiyojulikana"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Inatuma ujumbe wa SMS"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index debe568..97f1c70 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"ไม่สามารถเชื่อมต่อ Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" มีสัญญาณอินเทอร์เน็ตไม่ดี"</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"เริ่มการทำงาน WiFi Direct ซึ่งจะเป็นการปิดการทำงาน WiFi ไคลเอ็นต์/ฮอตสปอต"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"ไม่สามารถเริ่ม WiFi Direct ได้"</string>
<string name="accept" msgid="1645267259272829559">"ยอมรับ"</string>
<string name="decline" msgid="2112225451706137894">"ปฏิเสธ"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"ส่งข้อความเชิญแล้ว"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"ถึง:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"พิมพ์ PIN ที่ต้องการ:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"เปิด Wi-Fi Direct อยู่"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"แตะเพื่อตั้งค่า"</string>
<string name="select_character" msgid="3365550120617701745">"ใส่อักขระ"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"แอปพลิเคชันที่ไม่รู้จัก"</string>
<string name="sms_control_title" msgid="7296612781128917719">"กำลังส่งข้อความ SMS"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index e74e309..f59cde4 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Hindi makakonekta sa Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ay mayroong mahinang koneksyon sa Internet."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Simulan ang Wi-Fi Direct. I-o-off nito ang client/hotspot ng Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Hindi masimulan ang Wi-Fi Direct"</string>
<string name="accept" msgid="1645267259272829559">"Tanggapin"</string>
<string name="decline" msgid="2112225451706137894">"Tanggihan"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Naipadala ang imbitasyon"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Kay:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"I-type ang kinakailangang PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Ang Wi-Fi Direct ay naka-on"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Pindutin para sa mga setting"</string>
<string name="select_character" msgid="3365550120617701745">"Magpasok ng character"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Hindi kilalang app"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Nagpapadala ng mga SMS na mensahe"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 8d52c8c..bcaa9a8 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kablosuz bağlantısı kurulamadı"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" İnternet bağlantısı zayıf."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Kablosuz Doğrudan Bağlantı"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Kablosuz Doğrudan Bağlantıyı başlat. Bu işlem, Kablosuz istemci/hotspot kullanımını kapatacak."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Kablosuz Doğrudan bağlantı başlatılamadı."</string>
<string name="accept" msgid="1645267259272829559">"Kabul et"</string>
<string name="decline" msgid="2112225451706137894">"Reddet"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Davetiye gönderildi"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Alıcı:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Gerekli PIN\'i yazın:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Kablosuz Doğrudan özelliği açık"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Ayarlar için dokunun"</string>
<string name="select_character" msgid="3365550120617701745">"Karakter ekle"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Bilinmeyen uygulama"</string>
<string name="sms_control_title" msgid="7296612781128917719">"SMS mesajları gönderiliyor"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 9d049cf..6288aa1 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Не вдалося під’єднатися до мережі Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" має погане з’єднання з Інтернетом."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Запустити Wi-Fi Direct. Це вимкне з’єднання Wi-Fi клієнт/точка доступу."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Не вдалося запустити Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Прийняти"</string>
<string name="decline" msgid="2112225451706137894">"Відхилити"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Запрошення надіслано"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Кому:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Введіть потрібний PIN-код:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN-код:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct увімкнено"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Торкніться, щоб побачити налаштування"</string>
<string name="select_character" msgid="3365550120617701745">"Вставл-ня символу"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Невідома програма"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Надсил. SMS повідомлень"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 8166606..ba81838 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Không thể kết nối với Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" có kết nối Internet không tốt."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Khởi động Wi-Fi Direct. Việc này sẽ tắt hoạt động của ứng dụng khách/điểm phát sóng Wi-Fi."</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Không thể khởi động Wi-Fi Direct."</string>
<string name="accept" msgid="1645267259272829559">"Đồng ý"</string>
<string name="decline" msgid="2112225451706137894">"Từ chối"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Đã gửi thư mời"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Người nhận:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Nhập PIN bắt buộc:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"Mã PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct được bật"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Chạm để cài đặt"</string>
<string name="select_character" msgid="3365550120617701745">"Chèn ký tự"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"Ứng dụng không xác định"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Đang gửi tin nhắn SMS"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index a9f431c..cbfc222 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"无法连接到 Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" 互联网连接状况不佳。"</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"启动 Wi-Fi Direct。此操作将会关闭 Wi-Fi 客户端/热点。"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"无法启动 Wi-Fi Direct。"</string>
<string name="accept" msgid="1645267259272829559">"接受"</string>
<string name="decline" msgid="2112225451706137894">"拒绝"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"邀请已发送"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"收件人:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"键入所需的 PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"已启用 Wi-Fi Direct"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"通过触摸进行设置"</string>
<string name="select_character" msgid="3365550120617701745">"插入字符"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"未知应用程序"</string>
<string name="sms_control_title" msgid="7296612781128917719">"正在发送短信"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 5aee830..4d6042c 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"無法連線至 Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" 的網際網路連線狀況不佳。"</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"啟動 WiFi Direct 作業,這會關閉 WiFi 用戶端/無線基地台作業。"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"無法啟動 WiFi Direct。"</string>
<string name="accept" msgid="1645267259272829559">"接受"</string>
<string name="decline" msgid="2112225451706137894">"拒絕"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"邀請函已傳送"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"收件者:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"請輸入必要的 PIN:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct 已開啟"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"輕觸即可設定"</string>
<string name="select_character" msgid="3365550120617701745">"插入字元"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"不明的應用程式"</string>
<string name="sms_control_title" msgid="7296612781128917719">"傳送 SMS 簡訊"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 36da63d..c90fe76 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -215,7 +215,7 @@
<string name="permdesc_reorderTasks" msgid="4175137612205663399">"Ivumela insiza ukuthi ihambise izenzo ziye ngaphambili kanye nasemumva. Izinsiza ezinobungozi zingaziphoqelela ukuth iziye phambili ngaphandle kokulawula kwakho."</string>
<string name="permlab_removeTasks" msgid="6821513401870377403">"misa izinsiza ezisebenzayo"</string>
<string name="permdesc_removeTasks" msgid="1394714352062635493">"Vumela ukuthi insiza isuse okumele kwenziwe ibulale nezinsiza zakho. Izinsiza eziwubungozi zingaphazamisa ukusebenza kwezinye izinsiza."</string>
- <string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"misa ukuhambelana kwesikrini"</string>
+ <string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"setha ukuhambelana kwesikrini"</string>
<string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"Ivumela uhlelo lokusebenza ukulawula imodi yokuhambelana kwesikrini kwezinye izinhlelo zokusebenza. Izinhlelo zokusebenza ezinonya zingase zephule ukuziphatha kwezinye izinhlelo zokusebenza."</string>
<string name="permlab_setDebugApp" msgid="3022107198686584052">"vumela insiza ilungise inkinga"</string>
<string name="permdesc_setDebugApp" msgid="4474512416299013256">"Ivumela insiza ukuthi ivule uhlelo lokulungisa lwenye insiza. Izinsiza ezinobungozi zingasebenzisa lokhu ukubulala ezinye izinsiza."</string>
@@ -973,9 +973,6 @@
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Ayikwazanga ukuxhuma kwi-Wi-Fi"</string>
<string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" inoxhumano oluphansi lwe-inthanethi."</string>
- <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"I-WiFi Eqondile"</string>
- <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Qala ukusebenza kwe-WiFi Okuqondile. Lokhu kuzocima ikhasimende le-WiFi/Ukusebenza okwe-hotspot"</string>
- <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Yehlulekile ukuqala i-Wi-Fi Ngqo"</string>
<string name="accept" msgid="1645267259272829559">"Yamukela"</string>
<string name="decline" msgid="2112225451706137894">"Nqaba"</string>
<string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Isimemo sithunyelwe"</string>
@@ -984,8 +981,6 @@
<string name="wifi_p2p_to_message" msgid="248968974522044099">"Ku:"</string>
<string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"Faka i-PIN edingekayo:"</string>
<string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
- <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"I-Wi-Fi Direct ivulekile"</string>
- <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Thinta ukuze uthole izilungiselelo"</string>
<string name="select_character" msgid="3365550120617701745">"Faka uhlamvu"</string>
<string name="sms_control_default_app_name" msgid="3058577482636640465">"insiza engaziwa"</string>
<string name="sms_control_title" msgid="7296612781128917719">"Ithumela imiyalezo ye-SMS"</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3a7225e..1eab01a 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -246,6 +246,13 @@
<item>4</item>
</integer-array>
+ <!-- If the DUN connection for this CDMA device supports more than just DUN -->
+ <!-- traffic you should list them here. -->
+ <!-- If this device is not CDMA this is ignored. If this list is empty on -->
+ <!-- a DUN-requiring CDMA device, the DUN APN will just support just DUN. -->
+ <string-array translatable="false" name="config_cdma_dun_supported_types">
+ </string-array>
+
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 4e55b4f..f347a4e 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -218,7 +218,6 @@
<java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" />
<java-symbol type="bool" name="config_bluetooth_adapter_quick_switch" />
<java-symbol type="bool" name="config_bluetooth_sco_off_call" />
- <java-symbol type="bool" name="config_alwaysUseCdmaRssi" />
<java-symbol type="bool" name="config_duplicate_port_omadm_wappush" />
<java-symbol type="bool" name="config_enable_emergency_call_while_sim_locked" />
<java-symbol type="bool" name="config_enable_puk_unlock_screen" />
@@ -864,6 +863,7 @@
<java-symbol type="array" name="special_locale_codes" />
<java-symbol type="array" name="special_locale_names" />
<java-symbol type="array" name="config_masterVolumeRamp" />
+ <java-symbol type="array" name="config_cdma_dun_supported_types" />
<java-symbol type="drawable" name="default_wallpaper" />
<java-symbol type="drawable" name="ic_suggestions_add" />
@@ -1084,7 +1084,6 @@
<java-symbol type="style" name="ActiveWallpaperSettings" />
<java-symbol type="style" name="Animation.InputMethodFancy" />
<java-symbol type="style" name="Animation.Wallpaper" />
- <java-symbol type="style" name="Animation.RecentApplications" />
<java-symbol type="style" name="Animation.ZoomButtons" />
<java-symbol type="style" name="PreviewWallpaperSettings" />
<java-symbol type="style" name="TextAppearance.SlidingTabActive" />
@@ -1440,6 +1439,7 @@
<java-symbol type="anim" name="push_down_out" />
<java-symbol type="anim" name="push_up_in" />
<java-symbol type="anim" name="push_up_out" />
+ <java-symbol type="bool" name="config_alwaysUseCdmaRssi" />
<java-symbol type="dimen" name="status_bar_icon_size" />
<java-symbol type="dimen" name="system_bar_icon_size" />
<java-symbol type="drawable" name="list_selector_pressed_holo_dark" />
@@ -1477,6 +1477,7 @@
<java-symbol type="string" name="usb_storage_stop_notification_title" />
<java-symbol type="string" name="usb_storage_stop_title" />
<java-symbol type="string" name="usb_storage_title" />
+ <java-symbol type="style" name="Animation.RecentApplications" />
<!-- ImfTest -->
<java-symbol type="layout" name="auto_complete_list" />
@@ -3498,4 +3499,10 @@
<public type="attr" name="textDirection"/>
+ <public type="attr" name="paddingStart"/>
+ <public type="attr" name="paddingEnd"/>
+
+ <public type="attr" name="layout_marginStart"/>
+ <public type="attr" name="layout_marginEnd"/>
+
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 061460a..3c1f50d 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2716,6 +2716,12 @@
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>
+ <string name="wifi_p2p_dialog_title">Wi-Fi Direct</string>
+ <string name="wifi_p2p_turnon_message">Start Wi-Fi Direct. This will turn off Wi-Fi client/hotspot.</string>
+ <string name="wifi_p2p_failed_message">Couldn\'t start Wi-Fi Direct.</string>
+ <string name="wifi_p2p_enabled_notification_title">Wi-Fi Direct is on</string>
+ <string name="wifi_p2p_enabled_notification_message">Touch for settings</string>
+
<string name="accept">Accept</string>
<string name="decline">Decline</string>
<string name="wifi_p2p_invitation_sent_title">Invitation sent</string>
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
index 9819c54..9c1922f 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
@@ -46,8 +46,7 @@
// create a new test suite
suite.setName("ConnectivityManagerWifiOnlyFunctionalTests");
String[] methodNames = {"testConnectToWifi", "testConnectToWifWithKnownAP",
- "testDisconnectWifi", "testDataConnectionOverAMWithWifi",
- "testDataConnectionWithWifiToAMToWifi", "testWifiStateChange"};
+ "testDisconnectWifi", "testWifiStateChange"};
Class<ConnectivityManagerMobileTest> testClass = ConnectivityManagerMobileTest.class;
for (String method: methodNames) {
suite.addTest(TestSuite.createTest(testClass, method));
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index b81f774..88f3f34 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -22,7 +22,7 @@
$(call all-java-files-under, EnabledTestApp/src)
LOCAL_DX_FLAGS := --core-library
-LOCAL_STATIC_JAVA_LIBRARIES := core-tests android-common frameworks-core-util-lib mockwebserver guava
+LOCAL_STATIC_JAVA_LIBRARIES := core-tests android-common frameworks-core-util-lib mockwebserver guava littlemock
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksCoreTests
diff --git a/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java b/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java
index 4d65588..9015a6f 100644
--- a/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java
+++ b/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java
@@ -16,6 +16,8 @@
package android.net.http;
+import com.google.mockwebserver.MockResponse;
+import com.google.mockwebserver.MockWebServer;
import java.io.File;
import java.net.CacheRequest;
import java.net.CacheResponse;
@@ -30,6 +32,7 @@
public final class HttpResponseCacheTest extends TestCase {
private File cacheDir;
+ private MockWebServer server = new MockWebServer();
@Override public void setUp() throws Exception {
super.setUp();
@@ -39,6 +42,7 @@
@Override protected void tearDown() throws Exception {
ResponseCache.setDefault(null);
+ server.shutdown();
super.tearDown();
}
@@ -100,4 +104,32 @@
cache.delete();
assertNull(ResponseCache.getDefault());
}
+
+ /**
+ * Make sure that statistics tracking are wired all the way through the
+ * wrapper class. http://code.google.com/p/android/issues/detail?id=25418
+ */
+ public void testStatisticsTracking() throws Exception {
+ HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
+
+ server.enqueue(new MockResponse()
+ .addHeader("Cache-Control: max-age=60")
+ .setBody("A"));
+ server.play();
+
+ URLConnection c1 = server.getUrl("/").openConnection();
+ assertEquals('A', c1.getInputStream().read());
+ assertEquals(1, cache.getRequestCount());
+ assertEquals(1, cache.getNetworkCount());
+ assertEquals(0, cache.getHitCount());
+
+ URLConnection c2 = server.getUrl("/").openConnection();
+ assertEquals('A', c2.getInputStream().read());
+
+ URLConnection c3 = server.getUrl("/").openConnection();
+ assertEquals('A', c3.getInputStream().read());
+ assertEquals(3, cache.getRequestCount());
+ assertEquals(1, cache.getNetworkCount());
+ assertEquals(2, cache.getHitCount());
+ }
}
diff --git a/core/tests/coretests/src/android/widget/focus/RequestFocus.java b/core/tests/coretests/src/android/widget/focus/RequestFocus.java
index af9ee17..21d762a 100644
--- a/core/tests/coretests/src/android/widget/focus/RequestFocus.java
+++ b/core/tests/coretests/src/android/widget/focus/RequestFocus.java
@@ -21,9 +21,7 @@
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
-import android.widget.LinearLayout;
import android.widget.Button;
-import android.view.View;
/**
* Exercises cases where elements of the UI are requestFocus()ed.
diff --git a/core/tests/coretests/src/android/widget/focus/RequestFocusTest.java b/core/tests/coretests/src/android/widget/focus/RequestFocusTest.java
index a78b0c9..f2eba23 100644
--- a/core/tests/coretests/src/android/widget/focus/RequestFocusTest.java
+++ b/core/tests/coretests/src/android/widget/focus/RequestFocusTest.java
@@ -16,21 +16,28 @@
package android.widget.focus;
-import android.widget.focus.RequestFocus;
-import com.android.frameworks.coretests.R;
+import static com.google.testing.littlemock.LittleMock.inOrder;
+import static com.google.testing.littlemock.LittleMock.mock;
import android.os.Handler;
-import android.test.ActivityInstrumentationTestCase;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.UiThreadTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
-import android.widget.Button;
import android.util.AndroidRuntimeException;
+import android.view.View;
+import android.view.View.OnFocusChangeListener;
+import android.view.ViewTreeObserver.OnGlobalFocusChangeListener;
+import android.widget.Button;
+
+import com.android.frameworks.coretests.R;
+import com.google.testing.littlemock.LittleMock.InOrder;
/**
* {@link RequestFocusTest} is set up to exercise cases where the views that
* have focus become invisible or GONE.
*/
-public class RequestFocusTest extends ActivityInstrumentationTestCase<RequestFocus> {
+public class RequestFocusTest extends ActivityInstrumentationTestCase2<RequestFocus> {
private Button mTopLeftButton;
private Button mBottomLeftButton;
@@ -39,7 +46,7 @@
private Handler mHandler;
public RequestFocusTest() {
- super("com.android.frameworks.coretests", RequestFocus.class);
+ super(RequestFocus.class);
}
@Override
@@ -94,4 +101,90 @@
e.getClass().getName());
}
}
+
+ /**
+ * This tests checks the case in which the first focusable View clears focus.
+ * In such a case the framework tries to give the focus to another View starting
+ * from the top. Hence, the framework will try to give focus to the view that
+ * wants to clear its focus.
+ *
+ * @throws Exception If an error occurs.
+ */
+ @UiThreadTest
+ public void testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable()
+ throws Exception {
+ // Get the first focusable.
+ Button clearingFocusButton = mTopLeftButton;
+ Button gainingFocusButton = mTopLeftButton;
+
+ // Make sure that the clearing focus View is the first focusable.
+ View focusCandidate = clearingFocusButton.getRootView().getParent().focusSearch(null,
+ View.FOCUS_FORWARD);
+ assertSame("The clearing focus button is the first focusable.",
+ clearingFocusButton, focusCandidate);
+ assertSame("The gaining focus button is the first focusable.",
+ gainingFocusButton, focusCandidate);
+
+ // Focus the clearing focus button.
+ clearingFocusButton.requestFocus();
+ assertTrue(clearingFocusButton.hasFocus());
+
+ // Register the invocation order checker.
+ CombinedListeners mock = mock(CombinedListeners.class);
+ clearingFocusButton.setOnFocusChangeListener(mock);
+ gainingFocusButton.setOnFocusChangeListener(mock);
+ clearingFocusButton.getViewTreeObserver().addOnGlobalFocusChangeListener(mock);
+
+ // Try to clear focus.
+ clearingFocusButton.clearFocus();
+
+ // Check that no callback was invoked since focus did not move.
+ InOrder inOrder = inOrder(mock);
+ inOrder.verify(mock).onFocusChange(clearingFocusButton, false);
+ inOrder.verify(mock).onGlobalFocusChanged(clearingFocusButton, gainingFocusButton);
+ inOrder.verify(mock).onFocusChange(gainingFocusButton, true);
+ }
+
+ public interface CombinedListeners extends OnFocusChangeListener, OnGlobalFocusChangeListener {}
+
+ /**
+ * This tests check whether the on focus change callbacks are invoked in
+ * the proper order when a View loses focus and the framework gives it to
+ * the fist focusable one.
+ *
+ * @throws Exception
+ */
+ @UiThreadTest
+ public void testOnFocusChangeCallbackOrderWhenClearingFocusOfNotFirstFocusable()
+ throws Exception {
+ Button clearingFocusButton = mTopRightButton;
+ Button gainingFocusButton = mTopLeftButton;
+
+ // Make sure that the clearing focus View is not the first focusable.
+ View focusCandidate = clearingFocusButton.getRootView().getParent().focusSearch(null,
+ View.FOCUS_FORWARD);
+ assertNotSame("The clearing focus button is not the first focusable.",
+ clearingFocusButton, focusCandidate);
+ assertSame("The gaining focus button is the first focusable.",
+ gainingFocusButton, focusCandidate);
+
+ // Focus the clearing focus button.
+ clearingFocusButton.requestFocus();
+ assertTrue(clearingFocusButton.hasFocus());
+
+ // Register the invocation order checker.
+ CombinedListeners mock = mock(CombinedListeners.class);
+ clearingFocusButton.setOnFocusChangeListener(mock);
+ gainingFocusButton.setOnFocusChangeListener(mock);
+ clearingFocusButton.getViewTreeObserver().addOnGlobalFocusChangeListener(mock);
+
+ // Try to clear focus.
+ clearingFocusButton.clearFocus();
+
+ // Check that no callback was invoked since focus did not move.
+ InOrder inOrder = inOrder(mock);
+ inOrder.verify(mock).onFocusChange(clearingFocusButton, false);
+ inOrder.verify(mock).onGlobalFocusChanged(clearingFocusButton, gainingFocusButton);
+ inOrder.verify(mock).onFocusChange(gainingFocusButton, true);
+ }
}
diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd
index d390ec1..d22dca1 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/guide/developing/device.jd
@@ -51,19 +51,13 @@
<ol>
<li>Declare your application as "debuggable" in your Android Manifest.
- <p>In Eclipse, you can do this from the <b>Application</b> tab when viewing the Manifest
- (on the right side, set <b>Debuggable</b> to <em>true</em>). Otherwise, in the
-<code>AndroidManifest.xml</code>
- file, add <code>android:debuggable="true"</code> to the <code><application></code>
-element.</p>
- </li>
- <li>Set up your device to allow installation of non-Market applications. <p>On
-the device, go to <strong>Settings > Applications</strong> and enable
-
-<strong>Unknown sources</strong> (on an Android 4.0 device, the setting is
-located in <strong>Settings > Security</strong>).</p>
-
- </li>
+ <p>When using Eclipse, you can skip this step, because running your app directly from
+the Eclipse IDE automatically enables debugging.</p>
+ <p>In the <code>AndroidManifest.xml</code> file, add <code>android:debuggable="true"</code> to
+the <code><application></code> element.</p>
+ <p class="note"><strong>Note:</strong> If you manually enable debugging in the manifest
+ file, be sure to disable it before you build for release (your published application
+should usually <em>not</em> be debuggable).</p></li>
<li>Turn on "USB Debugging" on your device.
<p>On the device, go to <strong>Settings > Applications > Development</strong>
and enable <strong>USB debugging</strong>
@@ -72,13 +66,10 @@
</li>
<li>Set up your system to detect your device.
<ul>
- <li>If you're developing on Windows, you need to install a USB driver
- for adb. If you're using an Android Developer Phone (ADP), Nexus One, or Nexus S,
- see the <a href="{@docRoot}sdk/win-usb.html">Google Windows USB
- Driver</a>. Otherwise, you can find a link to the appropriate OEM driver in the
- <a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a> document.</li>
+ <li>If you're developing on Windows, you need to install a USB driver for adb. For an
+installation guide and links to OEM drivers, see the <a href="{@docRoot}sdk/oem-usb.html">OEM USB
+Drivers</a> document.</li>
<li>If you're developing on Mac OS X, it just works. Skip this step.</li>
-
<li>If you're developing on Ubuntu Linux, you need to add a
<code>udev</code> rules file that contains a USB configuration for each type of device
you want to use for development. In the rules file, each device manufacturer
@@ -114,7 +105,7 @@
</li>
</ol>
-<p>You can verify that your device is connected by executing <code>adb
+<p>When plugged in over USB, can verify that your device is connected by executing <code>adb
devices</code> from your SDK {@code platform-tools/} directory. If connected,
you'll see the device name listed as a "device."</p>
diff --git a/docs/html/index.jd b/docs/html/index.jd
index b9d6758..431a7d2 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -154,7 +154,7 @@
+ "href='https://plus.google.com/108967384991768947849'>+Android Developers</a>. "
+ "We'll use it to host Hangouts for developers, talk about the latest releases, "
+ "development and design tips, and much more.</p>"
-+ "<div style='margin:.7em 0 0 -1.2em'><g:plus href='https://plus.google.com/108967384991768947849' "
++ "<div style='margin:.7em 0 0 0'><g:plus href='https://plus.google.com/108967384991768947849' "
+ "size=\"smallbadge\" width=\"275\"></g:plus></div>"
},
diff --git a/docs/html/sdk/oem-usb.jd b/docs/html/sdk/oem-usb.jd
index b81be71..f98257d 100644
--- a/docs/html/sdk/oem-usb.jd
+++ b/docs/html/sdk/oem-usb.jd
@@ -3,9 +3,21 @@
<div id="qv-wrapper">
<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#InstallingDriver">Installing a USB Driver</a>
+ <ol>
+ <li><a href="#Win7">Windows 7</a></li>
+ <li><a href="#WinXp">Windows XP</a></li>
+ <li><a href="#WinVista">Windows Vista</a></li>
+ </ol>
+ </li>
+ <li><a href="#Drivers">OEM Drivers</a></li>
+ </ol>
+
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/device.html">Developing on a Device</a></li>
+ <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a></li>
</ol>
</div>
@@ -18,8 +30,8 @@
not exhaustive for all available Android-powered devices.</p>
<p>If you're developing on Mac OS X or Linux, then you probably don't need to install a USB driver.
-Refer to <a href="{@docRoot}guide/developing/device.html#setting-up">Setting up a Device</a> to
-start development with a device.</p>
+To start developing with your device, read <a
+href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>.</p>
<p class="note"><strong>Note:</strong> If your device is one of the Android Developer Phones
(purchased from the Android Market publisher site), a Nexus One, or a Nexus S, then you need
@@ -28,10 +40,184 @@
href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
(listed as model SCH-I515).</p>
-<p>For instructions about how to install the driver on Windows, follow the guide for <a
- href="{@docRoot}sdk/win-usb.html#InstallingDriver">Installing the USB Driver</a>.</p>
-<p class="table-caption"><strong>Table 1.</strong> Links to OEM USB drivers</p>
+<h2 id="InstallingDriver">Installing a USB Driver</h2>
+
+<p>First, find the appropriate driver for your device from the <a href="#Drivers">OEM drivers</a>
+table below.</p>
+
+<p>Once you've downloaded your USB driver, follow the instructions below to install or upgrade the
+driver, based on your version of Windows and whether you're installing for the first time
+or upgrading an existing driver.</p>
+
+<p class="note"><strong>Tip:</strong> When you finish the USB driver installation,
+see <a
+href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for
+other important information about using an Android-powered device for
+development.</p>
+
+<ol class="nolist">
+ <li><a href="#Win7">Windows 7</a></li>
+ <li><a href="#WinXp">Windows XP</a></li>
+ <li><a href="#WinVista">Windows Vista</a></li>
+</ol>
+
+
+<p class="caution"><strong>Caution:</strong>
+You may make changes to <code>android_winusb.inf</code> file found inside
+<code>usb_driver\</code> (for example, to add support for other devices),
+however, this will lead to security warnings when you install or upgrade the
+driver. Making any other changes to the driver files may break the installation
+process.</p>
+
+
+<h3 id="Win7">Windows 7</h3>
+
+
+<p>To install the Android USB driver on Windows 7 for the first time:</p>
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Devices</strong> in the left pane.</li>
+ <li>Locate and expand <em>Other device</em> in the right pane.</li>
+ <li>Right-click the device name (such as <em>Nexus S</em>) and select <strong>Update
+ Driver Software</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Browse my computer for driver software</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows 7 with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane of the Computer Management
+ window.</li>
+ <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
+ <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
+ Driver</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check
+<strong>Search removable media</strong>; and check <strong>Include this location in the
+search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to upgrade the driver.</li>
+</ol>
+
+
+
+
+
+<h3 id="WinXp">Windows XP</h3>
+
+<p>To install the Android USB driver on Windows XP for the first time:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port. Windows
+ will detect the device and launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check
+<strong>Search
+ removable media</strong>; and check <strong>Include
+this location in the search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows XP with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>My Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane.</li>
+ <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
+ <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
+ Driver</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check <strong>Search
+ removable media</strong>; and check <strong>Include
+this location in the search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to upgrade the driver.</li>
+</ol>
+
+
+
+<h3 id="WinVista">Windows Vista</h3>
+
+<p>To install the Android USB driver on Windows Vista for the first time:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port. Windows
+ will detect the device and launch the Found New Hardware wizard.</li>
+ <li>Select <strong>Locate and install driver software</strong>.</li>
+ <li>Select <strong>Don't search online</strong>.</li>
+ <li>Select <strong>I don't have the disk. Show me other options</strong>.</li>
+ <li>Select <strong>Browse my computer for driver software</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+exact location of the
+ installation package, you may leave <strong>Include subfolders</strong> checked or
+ unchecked—it doesn't matter.</li>
+ <li>Click <strong>Next</strong>. Vista may prompt you to confirm the privilege elevation
+ required for driver installation. Confirm it.</li>
+ <li>When Vista asks if you'd like to install the Google ADB Interface device,
+ click <strong>Install</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows Vista with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane.</li>
+ <li>Locate and expand <em>ADB Interface</em> in the right pane.</li>
+ <li>Right-click on <em>HTC Dream Composite ADB Interface</em>, and select <strong>Update
+ Driver Software</strong>.</li>
+ <li>When Vista starts updating the driver, a prompt will ask how you want to
+ search for the driver
+ software. Select <strong>Browse my computer for driver software</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+exact location of the
+ installation package, you may leave <strong>Include subfolders</strong> checked or
+ unchecked—it doesn't matter.</li>
+ <li>Click <strong>Next</strong>. Vista might prompt you to confirm the privilege elevation
+ required for driver installation. Confirm it.</li>
+ <li>When Vista asks if you'd like to install the Google ADB Interface device,
+ click <strong>Install</strong> to upgrade the driver.</li>
+</ol>
+
+
+<h2 id="Drivers">OEM Drivers</h2>
+
+<p class="note"><strong>Note:</strong> If your device is one of the Android Developer Phones
+(purchased from the Android Market publisher site), a Nexus One, or a Nexus S, then you need
+the <a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a>, instead of an OEM driver. The Galaxy
+Nexus driver, however, is distributed by <a
+href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
+(listed as model SCH-I515).</p>
+
+
<table><tr>
<th>OEM</th>
<th>Driver URL</th></tr>
@@ -92,7 +278,7 @@
</tr>
<tr><td>KT Tech</td> <td><a
-href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100(Take)</td>
+href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100 (Take)</td>
</tr>
<tr>
<td>
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index 2d1435b..2bd031e 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -7,19 +7,12 @@
<ol>
<li><a href="#notes">Revisions</a></li>
<li><a href="#WinUsbDriver">Downloading the Google USB Driver</a></li>
- <li><a href="#InstallingDriver">Installing the USB Driver</a>
- <ol>
- <li><a href="#Win7">Windows 7</a></li>
- <li><a href="#WinXp">Windows XP</a></li>
- <li><a href="#WinVista">Windows Vista</a></li>
- </ol>
- </li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/device.html">Developing on a Device</a></li>
+ <li><a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
+ <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
- <li><a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a></li>
</ol>
</div>
</div>
@@ -43,9 +36,9 @@
(listed as model SCH-I515).</p>
<p class="note"><strong>Note:</strong>
-If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. Refer to <a
-href="{@docRoot}guide/developing/device.html#setting-up">Setting up a Device</a> to start
-development with a device.</p>
+If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. To start
+developing with your device, also read <a href="{@docRoot}guide/developing/device.html">Using
+Hardware Devices</a>.</p>
<p>The sections below provide instructions on how to download and install the Google USB Driver
for Windows. </p>
@@ -170,174 +163,10 @@
<ol>
<li>Launch the SDK and AVD Manager by double-clicking <code>SDK Manager.exe</code>,
at the root of your SDK directory.</li>
- <li>Expand the <em>Third party Add-ons</em> and <em>Google Inc. add-ons</em>.</li>
- <li>Check <strong>Google Usb Driver package</strong> and click <strong>Install selected</strong>.</li>
+ <li>Expand <em>Extras</em>.</li>
+ <li>Check <strong>Google USB Driver package</strong> and click <strong>Install</strong>.</li>
<li>Proceed to install the package. When done, the driver files are
downloaded into the <code><sdk>\extras\google\usb_driver\</code> directory.</li>
</ol>
-
-
-<h2 id="InstallingDriver">Installing the USB Driver</h2>
-
-<p>Once you've downloaded your USB driver, follow the instructions below to install or upgrade the
-driver, based on your version of Windows and whether you're installing for the first time
-or upgrading an existing driver.</p>
-
-<p class="note"><strong>Tip:</strong> When you finish the USB driver installation,
-see <a
-href="{@docRoot}guide/developing/device.html">Developing on a Device</a> for
-other important information about using an Android-powered device for
-development.</p>
-
-<ol class="nolist">
- <li><a href="#Win7">Windows 7</a></li>
- <li><a href="#WinXp">Windows XP</a></li>
- <li><a href="#WinVista">Windows Vista</a></li>
-</ol>
-
-
-<p class="caution"><strong>Caution:</strong>
-You may make changes to <code>android_winusb.inf</code> file found inside
-<code>usb_driver\</code> (for example, to add support for other devices),
-however, this will lead to security warnings when you install or upgrade the
-driver. Making any other changes to the driver files may break the installation
-process.</p>
-
-
-<h3 id="Win7">Windows 7</h3>
-
-
-<p>To install the Android USB driver on Windows 7 for the first time:</p>
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Devices</strong> in the left pane.</li>
- <li>Locate and expand <em>Other device</em> in the right pane.</li>
- <li>Right-click the device name (such as <em>Nexus S</em>) and select <strong>Update
- Driver Software</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Browse my computer for driver software</strong> and click
- <strong>Next</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows 7 with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane of the Computer Management
- window.</li>
- <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
- <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
- Driver</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check
-<strong>Search removable media</strong>; and check <strong>Include this location in the
-search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to upgrade the driver.</li>
-</ol>
-
-
-
-
-
-<h3 id="WinXp">Windows XP</h3>
-
-<p>To install the Android USB driver on Windows XP for the first time:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port. Windows
- will detect the device and launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check
-<strong>Search
- removable media</strong>; and check <strong>Include
-this location in the search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows XP with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>My Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane.</li>
- <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
- <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
- Driver</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check <strong>Search
- removable media</strong>; and check <strong>Include
-this location in the search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to upgrade the driver.</li>
-</ol>
-
-
-
-<h3 id="WinVista">Windows Vista</h3>
-
-<p>To install the Android USB driver on Windows Vista for the first time:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port. Windows
- will detect the device and launch the Found New Hardware wizard.</li>
- <li>Select <strong>Locate and install driver software</strong>.</li>
- <li>Select <strong>Don't search online</strong>.</li>
- <li>Select <strong>I don't have the disk. Show me other options</strong>.</li>
- <li>Select <strong>Browse my computer for driver software</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
-exact location of the
- installation package, you may leave <strong>Include subfolders</strong> checked or
- unchecked—it doesn't matter.</li>
- <li>Click <strong>Next</strong>. Vista may prompt you to confirm the privilege elevation
- required for driver installation. Confirm it.</li>
- <li>When Vista asks if you'd like to install the Google ADB Interface device,
- click <strong>Install</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows Vista with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane.</li>
- <li>Locate and expand <em>ADB Interface</em> in the right pane.</li>
- <li>Right-click on <em>HTC Dream Composite ADB Interface</em>, and select <strong>Update
- Driver Software</strong>.</li>
- <li>When Vista starts updating the driver, a prompt will ask how you want to
- search for the driver
- software. Select <strong>Browse my computer for driver software</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
-exact location of the
- installation package, you may leave <strong>Include subfolders</strong> checked or
- unchecked—it doesn't matter.</li>
- <li>Click <strong>Next</strong>. Vista might prompt you to confirm the privilege elevation
- required for driver installation. Confirm it.</li>
- <li>When Vista asks if you'd like to install the Google ADB Interface device,
- click <strong>Install</strong> to upgrade the driver.</li>
-</ol>
-
+<p>For installation information, read <a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 44401c8..37a270e 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -102,7 +102,7 @@
public static final int USAGE_SCRIPT = 0x0001;
/**
- * GRAPHICS_TEXTURE The allcation will be used as a texture
+ * GRAPHICS_TEXTURE The allocation will be used as a texture
* source by one or more graphics programs.
*
*/
@@ -124,34 +124,34 @@
public static final int USAGE_GRAPHICS_CONSTANTS = 0x0008;
/**
- * USAGE_GRAPHICS_RENDER_TARGET The allcation will be used as a
+ * USAGE_GRAPHICS_RENDER_TARGET The allocation will be used as a
* target for offscreen rendering
*
*/
public static final int USAGE_GRAPHICS_RENDER_TARGET = 0x0010;
/**
- * USAGE_GRAPHICS_SURFACE_TEXTURE_INPUT The allocation will be
- * used with a SurfaceTexture object. This usage will cause the
- * allocation to be created read only.
+ * USAGE_GRAPHICS_SURFACE_TEXTURE_INPUT_OPAQUE The allocation
+ * will be used as a SurfaceTexture graphics consumer. This
+ * usage may only be used with USAGE_GRAPHICS_TEXTURE.
*
* @hide
*/
public static final int USAGE_GRAPHICS_SURFACE_TEXTURE_INPUT_OPAQUE = 0x0020;
/**
- * USAGE_IO_INPUT The allocation will be
- * used with a SurfaceTexture object. This usage will cause the
- * allocation to be created read only.
+ * USAGE_IO_INPUT The allocation will be used as SurfaceTexture
+ * consumer. This usage will cause the allocation to be created
+ * read only.
*
* @hide
*/
public static final int USAGE_IO_INPUT = 0x0040;
/**
- * USAGE_IO_OUTPUT The allocation will be
- * used with a SurfaceTexture object. This usage will cause the
- * allocation to be created write only.
+ * USAGE_IO_OUTPUT The allocation will be used as a
+ * SurfaceTexture producer. The dimensions and format of the
+ * SurfaceTexture will be forced to those of the allocation.
*
* @hide
*/
@@ -323,6 +323,37 @@
mRS.nAllocationSyncAll(getIDSafe(), srcLocation);
}
+ /**
+ * Send a buffer to the output stream. The contents of the
+ * Allocation will be undefined after this operation.
+ *
+ * @hide
+ *
+ */
+ public void ioSendOutput() {
+ if ((mUsage & USAGE_IO_OUTPUT) == 0) {
+ throw new RSIllegalArgumentException(
+ "Can only send buffer if IO_OUTPUT usage specified.");
+ }
+ mRS.validate();
+ mRS.nAllocationIoSend(getID());
+ }
+
+ /**
+ * Receive the latest input into the Allocation.
+ *
+ * @hide
+ *
+ */
+ public void ioGetInput() {
+ if ((mUsage & USAGE_IO_INPUT) == 0) {
+ throw new RSIllegalArgumentException(
+ "Can only send buffer if IO_OUTPUT usage specified.");
+ }
+ mRS.validate();
+ mRS.nAllocationIoReceive(getID());
+ }
+
public void copyFrom(BaseObj[] d) {
mRS.validate();
validateIsObject();
@@ -887,17 +918,37 @@
updateCacheInfo(mType);
}
- /*
+ /**
+ * Resize a 2D allocation. The contents of the allocation are
+ * preserved. If new elements are allocated objects are created
+ * with null contents and the new region is otherwise undefined.
+ *
+ * If the new region is smaller the references of any objects
+ * outside the new region will be released.
+ *
+ * A new type will be created with the new dimension.
+ *
+ * @hide
+ * @param dimX The new size of the allocation.
+ * @param dimY The new size of the allocation.
+ */
public void resize(int dimX, int dimY) {
- if ((mType.getZ() > 0) || mType.getFaces() || mType.getLOD()) {
- throw new RSIllegalStateException("Resize only support for 2D allocations at this time.");
+ if ((mType.getZ() > 0) || mType.hasFaces() || mType.hasMipmaps()) {
+ throw new RSInvalidStateException(
+ "Resize only support for 2D allocations at this time.");
}
if (mType.getY() == 0) {
- throw new RSIllegalStateException("Resize only support for 2D allocations at this time.");
+ throw new RSInvalidStateException(
+ "Resize only support for 2D allocations at this time.");
}
mRS.nAllocationResize2D(getID(), dimX, dimY);
+ mRS.finish(); // Necessary because resize is fifoed and update is async.
+
+ int typeID = mRS.nAllocationGetType(getID());
+ mType = new Type(typeID, mRS);
+ mType.updateFromNative();
+ updateCacheInfo(mType);
}
- */
@@ -1090,6 +1141,18 @@
}
+ /**
+ * @hide
+ */
+ public void setSurfaceTexture(SurfaceTexture sur) {
+ if ((mUsage & USAGE_IO_OUTPUT) == 0) {
+ throw new RSInvalidStateException("Allocation is not USAGE_IO_OUTPUT.");
+ }
+
+ mRS.validate();
+ mRS.nAllocationSetSurfaceTexture(getID(), sur);
+ }
+
/**
* Creates a non-mipmapped renderscript allocation to use as a
diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java
index f6a0281..3d4951f 100644
--- a/graphics/java/android/renderscript/Element.java
+++ b/graphics/java/android/renderscript/Element.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-2012 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.
@@ -832,10 +832,12 @@
/**
* Create a custom vector element of the specified DataType and vector size.
- * DataKind will be set to USER.
+ * DataKind will be set to USER. Only primitive types (FLOAT_32, FLOAT_64,
+ * SIGNED_8, SIGNED_16, SIGNED_32, SIGNED_64, UNSIGNED_8, UNSIGNED_16,
+ * UNSIGNED_32, UNSIGNED_64, BOOLEAN) are supported.
*
* @param rs The context associated with the new Element.
- * @param dt The DataType for the new element.
+ * @param dt The DataType for the new Element.
* @param size Vector size for the new Element. Range 2-4 inclusive
* supported.
*
@@ -845,10 +847,31 @@
if (size < 2 || size > 4) {
throw new RSIllegalArgumentException("Vector size out of range 2-4.");
}
- DataKind dk = DataKind.USER;
- boolean norm = false;
- int id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
- return new Element(id, rs, dt, dk, norm, size);
+
+ switch (dt) {
+ // Support only primitive integer/float/boolean types as vectors.
+ case FLOAT_32:
+ case FLOAT_64:
+ case SIGNED_8:
+ case SIGNED_16:
+ case SIGNED_32:
+ case SIGNED_64:
+ case UNSIGNED_8:
+ case UNSIGNED_16:
+ case UNSIGNED_32:
+ case UNSIGNED_64:
+ case BOOLEAN: {
+ DataKind dk = DataKind.USER;
+ boolean norm = false;
+ int id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
+ return new Element(id, rs, dt, dk, norm, size);
+ }
+
+ default: {
+ throw new RSIllegalArgumentException("Cannot create vector of " +
+ "non-primitive type.");
+ }
+ }
}
/**
@@ -933,10 +956,10 @@
// Ignore mKind because it is allowed to be different (user vs. pixel).
// We also ignore mNormalized because it can be different. The mType
- // field must be non-null since we require name equivalence for
- // user-created Elements.
+ // field must not be NONE since we require name equivalence for
+ // all user-created Elements.
return ((mSize == e.mSize) &&
- (mType != null) &&
+ (mType != DataType.NONE) &&
(mType == e.mType) &&
(mVectorSize == e.mVectorSize));
}
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index 3f769ee..4d60ac8 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -69,6 +69,7 @@
Element mOutputs[];
Type mConstants[];
TextureType mTextures[];
+ String mTextureNames[];
int mTextureCount;
String mShader;
@@ -111,6 +112,16 @@
}
/**
+ * @hide
+ */
+ public String getTextureName(int slot) {
+ if ((slot < 0) || (slot >= mTextureCount)) {
+ throw new IllegalArgumentException("Slot ID out of range.");
+ }
+ return mTextureNames[slot];
+ }
+
+ /**
* Binds a constant buffer to be used as uniform inputs to the
* program
*
@@ -180,6 +191,7 @@
Type mConstants[];
Type mTextures[];
TextureType mTextureTypes[];
+ String mTextureNames[];
int mInputCount;
int mOutputCount;
int mConstantCount;
@@ -197,6 +209,7 @@
mConstantCount = 0;
mTextureCount = 0;
mTextureTypes = new TextureType[MAX_TEXTURE];
+ mTextureNames = new String[MAX_TEXTURE];
}
/**
@@ -300,10 +313,28 @@
* @return self
*/
public BaseProgramBuilder addTexture(TextureType texType) throws IllegalArgumentException {
+ addTexture(texType, "Tex" + mTextureCount);
+ return this;
+ }
+
+ /**
+ * @hide
+ * Adds a texture input to the Program
+ *
+ * @param texType describes that the texture to append it (2D,
+ * Cubemap, etc.)
+ * @param texName what the texture should be called in the
+ * shader
+ * @return self
+ */
+ public BaseProgramBuilder addTexture(TextureType texType, String texName)
+ throws IllegalArgumentException {
if(mTextureCount >= MAX_TEXTURE) {
throw new IllegalArgumentException("Max texture count exceeded.");
}
- mTextureTypes[mTextureCount ++] = texType;
+ mTextureTypes[mTextureCount] = texType;
+ mTextureNames[mTextureCount] = texName;
+ mTextureCount ++;
return this;
}
@@ -317,6 +348,8 @@
p.mTextureCount = mTextureCount;
p.mTextures = new TextureType[mTextureCount];
System.arraycopy(mTextureTypes, 0, p.mTextures, 0, mTextureCount);
+ p.mTextureNames = new String[mTextureCount];
+ System.arraycopy(mTextureNames, 0, p.mTextureNames, 0, mTextureCount);
}
}
diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java
index 21bace8..ebc15e5 100644
--- a/graphics/java/android/renderscript/ProgramFragment.java
+++ b/graphics/java/android/renderscript/ProgramFragment.java
@@ -59,6 +59,7 @@
public ProgramFragment create() {
mRS.validate();
int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
+ String[] texNames = new String[mTextureCount];
int idx = 0;
for (int i=0; i < mInputCount; i++) {
@@ -76,9 +77,10 @@
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
tmp[idx++] = mTextureTypes[i].mID;
+ texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramFragmentCreate(mShader, tmp);
+ int id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
ProgramFragment pf = new ProgramFragment(id, mRS);
initProgram(pf);
return pf;
diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
index 0ab73c1..cd31db3 100644
--- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
@@ -47,6 +47,7 @@
public ProgramFragmentFixedFunction create() {
mRS.validate();
int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
+ String[] texNames = new String[mTextureCount];
int idx = 0;
for (int i=0; i < mInputCount; i++) {
@@ -64,9 +65,10 @@
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
tmp[idx++] = mTextureTypes[i].mID;
+ texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramFragmentCreate(mShader, tmp);
+ int id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
ProgramFragmentFixedFunction pf = new ProgramFragmentFixedFunction(id, mRS);
initProgram(pf);
return pf;
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index b3c1bd9..a6cd15b 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -116,6 +116,7 @@
public ProgramVertex create() {
mRS.validate();
int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
+ String[] texNames = new String[mTextureCount];
int idx = 0;
for (int i=0; i < mInputCount; i++) {
@@ -133,9 +134,10 @@
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
tmp[idx++] = mTextureTypes[i].mID;
+ texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramVertexCreate(mShader, tmp);
+ int id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
ProgramVertex pv = new ProgramVertex(id, mRS);
initProgram(pv);
return pv;
diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
index 740d6a5..9a43943 100644
--- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -70,6 +70,7 @@
public ProgramVertexFixedFunction create() {
mRS.validate();
int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
+ String[] texNames = new String[mTextureCount];
int idx = 0;
for (int i=0; i < mInputCount; i++) {
@@ -87,9 +88,10 @@
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
tmp[idx++] = mTextureTypes[i].mID;
+ texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramVertexCreate(mShader, tmp);
+ int id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
ProgramVertexFixedFunction pv = new ProgramVertexFixedFunction(id, mRS);
initProgram(pv);
return pv;
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index d3c801f2..9517513 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -274,6 +274,22 @@
validate();
return rsnAllocationGetSurfaceTextureID(mContext, alloc);
}
+ native void rsnAllocationSetSurfaceTexture(int con, int alloc, SurfaceTexture sur);
+ synchronized void nAllocationSetSurfaceTexture(int alloc, SurfaceTexture sur) {
+ validate();
+ rsnAllocationSetSurfaceTexture(mContext, alloc, sur);
+ }
+ native void rsnAllocationIoSend(int con, int alloc);
+ synchronized void nAllocationIoSend(int alloc) {
+ validate();
+ rsnAllocationIoSend(mContext, alloc);
+ }
+ native void rsnAllocationIoReceive(int con, int alloc);
+ synchronized void nAllocationIoReceive(int alloc) {
+ validate();
+ rsnAllocationIoReceive(mContext, alloc);
+ }
+
native void rsnAllocationGenerateMipmaps(int con, int alloc);
synchronized void nAllocationGenerateMipmaps(int alloc) {
@@ -553,15 +569,15 @@
validate();
rsnProgramBindSampler(mContext, vpf, slot, s);
}
- native int rsnProgramFragmentCreate(int con, String shader, int[] params);
- synchronized int nProgramFragmentCreate(String shader, int[] params) {
+ native int rsnProgramFragmentCreate(int con, String shader, String[] texNames, int[] params);
+ synchronized int nProgramFragmentCreate(String shader, String[] texNames, int[] params) {
validate();
- return rsnProgramFragmentCreate(mContext, shader, params);
+ return rsnProgramFragmentCreate(mContext, shader, texNames, params);
}
- native int rsnProgramVertexCreate(int con, String shader, int[] params);
- synchronized int nProgramVertexCreate(String shader, int[] params) {
+ native int rsnProgramVertexCreate(int con, String shader, String[] texNames, int[] params);
+ synchronized int nProgramVertexCreate(String shader, String[] texNames, int[] params) {
validate();
- return rsnProgramVertexCreate(mContext, shader, params);
+ return rsnProgramVertexCreate(mContext, shader, texNames, params);
}
native int rsnMeshCreate(int con, int[] vtx, int[] idx, int[] prim);
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 94f19b3..2d8c416 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -54,13 +54,11 @@
class AutoJavaStringToUTF8 {
public:
- AutoJavaStringToUTF8(JNIEnv* env, jstring str) : fEnv(env), fJStr(str)
- {
+ AutoJavaStringToUTF8(JNIEnv* env, jstring str) : fEnv(env), fJStr(str) {
fCStr = env->GetStringUTFChars(str, NULL);
fLength = env->GetStringUTFLength(str);
}
- ~AutoJavaStringToUTF8()
- {
+ ~AutoJavaStringToUTF8() {
fEnv->ReleaseStringUTFChars(fJStr, fCStr);
}
const char* c_str() const { return fCStr; }
@@ -73,6 +71,42 @@
jsize fLength;
};
+class AutoJavaStringArrayToUTF8 {
+public:
+ AutoJavaStringArrayToUTF8(JNIEnv* env, jobjectArray strings, jsize stringsLength)
+ : mEnv(env), mStrings(strings), mStringsLength(stringsLength) {
+ mCStrings = NULL;
+ mSizeArray = NULL;
+ if (stringsLength > 0) {
+ mCStrings = (const char **)calloc(stringsLength, sizeof(char *));
+ mSizeArray = (size_t*)calloc(stringsLength, sizeof(size_t));
+ for (jsize ct = 0; ct < stringsLength; ct ++) {
+ jstring s = (jstring)mEnv->GetObjectArrayElement(mStrings, ct);
+ mCStrings[ct] = mEnv->GetStringUTFChars(s, NULL);
+ mSizeArray[ct] = mEnv->GetStringUTFLength(s);
+ }
+ }
+ }
+ ~AutoJavaStringArrayToUTF8() {
+ for (jsize ct=0; ct < mStringsLength; ct++) {
+ jstring s = (jstring)mEnv->GetObjectArrayElement(mStrings, ct);
+ mEnv->ReleaseStringUTFChars(s, mCStrings[ct]);
+ }
+ free(mCStrings);
+ free(mSizeArray);
+ }
+ const char **c_str() const { return mCStrings; }
+ size_t *c_str_len() const { return mSizeArray; }
+ jsize length() const { return mStringsLength; }
+
+private:
+ JNIEnv *mEnv;
+ jobjectArray mStrings;
+ const char **mCStrings;
+ size_t *mSizeArray;
+ jsize mStringsLength;
+};
+
// ---------------------------------------------------------------------------
static jfieldID gContextId = 0;
@@ -322,33 +356,27 @@
}
static jint
-nElementCreate2(JNIEnv *_env, jobject _this, RsContext con, jintArray _ids, jobjectArray _names, jintArray _arraySizes)
+nElementCreate2(JNIEnv *_env, jobject _this, RsContext con,
+ jintArray _ids, jobjectArray _names, jintArray _arraySizes)
{
int fieldCount = _env->GetArrayLength(_ids);
LOG_API("nElementCreate2, con(%p)", con);
jint *ids = _env->GetIntArrayElements(_ids, NULL);
jint *arraySizes = _env->GetIntArrayElements(_arraySizes, NULL);
- const char ** nameArray = (const char **)calloc(fieldCount, sizeof(char *));
- size_t* sizeArray = (size_t*)calloc(fieldCount, sizeof(size_t));
- for (int ct=0; ct < fieldCount; ct++) {
- jstring s = (jstring)_env->GetObjectArrayElement(_names, ct);
- nameArray[ct] = _env->GetStringUTFChars(s, NULL);
- sizeArray[ct] = _env->GetStringUTFLength(s);
- }
+ AutoJavaStringArrayToUTF8 names(_env, _names, fieldCount);
+
+ const char **nameArray = names.c_str();
+ size_t *sizeArray = names.c_str_len();
+
jint id = (jint)rsElementCreate2(con,
(RsElement *)ids, fieldCount,
nameArray, fieldCount * sizeof(size_t), sizeArray,
(const uint32_t *)arraySizes, fieldCount);
- for (int ct=0; ct < fieldCount; ct++) {
- jstring s = (jstring)_env->GetObjectArrayElement(_names, ct);
- _env->ReleaseStringUTFChars(s, nameArray[ct]);
- }
+
_env->ReleaseIntArrayElements(_ids, ids, JNI_ABORT);
_env->ReleaseIntArrayElements(_arraySizes, arraySizes, JNI_ABORT);
- free(nameArray);
- free(sizeArray);
return (jint)id;
}
@@ -451,6 +479,37 @@
}
static void
+nAllocationSetSurfaceTexture(JNIEnv *_env, jobject _this, RsContext con,
+ RsAllocation alloc, jobject sur)
+{
+ LOG_API("nAllocationSetSurfaceTexture, con(%p), alloc(%p), surface(%p)",
+ con, alloc, (Surface *)sur);
+
+ sp<ANativeWindow> window;
+ if (sur != 0) {
+ sp<SurfaceTexture> st = SurfaceTexture_getSurfaceTexture(_env, sur);
+ window = new SurfaceTextureClient(st);
+ }
+
+ rsAllocationSetSurface(con, alloc, window.get());
+}
+
+static void
+nAllocationIoSend(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc)
+{
+ LOG_API("nAllocationIoSend, con(%p), alloc(%p)", con, alloc);
+ rsAllocationIoSend(con, alloc);
+}
+
+static void
+nAllocationIoReceive(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc)
+{
+ LOG_API("nAllocationIoReceive, con(%p), alloc(%p)", con, alloc);
+ rsAllocationIoReceive(con, alloc);
+}
+
+
+static void
nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, RsContext con, jint alloc)
{
LOG_API("nAllocationGenerateMipmaps, con(%p), a(%p)", con, (RsAllocation)alloc);
@@ -1033,15 +1092,24 @@
// ---------------------------------------------------------------------------
static jint
-nProgramFragmentCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader, jintArray params)
+nProgramFragmentCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader,
+ jobjectArray texNames, jintArray params)
{
AutoJavaStringToUTF8 shaderUTF(_env, shader);
jint *paramPtr = _env->GetIntArrayElements(params, NULL);
jint paramLen = _env->GetArrayLength(params);
+ int texCount = _env->GetArrayLength(texNames);
+ AutoJavaStringArrayToUTF8 names(_env, texNames, texCount);
+ const char ** nameArray = names.c_str();
+ size_t* sizeArray = names.c_str_len();
+
LOG_API("nProgramFragmentCreate, con(%p), paramLen(%i)", con, paramLen);
- jint ret = (jint)rsProgramFragmentCreate(con, shaderUTF.c_str(), shaderUTF.length(), (uint32_t *)paramPtr, paramLen);
+ jint ret = (jint)rsProgramFragmentCreate(con, shaderUTF.c_str(), shaderUTF.length(),
+ nameArray, texCount, sizeArray,
+ (uint32_t *)paramPtr, paramLen);
+
_env->ReleaseIntArrayElements(params, paramPtr, JNI_ABORT);
return ret;
}
@@ -1050,7 +1118,8 @@
// ---------------------------------------------------------------------------
static jint
-nProgramVertexCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader, jintArray params)
+nProgramVertexCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader,
+ jobjectArray texNames, jintArray params)
{
AutoJavaStringToUTF8 shaderUTF(_env, shader);
jint *paramPtr = _env->GetIntArrayElements(params, NULL);
@@ -1058,7 +1127,15 @@
LOG_API("nProgramVertexCreate, con(%p), paramLen(%i)", con, paramLen);
- jint ret = (jint)rsProgramVertexCreate(con, shaderUTF.c_str(), shaderUTF.length(), (uint32_t *)paramPtr, paramLen);
+ int texCount = _env->GetArrayLength(texNames);
+ AutoJavaStringArrayToUTF8 names(_env, texNames, texCount);
+ const char ** nameArray = names.c_str();
+ size_t* sizeArray = names.c_str_len();
+
+ jint ret = (jint)rsProgramVertexCreate(con, shaderUTF.c_str(), shaderUTF.length(),
+ nameArray, texCount, sizeArray,
+ (uint32_t *)paramPtr, paramLen);
+
_env->ReleaseIntArrayElements(params, paramPtr, JNI_ABORT);
return ret;
}
@@ -1277,6 +1354,9 @@
{"rsnAllocationSyncAll", "(III)V", (void*)nAllocationSyncAll },
{"rsnAllocationGetSurfaceTextureID", "(II)I", (void*)nAllocationGetSurfaceTextureID },
+{"rsnAllocationSetSurfaceTexture", "(IILandroid/graphics/SurfaceTexture;)V", (void*)nAllocationSetSurfaceTexture },
+{"rsnAllocationIoSend", "(II)V", (void*)nAllocationIoSend },
+{"rsnAllocationIoReceive", "(II)V", (void*)nAllocationIoReceive },
{"rsnAllocationData1D", "(IIIII[II)V", (void*)nAllocationData1D_i },
{"rsnAllocationData1D", "(IIIII[SI)V", (void*)nAllocationData1D_s },
{"rsnAllocationData1D", "(IIIII[BI)V", (void*)nAllocationData1D_b },
@@ -1317,9 +1397,9 @@
{"rsnProgramBindTexture", "(IIII)V", (void*)nProgramBindTexture },
{"rsnProgramBindSampler", "(IIII)V", (void*)nProgramBindSampler },
-{"rsnProgramFragmentCreate", "(ILjava/lang/String;[I)I", (void*)nProgramFragmentCreate },
+{"rsnProgramFragmentCreate", "(ILjava/lang/String;[Ljava/lang/String;[I)I", (void*)nProgramFragmentCreate },
{"rsnProgramRasterCreate", "(IZI)I", (void*)nProgramRasterCreate },
-{"rsnProgramVertexCreate", "(ILjava/lang/String;[I)I", (void*)nProgramVertexCreate },
+{"rsnProgramVertexCreate", "(ILjava/lang/String;[Ljava/lang/String;[I)I", (void*)nProgramVertexCreate },
{"rsnContextBindRootScript", "(II)V", (void*)nContextBindRootScript },
{"rsnContextBindProgramStore", "(II)V", (void*)nContextBindProgramStore },
diff --git a/libs/rs/driver/rsdAllocation.cpp b/libs/rs/driver/rsdAllocation.cpp
index ea92192..fb93d82 100644
--- a/libs/rs/driver/rsdAllocation.cpp
+++ b/libs/rs/driver/rsdAllocation.cpp
@@ -23,6 +23,11 @@
#include "rsAllocation.h"
+#include "system/window.h"
+#include "hardware/gralloc.h"
+#include "ui/Rect.h"
+#include "ui/GraphicBufferMapper.h"
+
#include <GLES/gl.h>
#include <GLES2/gl2.h>
#include <GLES/glext.h>
@@ -220,7 +225,8 @@
}
void * ptr = alloc->mHal.state.usrPtr;
- if (!ptr) {
+ if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT) {
+ } else {
ptr = malloc(alloc->mHal.state.type->getSizeBytes());
if (!ptr) {
free(drv);
@@ -248,7 +254,7 @@
alloc->mHal.drvState.mallocPtr = ptr;
drv->mallocPtr = (uint8_t *)ptr;
alloc->mHal.drv = drv;
- if (forceZero) {
+ if (forceZero && ptr) {
memset(ptr, 0, alloc->mHal.state.type->getSizeBytes());
}
@@ -386,9 +392,96 @@
return drv->textureID;
}
+static bool IoGetBuffer(const Context *rsc, Allocation *alloc, ANativeWindow *nw) {
+ DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
+
+ int32_t r = nw->dequeueBuffer(nw, &drv->wndBuffer);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error getting next IO output buffer.");
+ return false;
+ }
+
+ // This lock is implicitly released by the queue buffer in IoSend
+ r = nw->lockBuffer(nw, drv->wndBuffer);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error locking next IO output buffer.");
+ return false;
+ }
+
+ // Must lock the whole surface
+ GraphicBufferMapper &mapper = GraphicBufferMapper::get();
+ Rect bounds(drv->wndBuffer->width, drv->wndBuffer->height);
+
+ void *dst = NULL;
+ mapper.lock(drv->wndBuffer->handle,
+ GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN,
+ bounds, &dst);
+ alloc->mHal.drvState.mallocPtr = dst;
+ return true;
+}
+
+void rsdAllocationSetSurfaceTexture(const Context *rsc, Allocation *alloc, ANativeWindow *nw) {
+ DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
+
+ //ALOGE("rsdAllocationSetSurfaceTexture %p %p", alloc, nw);
+
+ // Cleanup old surface if there is one.
+ if (alloc->mHal.state.wndSurface) {
+ ANativeWindow *old = alloc->mHal.state.wndSurface;
+ GraphicBufferMapper &mapper = GraphicBufferMapper::get();
+ mapper.unlock(drv->wndBuffer->handle);
+ old->queueBuffer(old, drv->wndBuffer);
+ }
+
+ if (nw != NULL) {
+ int32_t r;
+ r = native_window_set_usage(nw, GRALLOC_USAGE_SW_READ_RARELY |
+ GRALLOC_USAGE_SW_WRITE_OFTEN);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error setting IO output buffer usage.");
+ return;
+ }
+
+ r = native_window_set_buffers_dimensions(nw, alloc->mHal.state.dimensionX,
+ alloc->mHal.state.dimensionY);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error setting IO output buffer dimensions.");
+ return;
+ }
+
+ r = native_window_set_buffer_count(nw, 3);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error setting IO output buffer count.");
+ return;
+ }
+
+ IoGetBuffer(rsc, alloc, nw);
+ }
+}
+
+void rsdAllocationIoSend(const Context *rsc, Allocation *alloc) {
+ DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
+ ANativeWindow *nw = alloc->mHal.state.wndSurface;
+
+ GraphicBufferMapper &mapper = GraphicBufferMapper::get();
+ mapper.unlock(drv->wndBuffer->handle);
+ int32_t r = nw->queueBuffer(nw, drv->wndBuffer);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error sending IO output buffer.");
+ return;
+ }
+
+ IoGetBuffer(rsc, alloc, nw);
+}
+
+void rsdAllocationIoReceive(const Context *rsc, Allocation *alloc) {
+ ALOGE("not implemented");
+}
+
+
void rsdAllocationData1D(const Context *rsc, const Allocation *alloc,
uint32_t xoff, uint32_t lod, uint32_t count,
- const void *data, uint32_t sizeBytes) {
+ const void *data, size_t sizeBytes) {
DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
const uint32_t eSize = alloc->mHal.state.type->getElementSizeBytes();
@@ -407,7 +500,7 @@
void rsdAllocationData2D(const Context *rsc, const Allocation *alloc,
uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face,
- uint32_t w, uint32_t h, const void *data, uint32_t sizeBytes) {
+ uint32_t w, uint32_t h, const void *data, size_t sizeBytes) {
DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;
uint32_t eSize = alloc->mHal.state.elementSizeBytes;
diff --git a/libs/rs/driver/rsdAllocation.h b/libs/rs/driver/rsdAllocation.h
index 230804b..e3a5126 100644
--- a/libs/rs/driver/rsdAllocation.h
+++ b/libs/rs/driver/rsdAllocation.h
@@ -24,6 +24,7 @@
#include <GLES2/gl2.h>
class RsdFrameBufferObj;
+struct ANativeWindowBuffer;
struct DrvAllocation {
// Is this a legal structure to be used as a texture source.
@@ -47,6 +48,7 @@
bool uploadDeferred;
RsdFrameBufferObj * readBackFBO;
+ ANativeWindowBuffer *wndBuffer;
};
GLenum rsdTypeToGLType(RsDataType t);
@@ -69,6 +71,12 @@
const android::renderscript::Allocation *alloc);
int32_t rsdAllocationInitSurfaceTexture(const android::renderscript::Context *rsc,
const android::renderscript::Allocation *alloc);
+void rsdAllocationSetSurfaceTexture(const android::renderscript::Context *rsc,
+ android::renderscript::Allocation *alloc, ANativeWindow *nw);
+void rsdAllocationIoSend(const android::renderscript::Context *rsc,
+ android::renderscript::Allocation *alloc);
+void rsdAllocationIoReceive(const android::renderscript::Context *rsc,
+ android::renderscript::Allocation *alloc);
void rsdAllocationData1D(const android::renderscript::Context *rsc,
const android::renderscript::Allocation *alloc,
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp
index e011955..bf2b62a 100644
--- a/libs/rs/driver/rsdCore.cpp
+++ b/libs/rs/driver/rsdCore.cpp
@@ -74,6 +74,9 @@
rsdAllocationSyncAll,
rsdAllocationMarkDirty,
rsdAllocationInitSurfaceTexture,
+ rsdAllocationSetSurfaceTexture,
+ rsdAllocationIoSend,
+ rsdAllocationIoReceive,
rsdAllocationData1D,
rsdAllocationData2D,
rsdAllocationData3D,
diff --git a/libs/rs/driver/rsdProgram.cpp b/libs/rs/driver/rsdProgram.cpp
index 54484df..fa4cb0f 100644
--- a/libs/rs/driver/rsdProgram.cpp
+++ b/libs/rs/driver/rsdProgram.cpp
@@ -34,8 +34,11 @@
using namespace android::renderscript;
bool rsdProgramVertexInit(const Context *rsc, const ProgramVertex *pv,
- const char* shader, uint32_t shaderLen) {
- RsdShader *drv = new RsdShader(pv, GL_VERTEX_SHADER, shader, shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength) {
+ RsdShader *drv = new RsdShader(pv, GL_VERTEX_SHADER, shader, shaderLen,
+ textureNames, textureNamesCount, textureNamesLength);
pv->mHal.drv = drv;
return drv->createShader();
@@ -78,8 +81,11 @@
}
bool rsdProgramFragmentInit(const Context *rsc, const ProgramFragment *pf,
- const char* shader, uint32_t shaderLen) {
- RsdShader *drv = new RsdShader(pf, GL_FRAGMENT_SHADER, shader, shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength) {
+ RsdShader *drv = new RsdShader(pf, GL_FRAGMENT_SHADER, shader, shaderLen,
+ textureNames, textureNamesCount, textureNamesLength);
pf->mHal.drv = drv;
return drv->createShader();
diff --git a/libs/rs/driver/rsdProgramFragment.h b/libs/rs/driver/rsdProgramFragment.h
index 366cb40..b03a9fe 100644
--- a/libs/rs/driver/rsdProgramFragment.h
+++ b/libs/rs/driver/rsdProgramFragment.h
@@ -22,7 +22,9 @@
bool rsdProgramFragmentInit(const android::renderscript::Context *rsc,
const android::renderscript::ProgramFragment *,
- const char* shader, uint32_t shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
void rsdProgramFragmentSetActive(const android::renderscript::Context *rsc,
const android::renderscript::ProgramFragment *);
void rsdProgramFragmentDestroy(const android::renderscript::Context *rsc,
diff --git a/libs/rs/driver/rsdProgramVertex.h b/libs/rs/driver/rsdProgramVertex.h
index e998572..f917a41 100644
--- a/libs/rs/driver/rsdProgramVertex.h
+++ b/libs/rs/driver/rsdProgramVertex.h
@@ -21,7 +21,9 @@
bool rsdProgramVertexInit(const android::renderscript::Context *rsc,
const android::renderscript::ProgramVertex *,
- const char* shader, uint32_t shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
void rsdProgramVertexSetActive(const android::renderscript::Context *rsc,
const android::renderscript::ProgramVertex *);
void rsdProgramVertexDestroy(const android::renderscript::Context *rsc,
diff --git a/libs/rs/driver/rsdShader.cpp b/libs/rs/driver/rsdShader.cpp
index 3bca794..1e73b95 100644
--- a/libs/rs/driver/rsdShader.cpp
+++ b/libs/rs/driver/rsdShader.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2011-2012 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.
@@ -30,14 +30,16 @@
using namespace android::renderscript;
RsdShader::RsdShader(const Program *p, uint32_t type,
- const char * shaderText, uint32_t shaderLength) {
-
+ const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength) {
mUserShader.setTo(shaderText, shaderLength);
mRSProgram = p;
mType = type;
initMemberVars();
initAttribAndUniformArray();
- init();
+ init(textureNames, textureNamesCount, textureNamesLength);
+ createTexturesString(textureNames, textureNamesCount, textureNamesLength);
}
RsdShader::~RsdShader() {
@@ -65,25 +67,26 @@
mIsValid = false;
}
-void RsdShader::init() {
+void RsdShader::init(const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength) {
uint32_t attribCount = 0;
uint32_t uniformCount = 0;
for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) {
- initAddUserElement(mRSProgram->mHal.state.inputElements[ct], mAttribNames, NULL, &attribCount, RS_SHADER_ATTR);
+ initAddUserElement(mRSProgram->mHal.state.inputElements[ct], mAttribNames,
+ NULL, &attribCount, RS_SHADER_ATTR);
}
for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) {
- initAddUserElement(mRSProgram->mHal.state.constantTypes[ct]->getElement(), mUniformNames, mUniformArraySizes, &uniformCount, RS_SHADER_UNI);
+ initAddUserElement(mRSProgram->mHal.state.constantTypes[ct]->getElement(),
+ mUniformNames, mUniformArraySizes, &uniformCount, RS_SHADER_UNI);
}
mTextureUniformIndexStart = uniformCount;
- char buf[256];
for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) {
- snprintf(buf, sizeof(buf), "UNI_Tex%i", ct);
- mUniformNames[uniformCount].setTo(buf);
+ mUniformNames[uniformCount].setTo("UNI_");
+ mUniformNames[uniformCount].append(textureNames[ct], textureNamesLength[ct]);
mUniformArraySizes[uniformCount] = 1;
uniformCount++;
}
-
}
String8 RsdShader::getGLSLInputString() const {
@@ -135,22 +138,25 @@
}
}
-void RsdShader::appendTextures() {
- char buf[256];
- for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) {
+void RsdShader::createTexturesString(const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength) {
+ mShaderTextures.setTo("");
+ for (uint32_t ct = 0; ct < mRSProgram->mHal.state.texturesCount; ct ++) {
if (mRSProgram->mHal.state.textureTargets[ct] == RS_TEXTURE_2D) {
Allocation *a = mRSProgram->mHal.state.textures[ct];
if (a && a->mHal.state.surfaceTextureID) {
- snprintf(buf, sizeof(buf), "uniform samplerExternalOES UNI_Tex%i;\n", ct);
+ mShaderTextures.append("uniform samplerExternalOES UNI_");
} else {
- snprintf(buf, sizeof(buf), "uniform sampler2D UNI_Tex%i;\n", ct);
+ mShaderTextures.append("uniform sampler2D UNI_");
}
mTextureTargets[ct] = GL_TEXTURE_2D;
} else {
- snprintf(buf, sizeof(buf), "uniform samplerCube UNI_Tex%i;\n", ct);
+ mShaderTextures.append("uniform samplerCube UNI_");
mTextureTargets[ct] = GL_TEXTURE_CUBE_MAP;
}
- mShader.append(buf);
+
+ mShaderTextures.append(textureNames[ct], textureNamesLength[ct]);
+ mShaderTextures.append(";\n");
}
}
@@ -161,7 +167,7 @@
}
appendUserConstants();
appendAttributes();
- appendTextures();
+ mShader.append(mShaderTextures);
mShader.append(mUserShader);
@@ -418,7 +424,8 @@
DrvAllocation *drvTex = (DrvAllocation *)mRSProgram->mHal.state.textures[ct]->mHal.drv;
if (drvTex->glTarget != GL_TEXTURE_2D && drvTex->glTarget != GL_TEXTURE_CUBE_MAP) {
- ALOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct);
+ ALOGE("Attempting to bind unknown texture to shader id %u, texture unit %u",
+ (uint)this, ct);
rsc->setError(RS_ERROR_BAD_SHADER, "Non-texture allocation bound to a shader");
}
RSD_CALL_GL(glBindTexture, drvTex->glTarget, drvTex->textureID);
diff --git a/libs/rs/driver/rsdShader.h b/libs/rs/driver/rsdShader.h
index 3f0d6ea..e32145f 100644
--- a/libs/rs/driver/rsdShader.h
+++ b/libs/rs/driver/rsdShader.h
@@ -39,7 +39,9 @@
public:
RsdShader(const android::renderscript::Program *p, uint32_t type,
- const char * shaderText, uint32_t shaderLength);
+ const char * shaderText, uint32_t shaderLength,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
virtual ~RsdShader();
bool createShader();
@@ -67,19 +69,27 @@
// Applies to vertex and fragment shaders only
void appendUserConstants();
- void setupUserConstants(const android::renderscript::Context *rsc, RsdShaderCache *sc, bool isFragment);
- void initAddUserElement(const android::renderscript::Element *e, android::String8 *names, uint32_t *arrayLengths, uint32_t *count, const char *prefix);
+ void setupUserConstants(const android::renderscript::Context *rsc,
+ RsdShaderCache *sc, bool isFragment);
+ void initAddUserElement(const android::renderscript::Element *e,
+ android::String8 *names, uint32_t *arrayLengths,
+ uint32_t *count, const char *prefix);
void setupTextures(const android::renderscript::Context *rsc, RsdShaderCache *sc);
- void setupSampler(const android::renderscript::Context *rsc, const android::renderscript::Sampler *s, const android::renderscript::Allocation *tex);
+ void setupSampler(const android::renderscript::Context *rsc,
+ const android::renderscript::Sampler *s,
+ const android::renderscript::Allocation *tex);
void appendAttributes();
void appendTextures();
+ void createTexturesString(const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
void initAttribAndUniformArray();
mutable bool mDirty;
android::String8 mShader;
android::String8 mUserShader;
+ android::String8 mShaderTextures;
uint32_t mShaderID;
uint32_t mType;
@@ -93,10 +103,14 @@
int32_t mTextureUniformIndexStart;
- void logUniform(const android::renderscript::Element *field, const float *fd, uint32_t arraySize );
- void setUniform(const android::renderscript::Context *rsc, const android::renderscript::Element *field, const float *fd, int32_t slot, uint32_t arraySize );
+ void logUniform(const android::renderscript::Element *field,
+ const float *fd, uint32_t arraySize);
+ void setUniform(const android::renderscript::Context *rsc,
+ const android::renderscript::Element *field,
+ const float *fd, int32_t slot, uint32_t arraySize );
void initMemberVars();
- void init();
+ void init(const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
};
#endif //ANDROID_RSD_SHADER_H
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index 6759bc7..cf4a391 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -69,168 +69,183 @@
ret int32_t
}
+AllocationSetSurface {
+ param RsAllocation alloc
+ param RsNativeWindow sur
+ sync
+ }
+
+AllocationIoSend {
+ param RsAllocation alloc
+ }
+
+AllocationIoReceive {
+ param RsAllocation alloc
+ }
+
+
ContextFinish {
- sync
- }
+ sync
+ }
ContextBindRootScript {
- param RsScript sampler
- }
+ param RsScript sampler
+ }
ContextBindProgramStore {
- param RsProgramStore pgm
- }
+ param RsProgramStore pgm
+ }
ContextBindProgramFragment {
- param RsProgramFragment pgm
- }
+ param RsProgramFragment pgm
+ }
ContextBindProgramVertex {
- param RsProgramVertex pgm
- }
+ param RsProgramVertex pgm
+ }
ContextBindProgramRaster {
- param RsProgramRaster pgm
- }
+ param RsProgramRaster pgm
+ }
ContextBindFont {
- param RsFont pgm
- }
+ param RsFont pgm
+ }
ContextPause {
- }
+ }
ContextResume {
- }
+ }
ContextSetSurface {
- param uint32_t width
- param uint32_t height
- param RsNativeWindow sur
+ param uint32_t width
+ param uint32_t height
+ param RsNativeWindow sur
sync
- }
+ }
ContextDump {
- param int32_t bits
+ param int32_t bits
}
ContextSetPriority {
- param int32_t priority
- }
+ param int32_t priority
+ }
ContextDestroyWorker {
sync
}
AssignName {
- param RsObjectBase obj
- param const char *name
- }
+ param RsObjectBase obj
+ param const char *name
+ }
ObjDestroy {
- param RsAsyncVoidPtr objPtr
- }
+ param RsAsyncVoidPtr objPtr
+ }
ElementCreate {
direct
- param RsDataType mType
- param RsDataKind mKind
- param bool mNormalized
- param uint32_t mVectorSize
- ret RsElement
- }
+ param RsDataType mType
+ param RsDataKind mKind
+ param bool mNormalized
+ param uint32_t mVectorSize
+ ret RsElement
+ }
ElementCreate2 {
direct
- param const RsElement * elements
- param const char ** names
- param const uint32_t * arraySize
- ret RsElement
- }
+ param const RsElement * elements
+ param const char ** names
+ param const uint32_t * arraySize
+ ret RsElement
+ }
AllocationCopyToBitmap {
- param RsAllocation alloc
- param void * data
- }
+ param RsAllocation alloc
+ param void * data
+ }
Allocation1DData {
- param RsAllocation va
- param uint32_t xoff
- param uint32_t lod
- param uint32_t count
- param const void *data
- }
+ param RsAllocation va
+ param uint32_t xoff
+ param uint32_t lod
+ param uint32_t count
+ param const void *data
+ }
Allocation1DElementData {
- param RsAllocation va
- param uint32_t x
- param uint32_t lod
- param const void *data
- param size_t comp_offset
- }
+ param RsAllocation va
+ param uint32_t x
+ param uint32_t lod
+ param const void *data
+ param size_t comp_offset
+ }
Allocation2DData {
- param RsAllocation va
- param uint32_t xoff
- param uint32_t yoff
- param uint32_t lod
- param RsAllocationCubemapFace face
- param uint32_t w
- param uint32_t h
- param const void *data
- }
+ param RsAllocation va
+ param uint32_t xoff
+ param uint32_t yoff
+ param uint32_t lod
+ param RsAllocationCubemapFace face
+ param uint32_t w
+ param uint32_t h
+ param const void *data
+ }
Allocation2DElementData {
- param RsAllocation va
- param uint32_t x
- param uint32_t y
- param uint32_t lod
- param RsAllocationCubemapFace face
- param const void *data
- param size_t element_offset
- }
+ param RsAllocation va
+ param uint32_t x
+ param uint32_t y
+ param uint32_t lod
+ param RsAllocationCubemapFace face
+ param const void *data
+ param size_t element_offset
+ }
AllocationGenerateMipmaps {
- param RsAllocation va
+ param RsAllocation va
}
AllocationRead {
- param RsAllocation va
- param void * data
- }
+ param RsAllocation va
+ param void * data
+ }
AllocationSyncAll {
- param RsAllocation va
- param RsAllocationUsageType src
+ param RsAllocation va
+ param RsAllocationUsageType src
}
AllocationResize1D {
- param RsAllocation va
- param uint32_t dimX
- }
+ param RsAllocation va
+ param uint32_t dimX
+ }
AllocationResize2D {
- param RsAllocation va
- param uint32_t dimX
- param uint32_t dimY
- }
+ param RsAllocation va
+ param uint32_t dimX
+ param uint32_t dimY
+ }
AllocationCopy2DRange {
- param RsAllocation dest
- param uint32_t destXoff
- param uint32_t destYoff
- param uint32_t destMip
- param uint32_t destFace
- param uint32_t width
- param uint32_t height
- param RsAllocation src
- param uint32_t srcXoff
- param uint32_t srcYoff
- param uint32_t srcMip
- param uint32_t srcFace
- }
+ param RsAllocation dest
+ param uint32_t destXoff
+ param uint32_t destYoff
+ param uint32_t destMip
+ param uint32_t destFace
+ param uint32_t width
+ param uint32_t height
+ param RsAllocation src
+ param uint32_t srcXoff
+ param uint32_t srcYoff
+ param uint32_t srcMip
+ param uint32_t srcFace
+ }
SamplerCreate {
direct
@@ -244,26 +259,26 @@
}
ScriptBindAllocation {
- param RsScript vtm
- param RsAllocation va
- param uint32_t slot
- }
+ param RsScript vtm
+ param RsAllocation va
+ param uint32_t slot
+ }
ScriptSetTimeZone {
- param RsScript s
- param const char * timeZone
- }
+ param RsScript s
+ param const char * timeZone
+ }
ScriptInvoke {
- param RsScript s
- param uint32_t slot
- }
+ param RsScript s
+ param uint32_t slot
+ }
ScriptInvokeV {
- param RsScript s
- param uint32_t slot
- param const void * data
- }
+ param RsScript s
+ param uint32_t slot
+ param const void * data
+ }
ScriptForEach {
param RsScript s
@@ -274,125 +289,127 @@
}
ScriptSetVarI {
- param RsScript s
- param uint32_t slot
- param int value
- }
+ param RsScript s
+ param uint32_t slot
+ param int value
+ }
ScriptSetVarObj {
- param RsScript s
- param uint32_t slot
- param RsObjectBase value
- }
+ param RsScript s
+ param uint32_t slot
+ param RsObjectBase value
+ }
ScriptSetVarJ {
- param RsScript s
- param uint32_t slot
- param int64_t value
- }
+ param RsScript s
+ param uint32_t slot
+ param int64_t value
+ }
ScriptSetVarF {
- param RsScript s
- param uint32_t slot
- param float value
- }
+ param RsScript s
+ param uint32_t slot
+ param float value
+ }
ScriptSetVarD {
- param RsScript s
- param uint32_t slot
- param double value
- }
+ param RsScript s
+ param uint32_t slot
+ param double value
+ }
ScriptSetVarV {
- param RsScript s
- param uint32_t slot
- param const void * data
- }
+ param RsScript s
+ param uint32_t slot
+ param const void * data
+ }
ScriptCCreate {
param const char * resName
param const char * cacheDir
- param const char * text
- ret RsScript
- }
+ param const char * text
+ ret RsScript
+ }
ProgramStoreCreate {
- direct
- param bool colorMaskR
- param bool colorMaskG
- param bool colorMaskB
- param bool colorMaskA
+ direct
+ param bool colorMaskR
+ param bool colorMaskG
+ param bool colorMaskB
+ param bool colorMaskA
param bool depthMask
param bool ditherEnable
- param RsBlendSrcFunc srcFunc
- param RsBlendDstFunc destFunc
+ param RsBlendSrcFunc srcFunc
+ param RsBlendDstFunc destFunc
param RsDepthFunc depthFunc
- ret RsProgramStore
- }
+ ret RsProgramStore
+ }
ProgramRasterCreate {
- direct
- param bool pointSprite
- param RsCullMode cull
- ret RsProgramRaster
+ direct
+ param bool pointSprite
+ param RsCullMode cull
+ ret RsProgramRaster
}
ProgramBindConstants {
- param RsProgram vp
- param uint32_t slot
- param RsAllocation constants
- }
+ param RsProgram vp
+ param uint32_t slot
+ param RsAllocation constants
+ }
ProgramBindTexture {
- param RsProgramFragment pf
- param uint32_t slot
- param RsAllocation a
- }
+ param RsProgramFragment pf
+ param uint32_t slot
+ param RsAllocation a
+ }
ProgramBindSampler {
- param RsProgramFragment pf
- param uint32_t slot
- param RsSampler s
- }
+ param RsProgramFragment pf
+ param uint32_t slot
+ param RsSampler s
+ }
ProgramFragmentCreate {
- direct
- param const char * shaderText
- param const uint32_t * params
- ret RsProgramFragment
- }
+ direct
+ param const char * shaderText
+ param const char ** textureNames
+ param const uint32_t * params
+ ret RsProgramFragment
+ }
ProgramVertexCreate {
- direct
- param const char * shaderText
- param const uint32_t * params
- ret RsProgramVertex
- }
+ direct
+ param const char * shaderText
+ param const char ** textureNames
+ param const uint32_t * params
+ ret RsProgramVertex
+ }
FontCreateFromFile {
- param const char *name
- param float fontSize
- param uint32_t dpi
- ret RsFont
- }
+ param const char *name
+ param float fontSize
+ param uint32_t dpi
+ ret RsFont
+ }
FontCreateFromMemory {
- param const char *name
- param float fontSize
- param uint32_t dpi
- param const void *data
- ret RsFont
- }
+ param const char *name
+ param float fontSize
+ param uint32_t dpi
+ param const void *data
+ ret RsFont
+ }
MeshCreate {
- param RsAllocation *vtx
- param RsAllocation *idx
- param uint32_t *primType
- ret RsMesh
- }
+ param RsAllocation *vtx
+ param RsAllocation *idx
+ param uint32_t *primType
+ ret RsMesh
+ }
PathCreate {
param RsPathPrimitive pp
@@ -402,4 +419,3 @@
param float quality
ret RsPath
}
-
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 02c6809..83c88fd 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -17,6 +17,7 @@
#include "rsContext.h"
#include "rs_hal.h"
+#include "system/window.h"
using namespace android;
using namespace android::renderscript;
@@ -44,6 +45,7 @@
delete a;
return NULL;
}
+
return a;
}
@@ -420,6 +422,28 @@
return id;
}
+void Allocation::setSurface(const Context *rsc, RsNativeWindow sur) {
+ ANativeWindow *nw = (ANativeWindow *)sur;
+ ANativeWindow *old = mHal.state.wndSurface;
+ if (nw) {
+ nw->incStrong(NULL);
+ }
+ rsc->mHal.funcs.allocation.setSurfaceTexture(rsc, this, nw);
+ mHal.state.wndSurface = nw;
+ if (old) {
+ old->decStrong(NULL);
+ }
+}
+
+void Allocation::ioSend(const Context *rsc) {
+ rsc->mHal.funcs.allocation.ioSend(rsc, this);
+}
+
+void Allocation::ioReceive(const Context *rsc) {
+ rsc->mHal.funcs.allocation.ioReceive(rsc, this);
+}
+
+
/////////////////
//
@@ -670,6 +694,21 @@
return alloc->getSurfaceTextureID(rsc);
}
+void rsi_AllocationSetSurface(Context *rsc, RsAllocation valloc, RsNativeWindow sur) {
+ Allocation *alloc = static_cast<Allocation *>(valloc);
+ alloc->setSurface(rsc, sur);
+}
+
+void rsi_AllocationIoSend(Context *rsc, RsAllocation valloc) {
+ Allocation *alloc = static_cast<Allocation *>(valloc);
+ alloc->ioSend(rsc);
+}
+
+void rsi_AllocationIoReceive(Context *rsc, RsAllocation valloc) {
+ Allocation *alloc = static_cast<Allocation *>(valloc);
+ alloc->ioReceive(rsc);
+}
+
}
}
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h
index 58a582b..58a6fca 100644
--- a/libs/rs/rsAllocation.h
+++ b/libs/rs/rsAllocation.h
@@ -19,6 +19,8 @@
#include "rsType.h"
+struct ANativeWindow;
+
// ---------------------------------------------------------------------------
namespace android {
namespace renderscript {
@@ -57,6 +59,7 @@
bool hasReferences;
void * usrPtr;
int32_t surfaceTextureID;
+ ANativeWindow *wndSurface;
};
State state;
@@ -127,6 +130,9 @@
}
int32_t getSurfaceTextureID(const Context *rsc);
+ void setSurface(const Context *rsc, RsNativeWindow sur);
+ void ioSend(const Context *rsc);
+ void ioReceive(const Context *rsc);
protected:
Vector<const Program *> mToDirtyList;
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 4f21b3b..c4276cf 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -490,8 +490,14 @@
shaderString.append(" gl_FragColor = col;\n");
shaderString.append("}\n");
- ObjectBaseRef<const Element> colorElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 4);
- ObjectBaseRef<const Element> gammaElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 1);
+ const char *textureNames[] = { "Tex0" };
+ const size_t textureNamesLengths[] = { 4 };
+ size_t numTextures = sizeof(textureNamesLengths)/sizeof(*textureNamesLengths);
+
+ ObjectBaseRef<const Element> colorElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32,
+ RS_KIND_USER, false, 4);
+ ObjectBaseRef<const Element> gammaElem = Element::createRef(mRSC, RS_TYPE_FLOAT_32,
+ RS_KIND_USER, false, 1);
Element::Builder builder;
builder.add(colorElem.get(), "Color", 1);
builder.add(gammaElem.get(), "Gamma", 1);
@@ -506,14 +512,17 @@
tmp[3] = RS_TEXTURE_2D;
mFontShaderFConstant.set(Allocation::createAllocation(mRSC, inputType.get(),
- RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS));
- ProgramFragment *pf = new ProgramFragment(mRSC, shaderString.string(),
- shaderString.length(), tmp, 4);
+ RS_ALLOCATION_USAGE_SCRIPT |
+ RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS));
+ ProgramFragment *pf = new ProgramFragment(mRSC, shaderString.string(), shaderString.length(),
+ textureNames, numTextures, textureNamesLengths,
+ tmp, 4);
mFontShaderF.set(pf);
mFontShaderF->bindAllocation(mRSC, mFontShaderFConstant.get(), 0);
mFontSampler.set(Sampler::getSampler(mRSC, RS_SAMPLER_NEAREST, RS_SAMPLER_NEAREST,
- RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP).get());
+ RS_SAMPLER_CLAMP, RS_SAMPLER_CLAMP,
+ RS_SAMPLER_CLAMP).get());
mFontShaderF->bindSampler(mRSC, 0, mFontSampler.get());
mFontProgramStore.set(ProgramStore::getProgramStore(mRSC, true, true, true, true,
@@ -525,10 +534,12 @@
}
void FontState::initTextTexture() {
- ObjectBaseRef<const Element> alphaElem = Element::createRef(mRSC, RS_TYPE_UNSIGNED_8, RS_KIND_PIXEL_A, true, 1);
+ ObjectBaseRef<const Element> alphaElem = Element::createRef(mRSC, RS_TYPE_UNSIGNED_8,
+ RS_KIND_PIXEL_A, true, 1);
// We will allocate a texture to initially hold 32 character bitmaps
- ObjectBaseRef<Type> texType = Type::getTypeRef(mRSC, alphaElem.get(), 1024, 256, 0, false, false);
+ ObjectBaseRef<Type> texType = Type::getTypeRef(mRSC, alphaElem.get(),
+ 1024, 256, 0, false, false);
Allocation *cacheAlloc = Allocation::createAllocation(mRSC, texType.get(),
RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE);
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index 8061515..7114f29 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -20,8 +20,8 @@
using namespace android;
using namespace android::renderscript;
-Program::Program(Context *rsc, const char * shaderText, uint32_t shaderLength,
- const uint32_t * params, uint32_t paramLength)
+Program::Program(Context *rsc, const char * shaderText, size_t shaderLength,
+ const uint32_t * params, size_t paramLength)
: ProgramBase(rsc) {
initMemberVars();
diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h
index 06fc3ec..d032930 100644
--- a/libs/rs/rsProgram.h
+++ b/libs/rs/rsProgram.h
@@ -58,8 +58,8 @@
};
Hal mHal;
- Program(Context *, const char * shaderText, uint32_t shaderLength,
- const uint32_t * params, uint32_t paramLength);
+ Program(Context *, const char * shaderText, size_t shaderLength,
+ const uint32_t * params, size_t paramLength);
virtual ~Program();
virtual bool freeChildren();
diff --git a/libs/rs/rsProgramFragment.cpp b/libs/rs/rsProgramFragment.cpp
index 4e73ca6..bebde1e 100644
--- a/libs/rs/rsProgramFragment.cpp
+++ b/libs/rs/rsProgramFragment.cpp
@@ -20,16 +20,18 @@
using namespace android;
using namespace android::renderscript;
-ProgramFragment::ProgramFragment(Context *rsc, const char * shaderText,
- uint32_t shaderLength, const uint32_t * params,
- uint32_t paramLength)
+ProgramFragment::ProgramFragment(Context *rsc, const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount, const size_t *textureNamesLength,
+
+ const uint32_t * params, size_t paramLength)
: Program(rsc, shaderText, shaderLength, params, paramLength) {
mConstantColor[0] = 1.f;
mConstantColor[1] = 1.f;
mConstantColor[2] = 1.f;
mConstantColor[3] = 1.f;
- mRSC->mHal.funcs.fragment.init(mRSC, this, mUserShader.string(), mUserShader.length());
+ mRSC->mHal.funcs.fragment.init(mRSC, this, mUserShader.string(), mUserShader.length(),
+ textureNames, textureNamesCount, textureNamesLength);
}
ProgramFragment::~ProgramFragment() {
@@ -110,8 +112,8 @@
Allocation *constAlloc = Allocation::createAllocation(rsc, inputType.get(),
RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS);
- ProgramFragment *pf = new ProgramFragment(rsc, shaderString.string(),
- shaderString.length(), tmp, 2);
+ ProgramFragment *pf = new ProgramFragment(rsc, shaderString.string(), shaderString.length(),
+ NULL, 0, NULL, tmp, 2);
pf->bindAllocation(rsc, constAlloc, 0);
pf->setConstantColor(rsc, 1.0f, 1.0f, 1.0f, 1.0f);
@@ -127,9 +129,14 @@
namespace renderscript {
RsProgramFragment rsi_ProgramFragmentCreate(Context *rsc, const char * shaderText,
- size_t shaderLength, const uint32_t * params,
- size_t paramLength) {
- ProgramFragment *pf = new ProgramFragment(rsc, shaderText, shaderLength, params, paramLength);
+ size_t shaderLength,
+ const char** textureNames,
+ size_t textureNamesCount,
+ const size_t *textureNamesLength,
+ const uint32_t * params, size_t paramLength) {
+ ProgramFragment *pf = new ProgramFragment(rsc, shaderText, shaderLength,
+ textureNames, textureNamesCount, textureNamesLength,
+ params, paramLength);
pf->incUserRef();
//ALOGE("rsi_ProgramFragmentCreate %p", pf);
return pf;
diff --git a/libs/rs/rsProgramFragment.h b/libs/rs/rsProgramFragment.h
index d6e20cd..4eb28e7 100644
--- a/libs/rs/rsProgramFragment.h
+++ b/libs/rs/rsProgramFragment.h
@@ -27,9 +27,9 @@
class ProgramFragment : public Program {
public:
- ProgramFragment(Context *rsc, const char * shaderText,
- uint32_t shaderLength, const uint32_t * params,
- uint32_t paramLength);
+ ProgramFragment(Context *rsc, const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount, const size_t *textureNamesLength,
+ const uint32_t * params, size_t paramLength);
virtual ~ProgramFragment();
virtual void setup(Context *, ProgramFragmentState *);
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index 871caac..c8a53ea 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -21,11 +21,13 @@
using namespace android::renderscript;
-ProgramVertex::ProgramVertex(Context *rsc, const char * shaderText,
- uint32_t shaderLength, const uint32_t * params,
- uint32_t paramLength)
+ProgramVertex::ProgramVertex(Context *rsc, const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount, const size_t *textureNamesLength,
+
+ const uint32_t * params, size_t paramLength)
: Program(rsc, shaderText, shaderLength, params, paramLength) {
- mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader.string(), mUserShader.length());
+ mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader.string(), mUserShader.length(),
+ textureNames, textureNamesCount, textureNamesLength);
}
ProgramVertex::~ProgramVertex() {
@@ -191,8 +193,8 @@
tmp[2] = RS_PROGRAM_PARAM_INPUT;
tmp[3] = (uint32_t)attrElem.get();
- ProgramVertex *pv = new ProgramVertex(rsc, shaderString.string(),
- shaderString.length(), tmp, 4);
+ ProgramVertex *pv = new ProgramVertex(rsc, shaderString.string(), shaderString.length(),
+ NULL, 0, NULL, tmp, 4);
Allocation *alloc = Allocation::createAllocation(rsc, inputType.get(),
RS_ALLOCATION_USAGE_SCRIPT | RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS);
pv->bindAllocation(rsc, alloc, 0);
@@ -229,10 +231,13 @@
namespace android {
namespace renderscript {
-RsProgramVertex rsi_ProgramVertexCreate(Context *rsc, const char * shaderText,
- size_t shaderLength, const uint32_t * params,
- size_t paramLength) {
- ProgramVertex *pv = new ProgramVertex(rsc, shaderText, shaderLength, params, paramLength);
+RsProgramVertex rsi_ProgramVertexCreate(Context *rsc, const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength,
+ const uint32_t * params, size_t paramLength) {
+ ProgramVertex *pv = new ProgramVertex(rsc, shaderText, shaderLength,
+ textureNames, textureNamesCount, textureNamesLength,
+ params, paramLength);
pv->incUserRef();
return pv;
}
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h
index 5cfdd8b..67c2a88 100644
--- a/libs/rs/rsProgramVertex.h
+++ b/libs/rs/rsProgramVertex.h
@@ -27,8 +27,9 @@
class ProgramVertex : public Program {
public:
- ProgramVertex(Context *,const char * shaderText, uint32_t shaderLength,
- const uint32_t * params, uint32_t paramLength);
+ ProgramVertex(Context *,const char * shaderText, size_t shaderLength,
+ const char** textureNames, size_t textureNamesCount, const size_t *textureNamesLength,
+ const uint32_t * params, size_t paramLength);
virtual ~ProgramVertex();
virtual void setup(Context *rsc, ProgramVertexState *state);
diff --git a/libs/rs/rs_hal.h b/libs/rs/rs_hal.h
index 1e222e1..1201128 100644
--- a/libs/rs/rs_hal.h
+++ b/libs/rs/rs_hal.h
@@ -19,6 +19,8 @@
#include <RenderScriptDefines.h>
+struct ANativeWindow;
+
namespace android {
namespace renderscript {
@@ -115,19 +117,23 @@
bool zeroNew);
void (*syncAll)(const Context *rsc, const Allocation *alloc, RsAllocationUsageType src);
void (*markDirty)(const Context *rsc, const Allocation *alloc);
+
int32_t (*initSurfaceTexture)(const Context *rsc, const Allocation *alloc);
+ void (*setSurfaceTexture)(const Context *rsc, Allocation *alloc, ANativeWindow *sur);
+ void (*ioSend)(const Context *rsc, Allocation *alloc);
+ void (*ioReceive)(const Context *rsc, Allocation *alloc);
void (*data1D)(const Context *rsc, const Allocation *alloc,
uint32_t xoff, uint32_t lod, uint32_t count,
- const void *data, uint32_t sizeBytes);
+ const void *data, size_t sizeBytes);
void (*data2D)(const Context *rsc, const Allocation *alloc,
uint32_t xoff, uint32_t yoff, uint32_t lod,
RsAllocationCubemapFace face, uint32_t w, uint32_t h,
- const void *data, uint32_t sizeBytes);
+ const void *data, size_t sizeBytes);
void (*data3D)(const Context *rsc, const Allocation *alloc,
uint32_t xoff, uint32_t yoff, uint32_t zoff,
uint32_t lod, RsAllocationCubemapFace face,
- uint32_t w, uint32_t h, uint32_t d, const void *data, uint32_t sizeBytes);
+ uint32_t w, uint32_t h, uint32_t d, const void *data, size_t sizeBytes);
// Allocation to allocation copies
void (*allocData1D)(const Context *rsc,
@@ -151,9 +157,9 @@
uint32_t srcLod, RsAllocationCubemapFace srcFace);
void (*elementData1D)(const Context *rsc, const Allocation *alloc, uint32_t x,
- const void *data, uint32_t elementOff, uint32_t sizeBytes);
+ const void *data, uint32_t elementOff, size_t sizeBytes);
void (*elementData2D)(const Context *rsc, const Allocation *alloc, uint32_t x, uint32_t y,
- const void *data, uint32_t elementOff, uint32_t sizeBytes);
+ const void *data, uint32_t elementOff, size_t sizeBytes);
} allocation;
@@ -172,14 +178,18 @@
struct {
bool (*init)(const Context *rsc, const ProgramVertex *pv,
- const char* shader, uint32_t shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
void (*setActive)(const Context *rsc, const ProgramVertex *pv);
void (*destroy)(const Context *rsc, const ProgramVertex *pv);
} vertex;
struct {
bool (*init)(const Context *rsc, const ProgramFragment *pf,
- const char* shader, uint32_t shaderLen);
+ const char* shader, size_t shaderLen,
+ const char** textureNames, size_t textureNamesCount,
+ const size_t *textureNamesLength);
void (*setActive)(const Context *rsc, const ProgramFragment *pf);
void (*destroy)(const Context *rsc, const ProgramFragment *pf);
} fragment;
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index eae03be..1c7f577 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -591,7 +591,7 @@
// Post a persist volume msg
sendMsg(mAudioHandler,
MSG_PERSIST_VOLUME,
- SENDMSG_REPLACE,
+ SENDMSG_QUEUE,
PERSIST_LAST_AUDIBLE,
device,
s,
@@ -606,7 +606,7 @@
// to persist). Do not change volume if stream is muted.
sendMsg(mAudioHandler,
MSG_SET_DEVICE_VOLUME,
- SENDMSG_NOOP,
+ SENDMSG_QUEUE,
device,
0,
streamState,
@@ -746,7 +746,7 @@
// Post a persist volume msg
sendMsg(mAudioHandler,
MSG_PERSIST_VOLUME,
- SENDMSG_REPLACE,
+ SENDMSG_QUEUE,
PERSIST_LAST_AUDIBLE,
device,
streamState,
@@ -758,7 +758,7 @@
// to persist).
sendMsg(mAudioHandler,
MSG_SET_DEVICE_VOLUME,
- SENDMSG_NOOP,
+ SENDMSG_QUEUE,
device,
0,
streamState,
@@ -2208,7 +2208,7 @@
}
sendMsg(mAudioHandler,
MSG_SET_ALL_VOLUMES,
- SENDMSG_NOOP,
+ SENDMSG_QUEUE,
0,
0,
VolumeStreamState.this, 0);
@@ -2252,7 +2252,7 @@
}
sendMsg(mAudioHandler,
MSG_SET_ALL_VOLUMES,
- SENDMSG_NOOP,
+ SENDMSG_QUEUE,
0,
0,
VolumeStreamState.this, 0);
@@ -2350,7 +2350,7 @@
// Post a persist volume msg
sendMsg(mAudioHandler,
MSG_PERSIST_VOLUME,
- SENDMSG_REPLACE,
+ SENDMSG_QUEUE,
PERSIST_CURRENT|PERSIST_LAST_AUDIBLE,
device,
streamState,
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 4a56dcf..eec5ce1 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -202,34 +202,6 @@
// ----------------------------------------------------------------------------
-EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image)
-{
- EGLContext context = egl_tls_t::getContext();
- if (context == EGL_NO_CONTEXT || image == EGL_NO_IMAGE_KHR)
- return EGL_NO_IMAGE_KHR;
-
- egl_context_t const * const c = get_context(context);
- if (c == NULL) // this should never happen, by construction
- return EGL_NO_IMAGE_KHR;
-
- egl_display_t* display = egl_display_t::get(c->dpy);
- if (display == NULL) // this should never happen, by construction
- return EGL_NO_IMAGE_KHR;
-
- ImageRef _i(display, image);
- if (!_i.get())
- return EGL_NO_IMAGE_KHR;
-
- // here we don't validate the context because if it's been marked for
- // termination, this call should still succeed since it's internal to
- // EGL.
-
- egl_image_t const * const i = get_image(image);
- return i->image;
-}
-
-// ----------------------------------------------------------------------------
-
const GLubyte * egl_get_string_for_current_context(GLenum name) {
// NOTE: returning NULL here will fall-back to the default
// implementation.
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index bb2783d..a5dc832 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -627,29 +627,6 @@
return err;
}
-// Note: Similar implementations of these functions also exist in
-// gl2.cpp and gl.cpp, and are used by applications that call the
-// exported entry points directly.
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-
-static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES_impl = NULL;
-static PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES_impl = NULL;
-
-static void glEGLImageTargetTexture2DOES_wrapper(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- glEGLImageTargetTexture2DOES_impl(target, implImage);
-}
-
-static void glEGLImageTargetRenderbufferStorageOES_wrapper(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- glEGLImageTargetRenderbufferStorageOES_impl(target, implImage);
-}
-
__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
{
// eglGetProcAddress() could be the very first function called
@@ -724,16 +701,6 @@
if (found) {
addr = gExtensionForwarders[slot];
-
- if (!strcmp(procname, "glEGLImageTargetTexture2DOES")) {
- glEGLImageTargetTexture2DOES_impl = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)addr;
- addr = (__eglMustCastToProperFunctionPointerType)glEGLImageTargetTexture2DOES_wrapper;
- }
- if (!strcmp(procname, "glEGLImageTargetRenderbufferStorageOES")) {
- glEGLImageTargetRenderbufferStorageOES_impl = (PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)addr;
- addr = (__eglMustCastToProperFunctionPointerType)glEGLImageTargetRenderbufferStorageOES_wrapper;
- }
-
sGLExtentionMap.add(name, addr);
sGLExtentionSlot++;
}
@@ -1024,57 +991,18 @@
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_NO_IMAGE_KHR;
- if (ctx != EGL_NO_CONTEXT) {
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
- egl_context_t * const c = get_context(ctx);
- // since we have an EGLContext, we know which implementation to use
- EGLImageKHR image = c->cnx->egl.eglCreateImageKHR(
- dp->disp.dpy, c->context, target, buffer, attrib_list);
- if (image == EGL_NO_IMAGE_KHR)
- return image;
-
- egl_image_t* result = new egl_image_t(dpy, ctx);
- result->image = image;
- return (EGLImageKHR)result;
- } else {
- // EGL_NO_CONTEXT is a valid parameter
+ ContextRef _c(dp, ctx);
+ egl_context_t * const c = _c.get();
- /* Since we don't have a way to know which implementation to call,
- * we're calling all of them. If at least one of the implementation
- * succeeded, this is a success.
- */
-
- EGLint currentError = eglGetError();
-
- EGLImageKHR implImage = EGL_NO_IMAGE_KHR;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglCreateImageKHR) {
- implImage = cnx->egl.eglCreateImageKHR(
- dp->disp.dpy, ctx, target, buffer, attrib_list);
- }
-
- if (implImage == EGL_NO_IMAGE_KHR) {
- // failure, if there was an error when we entered this function,
- // the error flag must not be updated.
- // Otherwise, the error is whatever happened in the implementation
- // that faulted.
- if (currentError != EGL_SUCCESS) {
- setError(currentError, EGL_NO_IMAGE_KHR);
- }
- return EGL_NO_IMAGE_KHR;
- } else {
- // In case of success, we need to clear all error flags
- // (especially those caused by the implementation that didn't
- // succeed).
- eglGetError();
- }
-
- egl_image_t* result = new egl_image_t(dpy, ctx);
- result->image = implImage;
- return (EGLImageKHR)result;
+ EGLImageKHR result = EGL_NO_IMAGE_KHR;
+ egl_connection_t* const cnx = &gEGLImpl;
+ if (cnx->dso && cnx->egl.eglCreateImageKHR) {
+ result = cnx->egl.eglCreateImageKHR(
+ dp->disp.dpy,
+ c ? c->context : EGL_NO_CONTEXT,
+ target, buffer, attrib_list);
}
+ return result;
}
EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
@@ -1084,27 +1012,10 @@
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_FALSE;
- ImageRef _i(dp, img);
- if (!_i.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-
- egl_image_t* image = get_image(img);
- bool success = false;
-
egl_connection_t* const cnx = &gEGLImpl;
- if (image->image != EGL_NO_IMAGE_KHR) {
- if (cnx->dso && cnx->egl.eglDestroyImageKHR) {
- if (cnx->egl.eglDestroyImageKHR(
- dp->disp.dpy, image->image)) {
- success = true;
- }
- }
+ if (cnx->dso && cnx->egl.eglDestroyImageKHR) {
+ cnx->egl.eglDestroyImageKHR(dp->disp.dpy, img);
}
-
- if (!success)
- return EGL_FALSE;
-
- _i.terminate();
-
return EGL_TRUE;
}
@@ -1120,21 +1031,12 @@
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_NO_SYNC_KHR;
- EGLContext ctx = eglGetCurrentContext();
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_NO_SYNC_KHR);
-
- egl_context_t * const c = get_context(ctx);
EGLSyncKHR result = EGL_NO_SYNC_KHR;
- if (c->cnx->egl.eglCreateSyncKHR) {
- EGLSyncKHR sync = c->cnx->egl.eglCreateSyncKHR(
- dp->disp.dpy, type, attrib_list);
- if (sync == EGL_NO_SYNC_KHR)
- return sync;
- result = (egl_sync_t*)new egl_sync_t(dpy, ctx, sync);
+ egl_connection_t* const cnx = &gEGLImpl;
+ if (cnx->dso && cnx->egl.eglCreateSyncKHR) {
+ result = cnx->egl.eglCreateSyncKHR(dp->disp.dpy, type, attrib_list);
}
- return (EGLSyncKHR)result;
+ return result;
}
EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
@@ -1144,75 +1046,46 @@
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_FALSE;
- SyncRef _s(dp, sync);
- if (!_s.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- egl_sync_t* syncObject = get_sync(sync);
-
- EGLContext ctx = syncObject->context;
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
EGLBoolean result = EGL_FALSE;
- egl_context_t * const c = get_context(ctx);
- if (c->cnx->egl.eglDestroySyncKHR) {
- result = c->cnx->egl.eglDestroySyncKHR(
- dp->disp.dpy, syncObject->sync);
- if (result)
- _s.terminate();
+ egl_connection_t* const cnx = &gEGLImpl;
+ if (cnx->dso && cnx->egl.eglDestroySyncKHR) {
+ result = cnx->egl.eglDestroySyncKHR(dp->disp.dpy, sync);
}
return result;
}
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
+EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync,
+ EGLint flags, EGLTimeKHR timeout)
{
clearError();
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_FALSE;
- SyncRef _s(dp, sync);
- if (!_s.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- egl_sync_t* syncObject = get_sync(sync);
-
- EGLContext ctx = syncObject->context;
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- egl_context_t * const c = get_context(ctx);
- if (c->cnx->egl.eglClientWaitSyncKHR) {
- return c->cnx->egl.eglClientWaitSyncKHR(
- dp->disp.dpy, syncObject->sync, flags, timeout);
+ EGLBoolean result = EGL_FALSE;
+ egl_connection_t* const cnx = &gEGLImpl;
+ if (cnx->dso && cnx->egl.eglClientWaitSyncKHR) {
+ result = cnx->egl.eglClientWaitSyncKHR(
+ dp->disp.dpy, sync, flags, timeout);
}
-
- return EGL_FALSE;
+ return result;
}
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
+EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
+ EGLint attribute, EGLint *value)
{
clearError();
egl_display_t const * const dp = validate_display(dpy);
if (!dp) return EGL_FALSE;
- SyncRef _s(dp, sync);
- if (!_s.get())
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-
- egl_sync_t* syncObject = get_sync(sync);
- EGLContext ctx = syncObject->context;
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- egl_context_t * const c = get_context(ctx);
- if (c->cnx->egl.eglGetSyncAttribKHR) {
- return c->cnx->egl.eglGetSyncAttribKHR(
- dp->disp.dpy, syncObject->sync, attribute, value);
+ EGLBoolean result = EGL_FALSE;
+ egl_connection_t* const cnx = &gEGLImpl;
+ if (cnx->dso && cnx->egl.eglGetSyncAttribKHR) {
+ result = cnx->egl.eglGetSyncAttribKHR(
+ dp->disp.dpy, sync, attribute, value);
}
-
- return EGL_FALSE;
+ return result;
}
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
index f137bad..4d91f54 100644
--- a/opengl/libs/EGL/egl_object.h
+++ b/opengl/libs/EGL/egl_object.h
@@ -173,40 +173,10 @@
String8 gl_extensions;
};
-class egl_image_t: public egl_object_t {
-protected:
- ~egl_image_t() {}
-public:
- typedef egl_object_t::LocalRef<egl_image_t, EGLImageKHR> Ref;
-
- egl_image_t(EGLDisplay dpy, EGLContext context) :
- egl_object_t(get_display(dpy)),
- dpy(dpy), context(context), image(EGL_NO_IMAGE_KHR) { }
- EGLDisplay dpy;
- EGLContext context;
- EGLImageKHR image;
-};
-
-class egl_sync_t: public egl_object_t {
-protected:
- ~egl_sync_t() {}
-public:
- typedef egl_object_t::LocalRef<egl_sync_t, EGLSyncKHR> Ref;
-
- egl_sync_t(EGLDisplay dpy, EGLContext context, EGLSyncKHR sync) :
- egl_object_t(get_display(dpy)), dpy(dpy), context(context), sync(sync) {
- }
- EGLDisplay dpy;
- EGLContext context;
- EGLSyncKHR sync;
-};
-
// ----------------------------------------------------------------------------
typedef egl_surface_t::Ref SurfaceRef;
typedef egl_context_t::Ref ContextRef;
-typedef egl_image_t::Ref ImageRef;
-typedef egl_sync_t::Ref SyncRef;
// ----------------------------------------------------------------------------
@@ -225,16 +195,6 @@
return egl_to_native_cast<egl_context_t>(context);
}
-static inline
-egl_image_t* get_image(EGLImageKHR image) {
- return egl_to_native_cast<egl_image_t>(image);
-}
-
-static inline
-egl_sync_t* get_sync(EGLSyncKHR sync) {
- return egl_to_native_cast<egl_sync_t>(sync);
-}
-
// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 79aa3cd..4345c2b 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -124,27 +124,3 @@
}
return ret;
}
-
-/*
- * These GL calls are special because they need to EGL to retrieve some
- * informations before they can execute.
- */
-
-extern "C" void __glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
-extern "C" void __glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
-
-
-void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- __glEGLImageTargetTexture2DOES(target, implImage);
-}
-
-void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- __glEGLImageTargetRenderbufferStorageOES(target, implImage);
-}
-
diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in
index a8907fd..c381075 100644
--- a/opengl/libs/GLES2/gl2ext_api.in
+++ b/opengl/libs/GLES2/gl2ext_api.in
@@ -1,7 +1,7 @@
-void API_ENTRY(__glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
+void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
}
-void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
+void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
}
void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index adeaa5b..adcb60d 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -179,27 +179,3 @@
}
return ret;
}
-
-/*
- * These GL calls are special because they need to EGL to retrieve some
- * informations before they can execute.
- */
-
-extern "C" void __glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
-extern "C" void __glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
-
-
-void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- __glEGLImageTargetTexture2DOES(target, implImage);
-}
-
-void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
-{
- GLeglImageOES implImage =
- (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
- __glEGLImageTargetRenderbufferStorageOES(target, implImage);
-}
-
diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in
index 268a535..7cd6cb5 100644
--- a/opengl/libs/GLES_CM/glext_api.in
+++ b/opengl/libs/GLES_CM/glext_api.in
@@ -31,10 +31,10 @@
void API_ENTRY(glDrawTexfvOES)(const GLfloat *coords) {
CALL_GL_API(glDrawTexfvOES, coords);
}
-void API_ENTRY(__glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
+void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
}
-void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
+void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
}
void API_ENTRY(glAlphaFuncxOES)(GLenum func, GLclampx ref) {
diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h
index 8ff51ec..cb0e908 100644
--- a/opengl/libs/egl_impl.h
+++ b/opengl/libs/egl_impl.h
@@ -30,7 +30,6 @@
// ----------------------------------------------------------------------------
EGLAPI const GLubyte * egl_get_string_for_current_context(GLenum name);
-EGLAPI EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image);
// ----------------------------------------------------------------------------
}; // namespace android
diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen
index 9be40cf..4d8334f 100755
--- a/opengl/libs/tools/glapigen
+++ b/opengl/libs/tools/glapigen
@@ -37,12 +37,6 @@
#printf("%s", $line);
my $prefix = "";
- if ($name eq "glEGLImageTargetTexture2DOES") {
- $prefix = "__";
- }
- if ($name eq "glEGLImageTargetRenderbufferStorageOES") {
- $prefix = "__";
- }
if ($name eq "glGetString") {
$prefix = "__";
}
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 3beaac9..3a8e3fc 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -148,4 +148,7 @@
<!-- Development settings -->
<bool name="def_stay_on_while_plugged_in">false</bool>
+ <!-- Number of retries for connecting to DHCP.
+ Value here is the same as WifiStateMachine.DEFAULT_MAX_DHCP_RETRIES -->
+ <integer name="def_max_dhcp_retries">9</integer>
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 882aa66..330a189 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -1602,6 +1602,9 @@
loadBooleanSetting(stmt, Settings.Secure.NETSTATS_ENABLED,
R.bool.def_netstats_enabled);
+
+ loadIntegerSetting(stmt, Settings.Secure.WIFI_MAX_DHCP_RETRY_COUNT,
+ R.integer.def_max_dhcp_retries);
} finally {
if (stmt != null) stmt.close();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
index f8a4592..dc2f0be 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
@@ -134,7 +134,9 @@
void jumpTo(boolean appearing) {
mContentView.setTranslationY(appearing ? 0 : mPanelHeight);
- mScrimView.getBackground().setAlpha(appearing ? 255 : 0);
+ if (mScrimView.getBackground() != null) {
+ mScrimView.getBackground().setAlpha(appearing ? 255 : 0);
+ }
}
public void setPanelHeight(int h) {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 8706f10..7896720 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -239,6 +239,7 @@
public void show(boolean show, boolean animate) {
if (show) {
+ refreshRecentTasksList(null, true);
mWaitingToShow = true;
mWaitingToShowAnimated = animate;
showIfReady();
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index bdbaab4..1c81bb1 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -142,8 +142,7 @@
/** {@hide} */
public class WindowManagerService extends IWindowManager.Stub
- implements Watchdog.Monitor, WindowManagerPolicy.WindowManagerFuncs,
- Choreographer.OnAnimateListener {
+ implements Watchdog.Monitor, WindowManagerPolicy.WindowManagerFuncs {
static final String TAG = "WindowManager";
static final boolean DEBUG = false;
static final boolean DEBUG_ADD_REMOVE = false;
@@ -603,6 +602,18 @@
}
private LayoutAndSurfaceFields mInnerFields = new LayoutAndSurfaceFields();
+ private final class AnimationRunnable implements Runnable {
+ @Override
+ public void run() {
+ synchronized(mWindowMap) {
+ mAnimationScheduled = false;
+ performLayoutAndPlaceSurfacesLocked();
+ }
+ }
+ }
+ final AnimationRunnable mAnimationRunnable = new AnimationRunnable();
+ boolean mAnimationScheduled;
+
final class DragInputEventReceiver extends InputEventReceiver {
public DragInputEventReceiver(InputChannel inputChannel, Looper looper) {
super(inputChannel, looper);
@@ -724,7 +735,6 @@
Looper.prepare();
WindowManagerService s = new WindowManagerService(mContext, mPM,
mHaveInputMethods, mAllowBootMessages);
- s.mChoreographer.addOnAnimateListener(s);
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_DISPLAY);
android.os.Process.setCanSelfBackground(false);
@@ -5441,7 +5451,7 @@
if (mScreenRotationAnimation.setRotation(rotation, mFxSession,
MAX_ANIMATION_DURATION, mTransitionAnimationScale,
mCurDisplayWidth, mCurDisplayHeight)) {
- mChoreographer.scheduleAnimation();
+ scheduleAnimationLocked();
}
}
Surface.setOrientation(0, rotation);
@@ -6882,7 +6892,7 @@
case FORCE_GC: {
synchronized(mWindowMap) {
- if (mChoreographer.isAnimationScheduled()) {
+ if (mAnimationScheduled) {
// If we are animating, don't do the gc now but
// delay a bit so we don't interrupt the animation.
mH.sendMessageDelayed(mH.obtainMessage(H.FORCE_GC),
@@ -8980,7 +8990,7 @@
if (needRelayout) {
requestTraversalLocked();
} else if (mInnerFields.mAnimating) {
- mChoreographer.scheduleAnimation();
+ scheduleAnimationLocked();
}
// Finally update all input windows now that the window changes have stabilized.
@@ -9100,10 +9110,10 @@
}
}
- @Override
- public void onAnimate() {
- synchronized(mWindowMap) {
- performLayoutAndPlaceSurfacesLocked();
+ void scheduleAnimationLocked() {
+ if (!mAnimationScheduled) {
+ mChoreographer.postAnimationCallback(mAnimationRunnable);
+ mAnimationScheduled = true;
}
}
@@ -9423,7 +9433,7 @@
if (DEBUG_ORIENTATION) Slog.i(TAG, "**** Dismissing screen rotation animation");
if (mScreenRotationAnimation.dismiss(mFxSession, MAX_ANIMATION_DURATION,
mTransitionAnimationScale, mCurDisplayWidth, mCurDisplayHeight)) {
- mChoreographer.scheduleAnimation();
+ scheduleAnimationLocked();
} else {
mScreenRotationAnimation = null;
updateRotation = true;
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 6868cf6..b013d27 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -1593,7 +1593,7 @@
mService.applyAnimationLocked(this, WindowManagerPolicy.TRANSIT_ENTER, true);
}
if (requestAnim) {
- mService.mChoreographer.scheduleAnimation();
+ mService.scheduleAnimationLocked();
}
return true;
}
@@ -1634,7 +1634,7 @@
}
}
if (requestAnim) {
- mService.mChoreographer.scheduleAnimation();
+ mService.scheduleAnimationLocked();
}
return true;
}
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index 24a4876..8cfdb79 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -292,6 +292,20 @@
}
/**
+ * Translates keypad letters to actual digits (e.g. 1-800-GOOG-411 will
+ * become 1-800-4664-411), and then strips all separators (e.g. 1-800-4664-411 will become
+ * 18004664411).
+ *
+ * @see #convertKeypadLettersToDigits(String)
+ * @see #stripSeparators(String)
+ *
+ * @hide
+ */
+ public static String convertAndStrip(String phoneNumber) {
+ return stripSeparators(convertKeypadLettersToDigits(phoneNumber));
+ }
+
+ /**
* Converts pause and tonewait pause characters
* to Android representation.
* RFC 3601 says pause is 'p' and tonewait is 'w'.
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 5d76484..2b9fb91 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -1040,7 +1040,8 @@
}
}
if (didDisable) {
- if (enabledCount == 0) {
+ if ((enabledCount == 0) || (apnId == APN_DUN_ID)) {
+ mRequestedApnType = Phone.APN_TYPE_DEFAULT;
onCleanUpConnection(true, apnId, Phone.REASON_DATA_DISABLED);
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index 3fe57ae..6e4dd58 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -95,6 +95,9 @@
Phone.APN_TYPE_MMS,
Phone.APN_TYPE_HIPRI };
+ private String[] mDunApnTypes = {
+ Phone.APN_TYPE_DUN };
+
private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
/* Constructor */
@@ -121,11 +124,26 @@
createAllDataConnectionList();
broadcastMessenger();
+
+ Context c = mCdmaPhone.getContext();
+ String[] t = c.getResources().getStringArray(
+ com.android.internal.R.array.config_cdma_dun_supported_types);
+ if (t != null && t.length > 0) {
+ ArrayList<String> temp = new ArrayList<String>();
+ for(int i=0; i< t.length; i++) {
+ if (!Phone.APN_TYPE_DUN.equalsIgnoreCase(t[i])) {
+ temp.add(t[i]);
+ }
+ }
+ temp.add(0, Phone.APN_TYPE_DUN);
+ mDunApnTypes = temp.toArray(t);
+ }
+
}
@Override
public void dispose() {
- cleanUpConnection(false, null);
+ cleanUpConnection(false, null, false);
super.dispose();
@@ -282,7 +300,7 @@
* @param tearDown true if the underlying DataConnection should be disconnected.
* @param reason for the clean up.
*/
- private void cleanUpConnection(boolean tearDown, String reason) {
+ private void cleanUpConnection(boolean tearDown, String reason, boolean doAll) {
if (DBG) log("cleanUpConnection: reason: " + reason);
// Clear the reconnect alarm, if set.
@@ -302,9 +320,15 @@
DataConnectionAc dcac =
mDataConnectionAsyncChannels.get(conn.getDataConnectionId());
if (tearDown) {
- if (DBG) log("cleanUpConnection: teardown, call conn.disconnect");
- conn.tearDown(reason, obtainMessage(EVENT_DISCONNECT_DONE,
- conn.getDataConnectionId(), 0, reason));
+ if (doAll) {
+ if (DBG) log("cleanUpConnection: teardown, conn.tearDownAll");
+ conn.tearDownAll(reason, obtainMessage(EVENT_DISCONNECT_DONE,
+ conn.getDataConnectionId(), 0, reason));
+ } else {
+ if (DBG) log("cleanUpConnection: teardown, conn.tearDown");
+ conn.tearDown(reason, obtainMessage(EVENT_DISCONNECT_DONE,
+ conn.getDataConnectionId(), 0, reason));
+ }
notificationDeferred = true;
} else {
if (DBG) log("cleanUpConnection: !tearDown, call conn.resetSynchronously");
@@ -348,8 +372,7 @@
String[] types;
int apnId;
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
- types = new String[1];
- types[0] = Phone.APN_TYPE_DUN;
+ types = mDunApnTypes;
apnId = DataConnectionTracker.APN_DUN_ID;
} else {
types = mDefaultApnTypes;
@@ -587,7 +610,7 @@
@Override
protected void onEnableNewApn() {
// No mRequestedApnType check; only one connection is supported
- cleanUpConnection(true, Phone.REASON_APN_SWITCHED);
+ cleanUpConnection(true, Phone.REASON_APN_SWITCHED, false);
}
/**
@@ -769,13 +792,13 @@
@Override
protected void onCleanUpConnection(boolean tearDown, int apnId, String reason) {
// No apnId check; only one connection is supported
- cleanUpConnection(tearDown, reason);
+ cleanUpConnection(tearDown, reason, (apnId == APN_DUN_ID));
}
@Override
protected void onCleanUpAllConnections(String cause) {
// Only one CDMA connection is supported
- cleanUpConnection(true, cause);
+ cleanUpConnection(true, cause, false);
}
private void createAllDataConnectionList() {
@@ -821,7 +844,7 @@
notifyDataConnection(Phone.REASON_CDMA_DATA_DETACHED);
} else {
if (mState == State.FAILED) {
- cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED);
+ cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED, false);
mDataConnections.get(0).resetRetryCount();
CdmaCellLocation loc = (CdmaCellLocation)(mPhone.getCellLocation());
@@ -900,7 +923,7 @@
log("onDataStateChanged: No active connection"
+ "state is CONNECTED, disconnecting/cleanup");
writeEventLogCdmaDataDrop();
- cleanUpConnection(true, null);
+ cleanUpConnection(true, null, false);
return;
}
diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberUtilsTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberUtilsTest.java
index 9d9680d..db670f8 100644
--- a/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberUtilsTest.java
+++ b/telephony/tests/telephonytests/src/com/android/internal/telephony/PhoneNumberUtilsTest.java
@@ -623,4 +623,35 @@
// Brazil.
assertFalse(PhoneNumberUtils.isPotentialEmergencyNumber("91112345", "BR"));
}
+
+ @SmallTest
+ public void testStripSeparators() {
+ // Smoke tests which should never fail.
+ assertEquals("1234567890", PhoneNumberUtils.stripSeparators("1234567890"));
+ assertEquals("911", PhoneNumberUtils.stripSeparators("911"));
+ assertEquals("112", PhoneNumberUtils.stripSeparators("112"));
+
+ // Separators should be removed, while '+' or any other digits should not.
+ assertEquals("+16502910000", PhoneNumberUtils.stripSeparators("+1 (650) 291-0000"));
+
+ // WAIT, PAUSE should *not* be stripped
+ assertEquals("+16502910000,300;",
+ PhoneNumberUtils.stripSeparators("+1 (650) 291-0000, 300;"));
+ }
+
+ @SmallTest
+ public void testConvertAndStrip() {
+ // Smoke tests which should never fail.
+ assertEquals("1234567890", PhoneNumberUtils.convertAndStrip("1234567890"));
+ assertEquals("911", PhoneNumberUtils.convertAndStrip("911"));
+ assertEquals("112", PhoneNumberUtils.convertAndStrip("112"));
+
+ // It should convert keypad characters into digits, and strip separators
+ assertEquals("22233344455566677778889999",
+ PhoneNumberUtils.convertAndStrip("ABC DEF GHI JKL MNO PQR STUV WXYZ"));
+
+ // Test real cases.
+ assertEquals("18004664411", PhoneNumberUtils.convertAndStrip("1-800-GOOG-411"));
+ assertEquals("8002223334", PhoneNumberUtils.convertAndStrip("(800) ABC-DEFG"));
+ }
}
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
index 4037a69..0a868fa 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
@@ -21,6 +21,7 @@
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Bundle;
+import android.text.TextPaint;
import android.view.View;
@SuppressWarnings({"UnusedDeclaration"})
@@ -39,6 +40,7 @@
private final Paint mScaledPaint;
private final Paint mSkewPaint;
private final Paint mHugePaint;
+ private final TextPaint mEventPaint;
CustomTextView(Context c) {
super(c);
@@ -70,6 +72,11 @@
mHugePaint.setAntiAlias(true);
mHugePaint.setColor(0xff000000);
mHugePaint.setTextSize(300f);
+
+ mEventPaint = new TextPaint();
+ mEventPaint.setFakeBoldText(true);
+ mEventPaint.setAntiAlias(true);
+ mEventPaint.setTextSize(14);
}
@Override
@@ -77,6 +84,8 @@
super.onDraw(canvas);
canvas.drawRGB(255, 255, 255);
+ canvas.drawText("Hello OpenGL renderer!", 300, 20, mEventPaint);
+
mMediumPaint.setStyle(Paint.Style.FILL_AND_STROKE);
mMediumPaint.setStrokeWidth(2.0f);
canvas.drawText("Hello OpenGL renderer!", 100, 20, mMediumPaint);
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 0134456..1b64f3e 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -1754,7 +1754,9 @@
* If we've exceeded the maximum number of retries for DHCP
* to a given network, disable the network
*/
- if (++mReconnectCount > getMaxDhcpRetries()) {
+ int maxRetries = getMaxDhcpRetries();
+ // maxRetries == 0 means keep trying forever
+ if (maxRetries > 0 && ++mReconnectCount > maxRetries) {
loge("Failed " +
mReconnectCount + " times, Disabling " + mLastNetworkId);
mWifiConfigStore.disableNetwork(mLastNetworkId,