diff options
182 files changed, 3616 insertions, 2348 deletions
diff --git a/api/current.txt b/api/current.txt index 0e3fee64c667..541ce5116b57 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7226,6 +7226,7 @@ package android.database { public class SQLException extends java.lang.RuntimeException { ctor public SQLException(); ctor public SQLException(java.lang.String); + ctor public SQLException(java.lang.String, java.lang.Throwable); } public class StaleDataException extends java.lang.RuntimeException { @@ -7403,6 +7404,7 @@ package android.database.sqlite { public class SQLiteException extends android.database.SQLException { ctor public SQLiteException(); ctor public SQLiteException(java.lang.String); + ctor public SQLiteException(java.lang.String, java.lang.Throwable); } public class SQLiteFullException extends android.database.sqlite.SQLiteException { @@ -10891,6 +10893,7 @@ package android.media { method public void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException; method public void setDisplay(android.view.SurfaceHolder); method public void setLooping(boolean); + method public void setNextMediaPlayer(android.media.MediaPlayer); method public void setOnBufferingUpdateListener(android.media.MediaPlayer.OnBufferingUpdateListener); method public void setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener); method public void setOnErrorListener(android.media.MediaPlayer.OnErrorListener); @@ -18852,6 +18855,7 @@ package android.security { method public static android.content.Intent createInstallIntent(); method public static java.security.cert.X509Certificate[] getCertificateChain(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException; method public static java.security.PrivateKey getPrivateKey(android.content.Context, java.lang.String) throws java.lang.InterruptedException, android.security.KeyChainException; + field public static final java.lang.String ACTION_STORAGE_CHANGED = "android.security.STORAGE_CHANGED"; field public static final java.lang.String EXTRA_CERTIFICATE = "CERT"; field public static final java.lang.String EXTRA_NAME = "name"; field public static final java.lang.String EXTRA_PKCS12 = "PKCS12"; diff --git a/cmds/system_server/library/Android.mk b/cmds/system_server/library/Android.mk index 7d08a8c8a2e5..9f92330aec84 100644 --- a/cmds/system_server/library/Android.mk +++ b/cmds/system_server/library/Android.mk @@ -8,10 +8,7 @@ base = $(LOCAL_PATH)/../../.. native = $(LOCAL_PATH)/../../../../native LOCAL_C_INCLUDES := \ - $(base)/services/camera/libcameraservice \ - $(base)/services/audioflinger \ $(base)/services/sensorservice \ - $(base)/media/libmediaplayerservice \ $(native)/services/surfaceflinger \ $(JNI_H_INCLUDE) @@ -19,9 +16,6 @@ LOCAL_SHARED_LIBRARIES := \ libandroid_runtime \ libsensorservice \ libsurfaceflinger \ - libaudioflinger \ - libcameraservice \ - libmediaplayerservice \ libinput \ libutils \ libbinder \ diff --git a/cmds/system_server/library/system_init.cpp b/cmds/system_server/library/system_init.cpp index bfbc13870717..745c34a0478c 100644 --- a/cmds/system_server/library/system_init.cpp +++ b/cmds/system_server/library/system_init.cpp @@ -15,10 +15,6 @@ #include <utils/Log.h> #include <SurfaceFlinger.h> -#include <AudioFlinger.h> -#include <CameraService.h> -#include <AudioPolicyService.h> -#include <MediaPlayerService.h> #include <SensorService.h> #include <android_runtime/AndroidRuntime.h> diff --git a/core/java/android/content/ContentProviderNative.java b/core/java/android/content/ContentProviderNative.java index eb83dbc6e549..4b31552ef06c 100644 --- a/core/java/android/content/ContentProviderNative.java +++ b/core/java/android/content/ContentProviderNative.java @@ -17,6 +17,7 @@ package android.content; import android.content.res.AssetFileDescriptor; +import android.database.BulkCursorDescriptor; import android.database.BulkCursorNative; import android.database.BulkCursorToCursorAdaptor; import android.database.Cursor; @@ -113,20 +114,14 @@ abstract public class ContentProviderNative extends Binder implements IContentPr if (cursor != null) { CursorToBulkCursorAdaptor adaptor = new CursorToBulkCursorAdaptor( cursor, observer, getProviderName()); - final IBinder binder = adaptor.asBinder(); - final int count = adaptor.count(); - final int index = BulkCursorToCursorAdaptor.findRowIdColumnIndex( - adaptor.getColumnNames()); - final boolean wantsAllOnMoveCalls = adaptor.getWantsAllOnMoveCalls(); + BulkCursorDescriptor d = adaptor.getBulkCursorDescriptor(); reply.writeNoException(); - reply.writeStrongBinder(binder); - reply.writeInt(count); - reply.writeInt(index); - reply.writeInt(wantsAllOnMoveCalls ? 1 : 0); + reply.writeInt(1); + d.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE); } else { reply.writeNoException(); - reply.writeStrongBinder(null); + reply.writeInt(0); } return true; @@ -369,12 +364,9 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); - IBulkCursor bulkCursor = BulkCursorNative.asInterface(reply.readStrongBinder()); - if (bulkCursor != null) { - int rowCount = reply.readInt(); - int idColumnPosition = reply.readInt(); - boolean wantsAllOnMoveCalls = reply.readInt() != 0; - adaptor.initialize(bulkCursor, rowCount, idColumnPosition, wantsAllOnMoveCalls); + if (reply.readInt() != 0) { + BulkCursorDescriptor d = BulkCursorDescriptor.CREATOR.createFromParcel(reply); + adaptor.initialize(d); } else { adaptor.close(); adaptor = null; diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java index 7bb986610b47..9c81c9e3a320 100644 --- a/core/java/android/content/SyncStorageEngine.java +++ b/core/java/android/content/SyncStorageEngine.java @@ -1171,7 +1171,7 @@ public class SyncStorageEngine extends Handler { syncs = new ArrayList<SyncInfo>(); mCurrentSyncs.put(userId, syncs); } - return new ArrayList<SyncInfo>(syncs); + return syncs; } } diff --git a/core/java/android/database/AbstractCursor.java b/core/java/android/database/AbstractCursor.java index b28ed8daf25f..dd6692cbc058 100644 --- a/core/java/android/database/AbstractCursor.java +++ b/core/java/android/database/AbstractCursor.java @@ -33,10 +33,39 @@ import java.util.Map; public abstract class AbstractCursor implements CrossProcessCursor { private static final String TAG = "Cursor"; - DataSetObservable mDataSetObservable = new DataSetObservable(); - ContentObservable mContentObservable = new ContentObservable(); + /** + * @deprecated This is never updated by this class and should not be used + */ + @Deprecated + protected HashMap<Long, Map<String, Object>> mUpdatedRows; + + protected int mPos; + + /** + * This must be set to the index of the row ID column by any + * subclass that wishes to support updates. + */ + protected int mRowIdColumnIndex; + + /** + * If {@link #mRowIdColumnIndex} is not -1 this contains contains the value of + * the column at {@link #mRowIdColumnIndex} for the current row this cursor is + * pointing at. + */ + protected Long mCurrentRowID; + + protected boolean mClosed; + protected ContentResolver mContentResolver; + private Uri mNotifyUri; + + private final Object mSelfObserverLock = new Object(); + private ContentObserver mSelfObserver; + private boolean mSelfObserverRegistered; - Bundle mExtras = Bundle.EMPTY; + private DataSetObservable mDataSetObservable = new DataSetObservable(); + private ContentObservable mContentObservable = new ContentObservable(); + + private Bundle mExtras = Bundle.EMPTY; /* -------------------------------------------------------- */ /* These need to be implemented by subclasses */ @@ -415,30 +444,4 @@ public abstract class AbstractCursor implements CrossProcessCursor { } } } - - /** - * @deprecated This is never updated by this class and should not be used - */ - @Deprecated - protected HashMap<Long, Map<String, Object>> mUpdatedRows; - - /** - * This must be set to the index of the row ID column by any - * subclass that wishes to support updates. - */ - protected int mRowIdColumnIndex; - - protected int mPos; - /** - * If {@link #mRowIdColumnIndex} is not -1 this contains contains the value of - * the column at {@link #mRowIdColumnIndex} for the current row this cursor is - * pointing at. - */ - protected Long mCurrentRowID; - protected ContentResolver mContentResolver; - protected boolean mClosed = false; - private Uri mNotifyUri; - private ContentObserver mSelfObserver; - final private Object mSelfObserverLock = new Object(); - private boolean mSelfObserverRegistered; } diff --git a/core/java/android/database/BulkCursorDescriptor.java b/core/java/android/database/BulkCursorDescriptor.java new file mode 100644 index 000000000000..c1e5e63b72a0 --- /dev/null +++ b/core/java/android/database/BulkCursorDescriptor.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.database; + +import android.os.Parcel; +import android.os.Parcelable; + +/** + * Describes the properties of a {@link CursorToBulkCursorAdaptor} that are + * needed to initialize its {@link BulkCursorToCursorAdaptor} counterpart on the client's end. + * + * {@hide} + */ +public final class BulkCursorDescriptor implements Parcelable { + public static final Parcelable.Creator<BulkCursorDescriptor> CREATOR = + new Parcelable.Creator<BulkCursorDescriptor>() { + @Override + public BulkCursorDescriptor createFromParcel(Parcel in) { + BulkCursorDescriptor d = new BulkCursorDescriptor(); + d.readFromParcel(in); + return d; + } + + @Override + public BulkCursorDescriptor[] newArray(int size) { + return new BulkCursorDescriptor[size]; + } + }; + + public IBulkCursor cursor; + public String[] columnNames; + public boolean wantsAllOnMoveCalls; + public int count; + public CursorWindow window; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeStrongBinder(cursor.asBinder()); + out.writeStringArray(columnNames); + out.writeInt(wantsAllOnMoveCalls ? 1 : 0); + out.writeInt(count); + if (window != null) { + out.writeInt(1); + window.writeToParcel(out, flags); + } else { + out.writeInt(0); + } + } + + public void readFromParcel(Parcel in) { + cursor = BulkCursorNative.asInterface(in.readStrongBinder()); + columnNames = in.readStringArray(); + wantsAllOnMoveCalls = in.readInt() != 0; + count = in.readInt(); + if (in.readInt() != 0) { + window = CursorWindow.CREATOR.createFromParcel(in); + } + } +} diff --git a/core/java/android/database/BulkCursorNative.java b/core/java/android/database/BulkCursorNative.java index 67cf0f82700a..d3c11e785d7f 100644 --- a/core/java/android/database/BulkCursorNative.java +++ b/core/java/android/database/BulkCursorNative.java @@ -72,26 +72,6 @@ public abstract class BulkCursorNative extends Binder implements IBulkCursor return true; } - case COUNT_TRANSACTION: { - data.enforceInterface(IBulkCursor.descriptor); - int count = count(); - reply.writeNoException(); - reply.writeInt(count); - return true; - } - - case GET_COLUMN_NAMES_TRANSACTION: { - data.enforceInterface(IBulkCursor.descriptor); - String[] columnNames = getColumnNames(); - reply.writeNoException(); - reply.writeInt(columnNames.length); - int length = columnNames.length; - for (int i = 0; i < length; i++) { - reply.writeString(columnNames[i]); - } - return true; - } - case DEACTIVATE_TRANSACTION: { data.enforceInterface(IBulkCursor.descriptor); deactivate(); @@ -125,14 +105,6 @@ public abstract class BulkCursorNative extends Binder implements IBulkCursor return true; } - case WANTS_ON_MOVE_TRANSACTION: { - data.enforceInterface(IBulkCursor.descriptor); - boolean result = getWantsAllOnMoveCalls(); - reply.writeNoException(); - reply.writeInt(result ? 1 : 0); - return true; - } - case GET_EXTRAS_TRANSACTION: { data.enforceInterface(IBulkCursor.descriptor); Bundle extras = getExtras(); @@ -217,52 +189,6 @@ final class BulkCursorProxy implements IBulkCursor { } } - public int count() throws RemoteException - { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - try { - data.writeInterfaceToken(IBulkCursor.descriptor); - - boolean result = mRemote.transact(COUNT_TRANSACTION, data, reply, 0); - DatabaseUtils.readExceptionFromParcel(reply); - - int count; - if (result == false) { - count = -1; - } else { - count = reply.readInt(); - } - return count; - } finally { - data.recycle(); - reply.recycle(); - } - } - - public String[] getColumnNames() throws RemoteException - { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - try { - data.writeInterfaceToken(IBulkCursor.descriptor); - - mRemote.transact(GET_COLUMN_NAMES_TRANSACTION, data, reply, 0); - DatabaseUtils.readExceptionFromParcel(reply); - - String[] columnNames = null; - int numColumns = reply.readInt(); - columnNames = new String[numColumns]; - for (int i = 0; i < numColumns; i++) { - columnNames[i] = reply.readString(); - } - return columnNames; - } finally { - data.recycle(); - reply.recycle(); - } - } - public void deactivate() throws RemoteException { Parcel data = Parcel.obtain(); @@ -317,23 +243,6 @@ final class BulkCursorProxy implements IBulkCursor { } } - public boolean getWantsAllOnMoveCalls() throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - try { - data.writeInterfaceToken(IBulkCursor.descriptor); - - mRemote.transact(WANTS_ON_MOVE_TRANSACTION, data, reply, 0); - DatabaseUtils.readExceptionFromParcel(reply); - - int result = reply.readInt(); - return result != 0; - } finally { - data.recycle(); - reply.recycle(); - } - } - public Bundle getExtras() throws RemoteException { if (mExtras == null) { Parcel data = Parcel.obtain(); diff --git a/core/java/android/database/BulkCursorToCursorAdaptor.java b/core/java/android/database/BulkCursorToCursorAdaptor.java index 885046bf1995..98c70436c34b 100644 --- a/core/java/android/database/BulkCursorToCursorAdaptor.java +++ b/core/java/android/database/BulkCursorToCursorAdaptor.java @@ -30,34 +30,23 @@ public final class BulkCursorToCursorAdaptor extends AbstractWindowedCursor { private SelfContentObserver mObserverBridge = new SelfContentObserver(this); private IBulkCursor mBulkCursor; - private int mCount; private String[] mColumns; private boolean mWantsAllOnMoveCalls; + private int mCount; /** * Initializes the adaptor. * Must be called before first use. */ - public void initialize(IBulkCursor bulkCursor, int count, int idIndex, - boolean wantsAllOnMoveCalls) { - mBulkCursor = bulkCursor; - mColumns = null; // lazily retrieved - mCount = count; - mRowIdColumnIndex = idIndex; - mWantsAllOnMoveCalls = wantsAllOnMoveCalls; - } - - /** - * Returns column index of "_id" column, or -1 if not found. - */ - public static int findRowIdColumnIndex(String[] columnNames) { - int length = columnNames.length; - for (int i = 0; i < length; i++) { - if (columnNames[i].equals("_id")) { - return i; - } + public void initialize(BulkCursorDescriptor d) { + mBulkCursor = d.cursor; + mColumns = d.columnNames; + mRowIdColumnIndex = DatabaseUtils.findRowIdColumnIndex(mColumns); + mWantsAllOnMoveCalls = d.wantsAllOnMoveCalls; + mCount = d.count; + if (d.window != null) { + setWindow(d.window); } - return -1; } /** @@ -169,14 +158,6 @@ public final class BulkCursorToCursorAdaptor extends AbstractWindowedCursor { public String[] getColumnNames() { throwIfCursorIsClosed(); - if (mColumns == null) { - try { - mColumns = mBulkCursor.getColumnNames(); - } catch (RemoteException ex) { - Log.e(TAG, "Unable to fetch column names because the remote process is dead"); - return null; - } - } return mColumns; } diff --git a/core/java/android/database/CursorToBulkCursorAdaptor.java b/core/java/android/database/CursorToBulkCursorAdaptor.java index 167278a10b4c..525be96c1498 100644 --- a/core/java/android/database/CursorToBulkCursorAdaptor.java +++ b/core/java/android/database/CursorToBulkCursorAdaptor.java @@ -132,6 +132,25 @@ public final class CursorToBulkCursorAdaptor extends BulkCursorNative } } + public BulkCursorDescriptor getBulkCursorDescriptor() { + synchronized (mLock) { + throwIfCursorIsClosed(); + + BulkCursorDescriptor d = new BulkCursorDescriptor(); + d.cursor = this; + d.columnNames = mCursor.getColumnNames(); + d.wantsAllOnMoveCalls = mCursor.getWantsAllOnMoveCalls(); + d.count = mCursor.getCount(); + d.window = mCursor.getWindow(); + if (d.window != null) { + // Acquire a reference to the window because its reference count will be + // decremented when it is returned as part of the binder call reply parcel. + d.window.acquireReference(); + } + return d; + } + } + @Override public CursorWindow getWindow(int position) { synchronized (mLock) { @@ -157,10 +176,9 @@ public final class CursorToBulkCursorAdaptor extends BulkCursorNative mCursor.fillWindow(position, window); } - // Acquire a reference before returning from this RPC. - // The Binder proxy will decrement the reference count again as part of writing - // the CursorWindow to the reply parcel as a return value. if (window != null) { + // Acquire a reference to the window because its reference count will be + // decremented when it is returned as part of the binder call reply parcel. window.acquireReference(); } return window; @@ -177,24 +195,6 @@ public final class CursorToBulkCursorAdaptor extends BulkCursorNative } @Override - public int count() { - synchronized (mLock) { - throwIfCursorIsClosed(); - - return mCursor.getCount(); - } - } - - @Override - public String[] getColumnNames() { - synchronized (mLock) { - throwIfCursorIsClosed(); - - return mCursor.getColumnNames(); - } - } - - @Override public void deactivate() { synchronized (mLock) { if (mCursor != null) { @@ -237,15 +237,6 @@ public final class CursorToBulkCursorAdaptor extends BulkCursorNative } } - @Override - public boolean getWantsAllOnMoveCalls() { - synchronized (mLock) { - throwIfCursorIsClosed(); - - return mCursor.getWantsAllOnMoveCalls(); - } - } - /** * Create a ContentObserver from the observer and register it as an observer on the * underlying cursor. diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java index 99d260e0f6ee..40a54cfacee0 100644 --- a/core/java/android/database/DatabaseUtils.java +++ b/core/java/android/database/DatabaseUtils.java @@ -1386,4 +1386,18 @@ public class DatabaseUtils { System.arraycopy(newValues, 0, result, originalValues.length, newValues.length); return result; } + + /** + * Returns column index of "_id" column, or -1 if not found. + * @hide + */ + public static int findRowIdColumnIndex(String[] columnNames) { + int length = columnNames.length; + for (int i = 0; i < length; i++) { + if (columnNames[i].equals("_id")) { + return i; + } + } + return -1; + } } diff --git a/core/java/android/database/IBulkCursor.java b/core/java/android/database/IBulkCursor.java index 0f4500a7aec8..b551116a0122 100644 --- a/core/java/android/database/IBulkCursor.java +++ b/core/java/android/database/IBulkCursor.java @@ -43,29 +43,12 @@ public interface IBulkCursor extends IInterface { */ public void onMove(int position) throws RemoteException; - /** - * Returns the number of rows in the cursor. - * - * @return the number of rows in the cursor. - */ - public int count() throws RemoteException; - - /** - * Returns a string array holding the names of all of the columns in the - * cursor in the order in which they were listed in the result. - * - * @return the names of the columns returned in this query. - */ - public String[] getColumnNames() throws RemoteException; - public void deactivate() throws RemoteException; public void close() throws RemoteException; public int requery(IContentObserver observer) throws RemoteException; - boolean getWantsAllOnMoveCalls() throws RemoteException; - Bundle getExtras() throws RemoteException; Bundle respond(Bundle extras) throws RemoteException; @@ -74,13 +57,10 @@ public interface IBulkCursor extends IInterface { static final String descriptor = "android.content.IBulkCursor"; static final int GET_CURSOR_WINDOW_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION; - static final int COUNT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 1; - static final int GET_COLUMN_NAMES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 2; - static final int DEACTIVATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 5; - static final int REQUERY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 6; - static final int ON_MOVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 7; - static final int WANTS_ON_MOVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 8; - static final int GET_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 9; - static final int RESPOND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 10; - static final int CLOSE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 11; + static final int DEACTIVATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 1; + static final int REQUERY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 2; + static final int ON_MOVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 3; + static final int GET_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 4; + static final int RESPOND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 5; + static final int CLOSE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 6; } diff --git a/core/java/android/database/SQLException.java b/core/java/android/database/SQLException.java index 0386af0f8c21..3402026a438a 100644 --- a/core/java/android/database/SQLException.java +++ b/core/java/android/database/SQLException.java @@ -19,12 +19,15 @@ package android.database; /** * An exception that indicates there was an error with SQL parsing or execution. */ -public class SQLException extends RuntimeException -{ - public SQLException() {} +public class SQLException extends RuntimeException { + public SQLException() { + } - public SQLException(String error) - { + public SQLException(String error) { super(error); } + + public SQLException(String error, Throwable cause) { + super(error, cause); + } } diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java index 0db3e4f8a886..e2c222bbaa4e 100644 --- a/core/java/android/database/sqlite/SQLiteConnection.java +++ b/core/java/android/database/sqlite/SQLiteConnection.java @@ -99,6 +99,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen private final SQLiteDatabaseConfiguration mConfiguration; private final int mConnectionId; private final boolean mIsPrimaryConnection; + private final boolean mIsReadOnlyConnection; private final PreparedStatementCache mPreparedStatementCache; private PreparedStatement mPreparedStatementPool; @@ -111,7 +112,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen private boolean mOnlyAllowReadOnlyOperations; // The number of times attachCancellationSignal has been called. - // Because SQLite statement execution can be re-entrant, we keep track of how many + // Because SQLite statement execution can be reentrant, we keep track of how many // times we have attempted to attach a cancellation signal to the connection so that // we can ensure that we detach the signal at the right time. private int mCancellationSignalAttachCount; @@ -121,7 +122,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen private static native void nativeClose(int connectionPtr); private static native void nativeRegisterCustomFunction(int connectionPtr, SQLiteCustomFunction function); - private static native void nativeSetLocale(int connectionPtr, String locale); + private static native void nativeRegisterLocalizedCollators(int connectionPtr, String locale); private static native int nativePrepareStatement(int connectionPtr, String sql); private static native void nativeFinalizeStatement(int connectionPtr, int statementPtr); private static native int nativeGetParameterCount(int connectionPtr, int statementPtr); @@ -163,6 +164,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen mConfiguration = new SQLiteDatabaseConfiguration(configuration); mConnectionId = connectionId; mIsPrimaryConnection = primaryConnection; + mIsReadOnlyConnection = (configuration.openFlags & SQLiteDatabase.OPEN_READONLY) != 0; mPreparedStatementCache = new PreparedStatementCache( mConfiguration.maxSqlCacheSize); mCloseGuard.open("close"); @@ -237,45 +239,102 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen } private void setPageSize() { - if (!mConfiguration.isInMemoryDb()) { - execute("PRAGMA page_size=" + SQLiteGlobal.getDefaultPageSize(), null, null); + if (!mConfiguration.isInMemoryDb() && !mIsReadOnlyConnection) { + final long newValue = SQLiteGlobal.getDefaultPageSize(); + long value = executeForLong("PRAGMA page_size", null, null); + if (value != newValue) { + execute("PRAGMA page_size=" + newValue, null, null); + } } } private void setAutoCheckpointInterval() { - if (!mConfiguration.isInMemoryDb()) { - executeForLong("PRAGMA wal_autocheckpoint=" + SQLiteGlobal.getWALAutoCheckpoint(), - null, null); + if (!mConfiguration.isInMemoryDb() && !mIsReadOnlyConnection) { + final long newValue = SQLiteGlobal.getWALAutoCheckpoint(); + long value = executeForLong("PRAGMA wal_autocheckpoint", null, null); + if (value != newValue) { + executeForLong("PRAGMA wal_autocheckpoint=" + newValue, null, null); + } } } private void setJournalSizeLimit() { - if (!mConfiguration.isInMemoryDb()) { - executeForLong("PRAGMA journal_size_limit=" + SQLiteGlobal.getJournalSizeLimit(), - null, null); + if (!mConfiguration.isInMemoryDb() && !mIsReadOnlyConnection) { + final long newValue = SQLiteGlobal.getJournalSizeLimit(); + long value = executeForLong("PRAGMA journal_size_limit", null, null); + if (value != newValue) { + executeForLong("PRAGMA journal_size_limit=" + newValue, null, null); + } } } private void setSyncModeFromConfiguration() { - if (!mConfiguration.isInMemoryDb()) { - execute("PRAGMA synchronous=" + mConfiguration.syncMode, null, null); + if (!mConfiguration.isInMemoryDb() && !mIsReadOnlyConnection) { + final String newValue = mConfiguration.syncMode; + String value = executeForString("PRAGMA synchronous", null, null); + if (!value.equalsIgnoreCase(newValue)) { + execute("PRAGMA synchronous=" + newValue, null, null); + } } } private void setJournalModeFromConfiguration() { - if (!mConfiguration.isInMemoryDb()) { - String result = executeForString("PRAGMA journal_mode=" + mConfiguration.journalMode, - null, null); - if (!result.equalsIgnoreCase(mConfiguration.journalMode)) { - Log.e(TAG, "setting journal_mode to " + mConfiguration.journalMode - + " failed for db: " + mConfiguration.label - + " (on pragma set journal_mode, sqlite returned:" + result); + if (!mConfiguration.isInMemoryDb() && !mIsReadOnlyConnection) { + final String newValue = mConfiguration.journalMode; + String value = executeForString("PRAGMA journal_mode", null, null); + if (!value.equalsIgnoreCase(newValue)) { + value = executeForString("PRAGMA journal_mode=" + newValue, null, null); + if (!value.equalsIgnoreCase(newValue)) { + Log.e(TAG, "setting journal_mode to " + newValue + + " failed for db: " + mConfiguration.label + + " (on pragma set journal_mode, sqlite returned:" + value); + } } } } private void setLocaleFromConfiguration() { - nativeSetLocale(mConnectionPtr, mConfiguration.locale.toString()); + if ((mConfiguration.openFlags & SQLiteDatabase.NO_LOCALIZED_COLLATORS) != 0) { + return; + } + + // Register the localized collators. + final String newLocale = mConfiguration.locale.toString(); + nativeRegisterLocalizedCollators(mConnectionPtr, newLocale); + + // If the database is read-only, we cannot modify the android metadata table + // or existing indexes. + if (mIsReadOnlyConnection) { + return; + } + + try { + // Ensure the android metadata table exists. + execute("CREATE TABLE IF NOT EXISTS android_metadata (locale TEXT)", null, null); + + // Check whether the locale was actually changed. + final String oldLocale = executeForString("SELECT locale FROM android_metadata " + + "UNION SELECT NULL ORDER BY locale DESC LIMIT 1", null, null); + if (oldLocale != null && oldLocale.equals(newLocale)) { + return; + } + + // Go ahead and update the indexes using the new locale. + execute("BEGIN", null, null); + boolean success = false; + try { + execute("DELETE FROM android_metadata", null, null); + execute("INSERT INTO android_metadata (locale) VALUES(?)", + new Object[] { newLocale }, null); + execute("REINDEX LOCALIZED", null, null); + success = true; + } finally { + execute(success ? "COMMIT" : "ROLLBACK", null, null); + } + } catch (RuntimeException ex) { + throw new SQLiteException("Failed to change locale for db '" + mConfiguration.label + + "' to '" + newLocale + "'.", ex); + } } // Called by SQLiteConnectionPool only. diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java index 82bb23ecb159..b29897eed97b 100644 --- a/core/java/android/database/sqlite/SQLiteCursor.java +++ b/core/java/android/database/sqlite/SQLiteCursor.java @@ -105,12 +105,7 @@ public class SQLiteCursor extends AbstractWindowedCursor { mQuery = query; mColumns = query.getColumnNames(); - for (int i = 0; i < mColumns.length; i++) { - // Make note of the row ID column index for quick access to it - if ("_id".equals(mColumns[i])) { - mRowIdColumnIndex = i; - } - } + mRowIdColumnIndex = DatabaseUtils.findRowIdColumnIndex(mColumns); } /** diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index d41b48440360..bf32ea722d80 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -1718,7 +1718,7 @@ public final class SQLiteDatabase extends SQLiteClosable { /** * Sets the locale for this database. Does nothing if this database has - * the NO_LOCALIZED_COLLATORS flag set or was opened read only. + * the {@link #NO_LOCALIZED_COLLATORS} flag set or was opened read only. * * @param locale The new locale. * diff --git a/core/java/android/database/sqlite/SQLiteException.java b/core/java/android/database/sqlite/SQLiteException.java index 3a97bfbbedb8..a1d9c9f95a2f 100644 --- a/core/java/android/database/sqlite/SQLiteException.java +++ b/core/java/android/database/sqlite/SQLiteException.java @@ -22,9 +22,14 @@ import android.database.SQLException; * A SQLite exception that indicates there was an error with SQL parsing or execution. */ public class SQLiteException extends SQLException { - public SQLiteException() {} + public SQLiteException() { + } public SQLiteException(String error) { super(error); } + + public SQLiteException(String error, Throwable cause) { + super(error, cause); + } } diff --git a/core/java/android/hardware/GeomagneticField.java b/core/java/android/hardware/GeomagneticField.java index 96fbe77db087..036982592d5c 100644 --- a/core/java/android/hardware/GeomagneticField.java +++ b/core/java/android/hardware/GeomagneticField.java @@ -19,7 +19,7 @@ package android.hardware; import java.util.GregorianCalendar; /** - * This class is used to estimated estimate magnetic field at a given point on + * Estimates magnetic field at a given point on * Earth, and in particular, to compute the magnetic declination from true * north. * diff --git a/core/java/android/view/DisplayList.java b/core/java/android/view/DisplayList.java index a50f09f88763..06927a78fb45 100644 --- a/core/java/android/view/DisplayList.java +++ b/core/java/android/view/DisplayList.java @@ -16,6 +16,8 @@ package android.view; +import android.os.Handler; + /** * A display lists records a series of graphics related operation and can replay * them later. Display lists are usually built by recording operations on a @@ -26,6 +28,13 @@ package android.view; * @hide */ public abstract class DisplayList { + private final Runnable mInvalidate = new Runnable() { + @Override + public void run() { + invalidate(); + } + }; + /** * Flag used when calling * {@link HardwareCanvas#drawDisplayList(DisplayList, int, int, android.graphics.Rect, int)}. @@ -57,6 +66,13 @@ public abstract class DisplayList { public abstract void invalidate(); /** + * Posts a call to {@link #invalidate()} in the specified handler. + */ + final void postInvalidate(Handler handler) { + handler.post(mInvalidate); + } + + /** * Returns whether the display list is currently usable. If this returns false, * the display list should be re-recorded prior to replaying it. * diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 1edcff6a0017..82bdd0088a7d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -9975,7 +9975,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal destroyLayer(); if (mDisplayList != null) { - mDisplayList.invalidate(); + mDisplayList.postInvalidate(mAttachInfo.mHandler); } if (mAttachInfo != null) { @@ -11473,7 +11473,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal if (concatMatrix) { // Undo the scroll translation, apply the transformation matrix, // then redo the scroll translate to get the correct result. - if (!hasDisplayList) { + if (!useDisplayListProperties) { canvas.translate(-transX, -transY); canvas.concat(transformToApply.getMatrix()); canvas.translate(transX, transY); diff --git a/core/java/android/webkit/AutoCompletePopup.java b/core/java/android/webkit/AutoCompletePopup.java index 674428aa90b3..b26156ce4027 100644 --- a/core/java/android/webkit/AutoCompletePopup.java +++ b/core/java/android/webkit/AutoCompletePopup.java @@ -16,7 +16,6 @@ package android.webkit; import android.content.Context; -import android.graphics.Rect; import android.os.Handler; import android.os.Message; import android.text.Editable; @@ -41,13 +40,10 @@ class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { private boolean mIsAutoFillProfileSet; private Handler mHandler; private int mQueryId; - private Rect mNodeBounds = new Rect(); - private int mNodeLayerId; private ListPopupWindow mPopup; private Filter mFilter; private CharSequence mText; private ListAdapter mAdapter; - private boolean mIsFocused; private View mAnchor; private WebViewClassic.WebViewInputConnection mInputConnection; private WebViewClassic mWebView; @@ -102,13 +98,6 @@ class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { return false; } - public void setFocused(boolean isFocused) { - mIsFocused = isFocused; - if (!mIsFocused) { - mPopup.dismiss(); - } - } - public void setText(CharSequence text) { mText = text; if (mFilter != null) { @@ -139,20 +128,14 @@ class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { resetRect(); } - public void setNodeBounds(Rect nodeBounds, int layerId) { - mNodeBounds.set(nodeBounds); - mNodeLayerId = layerId; - resetRect(); - } - public void resetRect() { - int left = mWebView.contentToViewX(mNodeBounds.left); - int right = mWebView.contentToViewX(mNodeBounds.right); + int left = mWebView.contentToViewX(mWebView.mEditTextBounds.left); + int right = mWebView.contentToViewX(mWebView.mEditTextBounds.right); int width = right - left; mPopup.setWidth(width); - int bottom = mWebView.contentToViewY(mNodeBounds.bottom); - int top = mWebView.contentToViewY(mNodeBounds.top); + int bottom = mWebView.contentToViewY(mWebView.mEditTextBounds.bottom); + int top = mWebView.contentToViewY(mWebView.mEditTextBounds.top); int height = bottom - top; AbsoluteLayout.LayoutParams lp = @@ -178,13 +161,6 @@ class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { } } - public void scrollDelta(int layerId, int dx, int dy) { - if (layerId == mNodeLayerId) { - mNodeBounds.offset(dx, dy); - resetRect(); - } - } - // AdapterView.OnItemClickListener implementation @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { @@ -230,11 +206,6 @@ class AutoCompletePopup implements OnItemClickListener, Filter.FilterListener { @Override public void onFilterComplete(int count) { - if (!mIsFocused) { - mPopup.dismiss(); - return; - } - boolean showDropDown = (count > 0) && (mInputConnection.getIsAutoFillable() || mText.length() > 0); if (showDropDown) { diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index f09e29d857df..dbcea71ef180 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -742,7 +742,8 @@ class BrowserFrame extends Handler { url = url.replaceFirst(ANDROID_ASSET, ""); try { AssetManager assets = mContext.getAssets(); - return assets.open(url, AssetManager.ACCESS_STREAMING); + Uri uri = Uri.parse(url); + return assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING); } catch (IOException e) { return null; } diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java index fac549d757f3..730ad08db348 100644 --- a/core/java/android/webkit/HTML5VideoFullScreen.java +++ b/core/java/android/webkit/HTML5VideoFullScreen.java @@ -112,6 +112,18 @@ public class HTML5VideoFullScreen extends HTML5VideoView } }; + MediaPlayer.OnVideoSizeChangedListener mSizeChangedListener = + new MediaPlayer.OnVideoSizeChangedListener() { + @Override + public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { + mVideoWidth = mp.getVideoWidth(); + mVideoHeight = mp.getVideoHeight(); + if (mVideoWidth != 0 && mVideoHeight != 0) { + mVideoSurfaceView.getHolder().setFixedSize(mVideoWidth, mVideoHeight); + } + } + }; + private SurfaceView getSurfaceView() { return mVideoSurfaceView; } @@ -150,6 +162,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView mc.setSystemUiVisibility(mLayout.getSystemUiVisibility()); setMediaController(mc); mPlayer.setScreenOnWhilePlaying(true); + mPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); prepareDataAndDisplayMode(mProxy); } diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 09ce1e2d3a5b..4c9e10cbed09 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -71,6 +71,8 @@ import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; import android.view.Display; +import android.view.GestureDetector; +import android.view.GestureDetector.SimpleOnGestureListener; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.HardwareCanvas; @@ -114,6 +116,7 @@ import android.widget.LinearLayout; import android.widget.ListView; import android.widget.OverScroller; import android.widget.PopupWindow; +import android.widget.Scroller; import android.widget.TextView; import android.widget.Toast; @@ -802,6 +805,51 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } } + private class TextScrollListener extends SimpleOnGestureListener { + @Override + public boolean onFling(MotionEvent e1, MotionEvent e2, + float velocityX, float velocityY) { + int maxScrollX = mEditTextContent.width() - + mEditTextBounds.width(); + int maxScrollY = mEditTextContent.height() - + mEditTextBounds.height(); + + int contentVelocityX = viewToContentDimension((int)-velocityX); + int contentVelocityY = viewToContentDimension((int)-velocityY); + mEditTextScroller.fling(-mEditTextContent.left, + -mEditTextContent.top, + contentVelocityX, contentVelocityY, + 0, maxScrollX, 0, maxScrollY); + return true; + } + + @Override + public boolean onScroll(MotionEvent e1, MotionEvent e2, + float distanceX, float distanceY) { + // Scrollable edit text. Scroll it. + int newScrollX = deltaToTextScroll( + -mEditTextContent.left, mEditTextContent.width(), + mEditTextBounds.width(), + (int) distanceX); + int newScrollY = deltaToTextScroll( + -mEditTextContent.top, mEditTextContent.height(), + mEditTextBounds.height(), + (int) distanceY); + scrollEditText(newScrollX, newScrollY); + return true; + } + + private int deltaToTextScroll(int oldScroll, int contentSize, + int boundsSize, int delta) { + int newScroll = oldScroll + + viewToContentDimension(delta); + int maxScroll = contentSize - boundsSize; + newScroll = Math.min(maxScroll, newScroll); + newScroll = Math.max(0, newScroll); + return newScroll; + } + } + // The listener to capture global layout change event. private InnerGlobalLayoutListener mGlobalLayoutListener = null; @@ -829,7 +877,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc WebViewInputConnection mInputConnection = null; private int mFieldPointer; private PastePopupWindow mPasteWindow; - AutoCompletePopup mAutoCompletePopup; + private AutoCompletePopup mAutoCompletePopup; + private GestureDetector mGestureDetector; + Rect mEditTextBounds = new Rect(); + Rect mEditTextContent = new Rect(); + int mEditTextLayerId; + boolean mIsEditingText = false; private static class OnTrimMemoryListener implements ComponentCallbacks2 { private static OnTrimMemoryListener sInstance = null; @@ -985,6 +1038,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // true when the touch movement exceeds the slop private boolean mConfirmMove; + private boolean mTouchInEditText; // if true, touch events will be first processed by WebCore, if prevent // default is not set, the UI will continue handle them. @@ -1033,6 +1087,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // pages with the space bar, in pixels. private static final int PAGE_SCROLL_OVERLAP = 24; + // Time between successive calls to text scroll fling animation + private static final int TEXT_SCROLL_ANIMATION_DELAY_MS = 16; + /** * These prevent calling requestLayout if either dimension is fixed. This * depends on the layout parameters and the measure specs. @@ -1066,6 +1123,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc // Used by OverScrollGlow OverScroller mScroller; + Scroller mEditTextScroller; private boolean mInOverScrollMode = false; private static Paint mOverScrollBackground; @@ -1195,6 +1253,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc static final int RELOCATE_AUTO_COMPLETE_POPUP = 146; static final int FOCUS_NODE_CHANGED = 147; static final int AUTOFILL_FORM = 148; + static final int ANIMATE_TEXT_SCROLL = 149; private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID; private static final int LAST_PACKAGE_MSG_ID = HIT_TEST_RESULT; @@ -1429,6 +1488,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } mAutoFillData = new WebViewCore.AutoFillData(); + mGestureDetector = new GestureDetector(mContext, new TextScrollListener()); + mEditTextScroller = new Scroller(context); } // === START: WebView Proxy binding === @@ -3915,8 +3976,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mSelectCursorExtent.offset(dx, dy); } } - if (mAutoCompletePopup != null) { - mAutoCompletePopup.scrollDelta(mCurrentScrollingLayerId, dx, dy); + if (mAutoCompletePopup != null && + mCurrentScrollingLayerId == mEditTextLayerId) { + mEditTextBounds.offset(dx, dy); + mAutoCompletePopup.resetRect(); } nativeScrollLayer(mCurrentScrollingLayerId, x, y); mScrollingLayerRect.left = x; @@ -5943,6 +6006,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mPreventDefault = PREVENT_DEFAULT_NO; mConfirmMove = false; mInitialHitTestResult = null; + if (!mEditTextScroller.isFinished()) { + mEditTextScroller.abortAnimation(); + } if (!mScroller.isFinished()) { // stop the current scroll animation, but if this is // the start of a fling, allow it to add to the current @@ -6080,6 +6146,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } } startTouch(x, y, eventTime); + if (mIsEditingText) { + mTouchInEditText = mEditTextBounds.contains(contentX, contentY); + mGestureDetector.onTouchEvent(ev); + } break; } case MotionEvent.ACTION_MOVE: { @@ -6113,6 +6183,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc invalidate(); } break; + } else if (mConfirmMove && mTouchInEditText) { + ViewParent parent = mWebView.getParent(); + if (parent != null) { + parent.requestDisallowInterceptTouchEvent(true); + } + mGestureDetector.onTouchEvent(ev); + break; } // pass the touch events from UI thread to WebCore thread @@ -6282,6 +6359,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc break; } case MotionEvent.ACTION_UP: { + mGestureDetector.onTouchEvent(ev); + if (mTouchInEditText && mConfirmMove) { + break; // We've been scrolling the edit text. + } // pass the touch events from UI thread to WebCore thread if (shouldForwardTouchEvent()) { TouchEventData ted = new TouchEventData(); @@ -8328,8 +8409,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc break; case FOCUS_NODE_CHANGED: - if (mAutoCompletePopup != null) { - mAutoCompletePopup.setFocused(msg.arg1 == mFieldPointer); + mIsEditingText = (msg.arg1 == mFieldPointer); + if (mAutoCompletePopup != null && !mIsEditingText) { + mAutoCompletePopup.clearAdapter(); } // fall through to HIT_TEST_RESULT case HIT_TEST_RESULT: @@ -8375,11 +8457,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mFieldPointer = initData.mFieldPointer; mInputConnection.initEditorInfo(initData); mInputConnection.setTextAndKeepSelection(initData.mText); - nativeMapLayerRect(mNativeClass, initData.mNodeLayerId, - initData.mNodeBounds); - mAutoCompletePopup.setNodeBounds(initData.mNodeBounds, - initData.mNodeLayerId); - mAutoCompletePopup.setText(mInputConnection.getEditable()); + mEditTextBounds.set(initData.mNodeBounds); + mEditTextLayerId = initData.mNodeLayerId; + nativeMapLayerRect(mNativeClass, mEditTextLayerId, + mEditTextBounds); + mEditTextContent.set(initData.mContentRect); + relocateAutoCompletePopup(); } break; @@ -8417,6 +8500,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc msg.arg1, /* unused */0); break; + case ANIMATE_TEXT_SCROLL: + computeEditTextScroll(); + break; + default: super.handleMessage(msg); break; @@ -8730,6 +8817,25 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc invalidate(); } + private void computeEditTextScroll() { + if (mEditTextScroller.computeScrollOffset()) { + scrollEditText(mEditTextScroller.getCurrX(), + mEditTextScroller.getCurrY()); + } + } + + private void scrollEditText(int scrollX, int scrollY) { + // Scrollable edit text. Scroll it. + float maxScrollX = (float)(mEditTextContent.width() - + mEditTextBounds.width()); + float scrollPercentX = ((float)scrollX)/maxScrollX; + mEditTextContent.offsetTo(-scrollX, -scrollY); + mWebViewCore.sendMessageAtFrontOfQueue(EventHub.SCROLL_TEXT_INPUT, 0, + scrollY, (Float)scrollPercentX); + mPrivateHandler.sendEmptyMessageDelayed(ANIMATE_TEXT_SCROLL, + TEXT_SCROLL_ANIMATION_DELAY_MS); + } + // Class used to use a dropdown for a <select> element private class InvokeListBox implements Runnable { // Whether the listbox allows multiple selection. diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 77d2641d20da..d0ebdd4b1323 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -951,36 +951,19 @@ public final class WebViewCore { } static class TextFieldInitData { - public TextFieldInitData(int fieldPointer, - String text, int type, boolean isSpellCheckEnabled, - boolean autoComplete, boolean isTextFieldNext, - boolean isTextFieldPrev, String name, String label, - int maxLength, Rect nodeBounds, int nodeLayerId) { - mFieldPointer = fieldPointer; - mText = text; - mType = type; - mIsAutoCompleteEnabled = autoComplete; - mIsSpellCheckEnabled = isSpellCheckEnabled; - mIsTextFieldNext = isTextFieldNext; - mIsTextFieldPrev = isTextFieldPrev; - mName = name; - mLabel = label; - mMaxLength = maxLength; - mNodeBounds = nodeBounds; - mNodeLayerId = nodeLayerId; - } - int mFieldPointer; - String mText; - int mType; - boolean mIsSpellCheckEnabled; - boolean mIsTextFieldNext; - boolean mIsTextFieldPrev; - boolean mIsAutoCompleteEnabled; - String mName; - String mLabel; - int mMaxLength; - Rect mNodeBounds; - int mNodeLayerId; + public int mFieldPointer; + public String mText; + public int mType; + public boolean mIsSpellCheckEnabled; + public boolean mIsTextFieldNext; + public boolean mIsTextFieldPrev; + public boolean mIsAutoCompleteEnabled; + public String mName; + public String mLabel; + public int mMaxLength; + public Rect mNodeBounds; + public int mNodeLayerId; + public Rect mContentRect; } // mAction of TouchEventData can be MotionEvent.getAction() which uses the @@ -1931,6 +1914,11 @@ public final class WebViewCore { mEventHub.sendMessage(Message.obtain(null, what)); } + void sendMessageAtFrontOfQueue(int what, int arg1, int arg2, Object obj) { + mEventHub.sendMessageAtFrontOfQueue(Message.obtain( + null, what, arg1, arg2, obj)); + } + void sendMessage(int what, Object obj) { mEventHub.sendMessage(Message.obtain(null, what, obj)); } @@ -2798,23 +2786,17 @@ public final class WebViewCore { } // called by JNI - private void initEditField(int pointer, String text, int inputType, - boolean isSpellCheckEnabled, boolean isAutoCompleteEnabled, - boolean nextFieldIsText, boolean prevFieldIsText, String name, - String label, int start, int end, int selectionPtr, int maxLength, - Rect nodeRect, int nodeLayer) { + private void initEditField(int start, int end, int selectionPtr, + TextFieldInitData initData) { if (mWebView == null) { return; } - TextFieldInitData initData = new TextFieldInitData(pointer, - text, inputType, isSpellCheckEnabled, isAutoCompleteEnabled, - nextFieldIsText, prevFieldIsText, name, label, maxLength, - nodeRect, nodeLayer); Message.obtain(mWebView.mPrivateHandler, WebViewClassic.INIT_EDIT_FIELD, initData).sendToTarget(); Message.obtain(mWebView.mPrivateHandler, - WebViewClassic.REQUEST_KEYBOARD_WITH_SELECTION_MSG_ID, pointer, - 0, new TextSelectionData(start, end, selectionPtr)) + WebViewClassic.REQUEST_KEYBOARD_WITH_SELECTION_MSG_ID, + initData.mFieldPointer, 0, + new TextSelectionData(start, end, selectionPtr)) .sendToTarget(); } diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 577444068bd7..057aabeb080b 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -88,6 +88,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te ViewTreeObserver.OnTouchModeChangeListener, RemoteViewsAdapter.RemoteAdapterConnectionCallback { + @SuppressWarnings("UnusedDeclaration") private static final String TAG = "AbsListView"; /** @@ -2429,7 +2430,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final ViewTreeObserver treeObserver = getViewTreeObserver(); treeObserver.removeOnTouchModeChangeListener(this); if (mTextFilterEnabled && mPopup != null) { - treeObserver.removeGlobalOnLayoutListener(this); + treeObserver.removeOnGlobalLayoutListener(this); mGlobalLayoutListenerAddedFilter = false; } @@ -2947,16 +2948,17 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (!mEdgeGlowBottom.isFinished()) { mEdgeGlowBottom.onRelease(); } + invalidate(mEdgeGlowTop.getBounds(false)); } else if (rawDeltaY < 0) { mEdgeGlowBottom.onPull((float) overscroll / getHeight()); if (!mEdgeGlowTop.isFinished()) { mEdgeGlowTop.onRelease(); } + invalidate(mEdgeGlowBottom.getBounds(true)); } } } mMotionY = y; - invalidate(); } mLastY = y; } @@ -2990,26 +2992,26 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (!mEdgeGlowBottom.isFinished()) { mEdgeGlowBottom.onRelease(); } + invalidate(mEdgeGlowTop.getBounds(false)); } else if (rawDeltaY < 0) { mEdgeGlowBottom.onPull((float) overScrollDistance / getHeight()); if (!mEdgeGlowTop.isFinished()) { mEdgeGlowTop.onRelease(); } + invalidate(mEdgeGlowBottom.getBounds(true)); } - invalidate(); } } if (incrementalDeltaY != 0) { // Coming back to 'real' list scrolling - mScrollY = 0; - invalidateParentIfNeeded(); - - // No need to do all this work if we're not going to move anyway - if (incrementalDeltaY != 0) { - trackMotionScroll(incrementalDeltaY, incrementalDeltaY); + if (mScrollY != 0) { + mScrollY = 0; + invalidateParentIfNeeded(); } + trackMotionScroll(incrementalDeltaY, incrementalDeltaY); + mTouchMode = TOUCH_MODE_SCROLL; // We did not scroll the full amount. Treat this essentially like the @@ -3468,11 +3470,12 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int rightPadding = mListPadding.right + mGlowPaddingRight; final int width = getWidth() - leftPadding - rightPadding; - canvas.translate(leftPadding, - Math.min(0, scrollY + mFirstPositionDistanceGuess)); + int edgeY = Math.min(0, scrollY + mFirstPositionDistanceGuess); + canvas.translate(leftPadding, edgeY); mEdgeGlowTop.setSize(width, getHeight()); if (mEdgeGlowTop.draw(canvas)) { - invalidate(); + mEdgeGlowTop.setPosition(leftPadding, edgeY); + invalidate(mEdgeGlowTop.getBounds(false)); } canvas.restoreToCount(restoreCount); } @@ -3483,12 +3486,15 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int width = getWidth() - leftPadding - rightPadding; final int height = getHeight(); - canvas.translate(-width + leftPadding, - Math.max(height, scrollY + mLastPositionDistanceGuess)); + int edgeX = -width + leftPadding; + int edgeY = Math.max(height, scrollY + mLastPositionDistanceGuess); + canvas.translate(edgeX, edgeY); canvas.rotate(180, width, 0); mEdgeGlowBottom.setSize(width, height); if (mEdgeGlowBottom.draw(canvas)) { - invalidate(); + // Account for the rotation + mEdgeGlowBottom.setPosition(edgeX + width, edgeY); + invalidate(mEdgeGlowBottom.getBounds(true)); } canvas.restoreToCount(restoreCount); } @@ -3874,7 +3880,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } // Don't stop just because delta is zero (it could have been rounded) - final boolean atEnd = trackMotionScroll(delta, delta) && (delta != 0); + final boolean atEdge = trackMotionScroll(delta, delta); + final boolean atEnd = atEdge && (delta != 0); if (atEnd) { if (motionView != null) { // Tweak the scroll for how far we overshot @@ -3889,7 +3896,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } if (more && !atEnd) { - invalidate(); + if (atEdge) invalidate(); mLastFlingY = y; post(this); } else { @@ -4431,7 +4438,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } private void createScrollingCache() { - if (mScrollingCacheEnabled && !mCachingStarted) { + if (mScrollingCacheEnabled && !mCachingStarted && !isHardwareAccelerated()) { setChildrenDrawnWithCacheEnabled(true); setChildrenDrawingCacheEnabled(true); mCachingStarted = mCachingActive = true; @@ -4439,23 +4446,25 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } private void clearScrollingCache() { - if (mClearScrollingCache == null) { - mClearScrollingCache = new Runnable() { - public void run() { - if (mCachingStarted) { - mCachingStarted = mCachingActive = false; - setChildrenDrawnWithCacheEnabled(false); - if ((mPersistentDrawingCache & PERSISTENT_SCROLLING_CACHE) == 0) { - setChildrenDrawingCacheEnabled(false); - } - if (!isAlwaysDrawnWithCacheEnabled()) { - invalidate(); + if (!isHardwareAccelerated()) { + if (mClearScrollingCache == null) { + mClearScrollingCache = new Runnable() { + public void run() { + if (mCachingStarted) { + mCachingStarted = mCachingActive = false; + setChildrenDrawnWithCacheEnabled(false); + if ((mPersistentDrawingCache & PERSISTENT_SCROLLING_CACHE) == 0) { + setChildrenDrawingCacheEnabled(false); + } + if (!isAlwaysDrawnWithCacheEnabled()) { + invalidate(); + } } } - } - }; + }; + } + post(mClearScrollingCache); } - post(mClearScrollingCache); } /** @@ -4599,14 +4608,18 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mRecycler.removeSkippedScrap(); } + // invalidate before moving the children to avoid unnecessary invalidate + // calls to bubble up from the children all the way to the top + if (!awakenScrollBars()) { + invalidate(); + } + offsetChildrenTopAndBottom(incrementalDeltaY); if (down) { mFirstPosition += count; } - invalidate(); - final int absIncrementalDeltaY = Math.abs(incrementalDeltaY); if (spaceAbove < absIncrementalDeltaY || spaceBelow < absIncrementalDeltaY) { fillGap(down); @@ -4629,7 +4642,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mBlockLayoutRequests = false; invokeOnItemScrollListener(); - awakenScrollBars(); return false; } diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java index 83aa8ba3a908..bb4a4cff902c 100644 --- a/core/java/android/widget/EdgeEffect.java +++ b/core/java/android/widget/EdgeEffect.java @@ -16,6 +16,7 @@ package android.widget; +import android.graphics.Rect; import com.android.internal.R; import android.content.Context; @@ -45,6 +46,7 @@ import android.view.animation.Interpolator; * {@link #draw(Canvas)} method.</p> */ public class EdgeEffect { + @SuppressWarnings("UnusedDeclaration") private static final String TAG = "EdgeEffect"; // Time it will take the effect to fully recede in ms @@ -57,10 +59,7 @@ public class EdgeEffect { private static final int PULL_DECAY_TIME = 1000; private static final float MAX_ALPHA = 1.f; - private static final float HELD_EDGE_ALPHA = 0.7f; private static final float HELD_EDGE_SCALE_Y = 0.5f; - private static final float HELD_GLOW_ALPHA = 0.5f; - private static final float HELD_GLOW_SCALE_Y = 0.5f; private static final float MAX_GLOW_HEIGHT = 4.f; @@ -76,7 +75,9 @@ public class EdgeEffect { private final Drawable mGlow; private int mWidth; private int mHeight; - private final int MIN_WIDTH = 300; + private int mX; + private int mY; + private static final int MIN_WIDTH = 300; private final int mMinWidth; private float mEdgeAlpha; @@ -119,6 +120,13 @@ public class EdgeEffect { private int mState = STATE_IDLE; private float mPullDistance; + + private final Rect mBounds = new Rect(); + + private final int mEdgeHeight; + private final int mGlowHeight; + private final int mGlowWidth; + private final int mMaxEffectHeight; /** * Construct a new EdgeEffect with a theme appropriate for the provided context. @@ -129,6 +137,14 @@ public class EdgeEffect { mEdge = res.getDrawable(R.drawable.overscroll_edge); mGlow = res.getDrawable(R.drawable.overscroll_glow); + mEdgeHeight = mEdge.getIntrinsicHeight(); + mGlowHeight = mGlow.getIntrinsicHeight(); + mGlowWidth = mGlow.getIntrinsicWidth(); + + mMaxEffectHeight = (int) (Math.min( + mGlowHeight * MAX_GLOW_HEIGHT * mGlowHeight / mGlowWidth * 0.6f, + mGlowHeight * MAX_GLOW_HEIGHT) + 0.5f); + mMinWidth = (int) (res.getDisplayMetrics().density * MIN_WIDTH + 0.5f); mInterpolator = new DecelerateInterpolator(); } @@ -145,6 +161,18 @@ public class EdgeEffect { } /** + * Set the position of this edge effect in pixels. This position is + * only used by {@link #getBounds(boolean)}. + * + * @param x The position of the edge effect on the X axis + * @param y The position of the edge effect on the Y axis + */ + void setPosition(int x, int y) { + mX = x; + mY = y; + } + + /** * Reports if this EdgeEffect's animation is finished. If this method returns false * after a call to {@link #draw(Canvas)} the host widget should schedule another * drawing pass to continue the animation. @@ -300,16 +328,11 @@ public class EdgeEffect { public boolean draw(Canvas canvas) { update(); - final int edgeHeight = mEdge.getIntrinsicHeight(); - final int edgeWidth = mEdge.getIntrinsicWidth(); - final int glowHeight = mGlow.getIntrinsicHeight(); - final int glowWidth = mGlow.getIntrinsicWidth(); - mGlow.setAlpha((int) (Math.max(0, Math.min(mGlowAlpha, 1)) * 255)); int glowBottom = (int) Math.min( - glowHeight * mGlowScaleY * glowHeight/ glowWidth * 0.6f, - glowHeight * MAX_GLOW_HEIGHT); + mGlowHeight * mGlowScaleY * mGlowHeight / mGlowWidth * 0.6f, + mGlowHeight * MAX_GLOW_HEIGHT); if (mWidth < mMinWidth) { // Center the glow and clip it. int glowLeft = (mWidth - mMinWidth)/2; @@ -323,7 +346,7 @@ public class EdgeEffect { mEdge.setAlpha((int) (Math.max(0, Math.min(mEdgeAlpha, 1)) * 255)); - int edgeBottom = (int) (edgeHeight * mEdgeScaleY); + int edgeBottom = (int) (mEdgeHeight * mEdgeScaleY); if (mWidth < mMinWidth) { // Center the edge and clip it. int edgeLeft = (mWidth - mMinWidth)/2; @@ -334,9 +357,25 @@ public class EdgeEffect { } mEdge.draw(canvas); + if (mState == STATE_RECEDE && glowBottom == 0 && edgeBottom == 0) { + mState = STATE_IDLE; + } + return mState != STATE_IDLE; } + /** + * Returns the bounds of the edge effect. + * + * @hide + */ + public Rect getBounds(boolean reverse) { + mBounds.set(0, 0, mWidth, mMaxEffectHeight); + mBounds.offset(mX, mY - (reverse ? mMaxEffectHeight : 0)); + + return mBounds; + } + private void update() { final long time = AnimationUtils.currentAnimationTimeMillis(); final float t = Math.min((time - mStartTime) / mDuration, 1.f); diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java index fc08cc5bfeab..60dd55cec36e 100644 --- a/core/java/android/widget/GridLayout.java +++ b/core/java/android/widget/GridLayout.java @@ -29,8 +29,8 @@ import android.view.View; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; - import com.android.internal.R; +import android.widget.RemoteViews.RemoteView; import java.lang.reflect.Array; import java.util.ArrayList; @@ -146,6 +146,7 @@ import static java.lang.Math.min; * @attr ref android.R.styleable#GridLayout_rowOrderPreserved * @attr ref android.R.styleable#GridLayout_columnOrderPreserved */ +@RemoteView public class GridLayout extends ViewGroup { // Public constants @@ -234,7 +235,6 @@ public class GridLayout extends ViewGroup { final Axis horizontalAxis = new Axis(true); final Axis verticalAxis = new Axis(false); - boolean layoutParamsValid = false; int orientation = DEFAULT_ORIENTATION; boolean useDefaultMargins = DEFAULT_USE_DEFAULT_MARGINS; int alignmentMode = DEFAULT_ALIGNMENT_MODE; @@ -713,12 +713,10 @@ public class GridLayout extends ViewGroup { minor = minor + minorSpan; } - lastLayoutParamsHashCode = computeLayoutParamsHashCode(); - invalidateStructure(); } private void invalidateStructure() { - layoutParamsValid = false; + lastLayoutParamsHashCode = UNINITIALIZED_HASH; horizontalAxis.invalidateStructure(); verticalAxis.invalidateStructure(); // This can end up being done twice. Better twice than not at all. @@ -742,10 +740,6 @@ public class GridLayout extends ViewGroup { } final LayoutParams getLayoutParams(View c) { - if (!layoutParamsValid) { - validateLayoutParams(); - layoutParamsValid = true; - } return (LayoutParams) c.getLayoutParams(); } @@ -874,20 +868,22 @@ public class GridLayout extends ViewGroup { return result; } - private void checkForLayoutParamsModification() { - int layoutParamsHashCode = computeLayoutParamsHashCode(); - if (lastLayoutParamsHashCode != UNINITIALIZED_HASH && - lastLayoutParamsHashCode != layoutParamsHashCode) { - invalidateStructure(); + private void consistencyCheck() { + if (lastLayoutParamsHashCode == UNINITIALIZED_HASH) { + validateLayoutParams(); + lastLayoutParamsHashCode = computeLayoutParamsHashCode(); + } else if (lastLayoutParamsHashCode != computeLayoutParamsHashCode()) { Log.w(TAG, "The fields of some layout parameters were modified in between layout " + "operations. Check the javadoc for GridLayout.LayoutParams#rowSpec."); + invalidateStructure(); + consistencyCheck(); } } // Measurement private void measureChildWithMargins2(View child, int parentWidthSpec, int parentHeightSpec, - int childWidth, int childHeight) { + int childWidth, int childHeight) { int childWidthSpec = getChildMeasureSpec(parentWidthSpec, mPaddingLeft + mPaddingRight + getTotalMargin(child, true), childWidth); int childHeightSpec = getChildMeasureSpec(parentHeightSpec, @@ -923,7 +919,7 @@ public class GridLayout extends ViewGroup { @Override protected void onMeasure(int widthSpec, int heightSpec) { - checkForLayoutParamsModification(); + consistencyCheck(); /** If we have been called by {@link View#measure(int, int)}, one of width or height * is likely to have changed. We must invalidate if so. */ @@ -993,7 +989,7 @@ public class GridLayout extends ViewGroup { */ @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - checkForLayoutParamsModification(); + consistencyCheck(); int targetWidth = right - left; int targetHeight = bottom - top; @@ -1250,7 +1246,7 @@ public class GridLayout extends ViewGroup { } private void include(List<Arc> arcs, Interval key, MutableInt size, - boolean ignoreIfAlreadyPresent) { + boolean ignoreIfAlreadyPresent) { /* Remove self referential links. These appear: @@ -1429,8 +1425,8 @@ public class GridLayout extends ViewGroup { int dst = arc.span.max; int value = arc.value.value; result.append((src < dst) ? - var + dst + " - " + var + src + " > " + value : - var + src + " - " + var + dst + " < " + -value); + var + dst + "-" + var + src + ">=" + value : + var + src + "-" + var + dst + "<=" + -value); } return result.toString(); diff --git a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp index 3b8fb7974140..294c626be470 100644 --- a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp +++ b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp @@ -196,7 +196,7 @@ static int do_accept(JNIEnv* env, jobject object, int ag_fd, struct sockaddr_rc raddr; int alen = sizeof(raddr); - int nsk = accept(ag_fd, (struct sockaddr *) &raddr, &alen); + int nsk = TEMP_FAILURE_RETRY(accept(ag_fd, (struct sockaddr *) &raddr, &alen)); if (nsk < 0) { ALOGE("Error on accept from socket fd %d: %s (%d).", ag_fd, @@ -331,12 +331,12 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, to.tv_sec = timeout_ms / 1000; to.tv_usec = 1000 * (timeout_ms % 1000); } - n = select(MAX(nat->hf_ag_rfcomm_sock, - nat->hs_ag_rfcomm_sock) + 1, + n = TEMP_FAILURE_RETRY(select( + MAX(nat->hf_ag_rfcomm_sock, nat->hs_ag_rfcomm_sock) + 1, &rset, NULL, NULL, - (timeout_ms < 0 ? NULL : &to)); + (timeout_ms < 0 ? NULL : &to))); if (timeout_ms > 0) { jint remaining = to.tv_sec*1000 + to.tv_usec/1000; ALOGI("Remaining time %ldms", (long)remaining); @@ -391,7 +391,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object, ALOGE("Neither HF nor HS listening sockets are open!"); return JNI_FALSE; } - n = poll(fds, cnt, timeout_ms); + n = TEMP_FAILURE_RETRY(poll(fds, cnt, timeout_ms)); if (n <= 0) { if (n < 0) { ALOGE("listening poll() on RFCOMM sockets: %s (%d)", diff --git a/core/jni/android_database_SQLiteConnection.cpp b/core/jni/android_database_SQLiteConnection.cpp index c8f911f242dc..fca5f20dddce 100644 --- a/core/jni/android_database_SQLiteConnection.cpp +++ b/core/jni/android_database_SQLiteConnection.cpp @@ -36,8 +36,8 @@ #include "android_database_SQLiteCommon.h" +// Set to 1 to use UTF16 storage for localized indexes. #define UTF16_STORAGE 0 -#define ANDROID_TABLE "android_metadata" namespace android { @@ -245,139 +245,16 @@ static void nativeRegisterCustomFunction(JNIEnv* env, jclass clazz, jint connect } } -// Set locale in the android_metadata table, install localized collators, and rebuild indexes -static void nativeSetLocale(JNIEnv* env, jclass clazz, jint connectionPtr, jstring localeStr) { +static void nativeRegisterLocalizedCollators(JNIEnv* env, jclass clazz, jint connectionPtr, + jstring localeStr) { SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr); - if (connection->openFlags & SQLiteConnection::NO_LOCALIZED_COLLATORS) { - // We should probably throw IllegalStateException but the contract for - // setLocale says that we just do nothing. Oh well. - return; - } - - int err; - char const* locale = env->GetStringUTFChars(localeStr, NULL); - sqlite3_stmt* stmt = NULL; - char** meta = NULL; - int rowCount, colCount; - char* dbLocale = NULL; - - // create the table, if necessary and possible - if (!(connection->openFlags & SQLiteConnection::OPEN_READONLY)) { - err = sqlite3_exec(connection->db, - "CREATE TABLE IF NOT EXISTS " ANDROID_TABLE " (locale TEXT)", - NULL, NULL, NULL); - if (err != SQLITE_OK) { - ALOGE("CREATE TABLE " ANDROID_TABLE " failed"); - throw_sqlite3_exception(env, connection->db); - goto done; - } - } + const char* locale = env->GetStringUTFChars(localeStr, NULL); + int err = register_localized_collators(connection->db, locale, UTF16_STORAGE); + env->ReleaseStringUTFChars(localeStr, locale); - // try to read from the table - err = sqlite3_get_table(connection->db, - "SELECT locale FROM " ANDROID_TABLE " LIMIT 1", - &meta, &rowCount, &colCount, NULL); if (err != SQLITE_OK) { - ALOGE("SELECT locale FROM " ANDROID_TABLE " failed"); throw_sqlite3_exception(env, connection->db); - goto done; - } - - dbLocale = (rowCount >= 1) ? meta[colCount] : NULL; - - if (dbLocale != NULL && !strcmp(dbLocale, locale)) { - // database locale is the same as the desired locale; set up the collators and go - err = register_localized_collators(connection->db, locale, UTF16_STORAGE); - if (err != SQLITE_OK) { - throw_sqlite3_exception(env, connection->db); - } - goto done; // no database changes needed - } - - if (connection->openFlags & SQLiteConnection::OPEN_READONLY) { - // read-only database, so we're going to have to put up with whatever we got - // For registering new index. Not for modifing the read-only database. - err = register_localized_collators(connection->db, locale, UTF16_STORAGE); - if (err != SQLITE_OK) { - throw_sqlite3_exception(env, connection->db); - } - goto done; - } - - // need to update android_metadata and indexes atomically, so use a transaction... - err = sqlite3_exec(connection->db, "BEGIN TRANSACTION", NULL, NULL, NULL); - if (err != SQLITE_OK) { - ALOGE("BEGIN TRANSACTION failed setting locale"); - throw_sqlite3_exception(env, connection->db); - goto done; - } - - err = register_localized_collators(connection->db, locale, UTF16_STORAGE); - if (err != SQLITE_OK) { - ALOGE("register_localized_collators() failed setting locale"); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - err = sqlite3_exec(connection->db, "DELETE FROM " ANDROID_TABLE, NULL, NULL, NULL); - if (err != SQLITE_OK) { - ALOGE("DELETE failed setting locale"); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - static const char *sql = "INSERT INTO " ANDROID_TABLE " (locale) VALUES(?);"; - err = sqlite3_prepare_v2(connection->db, sql, -1, &stmt, NULL); - if (err != SQLITE_OK) { - ALOGE("sqlite3_prepare_v2(\"%s\") failed", sql); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - err = sqlite3_bind_text(stmt, 1, locale, -1, SQLITE_TRANSIENT); - if (err != SQLITE_OK) { - ALOGE("sqlite3_bind_text() failed setting locale"); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - err = sqlite3_step(stmt); - if (err != SQLITE_OK && err != SQLITE_DONE) { - ALOGE("sqlite3_step(\"%s\") failed setting locale", sql); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - err = sqlite3_exec(connection->db, "REINDEX LOCALIZED", NULL, NULL, NULL); - if (err != SQLITE_OK) { - ALOGE("REINDEX LOCALIZED failed"); - throw_sqlite3_exception(env, connection->db); - goto rollback; - } - - // all done, yay! - err = sqlite3_exec(connection->db, "COMMIT TRANSACTION", NULL, NULL, NULL); - if (err != SQLITE_OK) { - ALOGE("COMMIT TRANSACTION failed setting locale"); - throw_sqlite3_exception(env, connection->db); - goto done; - } - -rollback: - if (err != SQLITE_OK) { - sqlite3_exec(connection->db, "ROLLBACK TRANSACTION", NULL, NULL, NULL); - } - -done: - if (stmt) { - sqlite3_finalize(stmt); - } - if (meta) { - sqlite3_free_table(meta); - } - if (locale) { - env->ReleaseStringUTFChars(localeStr, locale); } } @@ -898,8 +775,8 @@ static JNINativeMethod sMethods[] = (void*)nativeClose }, { "nativeRegisterCustomFunction", "(ILandroid/database/sqlite/SQLiteCustomFunction;)V", (void*)nativeRegisterCustomFunction }, - { "nativeSetLocale", "(ILjava/lang/String;)V", - (void*)nativeSetLocale }, + { "nativeRegisterLocalizedCollators", "(ILjava/lang/String;)V", + (void*)nativeRegisterLocalizedCollators }, { "nativePrepareStatement", "(ILjava/lang/String;)I", (void*)nativePrepareStatement }, { "nativeFinalizeStatement", "(II)V", diff --git a/core/res/res/drawable/activated_background.xml b/core/res/res/drawable/activated_background.xml index 1047e5bbb103..d92fba122fc8 100644 --- a/core/res/res/drawable/activated_background.xml +++ b/core/res/res/drawable/activated_background.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@android:drawable/list_selector_background_selected" /> <item android:drawable="@color/transparent" /> </selector> diff --git a/core/res/res/drawable/activated_background_holo_dark.xml b/core/res/res/drawable/activated_background_holo_dark.xml index a29bcb9a622f..febf2c40ef86 100644 --- a/core/res/res/drawable/activated_background_holo_dark.xml +++ b/core/res/res/drawable/activated_background_holo_dark.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" /> <item android:drawable="@color/transparent" /> </selector> diff --git a/core/res/res/drawable/activated_background_holo_light.xml b/core/res/res/drawable/activated_background_holo_light.xml index a29bcb9a622f..febf2c40ef86 100644 --- a/core/res/res/drawable/activated_background_holo_light.xml +++ b/core/res/res/drawable/activated_background_holo_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" /> <item android:drawable="@color/transparent" /> </selector> diff --git a/core/res/res/drawable/activated_background_light.xml b/core/res/res/drawable/activated_background_light.xml index 7d737db1ce1c..5d5681d5f038 100644 --- a/core/res/res/drawable/activated_background_light.xml +++ b/core/res/res/drawable/activated_background_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@drawable/list_selector_background_selected_light" /> <item android:drawable="@color/transparent" /> </selector> diff --git a/core/res/res/drawable/btn_cab_done_holo_dark.xml b/core/res/res/drawable/btn_cab_done_holo_dark.xml index 65d3496a550d..fe42951b50ec 100644 --- a/core/res/res/drawable/btn_cab_done_holo_dark.xml +++ b/core/res/res/drawable/btn_cab_done_holo_dark.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_cab_done_pressed_holo_dark" /> <item android:state_focused="true" android:state_enabled="true" diff --git a/core/res/res/drawable/btn_cab_done_holo_light.xml b/core/res/res/drawable/btn_cab_done_holo_light.xml index f6a63f430793..f3627740fec3 100644 --- a/core/res/res/drawable/btn_cab_done_holo_light.xml +++ b/core/res/res/drawable/btn_cab_done_holo_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_cab_done_pressed_holo_light" /> <item android:state_focused="true" android:state_enabled="true" diff --git a/core/res/res/drawable/item_background.xml b/core/res/res/drawable/item_background.xml index f7fef8221c6b..a1c9ff872aa7 100644 --- a/core/res/res/drawable/item_background.xml +++ b/core/res/res/drawable/item_background.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/transparent" /> diff --git a/core/res/res/drawable/item_background_holo_dark.xml b/core/res/res/drawable/item_background_holo_dark.xml index f188df79af6b..7c8590c67935 100644 --- a/core/res/res/drawable/item_background_holo_dark.xml +++ b/core/res/res/drawable/item_background_holo_dark.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. --> <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_dark" /> diff --git a/core/res/res/drawable/item_background_holo_light.xml b/core/res/res/drawable/item_background_holo_light.xml index ee3f4d898154..99b5ac2ff3bd 100644 --- a/core/res/res/drawable/item_background_holo_light.xml +++ b/core/res/res/drawable/item_background_holo_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. --> <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_light" /> diff --git a/core/res/res/drawable/list_selector_background.xml b/core/res/res/drawable/list_selector_background.xml index 122215510d97..eaf86caf1a95 100644 --- a/core/res/res/drawable/list_selector_background.xml +++ b/core/res/res/drawable/list_selector_background.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/transparent" /> diff --git a/core/res/res/drawable/list_selector_background_light.xml b/core/res/res/drawable/list_selector_background_light.xml index 50a821b42a85..4da7e2114e1e 100644 --- a/core/res/res/drawable/list_selector_background_light.xml +++ b/core/res/res/drawable/list_selector_background_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/transparent" /> diff --git a/core/res/res/drawable/list_selector_holo_dark.xml b/core/res/res/drawable/list_selector_holo_dark.xml index 9a6cb89ecbc6..e4c5c524e87a 100644 --- a/core/res/res/drawable/list_selector_holo_dark.xml +++ b/core/res/res/drawable/list_selector_holo_dark.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/transparent" /> diff --git a/core/res/res/drawable/list_selector_holo_light.xml b/core/res/res/drawable/list_selector_holo_light.xml index 844259e986f7..17631bdf850f 100644 --- a/core/res/res/drawable/list_selector_holo_light.xml +++ b/core/res/res/drawable/list_selector_holo_light.xml @@ -14,8 +14,7 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/transparent" /> diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index 49b31b4493bb..0141016d6aed 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"skryf kontakdata"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Laat die program toe om die kontakdata (adresse) wat op jou tablet gestoor is, te verander. Kwaadwillige programme kan dit dalk gebruik om jou kontakdata uit te vee of te verander."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Laat die program toe om die kontakdata (adresse) wat op jou foon gestoor is, te verander. Kwaadwillige programme kan dit dalk gebruik om jou kontakdata uit te vee of te verander."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"lees jou profieldata"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Laat die program toe om persoonlike profielinligting te lees wat op jou toestel gestoor is, soos jou naam en kontakbesonderhede. Dit beteken dat die program jou kan identifiseer en jou profielinligting aan ander mense kan stuur."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"skryf na jou profieldata"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Laat die program toe om enige private woorde, name en frases te lees wat die gebruiker in die gebruikerwoordeboek gestoor het."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"skryf na gebruikergedefinieerde woordeboek"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Laat die program toe om nuwe woorde in die gebruikerwoordeboek te skryf."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"Lees USB-geheue se inhoud"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"Lees SD-kaart se inhoud"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Laat die program toe om die USB-geheue se inhoud te lees."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Laat die program toe om die SD-kaart se inhoud te lees."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"verander/vee uit USB-berging se inhoud"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"wysig/vee uit SD-kaart se inhoud"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Laat die program toe om die USB-geheue te skryf."</string> diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml index d1e91220ec30..f9e0a8a8742b 100644 --- a/core/res/res/values-am/strings.xml +++ b/core/res/res/values-am/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"የእውቂያ ውሂብ ፃፍ"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"በጡባዊ ተኮህ ላይ የተከማቹ የእውቂያ(አድራሻ) ውሂብ ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ የእውቅያ ውሂብህን ለመደምሰስ ወይም ለመቀየር ተንኮል አዘል መተግበሪያዎች ሊጠቀሙት ይችላሉ፡፡"</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"በስልክህ ላይ የተከማቹ የእውቂያ(አድራሻ) ውሂብ ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ የእውቅያ ውሂብህን ለመደምሰስ ወይም ለመቀየር ተንኮል አዘል መተግበሪያዎች ሊጠቀሙት ይችላሉ፡፡"</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"የጥሪ ምዝግብ ማስታወሻን አንብብ"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የጡባዊ ተኮህን ምዝግብ ማስታወሻ እንዲያነብ ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች ለሌሎች ሰዎች ውሂብህን ለመላክ ሊጠቀሙበት ይችላሉ፡፡"</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የስልክ ጥሪህን ምዝግብ ማስታወሻ እንዲያነብ ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች ለሌሎች ሰዎች ውሂብህን ለመላክ ሊጠቀሙበት ይችላሉ፡፡"</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"የጥሪ ምዝግብ ማስታወሻን ፃፍ"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የጡባዊተኮህን ምዝግብ ማስታወሻ ለመቀየር ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች የስልክህን ምዝግብ ማስታወሻ ለመሰረዝ ወይም ለመለወጥ ሊጠቀሙበት ይችላሉ፡፡"</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"ስለ ገቢ እና ወጪ ጥሪዎችን ውሂብ ጨምሮ፣ የስልክህን ምዝግብ ማስታወሻ ለመቀየር ለመተግበሪያው ይፈቅዳል፡፡ ይሄንን ተንኮል አዘል መተግበሪያዎች የስልክህን ምዝግብ ማስታወሻ ለመሰረዝ ወይም ለመለወጥ ሊጠቀሙበት ይችላሉ፡፡"</string> <string name="permlab_readProfile" msgid="6824681438529842282">"የመገለጫ ውሂብዎን ያንብቡ"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"ልክ እንደ አንተ ስም እና የዕውቂያ መረጃ ፣ ባንተ መሳሪያ ወስጥ የተከማቹ የግል መገለጫ መረጃ ለማንበብ ለመተግበሪያው ይፈቅዳሉ፡፡ይሄም ማለት ሌሎች መተግበሪያዎች ሊለዩህ ይችላሉ እና ለሌሎች የመገለጫ መረጃህን ይልካሉ፡፡"</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"የአርስዎ መገለጫ ውሂብ ላይ ይፃፉ"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">" ተጠቃሚው በተጠቃሚ መዝገበ ቃላት ሊያከማች የቻለውን ማንኛውም የግል ቃላት፣ ስሞች፣እና ሀረጎች ለማንበብ ለመተግበሪያው ይፈቅዳሉ፡፡"</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"በተጠቃሚ በተወሰነ መዝገበ ቃላት ፃፍ"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"በተጠቃሚ መዝገበ ቃላት ውስጥ አዲስ ቃል እንዲጽፍ ለመተግበሪያው ይፈቅዳሉ፡፡"</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"የUSB ካርድ ይዘቶችን አንብብ"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"የSD ካርድ ይዘቶችን አንብብ"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"መተግበሪያው ከUSB ካርድ ላይ ያሉ ይዘቶችን እንዲያነብ ይፈቅድለታል፡፡"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"መተግበሪያው ከSD ካርድ ላይ ያሉ ይዘቶችን እንዲያነብ ይፈቅድለታል፡፡"</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"የUSB ማከማቻ ይዘቶችን ቀይር/ሰርዝ"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"የSD ካርድ ይዘትንቀይር/ሰርዝ"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"ወደ USB ማህደረ ትውስታው ለመፃፍ ለመተግበሪያው ይፈቅዳሉ፡፡"</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index 87755055de84..a8868be7892e 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"كتابة بيانات جهة الاتصال"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"للسماح للتطبيق بتعديل بيانات (عنوان) جهة الاتصال المخزّنة على الجهاز اللوحي. يمكن أن تستخدم التطبيقات الضارة ذلك لمسح بيانات جهات الاتصال أو تعديلها."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"للسماح للتطبيق بتعديل بيانات (عنوان) جهة الاتصال المخزّنة على هاتفك. يمكن أن تستخدم التطبيقات الضارة ذلك لمسح بيانات جهات الاتصال أو تعديلها."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"قراءة بيانات ملفك الشخصي"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"للسماح للتطبيق بقراءة معلومات الملف الشخصي الشخصية المخزنة على الجهاز، مثل اسمك ومعلومات جهات الاتصال. يعني ذلك أنه يمكن للتطبيق التعرف عليك وإرسال معلومات ملفك الشخصي إلى الآخرين."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"الكتابة إلى بيانات ملفك الشخصي"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"للسماح للتطبيق بقراءة أي كلمات وأسماء وعبارات خاصة ربما خزنها المستخدم في قاموس المستخدم."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"كتابة إلى القاموس المعرّف بواسطة المستخدم"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"للسماح للتطبيق بكتابة كلمات جديدة في قاموس المستخدم."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"قراءة محتويات وحدة تخزين USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"قراءة محتويات بطاقة SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"للسماح للتطبيق بقراءة محتويات وحدة تخزين USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"للسماح للتطبيق بقراءة محتويات بطاقة SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"تعديل/حذف محتويات وحدة تخزين USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"تعديل/حذف محتويات بطاقة SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"للسماح للتطبيق بالكتابة إلى وحدة تخزين USB."</string> diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml index eebf04ef896f..cfeb360d4b12 100644 --- a/core/res/res/values-be/strings.xml +++ b/core/res/res/values-be/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"запісваць кантактныя дадзеныя"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Дазваляе прыкладанням змяняць кантакты (адрасы), якія захоўваюцца на планшэце. Шкоднасныя прыкладанні могуць выкарыстоўваць гэтую магчымасць для выдалення або змены кантактных дадзеных."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Дазваляе прыкладанням змяняць кантакты (адрасы), якія захоўваюцца на вашым тэлефоне. Шкоднасныя прыкладанні могуць выкарыстоўваць гэту магчымасць для выдалення або змены кантактных дадзеных."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"чытаць дадзеныя вашага профілю"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Дазваляе прыкладанням счытваць асабістую інфармацыю ў профілях, якая захоўваецца на вашай прыладзе, напрыклад, ваша імя і кантактную інфармацыю. Гэта азначае, што прыкладанне можа ідэнтыфікаваць вас і адправіць інфармацыю вашага профілю трэцім асобам."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"увядзіце дадзеныя вашага профілю"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Дазваляе прыкладанню счытваць любыя прыватныя словы, імёны і фразы, якія карыстальнік можа захоўваць у карыстальніцкім слоўніку."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"запісаць у карыстальніцкі слоўнік"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Дазваляе прыкладанням запісваць новыя словы ў карыстальніцкі слоўнік."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"чытанне змесціва USB-назапашвальнiка"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"чытанне змесціва SD-карты"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Дазваляе прыкладаню счытваць змесцiва USB-назапашвальніка."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Дазваляе прыкладанню счытваць змесціва SD-карты."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"змяніць/выдаліць змесціва USB-назапашвальнiка"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"змяняць/выдаляць змесціва SD-карты"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Дазваляе прыкладаням выконваць запіс ва USB-назапашвальнік."</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index 583d21a4764b..2d74ffde4580 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"запис на данни за контактите"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Разрешава на приложението да променя данните за контактите (за адрес), съхранени в таблета ви. Злонамерените приложения могат да използват това, за да изтрият или променят тези данни."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Разрешава на приложението да променя данните за контактите (за адрес), съхранени в телефона ви. Злонамерените приложения могат да използват това, за да изтрият или променят тези данни."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"четене на данните в профила ви"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Разрешава на приложението да чете информацията от личния потребителски профил, съхранена на устройството ви, например вашето име и данни за връзка. Това означава, че приложението може да ви идентифицира и да изпраща информацията за потребителския ви профил на други хора."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"запис в потр. ви профил"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Разрешава на приложението да чете частни думи, имена и фрази, които потребителят може да е съхранил в потребителския речник."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"запис в дефинирания от потребителя речник"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Разрешава на приложението да записва нови думи в потребителския речник."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"четене на съдържанието на USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"четене на съдържанието на SD картата"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Разрешава на прил. да чете съдърж. на USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Разрешава на приложението да чете съдържанието на SD картата."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"промяна/изтриване на съдържанието в USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"промяна/изтриване на съдържанието на SD картата"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Разрешава на приложението да записва в USB."</string> diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index 36288c52fc27..64d0f8780cca 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"escriure dades de contacte"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permet que l\'aplicació modifiqui les dades de contacte (adreça) emmagatzemades a la tauleta. Les aplicacions malicioses poden utilitzar-ho per esborrar o modificar les dades de contacte."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permet que l\'aplicació modifiqui les dades de contacte (adreça) emmagatzemades al telèfon. Les aplicacions malicioses poden utilitzar-ho per esborrar o per modificar les dades de contacte."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"lectura del registre de trucades"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permet que l\'aplicació llegeixi el registre de trucades de la teva tauleta, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per enviar les teves dades a altres persones."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permet que l\'aplicació llegeixi el registre de trucades del teu telèfon, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per enviar les teves dades a altres persones."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"escriptura del registre de trucades"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permet que l\'aplicació modifiqui el registre de trucades de la teva tauleta, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per eliminar o per modificar el teu registre de trucades."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permet que l\'aplicació modifiqui el registre de trucades del teu telèfon, incloses les dades de les trucades entrants i sortints. És possible que les aplicacions malicioses ho utilitzin per eliminar o per modificar el teu registre de trucades."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"lectura de dades del teu perfil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permet que l\'aplicació pugui llegir informació del perfil personal emmagatzemada al dispositiu, com ara el teu nom i la teva informació de contacte. Això significa que l\'aplicació et pot identificar i enviar la informació del teu perfil a altres persones."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"escriptura a les teves dades del perfil"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Permet que l\'aplicació llegeixi les paraules, els noms i les frases privats que l\'usuari pot haver emmagatzemat al seu diccionari."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"escriu al diccionari definit per l\'usuari"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permet que l\'aplicació escrigui paraules noves al diccionari de l\'usuari."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"llegeix el contingut de l\'emmagatzematge USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"llegeix el contingut de la targeta SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permet que l\'aplicació llegeixi el contingut de l\'emmagatzematge USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permet que l\'aplicació llegeixi el contingut de la targeta SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificar/esborrar contingut USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/esborrar contingut de la targeta SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permet que l\'aplicació escrigui a l\'emmagatzematge USB."</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 2cda293d32d7..08f4dc99cdf8 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"zapisovat data kontaktů"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Umožňuje aplikaci upravit kontaktní údaje (adresy) uložené v tabletu. Škodlivé aplikace mohou toto oprávnění použít k vymazání nebo úpravě kontaktních údajů."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Umožňuje aplikaci upravit kontaktní údaje uložené v telefonu (adresu). Škodlivé aplikace mohou toto oprávnění použít k vymazání nebo úpravě kontaktních údajů."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"čtení údajů o vašem profilu"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Umožňuje aplikaci číst údaje v osobním profilu uložené v zařízení, například jméno nebo kontaktní údaje. Znamená to, že vás ostatní aplikace mohou identifikovat a odeslat údaje z profilu dalším aplikacím."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"zapisovat do údajů o profilu"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Umožní aplikaci číst soukromá slova, jména a fráze, která uživatel mohl uložit do svého slovníku."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"zápis do slovníku definovaného uživatelem"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Umožňuje aplikaci zapisovat nová slova do uživatelského slovníku."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čtení obsahu USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čtení obsahu karty SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Umožňuje čtení obsahu USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Umožňuje aplikaci čtení obsahu karty SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"úprava/mazání obsahu úložiště USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"změna/smazání obsahu karty SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Umožňuje aplikaci zapisovat do úložiště USB."</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 4f9f0f1f9729..ed51692154dd 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"skriv kontaktdata"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Tillader, at appen kan ændre data for kontaktpersoner (adresser), der er gemt på din tablet. Ondsindede apps kan bruge dette til at slette eller ændre dine kontaktoplysninger."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Tillader, at appen kan ændre kontaktdata (adresser), der er gemt på din telefon. Ondsindede apps kan bruge dette til at slette eller ændre kontaktdata."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"læse dine profildata"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Tillader, at appen kan læse personlige profiloplysninger, der er gemt på din enhed, f.eks. dit navn og dine kontaktoplysninger. Det betyder, at appen kan identificere dig og sende dine profiloplysninger til andre."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"skrive til dine profildata"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Tillader, at appen kan læse alle private ord, navne og sætninger, som brugeren kan have gemt i brugerordbogen."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"skrive til brugerordbogen"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Tillader, at appen kan skrive nye ord i brugerordbogen."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"læse USB-lagerets indhold"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"læse indholdet af SD-kortet"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Tillader, at app\'en læser indhold på USB-lager."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Tillader, at app\'en læser indholdet af SD-kortet."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"rette/slette i USB-lager"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"ret/slet indholdet på SD-kortet"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Lader appen skrive til USB."</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index b064243e88a2..f9ae61bb7ed4 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"Kontaktdaten schreiben"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Ermöglicht der App, die auf Ihrem Tablet gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Apps können so Ihre Kontaktdaten löschen oder ändern."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Ermöglicht der App, die auf Ihrem Telefon gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Apps können so Ihre Kontaktdaten löschen oder ändern."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"Ihre Profildaten lesen"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Ermöglicht der App, auf Ihrem Gerät gespeicherte persönliche Profilinformationen zu lesen, darunter Ihren Namen und Ihre Kontaktdaten. Die App kann Sie somit identifizieren und Ihre Profilinformationen an andere senden."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"In Ihre Profildaten schreiben"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Ermöglicht der App, alle privaten Wörter, Namen und Ausdrücke zu lesen, die ein Nutzer in seinem Wörterbuch gespeichert hat"</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"In benutzerdefiniertes Wörterbuch schreiben"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Ermöglicht der App, dem Nutzerwörterbuch neue Einträge hinzuzufügen"</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB-Speicher-Inhalt lesen"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD-Karten-Inhalt lesen"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ermöglicht der App, den USB-Speicher zu lesen"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ermöglicht der App, den Inhalt einer SD-Karte zu lesen"</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-Speicherinhalt ändern/löschen"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD-Karten-Inhalt ändern/löschen"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Ermöglicht der App, in den USB-Speicher zu schreiben"</string> @@ -741,8 +749,7 @@ <string name="double_tap_toast" msgid="4595046515400268881">"Tipp: Zum Vergrößern und Verkleinern zweimal tippen"</string> <string name="autofill_this_form" msgid="4616758841157816676">"AutoFill"</string> <string name="setup_autofill" msgid="7103495070180590814">"AutoFill konfig."</string> - <!-- no translation found for autofill_address_name_separator (6350145154779706772) --> - <skip /> + <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string> <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string> <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string> <string name="autofill_address_summary_format" msgid="4874459455786827344">"$1$2$3"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index b05cbe504ecb..99883fbe13b6 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"εγγραφή δεδομένων επαφής"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Επιτρέπει στην εφαρμογή να τροποποιεί τα δεδομένα επαφής (διεύθυνσης) που είναι αποθηκευμένα στο tablet σας. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να διαγράψουν ή να τροποποιήσουν τα δεδομένα επαφών σας."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Επιτρέπει στην εφαρμογή να τροποποιεί τα δεδομένα επαφής (διεύθυνσης) που είναι αποθηκευμένα στο τηλέφωνό σας. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να διαγράψουν ή να τροποποιήσουν τα δεδομένα επαφών σας."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"ανάγν. δεδ. προφ."</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Επιτρέπει στην εφαρμογή την ανάγνωση προσωπικών πληροφοριών προφίλ οι οποίες είναι αποθηκευμένες στη συσκευή σας, όπως το όνομα και τα στοιχεία επικοινωνίας σας. Αυτό σημαίνει ότι η εφαρμογή μπορεί να σας αναγνωρίσει και να στείλει τις πληροφορίες σας προφίλ σε άλλους."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"εγγρ. σε δεδ. προφίλ"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Επιτρέπει στην εφαρμογή την ανάγνωση ιδιωτικών λέξεων, ονομάτων και φράσεων, τα οποία ο χρήστης ενδέχεται να έχει αποθηκεύσει στο λεξικό χρήστη."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"εγγραφή σε λεξικό καθορισμένο από τον χρήστη"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Επιτρέπει στην εφαρμογή την εγγραφή νέων λέξεων στο λεξικό χρήστη."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"ανάγν. περιεχ. αποθ. χώρ. USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"ανάγνωση περιεχομένου κάρτας SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Επιτρ. η ανάγν. περιεχ. απ. χώρου USB"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Επιτρέπει στην εφαρμογή την ανάγνωση περιεχομένου της κάρτας SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"τροπ./διαγρ. περ. απ. χώρ. USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"τροποποίηση/διαγραφή περιεχομένων κάρτας SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Επιτρέπει στην εφαρμογή την εγγραφή στον αποθηκευτικό χώρο USB."</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index 38078a60d0a2..de92665f3d9b 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"write contact data"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Allows the app to modify the contact (address) data stored on your tablet. Malicious apps may use this to erase or modify your contact data."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Allows the app to modify the contact (address) data stored on your phone. Malicious apps may use this to erase or modify your contact data."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"read call log"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Allows the app to read your tablet\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to send your data to other people."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Allows the app to read your phone\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to send your data to other people."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"write call log"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Allows the app to modify your tablet\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to erase or modify your call log."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Allows the app to modify your phone\'s call log, including data about incoming and outgoing calls. Malicious apps may use this to erase or modify your call log."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"read your profile data"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Allows the app to read personal profile information stored on your device, such as your name and contact information. This means the app can identify you and send your profile information to others."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"write to your profile data"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Allows the app to read any private words, names and phrases that the user may have stored in the user dictionary."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"write to user-defined dictionary"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Allows the app to write new words into the user dictionary."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"read USB storage contents"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"read SD card contents"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Allows the app to read contents of USB storage."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Allows the app to read contents of SD card."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modify/delete USB storage contents"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modify/delete SD card contents"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Allows the app to write to the USB storage."</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index d1dc89faecec..20f18d90485c 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"escribir datos de contacto"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que la aplicación modifique la información de contacto (dirección) almacenada en tu tableta. Las aplicaciones maliciosas pueden utilizar este permiso para borrar o modificar tu información de contacto."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que la aplicación modifique la información de contacto (dirección) almacenada en tu dispositivo. Las aplicaciones maliciosas pueden utilizar este permiso para borrar o modificar tu información de contacto."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"Leer tus datos de perfil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que la aplicación lea la información de perfil almacenada en tu dispositivo, como tu nombre e información de contacto. Esto significa que la aplicación puede identificarte y enviar tu información de perfil a otros."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"Escrib. en datos de tu perfil"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index c39617a11290..9ede6a06517d 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"escribir datos de contacto"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que la aplicación lea todos los datos (direcciones) de contactos almacenados en el tablet. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar los datos de contactos."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que la aplicación consulte todos los datos (direcciones) de contactos almacenados en el teléfono. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar los datos de contactos."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"leer el registro de llamadas"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite que la aplicación lea el registro de llamadas del tablet, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para enviar tus datos a otros usuarios."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite que la aplicación lea el registro de llamadas del teléfono, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para enviar tus datos a otros usuarios."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"escribir en el registro de llamadas"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite que la aplicación modifique el registro de llamadas del tablet, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar el registro de llamadas."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite que la aplicación modifique el registro de llamadas del teléfono, incluidos datos sobre llamadas entrantes y salientes. Las aplicaciones malintencionadas pueden usar este permiso para borrar o modificar el registro de llamadas."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"acceder a datos de tu perfil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que la aplicación acceda a información del perfil personal almacenada en el dispositivo (como el nombre o la información de contacto), lo que significa que la aplicación puede identificar al usuario y enviar la información de su perfil a otros usuarios."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"escribir en datos de tu perfil"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite que la aplicación lea cualquier palabra, nombre o frase de carácter privado que el usuario haya almacenado en su diccionario."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"añadir al diccionario definido por el usuario"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite que la aplicación escriba palabras nuevas en el diccionario de usuario."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"leer contenido del almacenamiento USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"leer contenido de la tarjeta SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite que la aplicación lea contenido del almacenamiento USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite que la aplicación lea contenidos de la tarjeta SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificar/borrar contenido USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar contenido de la tarjeta SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite escribir en el almacenamiento USB."</string> diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml index 07aef03b6216..3c8079d3a44a 100644 --- a/core/res/res/values-et/strings.xml +++ b/core/res/res/values-et/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"kirjuta kontaktandmeid"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Võimaldab rakendusel muuta tahvelarvutisse salvestatud kontaktandmeid (aadresse). Pahatahtlikud rakendused võivad seda kasutada teie kontaktandmete kustutamiseks või muutmiseks."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Võimaldab rakendusel muuta telefoni salvestatud kontaktandmeid (aadresse). Pahatahtlikud rakendused võivad seda kasutada teie kontaktandmete kustutamiseks või muutmiseks."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"profiili andmete lugemine"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Võimaldab rakendusel lugeda seadmesse salvestatud isiklikku teavet, näiteks teie nime ja kontaktandmeid. See tähendab, et rakendus saab teid tuvastada ja saata teie profiiliteavet teistele."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"andmete kirjutamine profiili"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Võimaldab rakendusel lugeda kõiki privaatseid sõnu, nimesid ja fraase, mille kasutaja võis salvestada kasutajasõnastikku."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"Kasutaja määratud sõnastikku kirjutamine"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Võimaldab rakendusel kirjutada kasutajasõnastikku uusi sõnu."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB-salvestusruumi sisu lugem."</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD-kaardi sisu lugemine"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Rak. loeb USB-s.-ruumi sisu."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Võimaldab rakendusel lugeda SD-kaardi sisu."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-seadme sisu muutm./kustut."</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"muuda/kustuta SD-kaardi sisu"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Võimaldab rakendusel kirjutada USB-mäluseadmele."</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index 96201c6d8261..164d2138481a 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"نوشتن اطلاعات تماس"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"به برنامه اجازه میدهد دادههای مخاطب ذخیره شده در رایانه لوحی را تغییر دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا دادههای تماس شما را تغییر دهند یا پاک کنند."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"به برنامه اجازه میدهد تا دادههای مخاطب (آدرس) را که در تلفن ذخیره شده تغییر دهد. برنامههای مخرب میتوانند از این استفاده کنند تا دادههای تماس شما را پاک کنند یا تغییر دهند."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"خواندن دادههای نمایه شما"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"به برنامه اجازه میدهد اطلاعات نمایه شخصی ذخیره شده در دستگاه شما را بخواند. یعنی برنامه میتواند شما را شناسایی کند و اطلاعات نمایه شما را به دیگران ارسال کند."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"نوشتن در دادههای نمایه شما"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"به برنامه اجازه میدهد هر گونه کلمه، نام، عبارت خصوصی را که کاربر در فرهنگ لغت خود ذخیره کرده است بخواند."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"نوشتن در فرهنگ لغت تعریف شده از سوی کاربر"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"به برنامه اجازه میدهد تا کلمات جدید را در فهرست کاربر بنویسد."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"خواندن محتوای حافظه USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"خواندن محتوای کارت SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"به برنامه اجازه خواندن محتوای حافظه USB را میدهد."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"به برنامه اجازه خواندن محتوای کارت SD را میدهد."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"اصلاح/حذف محتواهای حافظه USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"اصلاح کردن/حذف محتویات کارت SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"به برنامه اجازه میدهد تا در حافظه USB بنویسد."</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index dfdc3fb8b361..07f6118d849e 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"kirjoita yhteystietoja"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Antaa sovelluksen muokata tablet-laitteen yhteystietoja (osoitetietoja). Haitalliset sovellukset voivat käyttää tätä yhteystietojen poistamiseen tai muokkaamiseen."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Antaa sovelluksen muokata puhelimen yhteystietoja (osoitetietoja). Haitalliset sovellukset voivat käyttää tätä yhteystietojen poistamiseen tai muokkaamiseen."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"lukea profiilisi tiedot"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Antaa sovelluksen lukea laitteelle tallennettuja henkilökohtaisia tietoja, kuten nimen ja yhteystietoja. Tämä antaa sovelluksen tunnistaa sinut ja lähettää profiilitietojasi muille."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"kirjoittaa profiilin tietoihin"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Antaa sovelluksen lukea yksityisiä sanoja, nimiä tai ilmauksia, joita käyttäjä on voinut tallentaa käyttäjän sanakirjaan."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"käyttäjän määrittelemään sanakirjaan kirjoittaminen"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Antaa sovelluksen kirjoittaa uusia sanoja käyttäjän sanakirjaan."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lue USB-tallennustilan sisältöä"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lue SD-kortin sisältöä"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Antaa sovelluksen lukea USB-tallennustilan sisältöä."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Antaa sovelluksen lukea SD-kortin sisältöä."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"muokkaa/poista USB-sisältöä"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"muokkaa/poista SD-kortin sisältöä"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Antaa sovelluksen kirjoittaa USB-tallennustilaan."</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 3abc1b40fa42..88fe7214b831 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"Édition des données d\'un contact"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permet à l\'application de modifier les coordonnées (adresses) de vos contacts qui sont stockées sur votre tablette. Des applications malveillantes peuvent exploiter cette fonctionnalité pour effacer ou modifier ces coordonnées."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permet à l\'application de modifier les coordonnées (adresses) de vos contacts qui sont stockées sur votre téléphone. Des applications malveillantes peuvent exploiter cette fonctionnalité pour effacer ou modifier ces coordonnées."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"lire le journal d\'appels"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permet à l\'application de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour envoyer vos données à des tiers."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permet à l\'application de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour envoyer vos données à des tiers."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"modifier le journal d\'appels"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permet à l\'application de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permet à l\'application de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"lire vos données de profil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permet à l\'application de lire les informations de profil stockées sur votre appareil, telles que votre nom et vos coordonnées, ou d\'en ajouter. D\'autres applications peuvent alors vous identifier et envoyer vos informations de profil à des tiers."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"modifier vos données de profil"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Permet à l\'application de lire tous les mots, noms et expressions privés que l\'utilisateur a pu enregistrer dans son dictionnaire personnel."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"enregistrer dans le dictionnaire défini par l\'utilisateur"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permet à l\'application d\'enregistrer de nouveaux mots dans le dictionnaire personnel de l\'utilisateur."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lire contenu de la mémoire USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lire le contenu de la carte SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permet à l\'appli de lire contenu mémoire USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permet à l\'application de lire le contenu de la carte SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"Modifier/Supprimer contenu mémoire USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modifier/supprimer le contenu de la carte SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permet à l\'application de modifier le contenu de la mémoire de stockage USB."</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index 5acca982b2b3..966c70df84de 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"संपर्क डेटा लिखें"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"एप्लिकेशन को आपके टेबलेट में संग्रहीत संपर्क (पता) डेटा संशोधित करने देता है. दुर्भावनापूर्ण एप्लिकेशन इसका उपयोग आपके संपर्क डेटा को मिटाने या संशोधित करने में कर सकते हैं."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"एप्लिकेशन को आपके फ़ोन में संग्रहीत संपर्क (पता) डेटा संशोधित करने देता है. दुर्भावनापूर्ण एप्लिकेशन इसका उपयोग आपके संपर्क डेटा को मिटाने या संशोधित करने में कर सकते हैं."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"अपना प्रोफ़ाइल डेटा पढ़ें"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"एप्लिकेशन को आपके उपकरण में संग्रहीत नाम और संपर्क जानकारी जैसी निजी प्रोफ़ाइल जानकारी पढ़ने देता है. इसका अर्थ है कि एप्लिकेशन आपको पहचान सकता है और आपकी प्रोफ़ाइल की जानकारी अन्य लोगों को भेज सकता है."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"अपने प्रोफ़ाइल डेटा में लिखें"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"एप्लिकेशन को ऐसे निजी शब्दों, नामों और वाक्यांशों को पढ़ने देता है जो संभवत: उपयोगकर्ता द्वारा उपयोगकर्ता डिक्शनरी में संग्रहीत किए गए हों."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"उपयोगकर्ता-निर्धारित डिक्शनरी में लिखें"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"एप्लिकेशन को उपयोगकर्ता डिक्शनरी में नए शब्द लिखने देता है."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB संग्रहण की सामग्री पढ़ें"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD कार्ड की सामग्री पढ़ें"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"एप्लि. को USB संग्रहण की सामग्री पढ़ने देता है."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"एप्लिकेशन को SD कार्ड की सामग्री पढ़ने देता है."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB संग्रहण सामग्रियों को संशोधित करें/हटाएं"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD कार्ड सामग्रियां संशोधित करें/हटाएं"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"एप्लि. को USB संग्रहण में लिखने देता है."</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index 671bc8d7de9e..588de28d8d0f 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"pisanje kontaktnih podataka"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Omogućuje aplikaciji da promijeni kontaktne podatke (adrese) pohranjene na tabletnom računalu. Zlonamjerne aplikacije mogu na taj način izbrisati ili promijeniti vaše kontaktne podatke."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Omogućuje aplikaciji da promijeni kontaktne podatke (adrese) pohranjene na telefonu. Zlonamjerne aplikacije mogu na taj način izbrisati ili promijeniti vaše kontaktne podatke."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"čitanje podataka vašeg profila"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Omogućuje aplikaciji čitanje osobnih podataka profila pohranjenih na uređaju, kao što su vaše ime ili kontaktni podaci. To znači da vas aplikacija može identificirati i slati informacije s vašeg profila drugima."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"pisanje u podatke profila"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Aplikaciji omogućuje čitanje svih privatnih riječi, imena i izraza koje je korisnik pohranio u korisničkom rječniku."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"pisanje u korisnički definiran rječnik"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Aplikaciji omogućuje pisanje novih riječi u korisnički rječnik."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čitanje sadržaja USB pohrane"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čitanje sadržaja SD kartice"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Aplikaciji omog. čitanje sadržaja USB pohrane."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Aplikaciji omogućuje čitanje sadržaja SD kartice."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"izmjeni/briši sadržaje memorije USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"izmjena/brisanje sadržaja SD kartice"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Dopušta pisanje u USB pohranu."</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 20280b35d000..637bdd2d3826 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"névjegyadatok írása"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Lehetővé teszi az alkalmazás számára, hogy módosítsa a táblagépen tárolt névjegy- (cím-) adatokat. A rosszindulatú alkalmazások felhasználhatják ezt a névjegyadatok törlésére vagy módosítására."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Lehetővé teszi az alkalmazás számára, hogy módosítsa a telefonon tárolt névjegy- (cím-) adatokat. A rosszindulatú alkalmazások felhasználhatják ezt a névjegyadatok törlésére vagy módosítására."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"olvassa el profiladatait"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Lehetővé teszi az alkalmazás számára a készüléken tárolt személyes profiladatok, például a név és elérhetőség olvasását. Ez azt jelenti, hogy más alkalmazások is azonosíthatják Önt, és elküldhetik másoknak a profiladatait."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"írás a profiladatokba"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Lehetővé teszi az alkalmazás számára, hogy olvassa a felhasználói szótárban tárolt saját szavakat, neveket és kifejezéseket."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"a felhasználó által definiált szótár írása"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Lehetővé teszi az alkalmazás számára, hogy új szavakat írjon a felhasználói szótárba."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB-tár tartalmának beolvasása"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD-kártya tartalmának beolvasása"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Beolvashat USB-tartalmakat."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Lehetővé teszi az alkalmazás számára SD-kártyák tartalmának beolvasását."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-tár tartalmának módosítása és törlése"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"az SD-kártya tartalmának módosítása és törlése"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Az alkalmazás USB-tárra írhat."</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 0807c4d4917d..b8b086786ecf 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -277,7 +277,7 @@ <string name="permlab_bindWallpaper" msgid="8716400279937856462">"mengikat ke wallpaper"</string> <string name="permdesc_bindWallpaper" msgid="7108428692595491668">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu wallpaper. Tidak pernah diperlukan oleh apl normal."</string> <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"mengikat ke layanan widget"</string> - <string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan gawit. Tidak pernah diperlukan oleh apl normal."</string> + <string name="permdesc_bindRemoteViews" msgid="4717987810137692572">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu layanan widget. Tidak pernah diperlukan oleh apl normal."</string> <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"berinteraksi dengan admin perangkat"</string> <string name="permdesc_bindDeviceAdmin" msgid="569715419543907930">"Mengizinkan pemegang mengirimkan tujuan kepada administrator perangkat. Tidak pernah diperlukan oleh apl normal."</string> <string name="permlab_setOrientation" msgid="3365947717163866844">"ubah orientasi layar"</string> @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"tuliskan data kenalan"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Mengizinkan apl mengubah data (alamat) kenalan yang tersimpan di tablet. Apl berbahaya dapat menggunakan ini untuk menghapus atau mengubah data kenalan Anda."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Mengizinkan apl memodifikasi data (alamat) kenalan yang tersimpan di ponsel Anda. Apl berbahaya dapat menggunakan ini untuk menghapus atau memodifikasi data kenalan Anda."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"membaca data profil Anda"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Mengizinkan apl membaca informasi profil pribadi yang tersimpan di perangkat Anda, misalnya nama dan informasi kenalan Anda. Ini artinya apl dapat mengenali dan mengirim informasi profil Anda ke orang lain."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"menulis ke data profil Anda"</string> @@ -414,7 +426,7 @@ <string name="permlab_checkinProperties" msgid="7855259461268734914">"akses properti lapor masuk"</string> <string name="permdesc_checkinProperties" msgid="4024526968630194128">"Mengizinkan apl membaca/menulis akses ke properti yang diunggah oleh layanan lapor masuk. Tidak untuk digunakan oleh apl normal."</string> <string name="permlab_bindGadget" msgid="776905339015863471">"pilih widget"</string> - <string name="permdesc_bindGadget" msgid="8261326938599049290">"Mengizinkan apl memberi tahu sistem tentang gawit mana yang dapat digunakan oleh suatu apl. Apl dengan izin ini dapat memberikan akses ke data pribadi untuk apl lain. Tidak untuk digunakan oleh apl normal."</string> + <string name="permdesc_bindGadget" msgid="8261326938599049290">"Mengizinkan apl memberi tahu sistem tentang widget mana yang dapat digunakan oleh suatu apl. Apl dengan izin ini dapat memberikan akses ke data pribadi untuk apl lain. Tidak untuk digunakan oleh apl normal."</string> <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"ubah kondisi ponsel"</string> <string name="permdesc_modifyPhoneState" msgid="1029877529007686732">"Mengizinkan apl mengontrol fitur telepon perangkat. Apl dengan izin ini dapat mengalihkan jaringan, menyalakan dan mematikan radio ponsel, dan melakukan hal serupa lainnya tanpa pernah memberi tahu Anda."</string> <string name="permlab_readPhoneState" msgid="2326172951448691631">"baca kondisi dan identitas ponsel"</string> @@ -1086,7 +1098,7 @@ <string name="permlab_copyProtectedData" msgid="4341036311211406692">"menyalin konten"</string> <string name="permdesc_copyProtectedData" msgid="4390697124288317831">"Mengizinkan apl menjalankan layanan kontainer default untuk menyalin konten. Tidak untuk digunakan oleh apl normal."</string> <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"Sentuh dua kali untuk mengontrol perbesar/perkecil"</string> - <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Tidak dapat menambahkan gawit."</string> + <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Tidak dapat menambahkan widget."</string> <string name="ime_action_go" msgid="8320845651737369027">"Buka"</string> <string name="ime_action_search" msgid="658110271822807811">"Telusuri"</string> <string name="ime_action_send" msgid="2316166556349314424">"Kirimkan"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index 2d1a413ebb39..75ed4e8d300c 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"scrittura dati di contatto"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Consente all\'applicazione di modificare i dati di contatto (indirizzi) memorizzati sul tablet. Le applicazioni dannose potrebbero farne uso per cancellare o modificare i tuoi dati di contatto."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Consente all\'applicazione di modificare i dati di contatto (indirizzi) memorizzati sul telefono. Le applicazioni dannose potrebbero farne uso per cancellare o modificare i tuoi dati di contatto."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"lettura del registro chiamate"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Consente all\'applicazione di leggere il registro chiamate del tablet, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero fare uso di questa funzione per inviare dati ad altre persone."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Consente all\'applicazione di leggere il registro chiamate del telefono, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero fare uso di questa funzione per inviare dati ad altre persone."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"scrittura del registro chiamate"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Consente all\'applicazione di modificare il registro chiamate del tablet, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Consente all\'applicazione di modificare il registro chiamate del telefono, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"lettura dei tuoi dati profilo"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Consente all\'applicazione di leggere informazioni del profilo personale memorizzate sul dispositivo, come il tuo nome e le tue informazioni di contatto. Ciò significa che l\'applicazione può identificarti e inviare le tue informazioni di profilo ad altri."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"scrittura dati del profilo"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Consente all\'applicazione di leggere parole, frasi e nomi privati che l\'utente potrebbe aver memorizzato nel dizionario utente."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"scrittura nel dizionario definito dall\'utente"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Consente all\'applicazione di scrivere nuove parole nel dizionario utente."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lettura contenuti archivio USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lettura dei contenuti della scheda SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Consente di leggere l\'archivio USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Consente all\'applicazione di leggere contenuti della scheda SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modifica/eliminaz. contenuti archivio USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificare/eliminare i contenuti della scheda SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Consente all\'applicazione di scrivere nell\'archivio USB."</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index e49b7240f688..40a4d015d615 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"כתוב נתונים של אנשי קשר"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"מאפשר ליישום לשנות את פרטי הקשר (כתובת) המאוחסנים בטבלט. יישומים זדוניים עלולים להשתמש בכך כדי למחוק או לשנות את פרטי הקשר שלך."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"מאפשר ליישום לשנות את פרטי הקשר (כתובת) המאוחסנים בטלפון. יישומים זדוניים עלולים להשתמש בכך כדי למחוק או לשנות את פרטי הקשר שלך."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"קריאת יומן שיחות"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"מאפשר ליישום לקרוא את יומן השיחות של הטבלט, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי לשלוח את הנתונים שלך לאנשים אחרים."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"מאפשר ליישום לקרוא את יומן השיחות של הטלפון, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי לשלוח את הנתונים שלך לאנשים אחרים."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"כתיבת יומן שיחות"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"מאפשר ליישום לשנות את יומן השיחות של הטבלט, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי למחוק או לשנות את יומן השיחות שלך."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"מאפשר ליישום לשנות את יומן השיחות של הטלפון, כולל נתונים על שיחות נכנסות ויוצאות. יישומים זדוניים עלולים לעשות בכך שימוש כדי למחוק או לשנות את יומן השיחות שלך."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"קרא את נתוני הפרופיל שלך"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"מאפשר ליישום לקרוא נתונים בפרטי הפרופיל האישי המאוחסנים במכשיר, כגון שמך ופרטי הקשר שלך. משמעות הדבר שהיישום יוכל לזהות אותך ולשלוח את מידע הפרופיל שלך לאנשים אחרים."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"כתוב בנתוני הפרופיל שלך"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"מאפשר ליישום לקרוא מילים, שמות וביטויים פרטיים שהמשתמש אחסן במילון המשתמש."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"כתיבה למילון בהגדרת המשתמש"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"מאפשר ליישום לכתוב מילים חדשות במילון המשתמש."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"קריאת תוכן אחסון USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"קריאת תוכן כרטיס SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"מאפשר ליישום לקרוא את התוכן של אחסון USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"מאפשר ליישום לקרוא את התוכן של כרטיס SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"שנה/מחק תוכן באמצעי אחסון מסוג USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"שנה/מחק תוכן של כרטיס SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"מאפשר ליישום לכתוב להתקן האחסון מסוג USB."</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index 5512eaf2a8bd..5b0918203fe9 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"連絡先データの書き込み"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"タブレットに保存されている連絡先(アドレス)データの変更をアプリに許可します。この許可を悪意のあるアプリに利用されると、連絡先データが消去または変更される恐れがあります。"</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"携帯端末に保存されている連絡先(アドレス)データの変更をアプリに許可します。この許可を悪意のあるアプリに利用されると、連絡先データが消去または変更される恐れがあります。"</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"プロフィールデータの読み取り"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"端末に保存されている個人のプロフィール情報(名前、連絡先情報など)を読み取ることをアプリに許可します。許可すると、アプリではユーザーの身元を特定したりプロフィール情報を第三者に転送したりできるようになります。"</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"プロフィールデータに書き込む"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"ユーザーが単語リストに個人情報として登録した可能性のある語句や名前を読み込むことをアプリに許可します。"</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"単語リストへの書き込み"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"単語リストに新しい語句を書き込むことをアプリに許可します。"</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USBストレージの読み取り"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SDカードのコンテンツの読み取り"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"USBストレージの読み取りをアプリに許可します。"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"SDカードのコンテンツの読み取りをアプリに許可します。"</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USBストレージのコンテンツの変更/削除"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SDカードのコンテンツを修正/削除する"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"USBストレージへの書き込みをアプリに許可します。"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index 29a721114fe4..ed3cfc999eec 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"연락처 데이터 작성"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"앱이 태블릿에 저장된 모든 연락처(주소) 데이터를 읽을 수 있도록 허용합니다. 이 경우 악성 앱이 연락처 데이터를 지우거나 수정할 수 있습니다."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"앱이 휴대전화에 저장된 모든 연락처(주소) 데이터를 읽을 수 있도록 허용합니다. 이 경우 악성 앱이 연락처 데이터를 지우거나 수정할 수 있습니다."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"프로필 데이터 읽기"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"앱이 기기에 저장된 개인 프로필 정보(예: 사용자 이름, 연락처 정보 등)를 읽을 수 있도록 허용합니다. 이는 앱이 사용자를 확인하고 다른 사용자들에게 해당 프로필 정보를 전송할 수 있다는 것을 의미합니다."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"프로필 데이터에 쓰기"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"앱이 사용자 사전에 보관되어 있는 비공개 단어, 이름 및 구문을 읽도록 허용합니다."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"사용자 정의 사전에 작성"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"앱이 사용자 사전에 새 단어를 입력할 수 있도록 허용합니다."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB 저장소 콘텐츠 읽기"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD 카드 콘텐츠 읽기"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"앱 USB 콘텐츠 읽기 허용"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"앱이 SD 카드의 콘텐츠를 읽을 수 있도록 허용합니다."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB 저장소 콘텐츠 수정/삭제"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD 카드 콘텐츠 수정/삭제"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"앱이 USB 저장소에 쓸 수 있도록 허용합니다."</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index da747b62e29f..e0a1ddf496d2 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"rašyti adresatų duomenis"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Leidžiama programai keisti planšetiniame kompiuteryje saugomus kontaktinius (adreso) duomenis. Kenkėjiškos programos gali tai naudoti, kad ištrintų ar pakeistų jūsų kontaktinius duomenis."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Leidžiama programai keisti telefone saugomus kontaktinius (adreso) duomenis. Kenkėjiškos programos gali tai naudoti, kad ištrintų ar pakeistų jūsų kontaktinius duomenis."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"skaityti profilio duomenis"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Leidžiama programai skaityti asmeninę profilio informaciją, saugomą jūsų įrenginyje, pvz., jūsų vardą, pavardę ir kontaktinę informaciją. Tai reiškia, kad programa gali nustatyti jūsų tapatybę ir siųsti profilio informaciją kitiems."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"rašyti kaip profilio duomenis"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Leidžiama programai skaityti privačius žodžius, vardus ir frazes, kuriuos naudotojas išsaugojo naudotojo žodyne."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"rašyti naudotojo nustatytame žodyne"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Leidžiama programai rašyti naujus žodžius į naudotojo žodyną."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"skaityti USB atminties turinį"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"skaityti SD kortelės turinį"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Leid. progr. skait. USB turin."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Leidžiama programai skaityti SD kortelės turinį."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"keisti / ištrinti USB atmintinės turinį"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"keisti / ištrinti SD kortelės turinį"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Leidž. progr. raš. į USB atm."</string> diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml index c96df5e97898..6e1bb33fba85 100644 --- a/core/res/res/values-lv/strings.xml +++ b/core/res/res/values-lv/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"rakstīt kontaktpersonu datus"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Ļauj lietotnei modificēt planšetdatorā saglabātos kontaktpersonu (adrešu) datus. Ļaunprātīgas lietotnes to var izmantot, lai dzēstu vai modificētu kontaktpersonu datus."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Ļauj lietotnei modificēt tālrunī saglabātos kontaktpersonu (adrešu) datus. Ļaunprātīgas lietotnes to var izmantot, lai dzēstu vai modificētu kontaktpersonu datus."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"jūsu profila datu lasīšana"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Ļauj lietotnei lasīt ierīcē saglabāto personīgā profila informāciju, piemēram, jūsu vārdu un kontaktinformāciju. Tas nozīmē, ka lietotne var jūs identificēt un sūtīt jūsu profila informāciju citām personām."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"rakstīšana jūsu profila datos"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Ļauj lietotnei lasīt jebkurus privātu vārdus, nosaukumus un frāzes, ko lietotājs saglabājis savā lietotāja vārdnīcā."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"rakstīt lietotāja noteiktā vārdnīcā"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Ļauj lietotnei rakstīt jaunus vārdus lietotāja vārdnīcā."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lasīt USB atmiņas saturu"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lasīt SD kartes saturu"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ļauj liet. lasīt USB atm. sat."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ļauj lietotnei lasīt SD kartes saturu."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"pārveidot/dzēst USB kr. sat."</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"pārveidot/dzēst SD kartes saturu"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Ļauj lietotnei rakstīt USB atmiņā."</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index f97f481c6414..bb2cf626b7aa 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"tulis data kenalan"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Membenarkan apl untuk mengubah suai data kenalan (alamat) yang disimpan pada tablet anda. Apl hasad boleh menggunakannya untuk memadam atau mengubah suai data kenalan anda."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Membenarkan apl untuk mengubah suai data kenalan (alamat) yang disimpan pada telefon anda. Apl hasad boleh menggunakannya untuk memadam atau mengubah suai data kenalan anda."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"baca data profil anda"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Membenarkan apl untuk membaca maklumat profil peribadi yang disimpan dalam peranti anda, seperti nama dan maklumat kenalan anda. Ini bermakna apl lain boleh mengenal pasti anda dan menghantar maklumat profil anda kepada orang lain."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"tulis ke data profil anda"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 9e3e480aa4f4..66ddfa877c5f 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"skrive kontaktinformasjon"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Lar appen lese alle kontaktdataene (adressene) som er lagret på nettbrettet. Ondsinnede apper kan bruke dette til å slette eller endre kontaktdataene dine."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Lar appen lese alle kontaktdataene (adressene) som er lagret på telefonen. Ondsinnede apper kan bruke dette til å slette eller endre kontaktdataene dine."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"lese profildataene dine"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Lar appen lese personlige profilinformasjon som er lagret på enheten, som for eksempel navn og kontaktinformasjon. Dette betyr at appen kan identifisere deg og sende profilinformasjonen din til andre."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"skriv til profildataene dine"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Lar appen lese eventuelle private ord, navn og uttrykk som brukeren kan ha lagret i brukerordlisten."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"skrive i brukerdefinert ordliste"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Lar appen skrive nye ord i brukerordlisten."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"lese innhold på USB-lagr."</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"lese innhold på SD-kortet"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Lar appen lese innhold på USB-lagringsenheten."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Lar appen lese innhold på SD-kortet."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"endre/slette innh. i USB-lagr."</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"redigere/slette innhold på minnekort"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Gir appen tillatelse til å skrive til USB-lagringen."</string> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index 8946bbb3f573..7609cc559e8d 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"contactgegevens schrijven"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Hiermee kan de app de op uw tablet opgeslagen contactgegevens (adresgegevens) wijzigen. Schadelijke apps kunnen hiermee uw contactgegevens verwijderen of wijzigen."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Hiermee kan de app de op uw telefoon opgeslagen contactgegevens (adresgegevens) wijzigen. Schadelijke apps kunnen hiermee uw contactgegevens verwijderen of wijzigen."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"uw profielgegevens lezen"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Hiermee kan de app persoonlijke profielgegevens lezen die op uw apparaat zijn opgeslagen, zoals uw naam en contactgegevens. Dit betekent dat de app u kan identificeren en uw profielgegevens naar anderen kan verzenden."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"schrijven naar profielgegevens"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index a1bfa7c3531f..b57e27d3b7a0 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"zapisywanie danych kontaktowych"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Pozwala aplikacji na zmianę danych kontaktowych (adresowych) zapisanych w tablecie. Złośliwe aplikacje mogą to wykorzystać w celu usunięcia lub zmodyfikowania Twoich danych kontaktowych."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Pozwala aplikacji na zmianę danych kontaktowych (adresowych) zapisanych w telefonie. Złośliwe aplikacje mogą to wykorzystać do usunięcia lub zmodyfikowania Twoich danych kontaktowych."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"odczyt danych z Twojego profilu"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Pozwala aplikacji na odczyt informacji, takich jak Twoje nazwisko i informacje kontaktowe, z profilu osobistego przechowywanego na urządzeniu. Oznacza to, że inne aplikacje mogą Cię zidentyfikować i przesłać informacje z Twojego profilu do innych osób."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"zapis danych w Twoim profilu"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Pozwala aplikacji na odczytywanie wszelkich prywatnych słów, nazw i wyrażeń zapisanych w słowniku użytkownika."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"zapisywanie w słowniku zdefiniowanym przez użytkownika"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Pozwala aplikacji na zapisywanie nowych słów do słownika użytkownika."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"odczyt zawartości pamięci USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"odczyt zawartości karty SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Pozwala aplikacji na odczyt pamięci USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Pozwala aplikacji na odczyt zawartości karty SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"Modyfikowanie/usuwanie z nośnika USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modyfikowanie/usuwanie zawartości karty SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Pozwala aplikacji na zapis w pamięci USB."</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index e5b262878882..e53a7c53b004 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"escrever dados de contacto"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que a aplicação modifique os dados de contacto (endereço) armazenados no tablet. As aplicações maliciosas podem utilizar isto para apagar ou modificar os dados dos seus contactos."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que uma aplicação modifique os dados de contacto (endereço) armazenados no telemóvel. As aplicações maliciosas podem utilizar isto para apagar ou modificar os dados dos seus contactos."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"ler registo de chamadas"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite à aplicação ler o registo de chamadas do tablet, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para enviar os seus dados para outras pessoas."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite à aplicação ler o registo de chamadas do telemóvel, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para enviar os seus dados para outras pessoas."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"escrever registo de chamadas"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite à aplicação modificar o registo de chamadas do tablet, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para apagar ou modificar o registo de chamadas."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite à aplicação modificar o registo de chamadas do telemóvel, incluindo os dados sobre as chamadas recebidas e efetuadas. As aplicações maliciosas podem utilizar isto para apagar ou modificar o registo de chamadas."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"ler os dados do perfil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que a aplicação leia dados de perfil pessoais armazenados no seu aparelho, como o seu nome e dados de contacto. Isto significa que outras aplicações podem identificá-lo e enviar os seus dados de perfil a terceiros."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"escrever nos dados do seu perfil"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite à aplicação ler quaisquer palavras, nomes e expressões privadas que o utilizador possa ter armazenado no dicionário do utilizador."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"escrever no dicionário definido pelo utilizador"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite à aplicação escrever novas palavras no dicionário do utilizador."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"ler conteúdo da memória USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"ler conteúdo do cartão SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite que a aplicação leia conteúdos da memória USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite que a aplicação leia conteúdos do cartão SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"mod./elim. conteúdo do armaz. USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar conteúdo do cartão SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite que a aplicação escreva na unidade de armazenamento USB."</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index c9794c10063b..f91b25cc3821 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"gravar dados de contato"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite que o aplicativo modifique os dados de contato (endereço) armazenados em seu tablet. Aplicativos maliciosos podem usar esse recurso para apagar ou modificar seus dados de contato."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite que o aplicativo modifique os dados de contato (endereço) armazenados em seu telefone. Aplicativos maliciosos podem usar esse recurso para apagar ou modificar seus dados de contato."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"ler registro de chamadas"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Permite que o aplicativo leia o registro de chamadas de seu tablet, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para enviar seus dados para outras pessoas."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Permite que o aplicativo leia o registro de chamadas de seu telefone, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para enviar seus dados para outras pessoas."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"salvar no registo de chamadas"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Permite que o aplicativo modifique o registro de chamadas de seu tablet, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para apagar ou modificar seu registro de chamadas."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Permite que o aplicativo modifique o registro de chamadas de seu telefone, incluindo dados sobre chamadas recebidas e efetuadas. Aplicativos maliciosos podem usar esta permissão para apagar ou modificar seu registro de chamadas."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"ler dados de seu perfil"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite que o aplicativo leia informações de perfil pessoais armazenadas em seu dispositivo, como seu nome e informações de contato. Isso significa que o aplicativo pode identificá-lo e enviar suas informações de perfil para outros aplicativos."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"escrever nos dados do perfil"</string> diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml index c58a0a3d90e1..fc6a51022b4b 100644 --- a/core/res/res/values-rm/strings.xml +++ b/core/res/res/values-rm/strings.xml @@ -489,6 +489,18 @@ <skip /> <!-- no translation found for permdesc_writeContacts (5075164818647934067) --> <skip /> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <!-- no translation found for permlab_readProfile (6824681438529842282) --> <skip /> <!-- no translation found for permdesc_readProfile (94520753797630679) --> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index 3f3658c9a3b3..6d49accd327f 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"scriere date de contact"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Permite aplicaţiei să modifice datele de contact (adresele) stocate pe tabletă. Aplicaţiile rău intenţionate pot să utilizeze această permisiune pentru a şterge sau a modifica datele dvs. de contact."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Permite aplicaţiei să modifice datele de contact (adresele) stocate pe telefon. Aplicaţiile rău intenţionate pot să utilizeze această permisiune pentru a şterge sau pentru a modifica datele dvs. de contact."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"citire date din profilul dvs."</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Permite aplicaţiei să citească informaţii de profil personal stocate pe dispozitiv, cum ar fi numele şi informaţiile de contact, ceea ce înseamnă că aplicaţia vă poate identifica şi poate trimite informaţiile dvs. de profil altor utilizatori."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"scriere date în profilul dvs."</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Permite aplicaţiei să citească cuvinte, nume şi expresii private stocate de utilizator în dicţionarul său."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"scriere în dicţionarul definit de utilizator"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Permite aplicaţiei să scrie cuvinte noi în dicţionarul utilizatorului."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"citeşte conţinutul stoc. USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"citeşte conţinutul cardului SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Permite aplic. citirea conţinutului stoc. USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Permite aplicaţiei să citească conţinutul cardului SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"modificare/ştergere a conţinutului stocării USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificare/ştergere conţinut card SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Permite scriere în stoc. USB."</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 458d10713ee6..662bbbbc421c 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"перезаписывать данные контакта"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Приложение сможет изменять адреса, сохраненные на планшетном ПК. Вредоносные программы смогут таким образом удалять и изменять данные ваших контактов."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Приложение сможет изменять адреса, сохраненные на телефоне. Вредоносные программы смогут таким образом удалять и изменять данные ваших контактов."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"просматривать данные профиля"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Приложение сможет считывать информацию личного профиля, сохраненную на устройстве, такую как ваше имя и контактные данные. Это означает, что приложение сможет получить ваши личные данные и отправить их другим пользователям."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"изменение данных профиля"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Приложение получит доступ ко всем словам, именам и фразам, которые хранятся в пользовательском словаре."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"запись данных в пользовательский словарь"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Приложение сможет добавлять слова в пользовательский словарь."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"чтение данных с USB-накопителя"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"чтение данных с SD-карты"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Приложение сможет считывать данные с USB-накопителя."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Приложение сможет считывать данные с SD-карты."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"доступ к USB-накопителю"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"изменять/удалять содержимое SD-карты"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Приложение сможет записывать данные на USB-накопитель."</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index 3c9000032450..242b78afa5e9 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"zápis údajov kontaktov"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Umožňuje aplikácii zmeniť všetky kontaktné údaje (adresy) uložené v tablete. Škodlivé aplikácie to môžu využiť a vymazať alebo zmeniť vaše kontaktné údaje."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Umožňuje aplikácii čítať všetky kontaktné údaje (adresy) uložené v telefóne. Škodlivé aplikácie to môžu využiť na odoslanie vašich údajov iným osobám."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"čítať údaje vášho profilu"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Umožňuje aplikácii čítať informácie v osobnom profile uložené vo vašom zariadení, ako je vaše meno a kontaktné informácie. Znamená to, že ďalšie aplikácie vás môžu identifikovať a poslať ostatným informácie o vašom profile."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"zapisovať do údajov profilu"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Umožňuje aplikácii čítať súkromné slová, názvy a frázy, ktoré mohol používateľ uložiť do slovníka používateľa."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"zapisovať do slovníka definovaného používateľom"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Umožňuje aplikácii zapisovať nové slová do používateľského slovníka."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"čítanie obsahu ukl. pries. USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"čítanie obsahu karty SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Umožňuje apl. čítať obsah USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Umožňuje aplikácii čítať obsah karty SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"upraviť/odstrániť obsah ukl. pr. USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"Zmeniť/odstrániť obsah karty SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Umožňuje aplikácii zápis do ukladacieho priestoru USB."</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index 434574189cf2..32c55f116044 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"pisanje podatkov stika"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Programu omogoča spreminjanje podatkov stikov (naslov), shranjenih v tabličnem računalniku. Zlonamerni programi lahko to uporabijo za brisanje ali spreminjanje podatkov stika."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Programu omogoča spreminjanje podatkov stikov (naslov), shranjenih v telefonu. Zlonamerni programi lahko to uporabijo za brisanje ali spreminjanje podatkov stika."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"branje podatkov v profilu"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Programu omogoča branje osebnih podatkov v profilu, kot so ime in podatki za stik. To pomeni, da vas lahko program prepozna in vaše podatke o profilu pošlje drugim."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"pisanje v podatke v profilu"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Programu omogoča branje morebitnih zasebnih besed, imen in izrazov, ki jih je uporabnik shranil v uporabniški slovar."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"pisanje v uporabniško določen slovar"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Programu omogoča pisanje nove besede v uporabniški slovar."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"branje vsebine pomnilnika USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"branje vsebine kartice SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Aplikaciji dovoli branje vsebine pomnilnika USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Aplikaciji dovoli branje vsebine kartice SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"spreminjanje vsebine pomnilnika USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"spreminjanje/brisanje vsebine kartice SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Programu omogoča zapisovanje v pomnilnik USB."</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index e216e5750643..3cded5a65cf5 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"уписивање података о контактима"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Дозвољава апликацији да измени податке о контакту (адреси) сачуване на таблету. Злонамерне апликације могу то да искористе да би избрисале или измениле податке о контакту."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Дозвољава апликацији да измени податке о контакту (адреси) сачуване на телефону. Злонамерне апликације могу то да искористе да би избрисале или измениле податке о контакту."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"читање података о профилу"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Дозвољава апликацији да чита личне информације са профила сачуване на уређају, као што су име и контакт информације. То значи да друге апликације могу да вас идентификују и да информације о вашем профилу шаљу другима."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"уписивање у податке профила"</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index fbca3e45a7d1..eee0d80b1967 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"skriva kontaktuppgifter"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Tillåter att appen ändrar kontaktuppgifter (adresser) som lagras på pekdatorn. Skadliga appar kan använda detta för att radera eller ändra kontaktuppgifter."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Tillåter att appen ändrar kontaktuppgifter (adresser) som lagras på mobilen. Skadliga appar kan använda detta för att radera eller ändra kontaktuppgifter."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"läs samtalslogg"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Tillåter att appen läser pekdatorns samtalslista, inklusive uppgifter om inkommande och utgående samtal. Skadliga appar kan använda informationen för att skicka dina data till andra personer."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Tillåter att appen läser mobilens samtalslista, inklusive uppgifter om inkommande och utgående samtal. Skadliga appar kan använda informationen för att skicka dina data till andra personer."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"skriv samtalslogg"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Tillåter att appen gör ändringar i pekdatorns samtalslista, inklusive i uppgifter om inkommande och utgående samtal. Skadliga program kan använda detta för att radera eller ändra din samtalslista."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Tillåter att appen gör ändringar i mobilens samtalslista, inklusive i uppgifter om inkommande och utgående samtal. Skadliga program kan använda detta för att radera eller ändra din samtalslista."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"läser din profilinformation"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Tillåter att appen läser personlig profilinformation som lagras på din enhet, t.ex. ditt namn och kontaktuppgifter. Det innebär att appen kan identifiera dig och skicka profilinformation till andra."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"skriver till data för din profil"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Tillåter att appen läser alla privata ord, namn och fraser som användaren har sparat i ordlistan."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"lägga till i användardefinierad ordlista"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Tillåter att appen anger nya ord i användarordlistan."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"läs innehållet på USB-lagringsenheten"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"läs innehållet på SD-kortet"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Appen får läsa innehåll på USB-enhet."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Tillåter appen att läsa innehållet på SD-kort."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"ändra/ta bort från USB-enhet"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"ändra/ta bort innehåll på SD-kortet"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Gör att app skriver till USB."</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 03b40d8f59d2..4de56edaf2a1 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"andika data ya anwani"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Inaruhusu programu kurekebisha data ya mwasiliani(anwani) iliyohifadhiwa kwenye kompyuta yako ki. programu hasidi zinaweza tumia hii kufuta au kurekebisha data yako ya mwasiliani."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Inaruhusu programu kurekebisha data ya mwasiliani(anwani) iliyohifadhiwa kwenye simu yako. Programu hasidi zinaweza kutumia hii kufuta au kurekebisha data yako ya mwasiliani."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"soma data ya maelezo yako mafupi"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Inaruhusu programu kusoma maelezo mafupi ya kibinafsi yaliyohifadhiwa kwenye kifaa chako, kama vile jina lako na taarifa ya kuwasiliana. Hii ina maanisha programu inaweza kukutambua na kutuma taarifa yako fupi ya kibinafsi kwa wengine."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"andika kwenye data ya maelezo yako mafupi"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Inaruhusu programu kusoma maneno, majina na vifungu vyovyote vya kibinafsi, ambavyo huenda mtumiaji amehifadhi katika kamusi ya mtumiaji."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"andika kwa kamusi iliyobainishwa na mtumiaji"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Inaruhusu programu kuandika maneno mapya katika kamusi ya mtumiaji."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"soma maudhui ya hifadhi ya USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"soma maudhui ya kadi ya SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Huruhusu programu kusoma maudhui ya hifadhi ya USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Huruhusu programu kusoma maudhui ya kadi ya SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"rekebisha/futa maudhui ya hifadhi ya USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"rekebisha/futa maudhui ya kadi ya SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Inaruhusu programu kuandikia hifadhi ya USB."</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index bcd9fe6d5e23..30df3abc58dd 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"เขียนข้อมูลที่อยู่ติดต่อ"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"อนุญาตให้แอปพลิเคชันแก้ไขข้อมูลการติดต่อ (ที่อยู่) ที่เก็บไว้ในแท็บเล็ตของคุณ แอปพลิเคชันที่เป็นอันตรายอาจใช้การอนุญาตนี้ลบหรือแก้ไขข้อมูลการติดต่อของคุณ"</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"อนุญาตให้แอปพลิเคชันแก้ไขข้อมูลการติดต่อ (ที่อยู่) ที่เก็บไว้ในโทรศัพท์ของคุณ แอปพลิเคชันที่เป็นอันตรายอาจใช้การอนุญาตนี้ลบหรือแก้ไขข้อมูลการติดต่อของคุณ"</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"อ่านข้อมูลโปรไฟล์ของคุณ"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"อนุญาตให้แอปพลิเคชันอ่านข้อมูลโปรไฟล์ส่วนบุคคลที่เก็บไว้บนอุปกรณ์ของคุณ เช่น ชื่อและข้อมูลติดต่อ ซึ่งหมายความว่าแอปพลิเคชันจะสามารถระบุตัวตนของคุณและส่งข้อมูลโปรไฟล์ของคุณแก่ผู้อื่นได้"</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"เขียนลงในข้อมูลโปรไฟล์ของคุณ"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"อนุญาตให้แอปพลิเคชันอ่านคำ ชื่อ และวลีส่วนบุคคลที่ผู้ใช้อาจเก็บไว้ในพจนานุกรมของผู้ใช้"</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"เขียนลงในพจนานุกรมที่ผู้ใช้กำหนด"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"อนุญาตให้แอปพลิเคชันเขียนคำใหม่ลงในพจนานุกรมผู้ใช้"</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"อ่านเนื้อหาที่บันทึกใน USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"อ่านเนื้อหาในการ์ด SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"ให้แอปฯ อ่านเนื้อหาใน USB"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"อนุญาตให้แอปพลิเคชันอ่านเนื้อหาของการ์ด SD"</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"แก้ไข/ลบเนื้อหาของที่เก็บข้อมูล USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"แก้ไข/ลบข้อมูลการ์ด SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"อนุญาตให้แอปฯ เขียนลงใน USB"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index 9e37534a8b96..ce79c7079125 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"sumulat ng data ng pakikipag-ugnay"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Pinapayagan ang app na baguhin ang data ng contact (address) na nakaimbak sa iyong tablet. Maaari itong gamitin ng nakakahamak na apps upang burahin o baguhin ang iyong data ng contact."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Pinapayagan ang app na baguhin ang data ng contact (address) na nakaimbak sa iyong telepono. Maaari itong gamitin ng nakakahamak na apps upang burahin o baguhin ang iyong data ng contact."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"basahin ang iyong data ng profile"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Pinapayagan ang app na basahin ang personal na impormasyon ng profile na nakaimbak sa iyong device, gaya ng iyong pangalan at impormasyon ng contact. Nangangahulugan ito na makikilala ka ng app at maipapadala nito ang impormasyon ng iyong profile sa iba."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"i-write sa iyong data ng profile"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Pinapayagan ang app na magbasa ng anumang pribadong mga salita, pangalan at parirala na maaaring inimbak ng user sa diksyunaryo ng user."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"magsulat sa diksyunaryong tinukoy ng user"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Pinapayagan ang app na magsulat ng mga bagong salita sa diksyunaryo ng user."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"basahin nilalaman USB storage"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"basahin ang mga nilalaman ng SD card"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Payag app basa laman USB strg."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Binibigyang-daan ang app na basahin ang mga nilalaman ng SD card."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"baguhin/tanggalin laman ng USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"baguhin/tanggalin ang mga nilalaman ng SD card"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Pinapayagan ang app na magsulat sa USB storage."</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index 2462e9034ba8..3fc02a9a03ef 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"kişi verileri yaz"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Uygulamaya, tabletinizde depolanan kişi (adres) verilerini değiştirme izni verir. Kötü amaçlı uygulamalar kişi verilerinizi silmek veya değiştirmek için bunu kullanabilir."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Uygulamaya, telefonunuzda depolanan kişi (adres) verilerini değiştirme izni verir. Kötü amaçlı uygulamalar kişi verilerinizi silmek veya değiştirmek için bunu kullanabilir."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"profil verilerimi oku"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Uygulamaya, adınız ve iletişim bilgileriniz gibi cihazınızda saklanan kişisel profil bilgilerini okuma izni verir. Bu izin, uygulamanın sizi tanımlayabileceği ve profil bilgilerinizi başkalarına gönderebileceği anlamına gelir."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"profil verilerime yaz"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Uygulamaya, kullanıcının kullanıcı sözlüğünde depolamış olabileceği kişisel kelimeleri, adları ve kelime öbeklerini okuma izni verir."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"kullanıcı tanımlı sözlüğe yaz"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Uygulamaya, kullanıcı sözlüğüne yeni kelimeler yazma izni verir."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"USB depolama içeriklerini oku"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"SD kart içeriklerini oku"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Uygulamaya USB depolama içeriğini okuma izni verir."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Uygulamaya SD kart içeriğini okuma izni verir."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB dep birm içeriğini dğş/sil"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD kart içeriklerini değiştir/sil"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Uygulamaya USB depolama birimine yazma izni verir."</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index a4f8e62effd0..3ff5f797a547 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"запис. контактні дані"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Дозволяє програмі змінювати контактні дані (адресу), збережені в планшетному ПК. Шкідливі програми можуть використовувати це для видалення чи зміни ваших контактних даних."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Дозволяє програмі змінювати контактні дані (адресу), збережені в телефоні. Шкідливі програми можуть використовувати це для видалення чи зміни ваших контактних даних."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"читати дані вашого профілю"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Дозволяє програмі читати особисту інформацію профілю, збережену на вашому пристрої, як-от ваше ім’я та контактну інформацію. Це означає, що інші програми можуть ідентифікувати вашу особу та надсилати дані вашого профілю іншим."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"записувати в дані профілю"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Дозволяє програмі читати будь-які особисті вислови, назви та фрази, які користувач міг зберегти у своєму словнику."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"писати у вказаний користувачем словник"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Дозволяє програмі писати нові слова в словник користувача."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"читати вміст носія USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"читати вміст карти SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Дозволяє програмі читати вміст носія USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Дозволяє програмі читати вміст карти SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"змінювати/видаляти вміст носія USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"змінювати/видал. вміст карти SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Дозволяє програмі писати на носій USB"</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index 13bdfa5af3c7..435ebbf3f7fd 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"ghi dữ liệu liên hệ"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Cho phép ứng dụng sửa đổi dữ liệu (địa chỉ) liên hệ được lưu trữ trên máy tính bảng của bạn. Ứng dụng độc hại có thể sử dụng quyền này để xóa hoặc sửa đổi dữ liệu liên hệ của bạn."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Cho phép ứng dụng sửa đổi dữ liệu (địa chỉ) liên hệ được lưu trữ trên điện thoại của bạn. Ứng dụng độc hại có thể sử dụng quyền này để xóa hoặc sửa đổi dữ liệu liên hệ của bạn."</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"đọc d.liệu t.sử của bạn"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Cho phép ứng dụng đọc thông tin tiểu sử cá nhân được lưu trữ trên thiết bị, chẳng hạn như tên và thông tin liên hệ của bạn. Điều này có nghĩa là ứng dụng có thể xác định danh tính của bạn và gửi thông tin tiểu sử của bạn cho người khác."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"ghi dữ liệu t.sử của bạn"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Cho phép ứng dụng đọc bất kỳ từ, tên và cụm từ riêng nào mà người dùng có thể đã lưu trữ trong từ điển của người dùng."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"ghi vào từ điển do người dùng xác định"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Cho phép ứng dụng ghi từ mới vào từ điển của người dùng."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"đọc nội dung của bộ nhớ USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"đọc nội dung của thẻ SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Cho phép ứng dụng đọc nội dung của bộ lưu trữ USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Cho phép ứng dụng đọc nội dung của thẻ SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"sửa đổi/xóa nội dung bộ nhớ USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"sửa đổi/xóa nội dung thẻ SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Cho phép ứng dụng ghi vào bộ lưu trữ USB."</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index d848dd29b26d..f21d7b828a69 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"写入联系数据"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"允许应用程序读取您平板电脑上存储的联系人(地址)数据。恶意应用程序可能借此清除或修改您的联系人数据。"</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"允许应用程序修改您手机上存储的联系人(地址)数据。恶意应用程序可能借此清除或修改您的联系人数据。"</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"读取您的个人资料数据"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"允许应用程序读取您设备上存储的个人资料信息,例如您的姓名和联系信息。这意味着应用程序可以识别您的身份,并将您的个人资料信息发送给他人。"</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"写入到您的个人资料数据"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index ae16b6b72cd6..70689e81be6c 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -335,6 +335,18 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"輸入聯絡人資料"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"允許應用程式修改平板電腦上儲存的聯絡人 (地址) 資料。請注意,惡意應用程式可能利用此功能清除或修改您的聯絡人資料。"</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"允許應用程式修改手機上儲存的聯絡人 (地址) 資料。請注意,惡意應用程式可能利用此功能清除或修改您的聯絡人資料。"</string> + <!-- no translation found for permlab_readCallLog (3478133184624102739) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3995157599976515002) --> + <skip /> + <!-- no translation found for permdesc_readCallLog (3452017559804750758) --> + <skip /> + <!-- no translation found for permlab_writeCallLog (8552045664743499354) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (6661806062274119245) --> + <skip /> + <!-- no translation found for permdesc_writeCallLog (683941736352787842) --> + <skip /> <string name="permlab_readProfile" msgid="6824681438529842282">"讀取您的個人資料"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"允許應用程式讀取裝置上儲存的個人資料,例如您的姓名和聯絡資訊。這表示應用程式可以識別您的身分,並將您的個人資料傳送給他人。"</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"寫入您的個人資料"</string> @@ -499,14 +511,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"允許應用程式讀取使用者儲存在使用者字典內的任何私人字詞、名稱和詞組。"</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"寫入使用者定義的字典"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"允許應用程式將新字詞寫入使用者的字典。"</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"讀取 USB 儲存裝置的內容"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"讀取 SD 卡的內容"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"允許應用程式讀取 USB 儲存裝置的內容。"</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"允許應用程式讀取 SD 卡的內容。"</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"修改/刪除 USB 儲存裝置內容"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"修改/刪除 SD 卡的內容"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"允許應用程式寫入 USB 儲存裝置。"</string> diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml index 930164846e5f..541133649650 100644 --- a/core/res/res/values-zu/strings.xml +++ b/core/res/res/values-zu/strings.xml @@ -335,6 +335,12 @@ <string name="permlab_writeContacts" msgid="644616215860933284">"bhala idatha yothintana naye"</string> <string name="permdesc_writeContacts" product="tablet" msgid="988969759110632978">"Ivumela insiza ukuthi iguqule imininingwane yekheli lokuxhumana eligcinwe ekhompyutheni yakho yepeni. Izinsiza ezinobungozi zingasebenzisa lokhu ukususa noma ziguqule ulwazi lwakho lokuxhuana."</string> <string name="permdesc_writeContacts" product="default" msgid="5075164818647934067">"Ivumela insiza ukuthi iguqule imininingwane yekheli lokuxhumana eligcinwe ocingweni lwakho. Izinsiza ezinobungozi zingasebenzisa lokhu ukususa noma ziguqule ulwazi lwakho lokuxhuana."</string> + <string name="permlab_readCallLog" msgid="3478133184624102739">"funda ilogi yekholi"</string> + <string name="permdesc_readCallLog" product="tablet" msgid="3995157599976515002">"Ivumela uhlelo lokusebenza ukufunda irekhodi lwamakholi lethubhulethi yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukuthumela idatha kwabanye abantu."</string> + <string name="permdesc_readCallLog" product="default" msgid="3452017559804750758">"Ivumela uhlelo lokusebenza ukufunda irekhodi lwamakholi wakho, kufaka phakathi idatha mayelana namakholi aphumayo nangenayo. Izinhlelo zokusebenza ezingalungile zingasebenzisa lokhu ukuthumela idatha kwabanye abantu."</string> + <string name="permlab_writeCallLog" msgid="8552045664743499354">"bhala irekhodi lwamakholi"</string> + <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Ivumela uhlelo lokusebenza ukushintsha ilogi yekholi yethebulethi yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukusula noma ukushintsha irekhodi lwamakholi wakho."</string> + <string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Ivumela uhlelo lokusebenza ukushintsha irekhodi lwamakholi lefoni yakho, kufaka phakathi idatha mayelana namakholi angenayo naphumayo. Izinhlelo zikusebenza ezingalungile zingasebenzisa lokhu ukusula noma ukushintsha irekhodi lwamakholi wakho."</string> <string name="permlab_readProfile" msgid="6824681438529842282">"bhala imininingo yemininingwane yakho"</string> <string name="permdesc_readProfile" product="default" msgid="94520753797630679">"Ivumela insiza ukuthi ifunde ulwazi lomuntu lwephrofayli olugcinwe edivayisini yakho njengegama lakho kanye nemininingwane yokuxhumana nawe. Lokhu kuchaza ukuthi izinsa ingakuhlonza bese ithumelela abanye imininingwane yephrofayili yakho."</string> <string name="permlab_writeProfile" msgid="4679878325177177400">"bhala imininingwane yemininingo yakho"</string> @@ -499,14 +505,10 @@ <string name="permdesc_readDictionary" msgid="8977815988329283705">"Ivumela uhlelo lokusebenza ukufunda noma yimaphi amagama ayimfihlo, amagama nemisho leyo umsebenzisi ayigcine kwisichazamazwi somsebenzisi."</string> <string name="permlab_writeDictionary" msgid="2296383164914812772">"bhala kwisichazamazwi esicacisiwe somsebenzisi"</string> <string name="permdesc_writeDictionary" msgid="8185385716255065291">"Ivumela insiza ukuthi ibhale amagama amasha esichazinimazwi."</string> - <!-- no translation found for permlab_sdcardRead (4086221374639183281) --> - <skip /> - <!-- no translation found for permlab_sdcardRead (8537875151845139539) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (1055302898999352339) --> - <skip /> - <!-- no translation found for permdesc_sdcardRead (7947792373570683542) --> - <skip /> + <string name="permlab_sdcardRead" product="nosdcard" msgid="4086221374639183281">"funda okuqukethwe kwesitoreji se-USB"</string> + <string name="permlab_sdcardRead" product="default" msgid="8537875151845139539">"funda okuqukethwe kwekhadi le-SD"</string> + <string name="permdesc_sdcardRead" product="nosdcard" msgid="1055302898999352339">"Ivumela uhlelo lokusebenza ukufunda okuqukethwe kokugciniwe okufinyeleleka nge-USB."</string> + <string name="permdesc_sdcardRead" product="default" msgid="7947792373570683542">"Ivumela uhlelo lokusebenza ukufunda okuqukethwe kwekhadi le-SD."</string> <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"guqula/susa okuqukethwe isitoreji se-USB"</string> <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"guqula/susa okuqukethwe kwekhadi le-SD"</string> <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"Ivumela insiza ukuthi ibhalele ekulondolozweni kwe-USB."</string> diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml index 51b07e44534a..63b3a58b8d5f 100644 --- a/data/fonts/fallback_fonts.xml +++ b/data/fonts/fallback_fonts.xml @@ -21,6 +21,15 @@ fallback fonts. That file can also specify the order in which the fallback fonts should be searched, to ensure that a vendor-provided font will be used before another fallback font which happens to handle the same glyph. + + Han languages (Chinese, Japanese, and Korean) share a common range of unicode characters; + their ordering in the fallback or vendor files gives priority to the first in the list. + Locale-specific ordering can be configured by adding language and region codes to the end + of the filename (e.g. /system/etc/fallback_fonts-ja.xml). When no region code is used, + as with this example, all regions are matched. Use separate files for each supported locale. + The standard fallback file (fallback_fonts.xml) is used when a locale does not have its own + file. All fallback files must contain the same complete set of fonts; only their ordering + can differ. --> <familyset> <family> diff --git a/data/fonts/vendor_fonts.xml b/data/fonts/vendor_fonts.xml index fe51fd27037e..c1116d045df2 100644 --- a/data/fonts/vendor_fonts.xml +++ b/data/fonts/vendor_fonts.xml @@ -25,6 +25,15 @@ place in the overall fallback fonts. The order of this list determines which fallback font will be used to support any glyphs that are not handled by the default system fonts. + Han languages (Chinese, Japanese, and Korean) share a common range of unicode characters; + their ordering in the fallback or vendor files gives priority to the first in the list. + Locale-specific ordering can be configured by adding language and region codes to the end + of the filename (e.g. /system/etc/fallback_fonts-ja.xml). When no region code is used, + as with this example, all regions are matched. Use separate files for each supported locale. + The standard fallback file (fallback_fonts.xml) is used when a locale does not have its own + file. All fallback files must contain the same complete set of fonts; only their ordering + can differ. + The sample configuration below is an example of how one might provide two families of fonts that get inserted at the first and second (0 and 1) position in the overall fallback fonts. diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd index d22dca1fee41..d91551a8e92d 100644 --- a/docs/html/guide/developing/device.jd +++ b/docs/html/guide/developing/device.jd @@ -134,11 +134,11 @@ above.</p> </tr> <tr> <td>ASUS</td> - <td><code>0B05</code></td> + <td><code>0b05</code></td> </tr> <tr> <td>Dell</td> - <td><code>413C</code></td> + <td><code>413c</code></td> </tr> <tr> <td>Foxconn</td> @@ -146,35 +146,35 @@ above.</p> </tr> <tr> <td>Fujitsu</td> - <td><code>04C5</code></td> + <td><code>04c5</code></td> </tr> <tr> <td>Fujitsu Toshiba</td> - <td><code>04C5</code></td> + <td><code>04c5</code></td> </tr> <tr> <td>Garmin-Asus</td> - <td><code>091E</code></td> + <td><code>091e</code></td> </tr> <tr> <td>Google</td> - <td><code>18D1</code></td> + <td><code>18d1</code></td> </tr> <tr> <td>Hisense</td> - <td><code>109B</code></td> + <td><code>109b</code></td> </tr> <tr> <td>HTC</td> - <td><code>0BB4</code></td> + <td><code>0bb4</code></td> </tr> <tr> <td>Huawei</td> - <td><code>12D1</code></td> + <td><code>12d1</code></td> </tr> <tr> <td>K-Touch</td> - <td><code>24E3</code></td> + <td><code>24e3</code></td> </tr> <tr> <td>KT Tech</td> @@ -185,8 +185,8 @@ above.</p> <td><code>0482</code></td> </tr> <tr> - <td>Lenevo</td> - <td><code>17EF</code></td> + <td>Lenovo</td> + <td><code>17ef</code></td> </tr> <tr> <td>LG</td> @@ -194,7 +194,7 @@ above.</p> </tr> <tr> <td>Motorola</td> - <td><code>22B8</code></td> + <td><code>22b8</code></td> </tr> <tr> <td>NEC</td> @@ -214,11 +214,11 @@ above.</p> </tr> <tr> <td>Pantech</td> - <td><code>10A9</code></td> + <td><code>10a9</code></td> </tr> <tr> <td>Pegatron</td> - <td><code>1D4D</code></td> + <td><code>1d4d</code></td> </tr> <tr> <td>Philips</td> @@ -226,31 +226,31 @@ above.</p> </tr> <tr> <td>PMC-Sierra</td> - <td><code>04DA</code></td> + <td><code>04da</code></td> </tr> <tr> <td>Qualcomm</td> - <td><code>05C6</code></td> + <td><code>05c6</code></td> </tr> <tr> <td>SK Telesys</td> - <td><code>1F53</code></td> + <td><code>1f53</code></td> </tr> <tr> <td>Samsung</td> - <td><code>04E8</code></td> + <td><code>04e8</code></td> </tr> <tr> <td>Sharp</td> - <td><code>04DD</code></td> + <td><code>04dd</code></td> </tr> <tr> <td>Sony</td> - <td><code>054C</code></td> + <td><code>054c</code></td> </tr> <tr> <td>Sony Ericsson</td> - <td><code>0FCE</code></td> + <td><code>0fce</code></td> </tr> <tr> <td>Teleepoch</td> @@ -262,6 +262,6 @@ above.</p> </tr> <tr> <td>ZTE</td> - <td><code>19D2</code></td> + <td><code>19d2</code></td> </tr> </table> diff --git a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd index 499b610bf734..346a0c648cd5 100644 --- a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd +++ b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd @@ -236,7 +236,7 @@ Table 1 explains the flags and arguments. You can generate an API reference for monkeyrunner by running: </p> <pre> -monkeyrunner <format> help.py <outfile> +monkeyrunner help.py <format> <outfile> </pre> <p> The arguments are: diff --git a/docs/html/guide/market/expansion-files.jd b/docs/html/guide/market/expansion-files.jd index 01acb33fc591..36b8f9ca043e 100644 --- a/docs/html/guide/market/expansion-files.jd +++ b/docs/html/guide/market/expansion-files.jd @@ -1088,12 +1088,8 @@ android.content.res.AssetFileDescriptor}, such as some {@link android.media.Medi <dd>Most applications don't need to use this class. This class defines a {@link android.content.ContentProvider} that marshals the data from the ZIP files through a content provider {@link android.net.Uri} in order to provide file access for certain Android APIs that -expect {@link android.net.Uri} access to media files. - <p>The sample application available in the -Apk Expansion package demonstrates a scenario in which this class is useful -to specify a video with {@link android.widget.VideoView#setVideoURI -VideoView.setVideoURI()}. See the sample app's class {@code SampleZipfileProvider} for an -example of how to extend this class to use in your application.</p></dd> +expect {@link android.net.Uri} access to media files. For example, this is useful if you want to +play a video with {@link android.widget.VideoView#setVideoURI VideoView.setVideoURI()}.</p></dd> </dl> <h4>Reading from a ZIP file</h4> diff --git a/docs/html/guide/market/licensing/setting-up.jd b/docs/html/guide/market/licensing/setting-up.jd index 15214d19aa29..41e3bc49b7b5 100644 --- a/docs/html/guide/market/licensing/setting-up.jd +++ b/docs/html/guide/market/licensing/setting-up.jd @@ -177,12 +177,6 @@ href="#acct-signin">Signing in to an authorized account</a>, below.</p></li> <strong>Google APIs Add-On, API 8 (release 2) or higher</strong> includes the necessary Google Play services.</p> - -<img src="{@docRoot}images/licensing_gapis_8.png" alt=""/> -<p class="img-caption"><strong>Figure 2.</strong> Google APIs -Add-On, API 8 (release 2) or higher lets you debug and test your licensing -implementation in an emulator.</p> - <p>To set up an emulator for adding licensing to an application, follow these steps: </p> @@ -190,7 +184,7 @@ these steps: </p> <li>Launch the Android SDK Manager. </li> <li>In the <strong>Available Packages</strong> panel, select and download the SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK -repository, as shown in figure 2. +repository. <p>When the download is complete, use the Android SDK Manager to create a new AVD based on that component, described next.</p></li> <li>In the <strong>Virtual @@ -256,11 +250,11 @@ classes to check and enforce licensing.</li> <p>To download the LVL component into your development environment, use the Android SDK Manager. Launch the Android SDK Manager and then -select the "Google Market Licensing" component, as shown in figure 3. +select the "Google Market Licensing" component, as shown in figure 2. Accept the terms and click <strong>Install Selected</strong> to begin the download. </p> <img src="{@docRoot}images/licensing_package.png" alt=""/> -<p class="img-caption"><strong>Figure 3.</strong> The Licensing package contains the LVL and +<p class="img-caption"><strong>Figure 2.</strong> The Licensing package contains the LVL and the LVL sample application.</p> <p>When the download is complete, the Android SDK Manager installs both @@ -390,7 +384,7 @@ Managing Projects from Eclipse with ADT</a></p>. <img src="{@docRoot}images/licensing_add_library.png" alt=""/> -<p class="img-caption"><strong>Figure 4.</strong> If you are +<p class="img-caption"><strong>Figure 3.</strong> If you are working in Eclipse with ADT, you can add the LVL library project to your application from the application's project properties.</p> @@ -494,7 +488,7 @@ Response Codes</a> in the <a href="{@docRoot}guide/market/licensing/licensing-reference.html">Licensing Reference</a>.</p> <img src="{@docRoot}images/licensing_test_response.png" alt=""/> -<p class="img-caption"><strong>Figure 5.</strong> The Licensing +<p class="img-caption"><strong>Figure 4.</strong> The Licensing panel of your account's Edit Profile page, showing the Test Accounts field and the Test Response menu.</p> @@ -586,7 +580,7 @@ Differences in account types for testing licensing.</p> <h4 id="reg-test-acct">Registering test accounts on the publisher account</h4> <p>To get started, you need to register each test account in your publisher -account. As shown in Figure 5, you +account. As shown in Figure 4, you register test accounts in the Licensing panel of your publisher account's Edit Profile page. Simply enter the accounts as a comma-delimited list and click <strong>Save</strong> to save your profile changes.</p> diff --git a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd index 465cf542dfb1..0880614ae646 100644 --- a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd +++ b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd @@ -154,7 +154,7 @@ See the following section about <a href="#ActivityState">Activity state</a>.</p> <p>Because the activities in the back stack are never rearranged, if your application allows users to start a particular activity from more than one activity, a new instance of -that activity is created and popped onto the stack (rather than bringing any previous instance of +that activity is created and pushed onto the stack (rather than bringing any previous instance of the activity to the top). As such, one activity in your application might be instantiated multiple times (even from different tasks), as shown in figure 3. As such, if the user navigates backward using the <em>Back</em> button, each instance of the activity is revealed in the order they were @@ -291,7 +291,7 @@ B should associate with current task. If both activities define how Activity B should associate with a task, then Activity A's request (as defined in the intent) is honored over Activity B's request (as defined in its manifest).</p> -<p class="note"><strong>Note:</strong> Some the launch modes available in the manifest +<p class="note"><strong>Note:</strong> Some launch modes available for the manifest file are not available as flags for an intent and, likewise, some launch modes available as flags for an intent cannot be defined in the manifest.</p> diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd index 9788945fbed5..98968d739f12 100644 --- a/docs/html/guide/topics/manifest/manifest-element.jd +++ b/docs/html/guide/topics/manifest/manifest-element.jd @@ -37,7 +37,7 @@ parent.link=manifest-intro.html <dt>description:</dt> <dd>The root element of the AndroidManifest.xml file. It must contain an <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> element -and specify {@code xlmns:android} and {@code package} attributes.</dd> +and specify {@code xmlns:android} and {@code package} attributes.</dd> <dt>attributes:</dt> <dd> diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd index 40b5c3fd4c7b..de89568c4fc6 100644 --- a/docs/html/guide/topics/providers/content-provider-basics.jd +++ b/docs/html/guide/topics/providers/content-provider-basics.jd @@ -123,7 +123,7 @@ page.title=Content Provider Basics <!-- Intro paragraphs --> <p> - A content provider manages access to a central repository of data. The provider and + A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the data. However, content providers are primarily intended to be used by other applications, which access the provider using a provider client object. Together, providers @@ -569,7 +569,7 @@ selectionArgs[0] = mUserInput; </pre> <p> A selection clause that uses <code>?</code> as a replaceable parameter and an array of - selection arguments array are preferred way to specify a selection, even the provider isn't + selection arguments array are preferred way to specify a selection, even if the provider isn't based on an SQL database. </p> <!-- Displaying the results --> diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index 380791a08999..b33a097790f1 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -287,9 +287,8 @@ names.</p> from the SIM card in the device. For example, <code>mcc310</code> is U.S. on any carrier, <code>mcc310-mnc004</code> is U.S. on Verizon, and <code>mcc208-mnc00</code> is France on Orange.</p> - <p>If the device uses a radio connection (GSM phone), the MCC comes - from the SIM, and the MNC comes from the network to which the - device is connected.</p> + <p>If the device uses a radio connection (GSM phone), the MCC and MNC values come + from the SIM card.</p> <p>You can also use the MCC alone (for example, to include country-specific legal resources in your application). If you need to specify based on the language only, then use the <em>language and region</em> qualifier instead (discussed next). If you decide to use the MCC and diff --git a/docs/html/guide/topics/resources/string-resource.jd b/docs/html/guide/topics/resources/string-resource.jd index ecd2d48a958b..5f5484ee42bb 100644 --- a/docs/html/guide/topics/resources/string-resource.jd +++ b/docs/html/guide/topics/resources/string-resource.jd @@ -358,11 +358,14 @@ values, with non-exhaustive examples in parentheses: <pre> int count = getNumberOfsongsAvailable(); Resources res = {@link android.content.Context#getResources()}; -String songsFound = res.{@link android.content.res.Resources#getQuantityString(int,int) -getQuantityString}(R.plurals.numberOfSongsAvailable, count, count); +String songsFound = res.<a +href="{@docRoot}reference/android/content/res/Resources.html#getQuantityString(int, int, java.lang.Object...)" +>getQuantityString</a>(R.plurals.numberOfSongsAvailable, count, count); </pre> -<p>When using the {@link android.content.res.Resources#getQuantityString(int,int) -getQuantityString()} method, you need to pass the {@code count} twice if your string includes + +<p>When using the <a +href="{@docRoot}reference/android/content/res/Resources.html#getQuantityString(int, int, java.lang.Object...)">{@code +getQuantityString()}</a> method, you need to pass the {@code count} twice if your string includes <a href="#FormattingAndStyling">string formatting</a> with a number. For example, for the string {@code %d songs found}, the first {@code count} parameter selects the appropriate plural string and the second {@code count} parameter is inserted into the {@code %d} placeholder. If your plural diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd index 75a1716c1931..43903dcf735a 100644 --- a/docs/html/guide/topics/sensors/index.jd +++ b/docs/html/guide/topics/sensors/index.jd @@ -43,7 +43,7 @@ device's temperature sensor and humidity sensor to calculate and report the dewp application might use the geomagnetic field sensor and accelerometer to report a compass bearing.</p> -<p>The Android platform supports four broad categories of sensors:</p> +<p>The Android platform supports three broad categories of sensors:</p> <ul> <li>Motion sensors diff --git a/docs/html/guide/topics/ui/layout-objects.jd b/docs/html/guide/topics/ui/layout-objects.jd index 8b2792dcfdac..e251fe980b0a 100644 --- a/docs/html/guide/topics/ui/layout-objects.jd +++ b/docs/html/guide/topics/ui/layout-objects.jd @@ -163,7 +163,7 @@ refer to the ID using the syntax of a relative resource <td> <pre> <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/blue" diff --git a/docs/html/guide/topics/wireless/wifip2p.jd b/docs/html/guide/topics/wireless/wifip2p.jd index 4dd3d26e27aa..ec8e71eeb997 100644 --- a/docs/html/guide/topics/wireless/wifip2p.jd +++ b/docs/html/guide/topics/wireless/wifip2p.jd @@ -333,7 +333,7 @@ protected void onCreate(Bundle savedInstanceState){ ... mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE); mChannel = mManager.initialize(this, getMainLooper(), null); - Receiver = new WiFiDirectBroadcastReceiver(manager, channel, this); + mReceiver = new WiFiDirectBroadcastReceiver(manager, channel, this); ... } </pre> @@ -364,13 +364,13 @@ protected void onCreate(Bundle savedInstanceState){ @Override protected void onResume() { super.onResume(); - registerReceiver(receiver, intentFilter); + registerReceiver(mReceiver, mIntentFilter); } /* unregister the broadcast receiver */ @Override protected void onPause() { super.onPause(); - unregisterReceiver(receiver); + unregisterReceiver(mReceiver); } </pre> diff --git a/docs/html/images/avd-manager.png b/docs/html/images/avd-manager.png Binary files differindex c33d8a885177..fd373f96a0b6 100644 --- a/docs/html/images/avd-manager.png +++ b/docs/html/images/avd-manager.png diff --git a/docs/html/images/billing_package.png b/docs/html/images/billing_package.png Binary files differindex 951e117d4446..6e673c876197 100644 --- a/docs/html/images/billing_package.png +++ b/docs/html/images/billing_package.png diff --git a/docs/html/images/developing/avd-dialog.png b/docs/html/images/developing/avd-dialog.png Binary files differindex d0e2eec3f724..9dfbd68e8414 100644 --- a/docs/html/images/developing/avd-dialog.png +++ b/docs/html/images/developing/avd-dialog.png diff --git a/docs/html/images/developing/sdk-usb-driver.png b/docs/html/images/developing/sdk-usb-driver.png Binary files differindex 207d3d723e92..34899910d662 100644 --- a/docs/html/images/developing/sdk-usb-driver.png +++ b/docs/html/images/developing/sdk-usb-driver.png diff --git a/docs/html/images/licensing_add_library.png b/docs/html/images/licensing_add_library.png Binary files differindex 3bbe6d5c6efc..257a62845b98 100644 --- a/docs/html/images/licensing_add_library.png +++ b/docs/html/images/licensing_add_library.png diff --git a/docs/html/images/licensing_gapis_8.png b/docs/html/images/licensing_gapis_8.png Binary files differdeleted file mode 100644 index 480d98992143..000000000000 --- a/docs/html/images/licensing_gapis_8.png +++ /dev/null diff --git a/docs/html/images/licensing_package.png b/docs/html/images/licensing_package.png Binary files differindex eb2c5cfd3f2c..dc3447340cc4 100644 --- a/docs/html/images/licensing_package.png +++ b/docs/html/images/licensing_package.png diff --git a/docs/html/images/sdk_manager_packages.png b/docs/html/images/sdk_manager_packages.png Binary files differindex 19a7cb91537d..a0e81088c0e1 100644 --- a/docs/html/images/sdk_manager_packages.png +++ b/docs/html/images/sdk_manager_packages.png diff --git a/docs/html/index.jd b/docs/html/index.jd index cfd9ff14a5b9..787a655e5de4 100644 --- a/docs/html/index.jd +++ b/docs/html/index.jd @@ -12,10 +12,8 @@ page.metaDescription=The official site for Android developers. Provides the Andr </div><!-- end homeTitle --> <div id="announcement-block"> <!-- total max width is 520px --> - <a href="{@docRoot}design/index.html"> <img src="{@docRoot}images/home/play_logo.png" alt="Google Play" width="120px" style="padding:10px 52px"/> - </a> <div id="announcement" style="width:275px"> <p>Introducing <strong>Google Play</strong>: An integrated digital content destination where users buy and enjoy all of their favorite content in one place. It's the new destination for diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs index 848303751a1c..e1a5e0f2d220 100644 --- a/docs/html/resources/resources_toc.cs +++ b/docs/html/resources/resources_toc.cs @@ -99,6 +99,27 @@ </li> <li class="toggle-list"> + <div><a href="<?cs var:toroot ?>training/search/index.html"> + <span class="en">Adding Search Functionality</span> + </a> <span class="new">new!</span> + </div> + <ul> + <li><a href="<?cs var:toroot ?>training/search/setup.html"> + <span class="en">Setting up the Search Interface</span> + </a> + </li> + <li><a href="<?cs var:toroot ?>training/search/search.html"> + <span class="en">Storing and Searching for Data</span> + </a> + </li> + <li><a href="<?cs var:toroot ?>training/search/backward-compat.html"> + <span class="en">Remaining Backward Compatible</span> + </a> + </li> + </ul> + </li> + + <li class="toggle-list"> <div><a href="<?cs var:toroot ?>training/id-auth/index.html"> <span class="en">Remembering Users</span> </a></div> diff --git a/docs/html/resources/tutorials/views/hello-webview.jd b/docs/html/resources/tutorials/views/hello-webview.jd index 2d07647382d0..f6a6a7188b26 100644 --- a/docs/html/resources/tutorials/views/hello-webview.jd +++ b/docs/html/resources/tutorials/views/hello-webview.jd @@ -52,7 +52,7 @@ public void onCreate(Bundle savedInstanceState) { <li>While you're in the manifest, give some more space for web pages by removing the title bar, with the "NoTitleBar" theme: <pre> -<activity android:name=".HelloGoogleMaps" android:label="@string/app_name" +<activity android:name=".HelloWebView" android:label="@string/app_name" <strong>android:theme="@android:style/Theme.NoTitleBar"</strong>> </pre> </li> diff --git a/docs/html/sdk/android-4.0-highlights.jd b/docs/html/sdk/android-4.0-highlights.jd index 50e9a14727ae..98f467d54813 100644 --- a/docs/html/sdk/android-4.0-highlights.jd +++ b/docs/html/sdk/android-4.0-highlights.jd @@ -343,7 +343,7 @@ capabilities</strong></p> <p>The Camera app includes many new features that let users capture special moments with great photos and videos. After capturing images, they can edit and share -them easily with friemds. </p> +them easily with friends. </p> <p>When taking pictures, <strong>continuous focus</strong>, <strong>zero shutter lag exposure</strong>, and decreased shot-to-shot speed help capture clear, diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd index 2bd031ebb8b3..6869d7465f3d 100644 --- a/docs/html/sdk/win-usb.jd +++ b/docs/html/sdk/win-usb.jd @@ -147,7 +147,7 @@ for the T-Mobile G1 and myTouch 3G (and similar devices).</p></dt> <h2 id="WinUsbDriver">Downloading the Google USB Driver</h2> -<div class="figure" style="width:498px;margin:0"> +<div class="figure" style="width:536px;margin:0"> <img src="{@docRoot}images/developing/sdk-usb-driver.png" alt="" /> <p class="img-caption"><strong>Figure 1.</strong> The SDK and AVD Manager with the Google USB Driver selected.</p> diff --git a/docs/html/training/monitoring-device-state/docking-monitoring.jd b/docs/html/training/monitoring-device-state/docking-monitoring.jd index 392ce30d2ba7..82d655e6d0ef 100644 --- a/docs/html/training/monitoring-device-state/docking-monitoring.jd +++ b/docs/html/training/monitoring-device-state/docking-monitoring.jd @@ -15,7 +15,7 @@ next.link=connectivity-monitoring.html <h2>This lesson teaches you to</h2> <ol> - <li><a href="#CurrentDockState">Request the Audio Focus</a></li> + <li><a href="#CurrentDockState">Determine the Current Docking State</a></li> <li><a href="#DockType">Determine the Current Dock Type</a></li> <li><a href="#MonitorDockState">Monitor for Changes in the Dock State or Type</a></li> </ol> diff --git a/docs/html/training/search/backward-compat.jd b/docs/html/training/search/backward-compat.jd new file mode 100644 index 000000000000..0894fa98e10f --- /dev/null +++ b/docs/html/training/search/backward-compat.jd @@ -0,0 +1,87 @@ +page.title=Remaining Backward Compatible +trainingnavtop=true +previous.title=Storing and Searching for Data +previous.link=search.html + +@jd:body + + <div id="tb-wrapper"> + <div id="tb"> + <h2>This lesson teaches you to</h2> + + <ul> + <li><a href="{@docRoot}training/search/backward-compat.html#set-sdk">Set Minimum + and Target API levels</a></li> + + <li><a href="{@docRoot}training/search/backward-compat.html#provide-sd">Provide the Search + Dialog for Older Devices</a></li> + + <li><a href="{@docRoot}training/search/backward-compat.html#check-ver">Check the Android Build + Version at Runtime</a></li> + </ul> + </div> + </div> + + <p>The {@link android.widget.SearchView} and action bar are only available on Android 3.0 and + later. To support older platforms, you can fall back to the search dialog. The search dialog is a + system provided UI that overlays on top of your application when invoked.</p> + + <h2 id="set-sdk">Set Minimum and Target API levels</h2> + + <p>To setup the search dialog, first declare in your manifest that you want to support older + devices, but want to target Android 3.0 or later versions. When you do this, your application + automatically uses the action bar on Android 3.0 or later and uses the traditional menu system on + older devices:</p> + <pre> +<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" /> + +<application> +... +</pre> + + <h2 id="provide-sd">Provide the Search Dialog for Older Devices</h2> + + <p>To invoke the search dialog on older devices, call {@link + android.app.Activity#onSearchRequested onSearchRequested()} whenever a user selects the search + menu item from the options menu. Because Android 3.0 and higher devices show the + {@link android.widget.SearchView} in the action bar (as demonstrated in the first lesson), only versions + older than 3.0 call {@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} when the + user selects the search menu item. + </p> + <pre> +@Override +public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case R.id.search: + onSearchRequested(); + return true; + default: + return false; + } +} +</pre> + + <h2 id="check-ver">Check the Android Build Version at Runtime</h2> + + <p>At runtime, check the device version to make sure an unsupported use of {@link + android.widget.SearchView} does not occur on older devices. In our example code, this happens in + the {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method:</p> + <pre> +@Override +public boolean onCreateOptionsMenu(Menu menu) { + + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.options_menu, menu); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + SearchManager searchManager = + (SearchManager) getSystemService(Context.SEARCH_SERVICE); + SearchView searchView = + (SearchView) menu.findItem(R.id.search).getActionView(); + searchView.setSearchableInfo( + searchManager.getSearchableInfo(getComponentName())); + searchView.setIconifiedByDefault(false); + } + return true; +} +</pre> diff --git a/docs/html/training/search/index.jd b/docs/html/training/search/index.jd new file mode 100644 index 000000000000..bfd16187c4b3 --- /dev/null +++ b/docs/html/training/search/index.jd @@ -0,0 +1,53 @@ +page.title=Adding Search Functionality +trainingnavtop=true +startpage=true +next.title=Setting Up the Search Interface +next.link=setup.html + +@jd:body + + <div id="tb-wrapper"> + <div id="tb"> + <h2>Dependencies and prerequisites</h2> + + <ul> + <li>Android 3.0 or later (with some support for Android 2.1)</li> + + <li>Experience building an Android <a href="{@docRoot}guide/topics/ui/index.html">User + Interface</a></li> + </ul> + + <h2>You should also read</h2> + + <ul> + <li><a href="{@docRoot}guide/topics/search/index.html">Search</a></li> + + <li><a href="{@docRoot}resources/samples/SearchableDictionary/index.html">Searchable + Dictionary Sample App</a></li> + </ul> + </div> + </div> + + <p>Android's built-in search features offer apps an easy way to provide a + consistent search experience for all users. There are two ways to implement search in your app + depending on the version of Android that is running on the device. This class covers how to add + search with {@link android.widget.SearchView}, which was introduced in Android 3.0, while + maintaining backward compatibility with older versions of Android by using the default search + dialog provided by the system.</p> + + <h2>Lessons</h2> + + <dl> + <dt><b><a href="setup.html">Setting Up the Search Interface</a></b></dt> + + <dd>Learn how to add a search interface to your app and how to configure an activity to handle + search queries.</dd> + + <dt><b><a href="search.html">Storing and Searching for Data</a></b></dt> + + <dd>Learn a simple way to store and search for data in a SQLite virtual database table.</dd> + + <dt><b><a href="backward-compat.html">Remaining Backward Compatible</a></b></dt> + + <dd>Learn how to keep search features backward compatible with older devices by using.</dd> + </dl>
\ No newline at end of file diff --git a/docs/html/training/search/search.jd b/docs/html/training/search/search.jd new file mode 100644 index 000000000000..17e7640cf7a1 --- /dev/null +++ b/docs/html/training/search/search.jd @@ -0,0 +1,217 @@ +page.title=Storing and Searching for Data +trainingnavtop=true +previous.title=Setting Up the Search Interface +previous.link=setup.html +next.title=Remaining Backward Compatible +next.link=backward-compat.html + +@jd:body + + <div id="tb-wrapper"> + <div id="tb"> + <h2>This lesson teaches you to</h2> + + <ul> + <li><a href="{@docRoot}training/search/search.html#create">Create the Virtual + Table</a></li> + + <li><a href="{@docRoot}training/search/search.html#populate">Populate the Virtual + Table</a></li> + + <li><a href="{@docRoot}training/search/search.html#search">Search for the Query</a></li> + </ul> + </div> + </div> + + <p>There are many ways to store your data, such as in an online database, in a local SQLite + database, or even in a text file. It is up to you to decide what is the best solution for your + application. This lesson shows you how to create a SQLite virtual table that can provide robust + full-text searching. The table is populated with data from a text file that contains a word and + definition pair on each line in the file.</p> + + <h2 id="create">Create the Virtual Table</h2> + + <p>A virtual table behaves similarly to a SQLite table, but reads and writes to an object in + memory via callbacks, instead of to a database file. To create a virtual table, create a class + for the table:</p> + <pre> +public class DatabaseTable { + private final DatabaseOpenHelper mDatabaseOpenHelper; + + public DatabaseTable(Context context) { + mDatabaseOpenHelper = new DatabaseOpenHelper(context); + } +} +</pre> + + <p>Create an inner class in <code>DatabaseTable</code> that extends {@link + android.database.sqlite.SQLiteOpenHelper}. The {@link android.database.sqlite.SQLiteOpenHelper} class + defines abstract methods that you must override so that your database table can be created and + upgraded when necessary. For example, here is some code that declares a database table that will + contain words for a dictionary app:</p> + <pre> +public class DatabaseTable { + + private static final String TAG = "DictionaryDatabase"; + + //The columns we'll include in the dictionary table + public static final String COL_WORD = "WORD"; + public static final String COL_DEFINITION = "DEFINITION"; + + private static final String DATABASE_NAME = "DICTIONARY"; + private static final String FTS_VIRTUAL_TABLE = "FTS"; + private static final int DATABASE_VERSION = 1; + + private final DatabaseOpenHelper mDatabaseOpenHelper; + + public DatabaseTable(Context context) { + mDatabaseOpenHelper = new DatabaseOpenHelper(context); + } + + private static class DatabaseOpenHelper extends SQLiteOpenHelper { + + private final Context mHelperContext; + private SQLiteDatabase mDatabase; + + private static final String FTS_TABLE_CREATE = + "CREATE VIRTUAL TABLE " + FTS_VIRTUAL_TABLE + + " USING fts3 (" + + COL_WORD + ", " + + COL_DEFINITION + ")"; + + DatabaseOpenHelper(Context context) { + super(context, DATABASE_NAME, null, DATABASE_VERSION); + mHelperContext = context; + } + + @Override + public void onCreate(SQLiteDatabase db) { + mDatabase = db; + mDatabase.execSQL(FTS_TABLE_CREATE); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + Log.w(TAG, "Upgrading database from version " + oldVersion + " to " + + newVersion + ", which will destroy all old data"); + db.execSQL("DROP TABLE IF EXISTS " + FTS_VIRTUAL_TABLE); + onCreate(db); + } + } +} +</pre> + + <h2 id="populate">Populate the Virtual Table</h2> + + <p>The table now needs data to store. The following code shows you how to read a text file + (located in <code>res/raw/definitions.txt</code>) that contains words and their definitions, how + to parse that file, and how to insert each line of that file as a row in the virtual table. This + is all done in another thread to prevent the UI from locking. Add the following code to your + <code>DatabaseOpenHelper</code> inner class.</p> + + <p class="note"><strong>Tip:</strong> You also might want to set up a callback to notify your UI + activity of this thread's completion.</p> + <pre> +private void loadDictionary() { + new Thread(new Runnable() { + public void run() { + try { + loadWords(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + }).start(); + } + +private void loadWords() throws IOException { + final Resources resources = mHelperContext.getResources(); + InputStream inputStream = resources.openRawResource(R.raw.definitions); + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); + + try { + String line; + while ((line = reader.readLine()) != null) { + String[] strings = TextUtils.split(line, "-"); + if (strings.length < 2) continue; + long id = addWord(strings[0].trim(), strings[1].trim()); + if (id < 0) { + Log.e(TAG, "unable to add word: " + strings[0].trim()); + } + } + } finally { + reader.close(); + } +} + +public long addWord(String word, String definition) { + ContentValues initialValues = new ContentValues(); + initialValues.put(COL_WORD, word); + initialValues.put(COL_DEFINITION, definition); + + return mDatabase.insert(FTS_VIRTUAL_TABLE, null, initialValues); +} +</pre> + + <p>Call the <code>loadDictionary()</code> method wherever appropriate to populate the table. A + good place would be in the {@link android.database.sqlite.SQLiteOpenHelper#onCreate onCreate()} + method of the <code>DatabaseOpenHelper</code> class, right after you create the table:</p> + <pre> +@Override +public void onCreate(SQLiteDatabase db) { + mDatabase = db; + mDatabase.execSQL(FTS_TABLE_CREATE); + loadDictionary(); +} +</pre> + + <h2 id="search">Search for the Query</h2> + + <p>When you have the virtual table created and populated, use the query supplied by your {@link + android.widget.SearchView} to search the data. Add the following methods to the + <code>DatabaseTable</code> class to build a SQL statement that searches for the query:</p> + <pre> +public Cursor getWordMatches(String query, String[] columns) { + String selection = COL_WORD + " MATCH ?"; + String[] selectionArgs = new String[] {query+"*"}; + + return query(selection, selectionArgs, columns); +} + +private Cursor query(String selection, String[] selectionArgs, String[] columns) { + SQLiteQueryBuilder builder = new SQLiteQueryBuilder(); + builder.setTables(FTS_VIRTUAL_TABLE); + + Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(), + columns, selection, selectionArgs, null, null, null); + + if (cursor == null) { + return null; + } else if (!cursor.moveToFirst()) { + cursor.close(); + return null; + } + return cursor; +} +</pre> + + <p>Search for a query by calling <code>getWordMatches()</code>. Any matching results are returned + in a {@link android.database.Cursor} that you can iterate through or use to build a {@link android.widget.ListView}. + This example calls <code>getWordMatches()</code> in the <code>handleIntent()</code> method of the searchable + activity. Remember that the searchable activity receives the query inside of the {@link + android.content.Intent#ACTION_SEARCH} intent as an extra, because of the intent filter that you + previously created:</p> + <pre> +DatabaseTable db = new DatabaseTable(this); + +... + +private void handleIntent(Intent intent) { + + if (Intent.ACTION_SEARCH.equals(intent.getAction())) { + String query = intent.getStringExtra(SearchManager.QUERY); + Cursor c = db.getWordMatches(query, null); + //process Cursor and display results + } +} +</pre>
\ No newline at end of file diff --git a/docs/html/training/search/setup.jd b/docs/html/training/search/setup.jd new file mode 100644 index 000000000000..044e422fe6a6 --- /dev/null +++ b/docs/html/training/search/setup.jd @@ -0,0 +1,197 @@ +page.title=Setting Up the Search Interface +trainingnavtop=true +next.title=Storing and Searching for Data +next.link=search.html + +@jd:body + + <div id="tb-wrapper"> + <div id="tb"> + <h2>This lesson teaches you to</h2> + + <ul> + <li><a href="{@docRoot}training/search/setup.html#add-sv">Add the Search View to the Action + Bar</a></li> + + <li><a href="{@docRoot}training/search/setup.html#create-sc">Create a Searchable + Configuration</a></li> + + <li><a href="{@docRoot}training/search/setup.html#create-sa">Create a Searchable + Activity</a></li> + </ul> + + <h2>You should also read:</h2> + + <ul> + <li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a></li> + </ul> + </div> + </div> + + <p>Beginning in Android 3.0, using the {@link android.widget.SearchView} widget as an item in + the action bar is the preferred way to provide search in your app. Like with all items in + the action bar, you can define the {@link android.widget.SearchView} to show at all times, only + when there is room, or as a collapsible action, which displays the {@link + android.widget.SearchView} as an icon initially, then takes up the entire action bar as a search + field when the user clicks the icon.</p> + + <p class="note"><strong>Note:</strong> Later in this class, you will learn how to make your + app compatible down to Android 2.1 (API level 7) for devices that do not support + {@link android.widget.SearchView}.</p> + + <h2 id="add-sv">Add the Search View to the Action Bar</h2> + + <p>To add a {@link android.widget.SearchView} widget to the action bar, create a file named + <code>res/menu/options_menu.xml</code> in your project and add the following code to the file. + This code defines how to create the search item, such as the icon to use and the title of the + item. The <code>collapseActionView</code> attribute allows your {@link android.widget.SearchView} + to expand to take up the whole action bar and collapse back down into a + normal action bar item when not in use. Because of the limited action bar space on handset devices, + using the <code>collapsibleActionView</code> attribute is recommended to provide a better + user experience.</p> + <pre> +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/search" + android:title="@string/search_title" + android:icon="@drawable/ic_search" + android:showAsAction="collapseActionView|ifRoom" + android:actionViewClass="android.widget.SearchView" /> +</menu> +</pre> + + <p class="note"><strong>Note:</strong> If you already have an existing XML file for your menu + items, you can add the <code><item></code> element to that file instead.</p> + + <p>To display the {@link android.widget.SearchView} in the action bar, inflate the XML menu + resource (<code>res/menu/options_menu.xml</code>) in the {@link + android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method of your activity:</p> + <pre> +@Override +public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.options_menu, menu); + + return true; +} +</pre> + + <p>If you run your app now, the {@link android.widget.SearchView} appears in your app's action + bar, but it isn't functional. You now need to define <em>how</em> the {@link + android.widget.SearchView} behaves.</p> + + <h2 id="create-sc">Create a Searchable Configuration</h2> + + <p>A <a href="http://developer.android.com/guide/topics/search/searchable-config.html">searchable + configuration</a> defines how the {@link android.widget.SearchView} behaves and is defined in a + <code>res/xml/searchable.xml</code> file. At a minimum, a searchable configuration must contain + an <code>android:label</code> attribute that has the same value as the + <code>android:label</code> attribute of the <a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> or + <a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a> element in your Android manifest. + However, we also recommend adding an <code>android:hint</code> attribute to give the user an idea of what to enter into the search + box:</p> + <pre> +<?xml version="1.0" encoding="utf-8"?> + +<searchable xmlns:android="http://schemas.android.com/apk/res/android" + android:label="@string/app_name" + android:hint="@string/search_hint" /> +</pre> + + <p>In your application's manifest file, declare a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"> + <code><meta-data></code></a> element that points to the <code>res/xml/searchable.xml</code> file, + so that your application knows where to find it. Declare the element in an <code><activity></code> + that you want to display the {@link android.widget.SearchView} in:</p> + <pre> +<activity ... > + ... + <meta-data android:name="android.app.searchable" + android:resource="@xml/searchable" /> + +</activity> +</pre> + + <p>In the {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method that you + created before, associate the searchable configuration with the {@link android.widget.SearchView} + by calling {@link android.widget.SearchView#setSearchableInfo}:</p> + <pre> +@Override +public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.options_menu, menu); + + // Associate searchable configuration with the SearchView + SearchManager searchManager = + (SearchManager) getSystemService(Context.SEARCH_SERVICE); + SearchView searchView = + (SearchView) menu.findItem(R.id.search).getActionView(); + searchView.setSearchableInfo( + searchManager.getSearchableInfo(getComponentName())); + + return true; +} +</pre> + + <p>The call to {@link android.app.SearchManager#getSearchableInfo getSearchableInfo()} obtains a + {@link android.app.SearchableInfo} object that is created from the searchable configuration XML + file. When the searchable configuration is correctly associated with your {@link + android.widget.SearchView}, the {@link android.widget.SearchView} starts an activity with the + {@link android.content.Intent#ACTION_SEARCH} intent when a user submits a query. You now need an + activity that can filter for this intent and handle the search query.</p> + + <h2 id="create-sa">Create a Searchable Activity</h2> + + <p>A {@link android.widget.SearchView} tries to start an activity with the {@link + android.content.Intent#ACTION_SEARCH} when a user submits a search query. A searchable activity + filters for the {@link android.content.Intent#ACTION_SEARCH} intent and searches for the query in + some sort of data set. To create a searchable activity, declare an activity of your choice to + filter for the {@link android.content.Intent#ACTION_SEARCH} intent:</p> + <pre> +<activity android:name=".SearchResultsActivity" ... > + ... + <intent-filter> + <action android:name="android.intent.action.SEARCH" /> + </intent-filter> + ... +</activity> +</pre> + + <p>In your searchable activity, handle the {@link android.content.Intent#ACTION_SEARCH} intent by + checking for it in your {@link android.app.Activity#onCreate onCreate()} method.</p> + + <p class="note"><strong>Note:</strong> If your searchable activity launches in single top mode + (<code>android:launchMode="singleTop"</code>), also handle the {@link + android.content.Intent#ACTION_SEARCH} intent in the {@link android.app.Activity#onNewIntent + onNewIntent()} method. In single top mode, only one instance of your activity is created and + subsequent calls to start your activity do not create a new activity on the + stack. This launch mode is useful so users can perform searches from the same activity + without creating a new activity instance every time.</p> + <pre> +public class SearchResultsActivity extends Activity { + + @Override + public void onCreate(Bundle savedInstanceState) { + ... + handleIntent(getIntent()); + } + + @Override + protected void onNewIntent(Intent intent) { + ... + handleIntent(intent); + } + + private void handleIntent(Intent intent) { + + if (Intent.ACTION_SEARCH.equals(intent.getAction())) { + String query = intent.getStringExtra(SearchManager.QUERY); + //use the query to search your data somehow + } + } + ... +} +</pre> + + <p>If you run your app now, the {@link android.widget.SearchView} can accept the user's query and + start your searchable activity with the {@link android.content.Intent#ACTION_SEARCH} intent. It + is now up to you to figure out how to store and search your data given a query.</p>
\ No newline at end of file diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h deleted file mode 100644 index 7edf6b4562ff..000000000000 --- a/include/camera/CameraParameters.h +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H -#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H - -#include <utils/KeyedVector.h> -#include <utils/String8.h> - -namespace android { - -struct Size { - int width; - int height; - - Size() { - width = 0; - height = 0; - } - - Size(int w, int h) { - width = w; - height = h; - } -}; - -class CameraParameters -{ -public: - CameraParameters(); - CameraParameters(const String8 ¶ms) { unflatten(params); } - ~CameraParameters(); - - String8 flatten() const; - void unflatten(const String8 ¶ms); - - void set(const char *key, const char *value); - void set(const char *key, int value); - void setFloat(const char *key, float value); - const char *get(const char *key) const; - int getInt(const char *key) const; - float getFloat(const char *key) const; - - void remove(const char *key); - - void setPreviewSize(int width, int height); - void getPreviewSize(int *width, int *height) const; - void getSupportedPreviewSizes(Vector<Size> &sizes) const; - - // Set the dimensions in pixels to the given width and height - // for video frames. The given width and height must be one - // of the supported dimensions returned from - // getSupportedVideoSizes(). Must not be called if - // getSupportedVideoSizes() returns an empty Vector of Size. - void setVideoSize(int width, int height); - // Retrieve the current dimensions (width and height) - // in pixels for video frames, which must be one of the - // supported dimensions returned from getSupportedVideoSizes(). - // Must not be called if getSupportedVideoSizes() returns an - // empty Vector of Size. - void getVideoSize(int *width, int *height) const; - // Retrieve a Vector of supported dimensions (width and height) - // in pixels for video frames. If sizes returned from the method - // is empty, the camera does not support calls to setVideoSize() - // or getVideoSize(). In adddition, it also indicates that - // the camera only has a single output, and does not have - // separate output for video frames and preview frame. - void getSupportedVideoSizes(Vector<Size> &sizes) const; - // Retrieve the preferred preview size (width and height) in pixels - // for video recording. The given width and height must be one of - // supported preview sizes returned from getSupportedPreviewSizes(). - // Must not be called if getSupportedVideoSizes() returns an empty - // Vector of Size. If getSupportedVideoSizes() returns an empty - // Vector of Size, the width and height returned from this method - // is invalid, and is "-1x-1". - void getPreferredPreviewSizeForVideo(int *width, int *height) const; - - void setPreviewFrameRate(int fps); - int getPreviewFrameRate() const; - void getPreviewFpsRange(int *min_fps, int *max_fps) const; - void setPreviewFormat(const char *format); - const char *getPreviewFormat() const; - void setPictureSize(int width, int height); - void getPictureSize(int *width, int *height) const; - void getSupportedPictureSizes(Vector<Size> &sizes) const; - void setPictureFormat(const char *format); - const char *getPictureFormat() const; - - void dump() const; - status_t dump(int fd, const Vector<String16>& args) const; - - // Parameter keys to communicate between camera application and driver. - // The access (read/write, read only, or write only) is viewed from the - // perspective of applications, not driver. - - // Preview frame size in pixels (width x height). - // Example value: "480x320". Read/Write. - static const char KEY_PREVIEW_SIZE[]; - // Supported preview frame sizes in pixels. - // Example value: "800x600,480x320". Read only. - static const char KEY_SUPPORTED_PREVIEW_SIZES[]; - // The current minimum and maximum preview fps. This controls the rate of - // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and - // maximum fps must be one of the elements from - // KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter. - // Example value: "10500,26623" - static const char KEY_PREVIEW_FPS_RANGE[]; - // The supported preview fps (frame-per-second) ranges. Each range contains - // a minimum fps and maximum fps. If minimum fps equals to maximum fps, the - // camera outputs frames in fixed frame rate. If not, the camera outputs - // frames in auto frame rate. The actual frame rate fluctuates between the - // minimum and the maximum. The list has at least one element. The list is - // sorted from small to large (first by maximum fps and then minimum fps). - // Example value: "(10500,26623),(15000,26623),(30000,30000)" - static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[]; - // The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in - // frameworks/base/include/camera/Camera.h. - // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read/write. - static const char KEY_PREVIEW_FORMAT[]; - // Supported image formats for preview frames. - // Example value: "yuv420sp,yuv422i-yuyv". Read only. - static const char KEY_SUPPORTED_PREVIEW_FORMATS[]; - // Number of preview frames per second. This is the target frame rate. The - // actual frame rate depends on the driver. - // Example value: "15". Read/write. - static const char KEY_PREVIEW_FRAME_RATE[]; - // Supported number of preview frames per second. - // Example value: "24,15,10". Read. - static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[]; - // The dimensions for captured pictures in pixels (width x height). - // Example value: "1024x768". Read/write. - static const char KEY_PICTURE_SIZE[]; - // Supported dimensions for captured pictures in pixels. - // Example value: "2048x1536,1024x768". Read only. - static const char KEY_SUPPORTED_PICTURE_SIZES[]; - // The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE - // in frameworks/base/include/camera/Camera.h. - // Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write. - static const char KEY_PICTURE_FORMAT[]; - // Supported image formats for captured pictures. - // Example value: "jpeg,rgb565". Read only. - static const char KEY_SUPPORTED_PICTURE_FORMATS[]; - // The width (in pixels) of EXIF thumbnail in Jpeg picture. - // Example value: "512". Read/write. - static const char KEY_JPEG_THUMBNAIL_WIDTH[]; - // The height (in pixels) of EXIF thumbnail in Jpeg picture. - // Example value: "384". Read/write. - static const char KEY_JPEG_THUMBNAIL_HEIGHT[]; - // Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail - // in EXIF. - // Example value: "512x384,320x240,0x0". Read only. - static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[]; - // The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100, - // with 100 being the best. - // Example value: "90". Read/write. - static const char KEY_JPEG_THUMBNAIL_QUALITY[]; - // Jpeg quality of captured picture. The range is 1 to 100, with 100 being - // the best. - // Example value: "90". Read/write. - static const char KEY_JPEG_QUALITY[]; - // The rotation angle in degrees relative to the orientation of the camera. - // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The - // camera driver may set orientation in the EXIF header without rotating the - // picture. Or the driver may rotate the picture and the EXIF thumbnail. If - // the Jpeg picture is rotated, the orientation in the EXIF header will be - // missing or 1 (row #0 is top and column #0 is left side). - // - // Note that the JPEG pictures of front-facing cameras are not mirrored - // as in preview display. - // - // For example, suppose the natural orientation of the device is portrait. - // The device is rotated 270 degrees clockwise, so the device orientation is - // 270. Suppose a back-facing camera sensor is mounted in landscape and the - // top side of the camera sensor is aligned with the right edge of the - // display in natural orientation. So the camera orientation is 90. The - // rotation should be set to 0 (270 + 90). - // - // Example value: "0" or "90" or "180" or "270". Write only. - static const char KEY_ROTATION[]; - // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in - // JPEG EXIF header. - // Example value: "25.032146" or "-33.462809". Write only. - static const char KEY_GPS_LATITUDE[]; - // GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored - // in JPEG EXIF header. - // Example value: "121.564448" or "-70.660286". Write only. - static const char KEY_GPS_LONGITUDE[]; - // GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF - // header. - // Example value: "21.0" or "-5". Write only. - static const char KEY_GPS_ALTITUDE[]; - // GPS timestamp (UTC in seconds since January 1, 1970). This should be - // stored in JPEG EXIF header. - // Example value: "1251192757". Write only. - static const char KEY_GPS_TIMESTAMP[]; - // GPS Processing Method - // Example value: "GPS" or "NETWORK". Write only. - static const char KEY_GPS_PROCESSING_METHOD[]; - // Current white balance setting. - // Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write. - static const char KEY_WHITE_BALANCE[]; - // Supported white balance settings. - // Example value: "auto,incandescent,daylight". Read only. - static const char KEY_SUPPORTED_WHITE_BALANCE[]; - // Current color effect setting. - // Example value: "none" or EFFECT_XXX constants. Read/write. - static const char KEY_EFFECT[]; - // Supported color effect settings. - // Example value: "none,mono,sepia". Read only. - static const char KEY_SUPPORTED_EFFECTS[]; - // Current antibanding setting. - // Example value: "auto" or ANTIBANDING_XXX constants. Read/write. - static const char KEY_ANTIBANDING[]; - // Supported antibanding settings. - // Example value: "auto,50hz,60hz,off". Read only. - static const char KEY_SUPPORTED_ANTIBANDING[]; - // Current scene mode. - // Example value: "auto" or SCENE_MODE_XXX constants. Read/write. - static const char KEY_SCENE_MODE[]; - // Supported scene mode settings. - // Example value: "auto,night,fireworks". Read only. - static const char KEY_SUPPORTED_SCENE_MODES[]; - // Current flash mode. - // Example value: "auto" or FLASH_MODE_XXX constants. Read/write. - static const char KEY_FLASH_MODE[]; - // Supported flash modes. - // Example value: "auto,on,off". Read only. - static const char KEY_SUPPORTED_FLASH_MODES[]; - // Current focus mode. This will not be empty. Applications should call - // CameraHardwareInterface.autoFocus to start the focus if focus mode is - // FOCUS_MODE_AUTO or FOCUS_MODE_MACRO. - // Example value: "auto" or FOCUS_MODE_XXX constants. Read/write. - static const char KEY_FOCUS_MODE[]; - // Supported focus modes. - // Example value: "auto,macro,fixed". Read only. - static const char KEY_SUPPORTED_FOCUS_MODES[]; - // The maximum number of focus areas supported. This is the maximum length - // of KEY_FOCUS_AREAS. - // Example value: "0" or "2". Read only. - static const char KEY_MAX_NUM_FOCUS_AREAS[]; - // Current focus areas. - // - // Before accessing this parameter, apps should check - // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas - // first. If the value is 0, focus area is not supported. - // - // Each focus area is a five-element int array. The first four elements are - // the rectangle of the area (left, top, right, bottom). The direction is - // relative to the sensor orientation, that is, what the sensor sees. The - // direction is not affected by the rotation or mirroring of - // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000. - // (-1000,-1000) is the upper left point. (1000, 1000) is the lower right - // point. The width and height of focus areas cannot be 0 or negative. - // - // The fifth element is the weight. Values for weight must range from 1 to - // 1000. The weight should be interpreted as a per-pixel weight - all - // pixels in the area have the specified weight. This means a small area - // with the same weight as a larger area will have less influence on the - // focusing than the larger area. Focus areas can partially overlap and the - // driver will add the weights in the overlap region. - // - // A special case of single focus area (0,0,0,0,0) means driver to decide - // the focus area. For example, the driver may use more signals to decide - // focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they - // want the driver to decide focus areas. - // - // Focus areas are relative to the current field of view (KEY_ZOOM). No - // matter what the zoom level is, (-1000,-1000) represents the top of the - // currently visible camera frame. The focus area cannot be set to be - // outside the current field of view, even when using zoom. - // - // Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO, - // FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or - // FOCUS_MODE_CONTINUOUS_PICTURE. - // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write. - static const char KEY_FOCUS_AREAS[]; - // Focal length in millimeter. - // Example value: "4.31". Read only. - static const char KEY_FOCAL_LENGTH[]; - // Horizontal angle of view in degrees. - // Example value: "54.8". Read only. - static const char KEY_HORIZONTAL_VIEW_ANGLE[]; - // Vertical angle of view in degrees. - // Example value: "42.5". Read only. - static const char KEY_VERTICAL_VIEW_ANGLE[]; - // Exposure compensation index. 0 means exposure is not adjusted. - // Example value: "0" or "5". Read/write. - static const char KEY_EXPOSURE_COMPENSATION[]; - // The maximum exposure compensation index (>=0). - // Example value: "6". Read only. - static const char KEY_MAX_EXPOSURE_COMPENSATION[]; - // The minimum exposure compensation index (<=0). - // Example value: "-6". Read only. - static const char KEY_MIN_EXPOSURE_COMPENSATION[]; - // The exposure compensation step. Exposure compensation index multiply by - // step eqals to EV. Ex: if exposure compensation index is 6 and step is - // 0.3333, EV is -2. - // Example value: "0.333333333" or "0.5". Read only. - static const char KEY_EXPOSURE_COMPENSATION_STEP[]; - // The state of the auto-exposure lock. "true" means that - // auto-exposure is locked to its current value and will not - // change. "false" means the auto-exposure routine is free to - // change exposure values. If auto-exposure is already locked, - // setting this to true again has no effect (the driver will not - // recalculate exposure values). Changing exposure compensation - // settings will still affect the exposure settings while - // auto-exposure is locked. Stopping preview or taking a still - // image will not change the lock. In conjunction with - // exposure compensation, this allows for capturing multi-exposure - // brackets with known relative exposure values. Locking - // auto-exposure after open but before the first call to - // startPreview may result in severely over- or under-exposed - // images. The driver will not change the AE lock after - // auto-focus completes. - static const char KEY_AUTO_EXPOSURE_LOCK[]; - // Whether locking the auto-exposure is supported. "true" means it is, and - // "false" or this key not existing means it is not supported. - static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[]; - // The state of the auto-white balance lock. "true" means that - // auto-white balance is locked to its current value and will not - // change. "false" means the auto-white balance routine is free to - // change white balance values. If auto-white balance is already - // locked, setting this to true again has no effect (the driver - // will not recalculate white balance values). Stopping preview or - // taking a still image will not change the lock. In conjunction - // with exposure compensation, this allows for capturing - // multi-exposure brackets with fixed white balance. Locking - // auto-white balance after open but before the first call to - // startPreview may result in severely incorrect color. The - // driver will not change the AWB lock after auto-focus - // completes. - static const char KEY_AUTO_WHITEBALANCE_LOCK[]; - // Whether locking the auto-white balance is supported. "true" - // means it is, and "false" or this key not existing means it is - // not supported. - static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[]; - - // The maximum number of metering areas supported. This is the maximum - // length of KEY_METERING_AREAS. - // Example value: "0" or "2". Read only. - static const char KEY_MAX_NUM_METERING_AREAS[]; - // Current metering areas. Camera driver uses these areas to decide - // exposure. - // - // Before accessing this parameter, apps should check - // KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering - // areas first. If the value is 0, metering area is not supported. - // - // Each metering area is a rectangle with specified weight. The direction is - // relative to the sensor orientation, that is, what the sensor sees. The - // direction is not affected by the rotation or mirroring of - // CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range - // from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000) - // is the lower right point. The width and height of metering areas cannot - // be 0 or negative. - // - // The fifth element is the weight. Values for weight must range from 1 to - // 1000. The weight should be interpreted as a per-pixel weight - all - // pixels in the area have the specified weight. This means a small area - // with the same weight as a larger area will have less influence on the - // metering than the larger area. Metering areas can partially overlap and - // the driver will add the weights in the overlap region. - // - // A special case of all-zero single metering area means driver to decide - // the metering area. For example, the driver may use more signals to decide - // metering areas and change them dynamically. Apps can set all-zero if they - // want the driver to decide metering areas. - // - // Metering areas are relative to the current field of view (KEY_ZOOM). - // No matter what the zoom level is, (-1000,-1000) represents the top of the - // currently visible camera frame. The metering area cannot be set to be - // outside the current field of view, even when using zoom. - // - // No matter what metering areas are, the final exposure are compensated - // by KEY_EXPOSURE_COMPENSATION. - // Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write. - static const char KEY_METERING_AREAS[]; - // Current zoom value. - // Example value: "0" or "6". Read/write. - static const char KEY_ZOOM[]; - // Maximum zoom value. - // Example value: "6". Read only. - static const char KEY_MAX_ZOOM[]; - // The zoom ratios of all zoom values. The zoom ratio is in 1/100 - // increments. Ex: a zoom of 3.2x is returned as 320. The number of list - // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last - // element is the zoom ratio of zoom value KEY_MAX_ZOOM. - // Example value: "100,150,200,250,300,350,400". Read only. - static const char KEY_ZOOM_RATIOS[]; - // Whether zoom is supported. Zoom is supported if the value is "true". Zoom - // is not supported if the value is not "true" or the key does not exist. - // Example value: "true". Read only. - static const char KEY_ZOOM_SUPPORTED[]; - // Whether if smooth zoom is supported. Smooth zoom is supported if the - // value is "true". It is not supported if the value is not "true" or the - // key does not exist. - // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and - // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h. - // Example value: "true". Read only. - static const char KEY_SMOOTH_ZOOM_SUPPORTED[]; - - // The distances (in meters) from the camera to where an object appears to - // be in focus. The object is sharpest at the optimal focus distance. The - // depth of field is the far focus distance minus near focus distance. - // - // Focus distances may change after starting auto focus, canceling auto - // focus, or starting the preview. Applications can read this anytime to get - // the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS, - // focus distances may change from time to time. - // - // This is intended to estimate the distance between the camera and the - // subject. After autofocus, the subject distance may be within near and far - // focus distance. However, the precision depends on the camera hardware, - // autofocus algorithm, the focus area, and the scene. The error can be - // large and it should be only used as a reference. - // - // Far focus distance > optimal focus distance > near focus distance. If - // the far focus distance is infinity, the value should be "Infinity" (case - // sensitive). The format is three float values separated by commas. The - // first is near focus distance. The second is optimal focus distance. The - // third is far focus distance. - // Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only. - static const char KEY_FOCUS_DISTANCES[]; - - // The current dimensions in pixels (width x height) for video frames. - // The width and height must be one of the supported sizes retrieved - // via KEY_SUPPORTED_VIDEO_SIZES. - // Example value: "1280x720". Read/write. - static const char KEY_VIDEO_SIZE[]; - // A list of the supported dimensions in pixels (width x height) - // for video frames. See CAMERA_MSG_VIDEO_FRAME for details in - // frameworks/base/include/camera/Camera.h. - // Example: "176x144,1280x720". Read only. - static const char KEY_SUPPORTED_VIDEO_SIZES[]; - - // The maximum number of detected faces supported by hardware face - // detection. If the value is 0, hardware face detection is not supported. - // Example: "5". Read only - static const char KEY_MAX_NUM_DETECTED_FACES_HW[]; - - // The maximum number of detected faces supported by software face - // detection. If the value is 0, software face detection is not supported. - // Example: "5". Read only - static const char KEY_MAX_NUM_DETECTED_FACES_SW[]; - - // Preferred preview frame size in pixels for video recording. - // The width and height must be one of the supported sizes retrieved - // via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when - // getSupportedVideoSizes() does not return an empty Vector of Size. - // Camcorder applications are recommended to set the preview size - // to a value that is not larger than the preferred preview size. - // In other words, the product of the width and height of the - // preview size should not be larger than that of the preferred - // preview size. In addition, we recommend to choos a preview size - // that has the same aspect ratio as the resolution of video to be - // recorded. - // Example value: "800x600". Read only. - static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[]; - - // The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in - // frameworks/base/include/camera/Camera.h. - // Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only. - static const char KEY_VIDEO_FRAME_FORMAT[]; - - // Sets the hint of the recording mode. If this is true, MediaRecorder.start - // may be faster or has less glitches. This should be called before starting - // the preview for the best result. But it is allowed to change the hint - // while the preview is active. The default value is false. - // - // The apps can still call Camera.takePicture when the hint is true. The - // apps can call MediaRecorder.start when the hint is false. But the - // performance may be worse. - // Example value: "true" or "false". Read/write. - static const char KEY_RECORDING_HINT[]; - - // Returns true if video snapshot is supported. That is, applications - // can call Camera.takePicture during recording. Applications do not need to - // call Camera.startPreview after taking a picture. The preview will be - // still active. Other than that, taking a picture during recording is - // identical to taking a picture normally. All settings and methods related - // to takePicture work identically. Ex: KEY_PICTURE_SIZE, - // KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc. - // The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON - // also still work, but the video will record the flash. - // - // Applications can set shutter callback as null to avoid the shutter - // sound. It is also recommended to set raw picture and post view callbacks - // to null to avoid the interrupt of preview display. - // - // Field-of-view of the recorded video may be different from that of the - // captured pictures. - // Example value: "true" or "false". Read only. - static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[]; - - // The state of the video stabilization. If set to true, both the - // preview stream and the recorded video stream are stabilized by - // the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is - // set to true. - // - // The value of this key can be changed any time the camera is - // open. If preview or recording is active, it is acceptable for - // there to be a slight video glitch when video stabilization is - // toggled on and off. - // - // This only stabilizes video streams (between-frames stabilization), and - // has no effect on still image capture. - static const char KEY_VIDEO_STABILIZATION[]; - - // Returns true if video stabilization is supported. That is, applications - // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview - // stream and record stabilized videos. - static const char KEY_VIDEO_STABILIZATION_SUPPORTED[]; - - // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. - static const char TRUE[]; - static const char FALSE[]; - - // Value for KEY_FOCUS_DISTANCES. - static const char FOCUS_DISTANCE_INFINITY[]; - - // Values for white balance settings. - static const char WHITE_BALANCE_AUTO[]; - static const char WHITE_BALANCE_INCANDESCENT[]; - static const char WHITE_BALANCE_FLUORESCENT[]; - static const char WHITE_BALANCE_WARM_FLUORESCENT[]; - static const char WHITE_BALANCE_DAYLIGHT[]; - static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[]; - static const char WHITE_BALANCE_TWILIGHT[]; - static const char WHITE_BALANCE_SHADE[]; - - // Values for effect settings. - static const char EFFECT_NONE[]; - static const char EFFECT_MONO[]; - static const char EFFECT_NEGATIVE[]; - static const char EFFECT_SOLARIZE[]; - static const char EFFECT_SEPIA[]; - static const char EFFECT_POSTERIZE[]; - static const char EFFECT_WHITEBOARD[]; - static const char EFFECT_BLACKBOARD[]; - static const char EFFECT_AQUA[]; - - // Values for antibanding settings. - static const char ANTIBANDING_AUTO[]; - static const char ANTIBANDING_50HZ[]; - static const char ANTIBANDING_60HZ[]; - static const char ANTIBANDING_OFF[]; - - // Values for flash mode settings. - // Flash will not be fired. - static const char FLASH_MODE_OFF[]; - // Flash will be fired automatically when required. The flash may be fired - // during preview, auto-focus, or snapshot depending on the driver. - static const char FLASH_MODE_AUTO[]; - // Flash will always be fired during snapshot. The flash may also be - // fired during preview or auto-focus depending on the driver. - static const char FLASH_MODE_ON[]; - // Flash will be fired in red-eye reduction mode. - static const char FLASH_MODE_RED_EYE[]; - // Constant emission of light during preview, auto-focus and snapshot. - // This can also be used for video recording. - static const char FLASH_MODE_TORCH[]; - - // Values for scene mode settings. - static const char SCENE_MODE_AUTO[]; - static const char SCENE_MODE_ACTION[]; - static const char SCENE_MODE_PORTRAIT[]; - static const char SCENE_MODE_LANDSCAPE[]; - static const char SCENE_MODE_NIGHT[]; - static const char SCENE_MODE_NIGHT_PORTRAIT[]; - static const char SCENE_MODE_THEATRE[]; - static const char SCENE_MODE_BEACH[]; - static const char SCENE_MODE_SNOW[]; - static const char SCENE_MODE_SUNSET[]; - static const char SCENE_MODE_STEADYPHOTO[]; - static const char SCENE_MODE_FIREWORKS[]; - static const char SCENE_MODE_SPORTS[]; - static const char SCENE_MODE_PARTY[]; - static const char SCENE_MODE_CANDLELIGHT[]; - // Applications are looking for a barcode. Camera driver will be optimized - // for barcode reading. - static const char SCENE_MODE_BARCODE[]; - - // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT, - // and KEY_VIDEO_FRAME_FORMAT - static const char PIXEL_FORMAT_YUV422SP[]; - static const char PIXEL_FORMAT_YUV420SP[]; // NV21 - static const char PIXEL_FORMAT_YUV422I[]; // YUY2 - static const char PIXEL_FORMAT_YUV420P[]; // YV12 - static const char PIXEL_FORMAT_RGB565[]; - static const char PIXEL_FORMAT_RGBA8888[]; - static const char PIXEL_FORMAT_JPEG[]; - // Raw bayer format used for images, which is 10 bit precision samples - // stored in 16 bit words. The filter pattern is RGGB. - static const char PIXEL_FORMAT_BAYER_RGGB[]; - - // Values for focus mode settings. - // Auto-focus mode. Applications should call - // CameraHardwareInterface.autoFocus to start the focus in this mode. - static const char FOCUS_MODE_AUTO[]; - // Focus is set at infinity. Applications should not call - // CameraHardwareInterface.autoFocus in this mode. - static const char FOCUS_MODE_INFINITY[]; - // Macro (close-up) focus mode. Applications should call - // CameraHardwareInterface.autoFocus to start the focus in this mode. - static const char FOCUS_MODE_MACRO[]; - // Focus is fixed. The camera is always in this mode if the focus is not - // adjustable. If the camera has auto-focus, this mode can fix the - // focus, which is usually at hyperfocal distance. Applications should - // not call CameraHardwareInterface.autoFocus in this mode. - static const char FOCUS_MODE_FIXED[]; - // Extended depth of field (EDOF). Focusing is done digitally and - // continuously. Applications should not call - // CameraHardwareInterface.autoFocus in this mode. - static const char FOCUS_MODE_EDOF[]; - // Continuous auto focus mode intended for video recording. The camera - // continuously tries to focus. This is the best choice for video - // recording because the focus changes smoothly . Applications still can - // call CameraHardwareInterface.takePicture in this mode but the subject may - // not be in focus. Auto focus starts when the parameter is set. - // - // Applications can call CameraHardwareInterface.autoFocus in this mode. The - // focus callback will immediately return with a boolean that indicates - // whether the focus is sharp or not. The focus position is locked after - // autoFocus call. If applications want to resume the continuous focus, - // cancelAutoFocus must be called. Restarting the preview will not resume - // the continuous autofocus. To stop continuous focus, applications should - // change the focus mode to other modes. - static const char FOCUS_MODE_CONTINUOUS_VIDEO[]; - // Continuous auto focus mode intended for taking pictures. The camera - // continuously tries to focus. The speed of focus change is more aggressive - // than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is - // set. - // - // Applications can call CameraHardwareInterface.autoFocus in this mode. If - // the autofocus is in the middle of scanning, the focus callback will - // return when it completes. If the autofocus is not scanning, focus - // callback will immediately return with a boolean that indicates whether - // the focus is sharp or not. The apps can then decide if they want to take - // a picture immediately or to change the focus mode to auto, and run a full - // autofocus cycle. The focus position is locked after autoFocus call. If - // applications want to resume the continuous focus, cancelAutoFocus must be - // called. Restarting the preview will not resume the continuous autofocus. - // To stop continuous focus, applications should change the focus mode to - // other modes. - static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; - -private: - DefaultKeyedVector<String8,String8> mMap; -}; - -}; // namespace android - -#endif diff --git a/include/cpustats/ThreadCpuUsage.h b/include/cpustats/ThreadCpuUsage.h index 24012a47f255..9cd93d807e9d 100644 --- a/include/cpustats/ThreadCpuUsage.h +++ b/include/cpustats/ThreadCpuUsage.h @@ -17,16 +17,17 @@ #ifndef _THREAD_CPU_USAGE_H #define _THREAD_CPU_USAGE_H -#include <cpustats/CentralTendencyStatistics.h> +#include <fcntl.h> +#include <pthread.h> -// Track CPU usage for the current thread, and maintain statistics on -// the CPU usage. Units are in per-thread CPU ns, as reported by +namespace android { + +// Track CPU usage for the current thread. +// Units are in per-thread CPU ns, as reported by // clock_gettime(CLOCK_THREAD_CPUTIME_ID). Simple usage: for cyclic // threads where you want to measure the execution time of the whole // cycle, just call sampleAndEnable() at the start of each cycle. -// Then call statistics() to get the results, and resetStatistics() -// to start a new set of measurements. -// For acyclic threads, or for cyclic threads where you want to measure +// For acyclic threads, or for cyclic threads where you want to measure/track // only part of each cycle, call enable(), disable(), and/or setEnabled() // to demarcate the region(s) of interest, and then call sample() periodically. // This class is not thread-safe for concurrent calls from multiple threads; @@ -44,13 +45,17 @@ public: // mPreviousTs // mMonotonicTs mMonotonicKnown(false) - // mStatistics - { } + { + (void) pthread_once(&sOnceControl, &init); + for (int i = 0; i < sKernelMax; ++i) { + mCurrentkHz[i] = (uint32_t) ~0; // unknown + } + } ~ThreadCpuUsage() { } // Return whether currently tracking CPU usage by current thread - bool isEnabled() { return mIsEnabled; } + bool isEnabled() const { return mIsEnabled; } // Enable tracking of CPU usage by current thread; // any CPU used from this point forward will be tracked. @@ -66,39 +71,52 @@ public: // This method is intended to be used for safe nested enable/disabling. bool setEnabled(bool isEnabled); - // Add a sample point for central tendency statistics, and also - // enable tracking if needed. If tracking has never been enabled, then - // enables tracking but does not add a sample (it is not possible to add - // a sample the first time because no previous). Otherwise if tracking is - // enabled, then adds a sample for tracked CPU ns since the previous + // Add a sample point, and also enable tracking if needed. + // If tracking has never been enabled, then this call enables tracking but + // does _not_ add a sample -- it is not possible to add a sample the + // first time because there is no previous point to subtract from. + // Otherwise, if tracking is enabled, + // then adds a sample for tracked CPU ns since the previous // sample, or since the first call to sampleAndEnable(), enable(), or // setEnabled(true). If there was a previous sample but tracking is // now disabled, then adds a sample for the tracked CPU ns accumulated // up until the most recent disable(), resets this accumulator, and then // enables tracking. Calling this method rather than enable() followed // by sample() avoids a race condition for the first sample. - void sampleAndEnable(); + // Returns true if the sample 'ns' is valid, or false if invalid. + // Note that 'ns' is an output parameter passed by reference. + // The caller does not need to initialize this variable. + // The units are CPU nanoseconds consumed by current thread. + bool sampleAndEnable(double& ns); - // Add a sample point for central tendency statistics, but do not + // Add a sample point, but do not // change the tracking enabled status. If tracking has either never been // enabled, or has never been enabled since the last sample, then log a warning // and don't add sample. Otherwise, adds a sample for tracked CPU ns since // the previous sample or since the first call to sampleAndEnable(), // enable(), or setEnabled(true) if no previous sample. - void sample(); + // Returns true if the sample is valid, or false if invalid. + // Note that 'ns' is an output parameter passed by reference. + // The caller does not need to initialize this variable. + // The units are CPU nanoseconds consumed by current thread. + bool sample(double& ns); - // Return the elapsed delta wall clock ns since initial enable or statistics reset, + // Return the elapsed delta wall clock ns since initial enable or reset, // as reported by clock_gettime(CLOCK_MONOTONIC). long long elapsed() const; - // Reset statistics and elapsed. Has no effect on tracking or accumulator. - void resetStatistics(); + // Reset elapsed wall clock. Has no effect on tracking or accumulator. + void resetElapsed(); - // Return a const reference to the central tendency statistics. - // Note that only the const methods can be called on this object. - const CentralTendencyStatistics& statistics() const { - return mStatistics; - } + // Return current clock frequency for specified CPU, in kHz. + // You can get your CPU number using sched_getcpu(2). Note that, unless CPU affinity + // has been configured appropriately, the CPU number can change. + // Also note that, unless the CPU governor has been configured appropriately, + // the CPU frequency can change. And even if the CPU frequency is locked down + // to a particular value, that the frequency might still be adjusted + // to prevent thermal overload. Therefore you should poll for your thread's + // current CPU number and clock frequency periodically. + uint32_t getCpukHz(int cpuNum); private: bool mIsEnabled; // whether tracking is currently enabled @@ -107,7 +125,15 @@ private: struct timespec mPreviousTs; // most recent thread CPU time, valid only if mIsEnabled is true struct timespec mMonotonicTs; // most recent monotonic time bool mMonotonicKnown; // whether mMonotonicTs has been set - CentralTendencyStatistics mStatistics; + + static const int MAX_CPU = 8; + static int sScalingFds[MAX_CPU];// file descriptor per CPU for reading scaling_cur_freq + uint32_t mCurrentkHz[MAX_CPU]; // current CPU frequency in kHz, not static to avoid a race + static pthread_once_t sOnceControl; + static int sKernelMax; // like MAX_CPU, but determined at runtime == cpu/kernel_max + 1 + static void init(); }; +} // namespace android + #endif // _THREAD_CPU_USAGE_H diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 662dd13afca5..a68ab4e8edbd 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -120,6 +120,9 @@ enum media_info_type { MEDIA_INFO_NOT_SEEKABLE = 801, // New media metadata is available. MEDIA_INFO_METADATA_UPDATE = 802, + + //9xx + MEDIA_INFO_TIMED_TEXT_ERROR = 900, }; @@ -140,9 +143,6 @@ enum media_player_states { // The same enum space is used for both set and get, in case there are future keys that // can be both set and get. But as of now, all parameters are either set only or get only. enum media_parameter_keys { - KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000, // set only - KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001, // set only - // Streaming/buffering parameters KEY_PARAMETER_CACHE_STAT_COLLECT_FREQ_MS = 1100, // set only @@ -155,6 +155,23 @@ enum media_parameter_keys { KEY_PARAMETER_PLAYBACK_RATE_PERMILLE = 1300, // set only }; +// Keep INVOKE_ID_* in sync with MediaPlayer.java. +enum media_player_invoke_ids { + INVOKE_ID_GET_TRACK_INFO = 1, + INVOKE_ID_ADD_EXTERNAL_SOURCE = 2, + INVOKE_ID_ADD_EXTERNAL_SOURCE_FD = 3, + INVOKE_ID_SELECT_TRACK = 4, + INVOKE_ID_UNSELECT_TRACK = 5, +}; + +// Keep MEDIA_TRACK_TYPE_* in sync with MediaPlayer.java. +enum media_track_type { + MEDIA_TRACK_TYPE_UNKNOWN = 0, + MEDIA_TRACK_TYPE_VIDEO = 1, + MEDIA_TRACK_TYPE_AUDIO = 2, + MEDIA_TRACK_TYPE_TIMEDTEXT = 3, +}; + // ---------------------------------------------------------------------------- // ref-counted object for callbacks class MediaPlayerListener: virtual public RefBase diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h index 2eb259e8b590..457d5d72e98c 100644 --- a/include/media/stagefright/MediaDefs.h +++ b/include/media/stagefright/MediaDefs.h @@ -54,6 +54,7 @@ extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2PS; extern const char *MEDIA_MIMETYPE_CONTAINER_WVM; extern const char *MEDIA_MIMETYPE_TEXT_3GPP; +extern const char *MEDIA_MIMETYPE_TEXT_SUBRIP; } // namespace android diff --git a/include/media/stagefright/timedtext/TimedTextDriver.h b/include/media/stagefright/timedtext/TimedTextDriver.h index efedb6e9028e..b9752df5a7e6 100644 --- a/include/media/stagefright/timedtext/TimedTextDriver.h +++ b/include/media/stagefright/timedtext/TimedTextDriver.h @@ -37,26 +37,26 @@ public: ~TimedTextDriver(); - // TODO: pause-resume pair seems equivalent to stop-start pair. - // Check if it is replaceable with stop-start. status_t start(); - status_t stop(); status_t pause(); - status_t resume(); + status_t selectTrack(int32_t index); + status_t unselectTrack(int32_t index); status_t seekToAsync(int64_t timeUs); status_t addInBandTextSource(const sp<MediaSource>& source); - status_t addOutOfBandTextSource(const Parcel &request); + status_t addOutOfBandTextSource(const char *uri, const char *mimeType); + // Caller owns the file desriptor and caller is responsible for closing it. + status_t addOutOfBandTextSource( + int fd, off64_t offset, size_t length, const char *mimeType); - status_t setTimedTextTrackIndex(int32_t index); + void getTrackInfo(Parcel *parcel); private: Mutex mLock; enum State { UNINITIALIZED, - STOPPED, PLAYING, PAUSED, }; @@ -67,11 +67,11 @@ private: // Variables to be guarded by mLock. State mState; - Vector<sp<TimedTextSource> > mTextInBandVector; - Vector<sp<TimedTextSource> > mTextOutOfBandVector; + int32_t mCurrentTrackIndex; + Vector<sp<TimedTextSource> > mTextSourceVector; // -- End of variables to be guarded by mLock - status_t setTimedTextTrackIndex_l(int32_t index); + status_t selectTrack_l(int32_t index); DISALLOW_EVIL_CONSTRUCTORS(TimedTextDriver); }; diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java index fba5bab4586f..fe03437b2966 100644 --- a/keystore/java/android/security/KeyChain.java +++ b/keystore/java/android/security/KeyChain.java @@ -169,7 +169,6 @@ public final class KeyChain { /** - * @hide TODO This is temporary and will be removed * Broadcast Action: Indicates the trusted storage has changed. Sent when * one of this happens: * diff --git a/libs/cpustats/ThreadCpuUsage.cpp b/libs/cpustats/ThreadCpuUsage.cpp index ffee039e1ee1..99b4c836394c 100644 --- a/libs/cpustats/ThreadCpuUsage.cpp +++ b/libs/cpustats/ThreadCpuUsage.cpp @@ -14,18 +14,26 @@ * limitations under the License. */ +#define LOG_TAG "ThreadCpuUsage" +//#define LOG_NDEBUG 0 + #include <errno.h> +#include <stdlib.h> #include <time.h> +#include <utils/Debug.h> #include <utils/Log.h> #include <cpustats/ThreadCpuUsage.h> +namespace android { + bool ThreadCpuUsage::setEnabled(bool isEnabled) { bool wasEnabled = mIsEnabled; // only do something if there is a change if (isEnabled != wasEnabled) { + ALOGV("setEnabled(%d)", isEnabled); int rc; // enabling if (isEnabled) { @@ -65,20 +73,28 @@ bool ThreadCpuUsage::setEnabled(bool isEnabled) return wasEnabled; } -void ThreadCpuUsage::sampleAndEnable() +bool ThreadCpuUsage::sampleAndEnable(double& ns) { + bool ret; bool wasEverEnabled = mWasEverEnabled; if (enable()) { // already enabled, so add a new sample relative to previous - sample(); + return sample(ns); } else if (wasEverEnabled) { // was disabled, but add sample for accumulated time while enabled - mStatistics.sample((double) mAccumulator); + ns = (double) mAccumulator; mAccumulator = 0; + ALOGV("sampleAndEnable %.0f", ns); + return true; + } else { + // first time called + ns = 0.0; + ALOGV("sampleAndEnable false"); + return false; } } -void ThreadCpuUsage::sample() +bool ThreadCpuUsage::sample(double &ns) { if (mWasEverEnabled) { if (mIsEnabled) { @@ -87,6 +103,8 @@ void ThreadCpuUsage::sample() rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); if (rc) { ALOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno); + ns = 0.0; + return false; } else { long long delta = (ts.tv_sec - mPreviousTs.tv_sec) * 1000000000LL + (ts.tv_nsec - mPreviousTs.tv_nsec); @@ -96,10 +114,14 @@ void ThreadCpuUsage::sample() } else { mWasEverEnabled = false; } - mStatistics.sample((double) mAccumulator); + ns = (double) mAccumulator; + ALOGV("sample %.0f", ns); mAccumulator = 0; + return true; } else { ALOGW("Can't add sample because measurements have never been enabled"); + ns = 0.0; + return false; } } @@ -122,12 +144,13 @@ long long ThreadCpuUsage::elapsed() const ALOGW("Can't compute elapsed time because measurements have never been enabled"); elapsed = 0; } + ALOGV("elapsed %lld", elapsed); return elapsed; } -void ThreadCpuUsage::resetStatistics() +void ThreadCpuUsage::resetElapsed() { - mStatistics.reset(); + ALOGV("resetElapsed"); if (mMonotonicKnown) { int rc; rc = clock_gettime(CLOCK_MONOTONIC, &mMonotonicTs); @@ -137,3 +160,93 @@ void ThreadCpuUsage::resetStatistics() } } } + +/*static*/ +int ThreadCpuUsage::sScalingFds[ThreadCpuUsage::MAX_CPU]; +pthread_once_t ThreadCpuUsage::sOnceControl = PTHREAD_ONCE_INIT; +int ThreadCpuUsage::sKernelMax; + +/*static*/ +void ThreadCpuUsage::init() +{ + // read the number of CPUs + sKernelMax = 1; + int fd = open("/sys/devices/system/cpu/kernel_max", O_RDONLY); + if (fd >= 0) { +#define KERNEL_MAX_SIZE 12 + char kernelMax[KERNEL_MAX_SIZE]; + ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); + if (actual >= 2 && kernelMax[actual-1] == '\n') { + sKernelMax = atoi(kernelMax); + if (sKernelMax >= MAX_CPU - 1) { + ALOGW("kernel_max %d but MAX_CPU %d", sKernelMax, MAX_CPU); + sKernelMax = MAX_CPU; + } else if (sKernelMax < 0) { + ALOGW("kernel_max invalid %d", sKernelMax); + sKernelMax = 1; + } else { + ++sKernelMax; + ALOGV("number of CPUs %d", sKernelMax); + } + } else { + ALOGW("Can't read number of CPUs"); + } + (void) close(fd); + } else { + ALOGW("Can't open number of CPUs"); + } + + // open fd to each frequency per CPU +#define FREQ_SIZE 64 + char freq_path[FREQ_SIZE]; +#define FREQ_DIGIT 27 + COMPILE_TIME_ASSERT_FUNCTION_SCOPE(MAX_CPU <= 10); + strlcpy(freq_path, "/sys/devices/system/cpu/cpu?/cpufreq/scaling_cur_freq", sizeof(freq_path)); + int i; + for (i = 0; i < MAX_CPU; ++i) { + sScalingFds[i] = -1; + } + for (i = 0; i < sKernelMax; ++i) { + freq_path[FREQ_DIGIT] = i + '0'; + fd = open(freq_path, O_RDONLY); + if (fd >= 0) { + // keep this fd until process exit + sScalingFds[i] = fd; + } else { + ALOGW("Can't open CPU %d", i); + } + } +} + +uint32_t ThreadCpuUsage::getCpukHz(int cpuNum) +{ + if (cpuNum < 0 || cpuNum >= MAX_CPU) { + ALOGW("getCpukHz called with invalid CPU %d", cpuNum); + return 0; + } + int fd = sScalingFds[cpuNum]; + if (fd < 0) { + ALOGW("getCpukHz called for unopened CPU %d", cpuNum); + return 0; + } +#define KHZ_SIZE 12 + char kHz[KHZ_SIZE]; // kHz base 10 + ssize_t actual = pread(fd, kHz, sizeof(kHz), (off_t) 0); + uint32_t ret; + if (actual >= 2 && kHz[actual-1] == '\n') { + ret = atoi(kHz); + } else { + ret = 0; + } + if (ret != mCurrentkHz[cpuNum]) { + if (ret > 0) { + ALOGV("CPU %d frequency %u kHz", cpuNum, ret); + } else { + ALOGW("Can't read CPU %d frequency", cpuNum); + } + mCurrentkHz[cpuNum] = ret; + } + return ret; +} + +} // namespace android diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 43617e7b8b02..4bbb04f36a41 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -574,7 +574,7 @@ public: virtual void drawLines(float* points, int count, SkPaint* paint); virtual void drawPoints(float* points, int count, SkPaint* paint); virtual void drawText(const char* text, int bytesCount, int count, float x, float y, - SkPaint* paint, float length = 1.0f); + SkPaint* paint, float length = -1.0f); virtual void drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path, float hOffset, float vOffset, SkPaint* paint); virtual void drawPosText(const char* text, int bytesCount, int count, const float* positions, diff --git a/libs/rs/Script.cpp b/libs/rs/Script.cpp index 25fa673c53f9..c87d4604a093 100644 --- a/libs/rs/Script.cpp +++ b/libs/rs/Script.cpp @@ -25,12 +25,12 @@ #include "Allocation.h" #include "Script.h" -void Script::invoke(uint32_t slot, const void *v, size_t len) { +void Script::invoke(uint32_t slot, const void *v, size_t len) const { rsScriptInvokeV(mRS->mContext, getID(), slot, v, len); } void Script::forEach(uint32_t slot, const Allocation *ain, const Allocation *aout, - const void *usr, size_t usrLen) { + const void *usr, size_t usrLen) const { if ((ain == NULL) && (aout == NULL)) { mRS->throwError("At least one of ain or aout is required to be non-null."); } @@ -44,16 +44,16 @@ Script::Script(void *id, RenderScript *rs) : BaseObj(id, rs) { } -void Script::bindAllocation(const Allocation *va, uint32_t slot) { +void Script::bindAllocation(const Allocation *va, uint32_t slot) const { rsScriptBindAllocation(mRS->mContext, getID(), BaseObj::getObjID(va), slot); } -void Script::setVar(uint32_t index, const BaseObj *o) { +void Script::setVar(uint32_t index, const BaseObj *o) const { rsScriptSetVarObj(mRS->mContext, getID(), index, (o == NULL) ? 0 : o->getID()); } -void Script::setVar(uint32_t index, const void *v, size_t len) { +void Script::setVar(uint32_t index, const void *v, size_t len) const { rsScriptSetVarV(mRS->mContext, getID(), index, v, len); } diff --git a/libs/rs/Script.h b/libs/rs/Script.h index 54d1e40cfd2f..0700898f6b65 100644 --- a/libs/rs/Script.h +++ b/libs/rs/Script.h @@ -30,29 +30,29 @@ class Allocation; class Script : public BaseObj { protected: Script(void *id, RenderScript *rs); - void forEach(uint32_t slot, const Allocation *in, const Allocation *out, const void *v, size_t); - void bindAllocation(const Allocation *va, uint32_t slot); - void setVar(uint32_t index, const void *, size_t len); - void setVar(uint32_t index, const BaseObj *o); - void invoke(uint32_t slot, const void *v, size_t len); + void forEach(uint32_t slot, const Allocation *in, const Allocation *out, const void *v, size_t) const; + void bindAllocation(const Allocation *va, uint32_t slot) const; + void setVar(uint32_t index, const void *, size_t len) const; + void setVar(uint32_t index, const BaseObj *o) const; + void invoke(uint32_t slot, const void *v, size_t len) const; - void invoke(uint32_t slot) { + void invoke(uint32_t slot) const { invoke(slot, NULL, 0); } - void setVar(uint32_t index, float v) { + void setVar(uint32_t index, float v) const { setVar(index, &v, sizeof(v)); } - void setVar(uint32_t index, double v) { + void setVar(uint32_t index, double v) const { setVar(index, &v, sizeof(v)); } - void setVar(uint32_t index, int32_t v) { + void setVar(uint32_t index, int32_t v) const { setVar(index, &v, sizeof(v)); } - void setVar(uint32_t index, int64_t v) { + void setVar(uint32_t index, int64_t v) const { setVar(index, &v, sizeof(v)); } - void setVar(uint32_t index, bool v) { + void setVar(uint32_t index, bool v) const { setVar(index, &v, sizeof(v)); } diff --git a/libs/rs/ScriptC.cpp b/libs/rs/ScriptC.cpp index ad82ff46acf1..80e8efc87828 100644 --- a/libs/rs/ScriptC.cpp +++ b/libs/rs/ScriptC.cpp @@ -22,11 +22,11 @@ #include "ScriptC.h" ScriptC::ScriptC(RenderScript *rs, - const char *codeTxt, size_t codeLength, + const void *codeTxt, size_t codeLength, const char *cachedName, size_t cachedNameLength, const char *cacheDir, size_t cacheDirLength) : Script(NULL, rs) { mID = rsScriptCCreate(rs->mContext, cachedName, cachedNameLength, - cacheDir, cacheDirLength, codeTxt, codeLength); + cacheDir, cacheDirLength, (const char *)codeTxt, codeLength); } diff --git a/libs/rs/ScriptC.h b/libs/rs/ScriptC.h index dcbbe10ef5e3..b68f61c57082 100644 --- a/libs/rs/ScriptC.h +++ b/libs/rs/ScriptC.h @@ -25,7 +25,7 @@ class ScriptC : public Script { protected: ScriptC(RenderScript *rs, - const char *codeTxt, size_t codeLength, + const void *codeTxt, size_t codeLength, const char *cachedName, size_t cachedNameLength, const char *cacheDir, size_t cacheDirLength); diff --git a/libs/rs/tests/ScriptC_mono.cpp b/libs/rs/tests/ScriptC_mono.cpp index 7f83616acf6f..a6c63a89b949 100644 --- a/libs/rs/tests/ScriptC_mono.cpp +++ b/libs/rs/tests/ScriptC_mono.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2012 The Android Open Source Project + * Copyright (C) 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. @@ -14,74 +14,105 @@ * limitations under the License. */ -#include "ScriptC_mono.h" - -static const char mono[] = \ - "\xDE\xC0\x17\x0B\x00\x00\x00\x00\x18\x00\x00\x00\xFC\x03\x00\x00\x00\x00\x00\x00" \ - "\x10\x00\x00\x00\x42\x43\xC0\xDE\x21\x0C\x00\x00\xFC\x00\x00\x00\x01\x10\x00\x00" \ - "\x12\x00\x00\x00\x07\x81\x23\x91\x41\xC8\x04\x49\x06\x10\x32\x39\x92\x01\x84\x0C" \ - "\x25\x05\x08\x19\x1E\x04\x8B\x62\x80\x14\x45\x02\x42\x92\x0B\x42\xA4\x10\x32\x14" \ - "\x38\x08\x18\x49\x0A\x32\x44\x24\x48\x0A\x90\x21\x23\xC4\x52\x80\x0C\x19\x21\x72" \ - "\x24\x07\xC8\x48\x11\x62\xA8\xA0\xA8\x40\xC6\xF0\x01\x00\x00\x00\x49\x18\x00\x00" \ - "\x08\x00\x00\x00\x0B\x8C\x00\x04\x41\x10\x04\x09\x01\x04\x41\x10\x04\x89\xFF\xFF" \ - "\xFF\xFF\x1F\xC0\x60\x81\xF0\xFF\xFF\xFF\xFF\x03\x18\x00\x00\x00\x89\x20\x00\x00" \ - "\x13\x00\x00\x00\x32\x22\x48\x09\x20\x64\x85\x04\x93\x22\xA4\x84\x04\x93\x22\xE3" \ - "\x84\xA1\x90\x14\x12\x4C\x8A\x8C\x0B\x84\xA4\x4C\x10\x48\x23\x00\x73\x04\xC8\x30" \ - "\x02\x11\x90\x28\x03\x18\x83\xC8\x0C\xC0\x30\x02\x61\x14\xE1\x08\x42\xC3\x08\x83" \ - "\x51\x06\xA3\x14\xAD\x22\x08\x45\x6D\x20\x60\x8E\x00\x0C\x86\x11\x06\x08\x00\x00" \ - "\x13\xB0\x70\x90\x87\x76\xB0\x87\x3B\x68\x03\x77\x78\x07\x77\x28\x87\x36\x60\x87" \ - "\x74\x70\x87\x7A\xC0\x87\x36\x38\x07\x77\xA8\x87\x72\x08\x07\x71\x48\x87\x0D\xF2" \ - "\x50\x0E\x6D\x00\x0F\x7A\x30\x07\x72\xA0\x07\x73\x20\x07\x7A\x30\x07\x72\xD0\x06" \ - "\xE9\x10\x07\x7A\x80\x07\x7A\x80\x07\x6D\x90\x0E\x78\xA0\x07\x78\xA0\x07\x78\xD0" \ - "\x06\xE9\x10\x07\x76\xA0\x07\x71\x60\x07\x7A\x10\x07\x76\xD0\x06\xE9\x30\x07\x72" \ - "\xA0\x07\x73\x20\x07\x7A\x30\x07\x72\xD0\x06\xE9\x60\x07\x74\xA0\x07\x76\x40\x07" \ - "\x7A\x60\x07\x74\xD0\x06\xE6\x30\x07\x72\xA0\x07\x73\x20\x07\x7A\x30\x07\x72\xD0" \ - "\x06\xE6\x60\x07\x74\xA0\x07\x76\x40\x07\x7A\x60\x07\x74\xD0\x06\xF6\x60\x07\x74" \ - "\xA0\x07\x76\x40\x07\x7A\x60\x07\x74\xD0\x06\xF6\x10\x07\x72\x80\x07\x7A\x60\x07" \ - "\x74\xA0\x07\x71\x20\x07\x78\xD0\x06\xE1\x00\x07\x7A\x00\x07\x7A\x60\x07\x74\xD0" \ - "\x06\xEE\x30\x07\x72\xD0\x06\xB3\x60\x07\x74\x30\x44\x29\x00\x00\x08\x00\x00\x00" \ - "\x80\x21\x4A\x02\x04\x00\x00\x00\x00\x00\x0C\x51\x18\x20\x00\x00\x00\x00\x00\x60" \ - "\x88\xE2\x00\x01\x00\x00\x00\x00\x00\x79\x18\x00\x45\x00\x00\x00\x43\x88\x27\x78" \ - "\x84\x05\x87\x3D\x94\x83\x3C\xCC\x43\x3A\xBC\x83\x3B\x2C\x08\xE2\x60\x08\xF1\x10" \ - "\x4F\xB1\x20\x52\x87\x70\xB0\x87\x70\xF8\x05\x78\x08\x87\x71\x58\x87\x70\x38\x87" \ - "\x72\xF8\x05\x77\x08\x87\x76\x28\x87\x05\x63\x30\x0E\xEF\xD0\x0E\x6E\x50\x0E\xF8" \ - "\x10\x0E\xED\x00\x0F\xEC\x50\x0E\x6E\x10\x0E\xEE\x40\x0E\xF2\xF0\x0E\xE9\x40\x0E" \ - "\x6E\x20\x0F\xF3\xE0\x06\xE8\x50\x0E\xEC\xC0\x0E\xEF\x30\x0E\xEF\xD0\x0E\xF0\x50" \ - "\x0F\xF4\x50\x0E\x43\x84\xE7\x58\x40\xC8\xC3\x3B\xBC\x03\x3D\x0C\x11\x9E\x64\x41" \ - "\x30\x07\x43\x88\x67\x79\x98\x05\xCF\x3B\xB4\x83\x3B\xA4\x03\x3C\xBC\x03\x3D\x94" \ - "\x83\x3B\xD0\x03\x18\x8C\x03\x3A\x84\x83\x3C\x0C\x21\x9E\x06\x00\x16\x44\xB3\x90" \ - "\x0E\xED\x00\x0F\xEC\x50\x0E\x60\x30\x0A\x6F\x30\x0A\x6B\xB0\x06\x60\x40\x0B\xA2" \ - "\x10\x0A\xA1\x30\xE2\x18\x03\x78\x90\x87\x70\x38\x87\x76\x08\x87\x29\x02\x30\x8C" \ - "\xB8\xC6\x40\x1E\xE6\xE1\x17\xCA\x01\x1F\xE0\xE1\x1D\xE4\x81\x1E\x7E\xC1\x1C\xDE" \ - "\x41\x1E\xCA\x21\x1C\xC6\x01\x1D\x7E\xC1\x1D\xC2\xA1\x1D\xCA\x61\x4A\x60\x8C\x90" \ - "\xC6\x40\x1E\xE6\xE1\x17\xCA\x01\x1F\xE0\xE1\x1D\xE4\x81\x1E\x7E\xC1\x1C\xDE\x41" \ - "\x1E\xCA\x21\x1C\xC6\x01\x1D\xA6\x04\x08\x00\x00\x61\x20\x00\x00\x24\x00\x00\x00" \ - "\x13\x04\x41\x2C\x10\x00\x00\x00\x0C\x00\x00\x00\x04\x8B\xA0\x04\x46\x00\xE8\xCC" \ - "\x00\x90\x9A\x01\x98\x63\x70\x1A\x86\xCC\x18\x41\x6D\xFA\xB2\xEF\x8D\x11\x88\x6D" \ - "\xCC\xC6\xDF\x18\xC1\x49\x97\x72\xFA\x51\x9C\x63\x40\x0E\x63\x04\x00\x00\x00\x00" \ - "\x44\x8C\x11\x03\x42\x08\x82\x68\x90\x41\x4A\x9E\x11\x83\x42\x08\x84\x69\x99\x63" \ - "\x50\x28\x64\x90\xA1\x52\xA0\x11\x03\x42\x08\x06\x6B\x30\xA2\xB8\x06\x00\xC3\x81" \ - "\x00\x00\x00\x00\x03\x00\x00\x00\x46\x40\x54\x3F\xD2\x58\x41\x51\xFD\x0E\x35\x01" \ - "\x01\x31\x00\x00\x03\x00\x00\x00\x5B\x06\x20\x50\xB6\x0C\x47\xA0\x00\x00\x00\x00" \ - "\x00\x00\x00\x00\x79\x18\x00\x00\x0B\x00\x00\x00\x33\x08\x80\x1C\xC4\xE1\x1C\x66" \ - "\x14\x01\x3D\x88\x43\x38\x84\xC3\x8C\x42\x80\x07\x79\x78\x07\x73\x98\xB1\x0C\xE6" \ - "\x00\x0F\xE1\x30\x0E\xE3\x50\x0F\xF2\x10\x0E\xE3\x90\x0F\x00\x00\x71\x20\x00\x00" \ - "\x0E\x00\x00\x00\x06\x40\x44\x8E\x33\x59\x40\x14\x49\x6E\xF3\x00\x82\xC2\x39\x8B" \ - "\x13\xF1\x3C\xCF\x9B\x40\xF3\xCF\xF7\xE0\x4C\x5D\x75\xFF\x05\xFB\xDB\x80\xF6\xCF" \ - "\xF5\x1E\x49\x29\x20\x28\x9C\xB3\x38\x51\xEB\xF0\x3C\xCF\x77\xD5\xFD\x17\x00\x00" \ - "\x00\x00\x00\x00"; +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: mono.rs + */ -ScriptC_mono::ScriptC_mono(RenderScript *rs, const char *cacheDir, size_t cacheDirLength) : - ScriptC(rs, mono, sizeof(mono) - 1, "mono", 4, cacheDir, cacheDirLength) { - printf("sizeof text %i", sizeof(mono)); +#include "ScriptC_mono.h" +static const unsigned char __txt[] = { + 0xde,0xc0,0x17,0x0b,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xd0,0x04,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x42,0x43,0xc0,0xde,0x21,0x0c,0x00,0x00, + 0x31,0x01,0x00,0x00,0x01,0x10,0x00,0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91, + 0x41,0xc8,0x04,0x49,0x06,0x10,0x32,0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19, + 0x1e,0x04,0x8b,0x62,0x80,0x14,0x45,0x02,0x42,0x92,0x0b,0x42,0xa4,0x10,0x32,0x14, + 0x38,0x08,0x18,0x49,0x0a,0x32,0x44,0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80, + 0x0c,0x19,0x21,0x72,0x24,0x07,0xc8,0x48,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0, + 0x01,0x00,0x00,0x00,0x49,0x18,0x00,0x00,0x08,0x00,0x00,0x00,0x0b,0x8c,0x00,0x04, + 0x41,0x10,0x04,0x09,0x01,0x04,0x41,0x10,0x04,0x89,0xff,0xff,0xff,0xff,0x1f,0xc0, + 0x60,0x81,0xf0,0xff,0xff,0xff,0xff,0x03,0x18,0x00,0x00,0x00,0x89,0x20,0x00,0x00, + 0x14,0x00,0x00,0x00,0x32,0x22,0x48,0x09,0x20,0x64,0x85,0x04,0x93,0x22,0xa4,0x84, + 0x04,0x93,0x22,0xe3,0x84,0xa1,0x90,0x14,0x12,0x4c,0x8a,0x8c,0x0b,0x84,0xa4,0x4c, + 0x10,0x54,0x73,0x04,0x60,0x40,0x60,0x06,0x80,0xc4,0x1c,0x01,0x42,0x64,0x04,0x60, + 0x18,0x81,0x20,0xe8,0x94,0xc1,0x20,0x44,0x69,0x18,0x81,0x10,0x8a,0xb0,0x0e,0xb1, + 0x61,0x84,0x41,0x28,0x83,0x70,0x8e,0x5e,0x11,0x8e,0xa3,0x38,0x10,0x30,0x8c,0x30, + 0x00,0x00,0x00,0x00,0x13,0xb0,0x70,0x90,0x87,0x76,0xb0,0x87,0x3b,0x68,0x03,0x77, + 0x78,0x07,0x77,0x28,0x87,0x36,0x60,0x87,0x74,0x70,0x87,0x7a,0xc0,0x87,0x36,0x38, + 0x07,0x77,0xa8,0x87,0x72,0x08,0x07,0x71,0x48,0x87,0x0d,0xf2,0x50,0x0e,0x6d,0x00, + 0x0f,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06, + 0xe9,0x10,0x07,0x7a,0x80,0x07,0x7a,0x80,0x07,0x6d,0x90,0x0e,0x78,0xa0,0x07,0x78, + 0xa0,0x07,0x78,0xd0,0x06,0xe9,0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x7a,0x10, + 0x07,0x76,0xd0,0x06,0xe9,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07, + 0x72,0xd0,0x06,0xe9,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74, + 0xd0,0x06,0xe6,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0, + 0x06,0xe6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06, + 0xf6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6, + 0x10,0x07,0x72,0x80,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x71,0x20,0x07,0x78,0xd0, + 0x06,0xe1,0x00,0x07,0x7a,0x00,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xee,0x30,0x07, + 0x72,0xd0,0x06,0xb3,0x60,0x07,0x74,0xa0,0xf3,0x40,0x86,0x04,0x32,0x42,0x44,0x04, + 0x60,0x20,0x30,0x77,0x81,0x59,0x0a,0x34,0x44,0x51,0x00,0x00,0x08,0x00,0x00,0x00, + 0x80,0x21,0x4a,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x0c,0x51,0x20,0x20,0x00,0x00, + 0x00,0x00,0x00,0x60,0x88,0x22,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x59,0x20,0x00, + 0x08,0x00,0x00,0x00,0x32,0x1e,0x98,0x10,0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,0x47, + 0xc6,0x04,0x43,0x02,0x85,0x50,0x06,0x44,0x4a,0x80,0xc4,0x18,0x81,0xce,0x9a,0x73, + 0xfe,0x01,0x00,0x00,0x79,0x18,0x00,0x00,0x69,0x00,0x00,0x00,0x43,0x88,0x29,0x98, + 0x84,0x05,0x87,0x3d,0x94,0x83,0x3c,0xcc,0x43,0x3a,0xbc,0x83,0x3b,0x2c,0x08,0xe2, + 0x60,0x08,0x31,0x11,0x53,0xb1,0x20,0x52,0x87,0x70,0xb0,0x87,0x70,0xf8,0x05,0x78, + 0x08,0x87,0x71,0x58,0x87,0x70,0x38,0x87,0x72,0xf8,0x05,0x77,0x08,0x87,0x76,0x28, + 0x87,0x05,0x63,0x30,0x0e,0xef,0xd0,0x0e,0x6e,0x50,0x0e,0xf8,0x10,0x0e,0xed,0x00, + 0x0f,0xec,0x50,0x0e,0x6e,0x10,0x0e,0xee,0x40,0x0e,0xf2,0xf0,0x0e,0xe9,0x40,0x0e, + 0x6e,0x20,0x0f,0xf3,0xe0,0x06,0xe8,0x50,0x0e,0xec,0xc0,0x0e,0xef,0x30,0x0e,0xef, + 0xd0,0x0e,0xf0,0x50,0x0f,0xf4,0x50,0x0e,0x43,0x04,0x00,0x19,0x42,0x4c,0xc8,0x94, + 0x2c,0x20,0xce,0x21,0x15,0xdc,0x81,0x1e,0x16,0x04,0x75,0x30,0x84,0x98,0x96,0x49, + 0x58,0x60,0x8c,0x83,0x29,0xb0,0xc3,0x3b,0x84,0x03,0x3d,0x0c,0x21,0xa6,0x66,0x72, + 0x16,0x14,0xe7,0x20,0x0a,0xef,0xf0,0x0e,0xec,0xb0,0x40,0x88,0x83,0x38,0x18,0x22, + 0x4c,0xd0,0x02,0x42,0x1e,0xde,0xe1,0x1d,0xe8,0x61,0x88,0x30,0x49,0x0b,0x82,0x39, + 0x18,0x42,0x4c,0xd4,0x54,0x2d,0x78,0xde,0xa1,0x1d,0xdc,0x21,0x1d,0xe0,0xe1,0x1d, + 0xe8,0xa1,0x1c,0xdc,0x81,0x1e,0xc0,0x60,0x1c,0xd0,0x21,0x1c,0xe4,0x61,0x08,0x31, + 0x59,0x06,0xb0,0x20,0x9a,0x85,0x74,0x68,0x07,0x78,0x60,0x87,0x72,0x00,0x83,0x51, + 0x78,0x83,0x51,0x58,0x83,0x35,0x00,0x03,0x5a,0x10,0x85,0x50,0x08,0x85,0x11,0xc7, + 0x18,0xc0,0x83,0x3c,0x84,0xc3,0x39,0xb4,0x43,0x38,0x4c,0x11,0x80,0x61,0xc4,0x34, + 0x06,0xef,0x00,0x0f,0xf4,0x90,0x0e,0xed,0x90,0x0e,0xfa,0x10,0x0e,0xf4,0x90,0x0e, + 0xef,0xe0,0x0e,0xbf,0xc0,0x0e,0xe5,0x60,0x0f,0xe5,0xc0,0x0e,0x53,0x02,0x63,0x84, + 0x33,0x06,0xf2,0x30,0x0f,0xbf,0x50,0x0e,0xf8,0x00,0x0f,0xef,0x20,0x0f,0xf4,0xf0, + 0x0b,0xf6,0x10,0x0e,0xf2,0x30,0x65,0x38,0x14,0x66,0x04,0x34,0x06,0xf2,0x30,0x0f, + 0xbf,0xf0,0x0e,0xe2,0xa0,0x0e,0xe5,0x30,0x0e,0xf4,0xf0,0x0b,0xf3,0xc0,0x0e,0xef, + 0x40,0x0f,0xf3,0x30,0x05,0x18,0x71,0x8d,0x81,0x3c,0xcc,0xc3,0x2f,0x94,0x03,0x3e, + 0xc0,0xc3,0x3b,0xc8,0x03,0x3d,0xfc,0x82,0x39,0xbc,0x83,0x3c,0x94,0x43,0x38,0x8c, + 0x03,0x3a,0xfc,0x82,0x3b,0x84,0x43,0x3b,0x94,0xc3,0x94,0xe0,0x19,0x21,0x8d,0x81, + 0x3c,0xcc,0xc3,0x2f,0x94,0x03,0x3e,0xc0,0xc3,0x3b,0xc8,0x03,0x3d,0xfc,0x82,0x39, + 0xbc,0x83,0x3c,0x94,0x43,0x38,0x8c,0x03,0x3a,0x4c,0x09,0x22,0x00,0x00,0x00,0x00, + 0x79,0x18,0x00,0x00,0x0b,0x00,0x00,0x00,0x33,0x08,0x80,0x1c,0xc4,0xe1,0x1c,0x66, + 0x14,0x01,0x3d,0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,0x07,0x79,0x78,0x07,0x73, + 0x98,0xb1,0x0c,0xe6,0x00,0x0f,0xe1,0x30,0x0e,0xe3,0x50,0x0f,0xf2,0x10,0x0e,0xe3, + 0x90,0x0f,0x00,0x00,0x71,0x20,0x00,0x00,0x13,0x00,0x00,0x00,0x06,0x40,0x18,0x62, + 0x33,0x99,0x40,0x61,0x6c,0x8e,0xb3,0xd8,0x00,0x11,0x39,0xce,0x64,0x04,0x51,0x24, + 0xb9,0xcd,0x03,0x08,0x0a,0xe7,0x2c,0x4e,0xc4,0xf3,0x3c,0x6f,0x05,0xcd,0x3f,0xdf, + 0x83,0x33,0x75,0xd5,0xfd,0x17,0xec,0x6f,0x01,0x86,0xf0,0x2d,0x0e,0x30,0x99,0x81, + 0xf6,0xcf,0xf5,0x1e,0x49,0x29,0x20,0x28,0x9c,0xb3,0x38,0x51,0xeb,0xf0,0x3c,0xcf, + 0x77,0xd5,0xfd,0x17,0x00,0x00,0x00,0x00,0x61,0x20,0x00,0x00,0x21,0x00,0x00,0x00, + 0x13,0x04,0x41,0x2c,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x04,0x46,0x00,0x68, + 0xcd,0x00,0x90,0x9b,0x01,0x18,0x6b,0x38,0xe9,0x52,0x4e,0x3f,0xb1,0x8d,0xd9,0xf8, + 0xab,0x4d,0x5f,0xf6,0x3d,0xa2,0x63,0x0d,0x40,0x20,0x8c,0x00,0x00,0x00,0x00,0x00, + 0xb4,0x8c,0x11,0x03,0x42,0x08,0x88,0x69,0x90,0x81,0x72,0xa2,0x11,0x83,0x42,0x08, + 0x8a,0x0a,0x9a,0x63,0x78,0xac,0x66,0x90,0xe1,0x7a,0xa4,0x11,0x03,0x42,0x08,0x0c, + 0x6c,0x30,0x82,0xc9,0x06,0x00,0xc3,0x81,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0xb6,0x40,0x54,0x3f,0xd2,0x18,0x43,0x51,0xfd,0x0e,0x35,0x01,0x01,0x31,0x00,0x00, + 0x03,0x00,0x00,0x00,0x5b,0x06,0x20,0x98,0xb6,0x0c,0x47,0x30,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; +ScriptC_mono::ScriptC_mono(RenderScript *rs, const char *cacheDir, size_t cacheDirLength) : + ScriptC(rs, __txt, sizeof(__txt), "mono.rs", 4, cacheDir, cacheDirLength) { +} +ScriptC_mono::~ScriptC_mono() { } -void ScriptC_mono::forEach_root(const Allocation *ain, const Allocation *aout) { +void ScriptC_mono::forEach_root(const Allocation *ain, const Allocation *aout) const { forEach(0, ain, aout, NULL, 0); } diff --git a/libs/rs/tests/ScriptC_mono.h b/libs/rs/tests/ScriptC_mono.h index 7e4f601e78fd..69c41acddea8 100644 --- a/libs/rs/tests/ScriptC_mono.h +++ b/libs/rs/tests/ScriptC_mono.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2012 The Android Open Source Project + * Copyright (C) 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. @@ -14,13 +14,42 @@ * limitations under the License. */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: mono.rs + */ + + #include "ScriptC.h" class ScriptC_mono : protected ScriptC { +private: + int32_t __gInt; + bool __gBool; public: ScriptC_mono(RenderScript *rs, const char *cacheDir, size_t cacheDirLength); - - void forEach_root(const Allocation *ain, const Allocation *aout); - + virtual ~ScriptC_mono(); + + void set_gInt(int32_t v) { + setVar(0, v); + __gInt = v; + } + int32_t get_gInt() const { + return __gInt; + } + + float get_cFloat() const { + return 1.2f; + } + + void set_gBool(bool v) { + setVar(2, v); + __gBool = v; + } + bool get_gBool() const { + return __gBool; + } + + void forEach_root(const Allocation *ain, const Allocation *aout) const; }; - diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index 4e6c17480964..d92180db62d5 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -24,6 +24,7 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.Parcel; +import android.os.Parcelable; import android.os.ParcelFileDescriptor; import android.os.PowerManager; import android.util.Log; @@ -455,6 +456,22 @@ import java.lang.ref.WeakReference; * <td>Successful invoke of this method in a valid state transfers the * object to the <em>Stopped</em> state. Calling this method in an * invalid state transfers the object to the <em>Error</em> state.</p></td></tr> + * <tr><td>getTrackInfo </p></td> + * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td> + * <td>{Idle, Initialized, Error}</p></td> + * <td>Successful invoke of this method does not change the state.</p></td></tr> + * <tr><td>addExternalSource </p></td> + * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td> + * <td>{Idle, Initialized, Error}</p></td> + * <td>Successful invoke of this method does not change the state.</p></td></tr> + * <tr><td>selectTrack </p></td> + * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td> + * <td>{Idle, Initialized, Error}</p></td> + * <td>Successful invoke of this method does not change the state.</p></td></tr> + * <tr><td>disableTrack </p></td> + * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td> + * <td>{Idle, Initialized, Error}</p></td> + * <td>Successful invoke of this method does not change the state.</p></td></tr> * * </table> * @@ -572,6 +589,15 @@ public class MediaPlayer */ private native void _setVideoSurface(Surface surface); + /* Do not change these values (starting with INVOKE_ID) without updating + * their counterparts in include/media/mediaplayer.h! + */ + private static final int INVOKE_ID_GET_TRACK_INFO = 1; + private static final int INVOKE_ID_ADD_EXTERNAL_SOURCE = 2; + private static final int INVOKE_ID_ADD_EXTERNAL_SOURCE_FD = 3; + private static final int INVOKE_ID_SELECT_TRACK = 4; + private static final int INVOKE_ID_UNSELECT_TRACK = 5; + /** * Create a request parcel which can be routed to the native media * player using {@link #invoke(Parcel, Parcel)}. The Parcel @@ -1170,7 +1196,6 @@ public class MediaPlayer * * @param next the player to start after this one completes playback. * - * @hide */ public native void setNextMediaPlayer(MediaPlayer next); @@ -1313,23 +1338,6 @@ public class MediaPlayer /* Do not change these values (starting with KEY_PARAMETER) without updating * their counterparts in include/media/mediaplayer.h! */ - /* - * Key used in setParameter method. - * Indicates the index of the timed text track to be enabled/disabled. - * The index includes both the in-band and out-of-band timed text. - * The index should start from in-band text if any. Application can retrieve the number - * of in-band text tracks by using MediaMetadataRetriever::extractMetadata(). - * Note it might take a few hundred ms to scan an out-of-band text file - * before displaying it. - */ - private static final int KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000; - /* - * Key used in setParameter method. - * Used to add out-of-band timed text source path. - * Application can add multiple text sources by calling setParameter() with - * KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE multiple times. - */ - private static final int KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001; // There are currently no defined keys usable from Java with get*Parameter. // But if any keys are defined, the order must be kept in sync with include/media/mediaplayer.h. @@ -1374,7 +1382,7 @@ public class MediaPlayer return ret; } - /** + /* * Gets the value of the parameter indicated by key. * @param key key indicates the parameter to get. * @param reply value of the parameter to get. @@ -1436,7 +1444,7 @@ public class MediaPlayer */ public native void setAuxEffectSendLevel(float level); - /** + /* * @param request Parcel destinated to the media player. The * Interface token must be set to the IMediaPlayer * one to be routed correctly through the system. @@ -1446,7 +1454,7 @@ public class MediaPlayer private native final int native_invoke(Parcel request, Parcel reply); - /** + /* * @param update_only If true fetch only the set of metadata that have * changed since the last invocation of getMetadata. * The set is built using the unfiltered @@ -1463,7 +1471,7 @@ public class MediaPlayer boolean apply_filter, Parcel reply); - /** + /* * @param request Parcel with the 2 serialized lists of allowed * metadata types followed by the one to be * dropped. Each list starts with an integer @@ -1477,33 +1485,289 @@ public class MediaPlayer private native final void native_finalize(); /** - * @param index The index of the text track to be turned on. - * @return true if the text track is enabled successfully. + * Class for MediaPlayer to return each audio/video/subtitle track's metadata. + * + * {@see #getTrackInfo()}. + * {@hide} + */ + static public class TrackInfo implements Parcelable { + /** + * Gets the track type. + * @return TrackType which indicates if the track is video, audio, timed text. + */ + public int getTrackType() { + return mTrackType; + } + + /** + * Gets the language code of the track. + * @return a language code in either way of ISO-639-1 or ISO-639-2. + * When the language is unknown or could not be determined, + * ISO-639-2 language code, "und", is returned. + */ + public String getLanguage() { + return mLanguage; + } + + public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0; + public static final int MEDIA_TRACK_TYPE_VIDEO = 1; + public static final int MEDIA_TRACK_TYPE_AUDIO = 2; + public static final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3; + + final int mTrackType; + final String mLanguage; + + TrackInfo(Parcel in) { + mTrackType = in.readInt(); + mLanguage = in.readString(); + } + + /* + * No special parcel contents. Keep it as hide. + * {@hide} + */ + @Override + public int describeContents() { + return 0; + } + + /* + * {@hide} + */ + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(mTrackType); + dest.writeString(mLanguage); + } + + /** + * Used to read a TrackInfo from a Parcel. + */ + static final Parcelable.Creator<TrackInfo> CREATOR + = new Parcelable.Creator<TrackInfo>() { + @Override + public TrackInfo createFromParcel(Parcel in) { + return new TrackInfo(in); + } + + @Override + public TrackInfo[] newArray(int size) { + return new TrackInfo[size]; + } + }; + + }; + + /** + * Returns an array of track information. + * + * @return Array of track info. null if an error occured. * {@hide} */ - public boolean enableTimedTextTrackIndex(int index) { - if (index < 0) { - return false; + // FIXME: It returns timed text tracks' information for now. Other types of tracks will be + // supported in future. + public TrackInfo[] getTrackInfo() { + Parcel request = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + request.writeInterfaceToken(IMEDIA_PLAYER); + request.writeInt(INVOKE_ID_GET_TRACK_INFO); + invoke(request, reply); + TrackInfo trackInfo[] = reply.createTypedArray(TrackInfo.CREATOR); + return trackInfo; + } + + /* + * A helper function to check if the mime type is supported by media framework. + */ + private boolean availableMimeTypeForExternalSource(String mimeType) { + if (mimeType == MEDIA_MIMETYPE_TEXT_SUBRIP) { + return true; } - return setParameter(KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX, index); + return false; } + /* TODO: Limit the total number of external timed text source to a reasonable number. + */ /** - * Enables the first timed text track if any. - * @return true if the text track is enabled successfully + * Adds an external source file. + * + * Currently supported format is SubRip with the file extension .srt, case insensitive. + * Note that a single external source may contain multiple tracks in it. + * One can find the total number of available tracks using {@link #getTrackInfo()} to see what + * additional tracks become available after this method call. + * + * @param path The file path of external source file. * {@hide} */ - public boolean enableTimedText() { - return enableTimedTextTrackIndex(0); + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException). + public void addExternalSource(String path, String mimeType) + throws IllegalArgumentException { + if (!availableMimeTypeForExternalSource(mimeType)) { + throw new IllegalArgumentException("Illegal mimeType for external source: " + mimeType); + } + + Parcel request = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + request.writeInterfaceToken(IMEDIA_PLAYER); + request.writeInt(INVOKE_ID_ADD_EXTERNAL_SOURCE); + request.writeString(path); + request.writeString(mimeType); + invoke(request, reply); } /** - * Disables timed text display. - * @return true if the text track is disabled successfully. + * Adds an external source file (Uri). + * + * Currently supported format is SubRip with the file extension .srt, case insensitive. + * Note that a single external source may contain multiple tracks in it. + * One can find the total number of available tracks using {@link #getTrackInfo()} to see what + * additional tracks become available after this method call. + * + * @param context the Context to use when resolving the Uri + * @param uri the Content URI of the data you want to play * {@hide} */ - public boolean disableTimedText() { - return setParameter(KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX, -1); + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException). + public void addExternalSource(Context context, Uri uri, String mimeType) + throws IOException, IllegalArgumentException { + String scheme = uri.getScheme(); + if(scheme == null || scheme.equals("file")) { + addExternalSource(uri.getPath(), mimeType); + return; + } + + AssetFileDescriptor fd = null; + try { + ContentResolver resolver = context.getContentResolver(); + fd = resolver.openAssetFileDescriptor(uri, "r"); + if (fd == null) { + return; + } + addExternalSource(fd.getFileDescriptor(), mimeType); + return; + } catch (SecurityException ex) { + } catch (IOException ex) { + } finally { + if (fd != null) { + fd.close(); + } + } + + // TODO: try server side. + } + + /* Do not change these values without updating their counterparts + * in include/media/stagefright/MediaDefs.h and media/libstagefright/MediaDefs.cpp! + */ + /** + * MIME type for SubRip (SRT) container. Used in {@link #addExternalSource()} APIs. + * {@hide} + */ + public static final String MEDIA_MIMETYPE_TEXT_SUBRIP = "application/x-subrip"; + + /** + * Adds an external source file (FileDescriptor). + * It is the caller's responsibility to close the file descriptor. + * It is safe to do so as soon as this call returns. + * + * Currently supported format is SubRip with the file extension .srt, case insensitive. + * Note that a single external source may contain multiple tracks in it. + * One can find the total number of available tracks using {@link #getTrackInfo()} to see what + * additional tracks become available after this method call. + * + * @param fd the FileDescriptor for the file you want to play + * @param mimeType A MIME type for the content. It can be null. + * <ul> + * <li>{@link #MEDIA_MIMETYPE_TEXT_SUBRIP} + * </ul> + * {@hide} + */ + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException). + public void addExternalSource(FileDescriptor fd, String mimeType) + throws IllegalArgumentException { + // intentionally less than LONG_MAX + addExternalSource(fd, 0, 0x7ffffffffffffffL, mimeType); + } + + /** + * Adds an external timed text file (FileDescriptor). + * It is the caller's responsibility to close the file descriptor. + * It is safe to do so as soon as this call returns. + * + * Currently supported format is SubRip with the file extension .srt, case insensitive. + * Note that a single external source may contain multiple tracks in it. + * One can find the total number of available tracks using {@link #getTrackInfo()} to see what + * additional tracks become available after this method call. + * + * @param fd the FileDescriptor for the file you want to play + * @param offset the offset into the file where the data to be played starts, in bytes + * @param length the length in bytes of the data to be played + * @param mimeType A MIME type for the content. It can be null. + * {@hide} + */ + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException). + public void addExternalSource(FileDescriptor fd, long offset, long length, String mimeType) + throws IllegalArgumentException { + if (!availableMimeTypeForExternalSource(mimeType)) { + throw new IllegalArgumentException("Illegal mimeType for external source: " + mimeType); + } + Parcel request = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + request.writeInterfaceToken(IMEDIA_PLAYER); + request.writeInt(INVOKE_ID_ADD_EXTERNAL_SOURCE_FD); + request.writeFileDescriptor(fd); + request.writeLong(offset); + request.writeLong(length); + request.writeString(mimeType); + invoke(request, reply); + } + + /** + * Selects a track. + * <p> + * If a MediaPlayer is in invalid state, it throws exception. + * If a MediaPlayer is in Started state, the selected track will be presented immediately. + * If a MediaPlayer is not in Started state, it just marks the track to be played. + * </p> + * <p> + * In any valid state, if it is called multiple times on the same type of track (ie. Video, + * Audio, Timed Text), the most recent one will be chosen. + * </p> + * <p> + * The first audio and video tracks will be selected by default, even though this function is not + * called. However, no timed text track will be selected until this function is called. + * </p> + * {@hide} + */ + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException, IllegalArgumentException). + public void selectTrack(int index) { + Parcel request = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + request.writeInterfaceToken(IMEDIA_PLAYER); + request.writeInt(INVOKE_ID_SELECT_TRACK); + request.writeInt(index); + invoke(request, reply); + } + + /** + * Unselect a track. + * If the track identified by index has not been selected before, it throws an exception. + * {@hide} + */ + // FIXME: define error codes and throws exceptions according to the error codes. + // (IllegalStateException, IOException, IllegalArgumentException). + public void unselectTrack(int index) { + Parcel request = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + request.writeInterfaceToken(IMEDIA_PLAYER); + request.writeInt(INVOKE_ID_UNSELECT_TRACK); + request.writeInt(index); + invoke(request, reply); } /** @@ -1642,14 +1906,14 @@ public class MediaPlayer // No real default action so far. return; case MEDIA_TIMED_TEXT: - if (mOnTimedTextListener != null) { - if (msg.obj == null) { - mOnTimedTextListener.onTimedText(mMediaPlayer, null); - } else { - if (msg.obj instanceof byte[]) { - TimedText text = new TimedText((byte[])(msg.obj)); - mOnTimedTextListener.onTimedText(mMediaPlayer, text); - } + if (mOnTimedTextListener == null) + return; + if (msg.obj == null) { + mOnTimedTextListener.onTimedText(mMediaPlayer, null); + } else { + if (msg.obj instanceof byte[]) { + TimedText text = new TimedText((byte[])(msg.obj)); + mOnTimedTextListener.onTimedText(mMediaPlayer, text); } } return; @@ -1664,7 +1928,7 @@ public class MediaPlayer } } - /** + /* * Called from native code when an interesting event happens. This method * just uses the EventHandler system to post the event back to the main app thread. * We use a weak reference to the original MediaPlayer object so that the native @@ -1978,6 +2242,13 @@ public class MediaPlayer */ public static final int MEDIA_INFO_METADATA_UPDATE = 802; + /** Failed to handle timed text track properly. + * @see android.media.MediaPlayer.OnInfoListener + * + * {@hide} + */ + public static final int MEDIA_INFO_TIMED_TEXT_ERROR = 900; + /** * Interface definition of a callback to be invoked to communicate some * info and/or warning about the media or its playback. diff --git a/media/jni/audioeffect/Android.mk b/media/jni/audioeffect/Android.mk index 3e493b1a03ea..b5d8b7b21a46 100644 --- a/media/jni/audioeffect/Android.mk +++ b/media/jni/audioeffect/Android.mk @@ -13,7 +13,7 @@ LOCAL_SHARED_LIBRARIES := \ libmedia LOCAL_C_INCLUDES := \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) LOCAL_MODULE:= libaudioeffect_jni diff --git a/media/libeffects/downmix/Android.mk b/media/libeffects/downmix/Android.mk index 0348e1e9f077..95ca6fd11c9d 100644 --- a/media/libeffects/downmix/Android.mk +++ b/media/libeffects/downmix/Android.mk @@ -20,8 +20,8 @@ LOCAL_LDLIBS += -ldl endif LOCAL_C_INCLUDES := \ - system/media/audio_effects/include \ - system/media/audio_utils/include + $(call include-path-for, audio-effects) \ + $(call include-path-for, audio-utils) LOCAL_PRELINK_MODULE := false diff --git a/media/libeffects/factory/Android.mk b/media/libeffects/factory/Android.mk index 2f2b974773d0..6e69151a4087 100644 --- a/media/libeffects/factory/Android.mk +++ b/media/libeffects/factory/Android.mk @@ -15,6 +15,6 @@ LOCAL_MODULE:= libeffects LOCAL_SHARED_LIBRARIES += libdl LOCAL_C_INCLUDES := \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) include $(BUILD_SHARED_LIBRARY) diff --git a/media/libeffects/lvm/wrapper/Android.mk b/media/libeffects/lvm/wrapper/Android.mk index f097dd084ecf..4313424a1426 100644 --- a/media/libeffects/lvm/wrapper/Android.mk +++ b/media/libeffects/lvm/wrapper/Android.mk @@ -26,7 +26,7 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/Bundle \ $(LOCAL_PATH)/../lib/Common/lib/ \ $(LOCAL_PATH)/../lib/Bundle/lib/ \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) include $(BUILD_SHARED_LIBRARY) @@ -55,6 +55,6 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/Reverb \ $(LOCAL_PATH)/../lib/Common/lib/ \ $(LOCAL_PATH)/../lib/Reverb/lib/ \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) -include $(BUILD_SHARED_LIBRARY)
\ No newline at end of file +include $(BUILD_SHARED_LIBRARY) diff --git a/media/libeffects/preprocessing/Android.mk b/media/libeffects/preprocessing/Android.mk index 7f7c7e1ee892..c13b9d4141f5 100755 --- a/media/libeffects/preprocessing/Android.mk +++ b/media/libeffects/preprocessing/Android.mk @@ -14,7 +14,7 @@ LOCAL_C_INCLUDES += \ external/webrtc/src \ external/webrtc/src/modules/interface \ external/webrtc/src/modules/audio_processing/interface \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) LOCAL_C_INCLUDES += $(call include-path-for, speex) diff --git a/media/libeffects/testlibs/Android.mk_ b/media/libeffects/testlibs/Android.mk_ index 249ebf417cb7..2954908806ae 100644 --- a/media/libeffects/testlibs/Android.mk_ +++ b/media/libeffects/testlibs/Android.mk_ @@ -23,7 +23,7 @@ LOCAL_SHARED_LIBRARIES += libdl endif LOCAL_C_INCLUDES := \ - system/media/audio_effects/include \ + $(call include-path-for, audio-effects) \ $(call include-path-for, graphics corecg) LOCAL_MODULE_TAGS := optional @@ -60,7 +60,7 @@ endif LOCAL_C_INCLUDES := \ $(call include-path-for, graphics corecg) \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) LOCAL_MODULE_TAGS := optional diff --git a/media/libeffects/visualizer/Android.mk b/media/libeffects/visualizer/Android.mk index 2160177e1ce3..76b5110b7e5d 100644 --- a/media/libeffects/visualizer/Android.mk +++ b/media/libeffects/visualizer/Android.mk @@ -17,7 +17,7 @@ LOCAL_MODULE:= libvisualizer LOCAL_C_INCLUDES := \ $(call include-path-for, graphics corecg) \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) include $(BUILD_SHARED_LIBRARY) diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk index 5ecc8f508efa..8b009aa2383f 100644 --- a/media/libmedia/Android.mk +++ b/media/libmedia/Android.mk @@ -60,7 +60,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/native/include/media/openmax \ external/icu4c/common \ external/expat/lib \ - system/media/audio_effects/include \ - system/media/audio_utils/include + $(call include-path-for, audio-effects) \ + $(call include-path-for, audio-utils) include $(BUILD_SHARED_LIBRARY) diff --git a/media/libmediaplayerservice/StagefrightPlayer.cpp b/media/libmediaplayerservice/StagefrightPlayer.cpp index 052ebf04df2c..619c14908962 100644 --- a/media/libmediaplayerservice/StagefrightPlayer.cpp +++ b/media/libmediaplayerservice/StagefrightPlayer.cpp @@ -166,7 +166,8 @@ player_type StagefrightPlayer::playerType() { } status_t StagefrightPlayer::invoke(const Parcel &request, Parcel *reply) { - return INVALID_OPERATION; + ALOGV("invoke()"); + return mPlayer->invoke(request, reply); } void StagefrightPlayer::setAudioSink(const sp<AudioSink> &audioSink) { diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 9e00bb349144..b4cb1abff94f 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1114,7 +1114,7 @@ status_t AwesomePlayer::pause_l(bool at_eos) { modifyFlags(AUDIO_RUNNING, CLEAR); } - if (mFlags & TEXTPLAYER_STARTED) { + if (mFlags & TEXTPLAYER_INITIALIZED) { mTextDriver->pause(); modifyFlags(TEXT_RUNNING, CLEAR); } @@ -1268,32 +1268,6 @@ status_t AwesomePlayer::seekTo(int64_t timeUs) { return OK; } -status_t AwesomePlayer::setTimedTextTrackIndex(int32_t index) { - if (mTextDriver != NULL) { - if (index >= 0) { // to turn on a text track - status_t err = mTextDriver->setTimedTextTrackIndex(index); - if (err != OK) { - return err; - } - - modifyFlags(TEXT_RUNNING, SET); - modifyFlags(TEXTPLAYER_STARTED, SET); - return OK; - } else { // to turn off the text track display - if (mFlags & TEXT_RUNNING) { - modifyFlags(TEXT_RUNNING, CLEAR); - } - if (mFlags & TEXTPLAYER_STARTED) { - modifyFlags(TEXTPLAYER_STARTED, CLEAR); - } - - return mTextDriver->setTimedTextTrackIndex(index); - } - } else { - return INVALID_OPERATION; - } -} - status_t AwesomePlayer::seekTo_l(int64_t timeUs) { if (mFlags & CACHE_UNDERRUN) { modifyFlags(CACHE_UNDERRUN, CLEAR); @@ -1315,7 +1289,7 @@ status_t AwesomePlayer::seekTo_l(int64_t timeUs) { seekAudioIfNecessary_l(); - if (mFlags & TEXTPLAYER_STARTED) { + if (mFlags & TEXTPLAYER_INITIALIZED) { mTextDriver->seekToAsync(mSeekTimeUs); } @@ -1691,8 +1665,8 @@ void AwesomePlayer::onVideoEvent() { } } - if ((mFlags & TEXTPLAYER_STARTED) && !(mFlags & (TEXT_RUNNING | SEEK_PREVIEW))) { - mTextDriver->resume(); + if ((mFlags & TEXTPLAYER_INITIALIZED) && !(mFlags & (TEXT_RUNNING | SEEK_PREVIEW))) { + mTextDriver->start(); modifyFlags(TEXT_RUNNING, SET); } @@ -2232,20 +2206,6 @@ void AwesomePlayer::postAudioSeekComplete() { status_t AwesomePlayer::setParameter(int key, const Parcel &request) { switch (key) { - case KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX: - { - Mutex::Autolock autoLock(mTimedTextLock); - return setTimedTextTrackIndex(request.readInt32()); - } - case KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE: - { - Mutex::Autolock autoLock(mTimedTextLock); - if (mTextDriver == NULL) { - mTextDriver = new TimedTextDriver(mListener); - } - - return mTextDriver->addOutOfBandTextSource(request); - } case KEY_PARAMETER_CACHE_STAT_COLLECT_FREQ_MS: { return setCacheStatCollectFreq(request); @@ -2294,6 +2254,103 @@ status_t AwesomePlayer::getParameter(int key, Parcel *reply) { } } +status_t AwesomePlayer::invoke(const Parcel &request, Parcel *reply) { + if (NULL == reply) { + return android::BAD_VALUE; + } + int32_t methodId; + status_t ret = request.readInt32(&methodId); + if (ret != android::OK) { + return ret; + } + switch(methodId) { + case INVOKE_ID_GET_TRACK_INFO: + { + Mutex::Autolock autoLock(mTimedTextLock); + if (mTextDriver == NULL) { + return INVALID_OPERATION; + } + mTextDriver->getTrackInfo(reply); + return OK; + } + case INVOKE_ID_ADD_EXTERNAL_SOURCE: + { + Mutex::Autolock autoLock(mTimedTextLock); + if (mTextDriver == NULL) { + mTextDriver = new TimedTextDriver(mListener); + } + // String values written in Parcel are UTF-16 values. + String16 uri16 = request.readString16(); + const char *uri = NULL; + if (uri16 != NULL) { + uri = String8(uri16).string(); + } + String16 mimeType16 = request.readString16(); + const char *mimeType = NULL; + if (mimeType16 != NULL) { + mimeType = String8(mimeType16).string(); + } + return mTextDriver->addOutOfBandTextSource(uri, mimeType); + } + case INVOKE_ID_ADD_EXTERNAL_SOURCE_FD: + { + Mutex::Autolock autoLock(mTimedTextLock); + if (mTextDriver == NULL) { + mTextDriver = new TimedTextDriver(mListener); + } + int fd = request.readFileDescriptor(); + off64_t offset = request.readInt64(); + size_t length = request.readInt64(); + String16 mimeType16 = request.readString16(); + const char *mimeType = NULL; + if (mimeType16 != NULL) { + mimeType = String8(mimeType16).string(); + } + + return mTextDriver->addOutOfBandTextSource( + fd, offset, length, mimeType); + } + case INVOKE_ID_SELECT_TRACK: + { + Mutex::Autolock autoLock(mTimedTextLock); + if (mTextDriver == NULL) { + return INVALID_OPERATION; + } + + status_t err = mTextDriver->selectTrack( + request.readInt32()); + if (err == OK) { + modifyFlags(TEXTPLAYER_INITIALIZED, SET); + if (mFlags & PLAYING && !(mFlags & TEXT_RUNNING)) { + mTextDriver->start(); + modifyFlags(TEXT_RUNNING, SET); + } + } + return err; + } + case INVOKE_ID_UNSELECT_TRACK: + { + Mutex::Autolock autoLock(mTimedTextLock); + if (mTextDriver == NULL) { + return INVALID_OPERATION; + } + status_t err = mTextDriver->unselectTrack( + request.readInt32()); + if (err == OK) { + modifyFlags(TEXTPLAYER_INITIALIZED, CLEAR); + modifyFlags(TEXT_RUNNING, CLEAR); + } + return err; + } + default: + { + return ERROR_UNSUPPORTED; + } + } + // It will not reach here. + return OK; +} + bool AwesomePlayer::isStreamingHTTP() const { return mCachedSource != NULL || mWVMExtractor != NULL; } diff --git a/media/libstagefright/MediaDefs.cpp b/media/libstagefright/MediaDefs.cpp index 444e823295a3..2549de68afb6 100644 --- a/media/libstagefright/MediaDefs.cpp +++ b/media/libstagefright/MediaDefs.cpp @@ -52,5 +52,6 @@ const char *MEDIA_MIMETYPE_CONTAINER_MPEG2PS = "video/mp2p"; const char *MEDIA_MIMETYPE_CONTAINER_WVM = "video/wvm"; const char *MEDIA_MIMETYPE_TEXT_3GPP = "text/3gpp-tt"; +const char *MEDIA_MIMETYPE_TEXT_SUBRIP = "application/x-subrip"; } // namespace android diff --git a/media/libstagefright/XINGSeeker.cpp b/media/libstagefright/XINGSeeker.cpp index 20913816b362..e36d61978cbb 100644 --- a/media/libstagefright/XINGSeeker.cpp +++ b/media/libstagefright/XINGSeeker.cpp @@ -24,7 +24,7 @@ namespace android { static bool parse_xing_header( const sp<DataSource> &source, off64_t first_frame_pos, int32_t *frame_number = NULL, int32_t *byte_number = NULL, - unsigned char *table_of_contents = NULL, + unsigned char *table_of_contents = NULL, bool *toc_is_valid = NULL, int32_t *quality_indicator = NULL, int64_t *duration = NULL); // static @@ -36,7 +36,7 @@ sp<XINGSeeker> XINGSeeker::CreateFromSource( if (!parse_xing_header( source, first_frame_pos, - NULL, &seeker->mSizeBytes, seeker->mTableOfContents, + NULL, &seeker->mSizeBytes, seeker->mTOC, &seeker->mTOCValid, NULL, &seeker->mDurationUs)) { return NULL; } @@ -60,7 +60,7 @@ bool XINGSeeker::getDuration(int64_t *durationUs) { } bool XINGSeeker::getOffsetForTime(int64_t *timeUs, off64_t *pos) { - if (mSizeBytes == 0 || mTableOfContents[0] <= 0 || mDurationUs < 0) { + if (mSizeBytes == 0 || !mTOCValid || mDurationUs < 0) { return false; } @@ -76,10 +76,10 @@ bool XINGSeeker::getOffsetForTime(int64_t *timeUs, off64_t *pos) { if ( a == 0 ) { fa = 0.0f; } else { - fa = (float)mTableOfContents[a-1]; + fa = (float)mTOC[a-1]; } if ( a < 99 ) { - fb = (float)mTableOfContents[a]; + fb = (float)mTOC[a]; } else { fb = 256.0f; } @@ -94,7 +94,8 @@ bool XINGSeeker::getOffsetForTime(int64_t *timeUs, off64_t *pos) { static bool parse_xing_header( const sp<DataSource> &source, off64_t first_frame_pos, int32_t *frame_number, int32_t *byte_number, - unsigned char *table_of_contents, int32_t *quality_indicator, + unsigned char *table_of_contents, bool *toc_valid, + int32_t *quality_indicator, int64_t *duration) { if (frame_number) { *frame_number = 0; @@ -102,8 +103,8 @@ static bool parse_xing_header( if (byte_number) { *byte_number = 0; } - if (table_of_contents) { - table_of_contents[0] = 0; + if (toc_valid) { + *toc_valid = false; } if (quality_indicator) { *quality_indicator = 0; @@ -199,10 +200,13 @@ static bool parse_xing_header( offset += 4; } if (flags & 0x0004) { // TOC field is present - if (table_of_contents) { + if (table_of_contents) { if (source->readAt(offset + 1, table_of_contents, 99) < 99) { return false; } + if (toc_valid) { + *toc_valid = true; + } } offset += 100; } diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 4c7bfa684a13..06e946887f18 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -90,6 +90,7 @@ struct AwesomePlayer { status_t setParameter(int key, const Parcel &request); status_t getParameter(int key, Parcel *reply); + status_t invoke(const Parcel &request, Parcel *reply); status_t setCacheStatCollectFreq(const Parcel &request); status_t seekTo(int64_t timeUs); @@ -100,8 +101,6 @@ struct AwesomePlayer { void postAudioEOS(int64_t delayUs = 0ll); void postAudioSeekComplete(); - status_t setTimedTextTrackIndex(int32_t index); - status_t dump(int fd, const Vector<String16> &args) const; private: @@ -136,7 +135,7 @@ private: INCOGNITO = 0x8000, TEXT_RUNNING = 0x10000, - TEXTPLAYER_STARTED = 0x20000, + TEXTPLAYER_INITIALIZED = 0x20000, SLOW_DECODER_HACK = 0x40000, }; diff --git a/media/libstagefright/include/XINGSeeker.h b/media/libstagefright/include/XINGSeeker.h index ec5bd9b0ac94..85109791d9b8 100644 --- a/media/libstagefright/include/XINGSeeker.h +++ b/media/libstagefright/include/XINGSeeker.h @@ -37,7 +37,8 @@ private: int32_t mSizeBytes; // TOC entries in XING header. Skip the first one since it's always 0. - unsigned char mTableOfContents[99]; + unsigned char mTOC[99]; + bool mTOCValid; XINGSeeker(); diff --git a/media/libstagefright/timedtext/TimedText3GPPSource.cpp b/media/libstagefright/timedtext/TimedText3GPPSource.cpp index 4a3bfd323e74..c423ef063f30 100644 --- a/media/libstagefright/timedtext/TimedText3GPPSource.cpp +++ b/media/libstagefright/timedtext/TimedText3GPPSource.cpp @@ -110,4 +110,8 @@ status_t TimedText3GPPSource::extractGlobalDescriptions(Parcel *parcel) { return OK; } +sp<MetaData> TimedText3GPPSource::getFormat() { + return mSource->getFormat(); +} + } // namespace android diff --git a/media/libstagefright/timedtext/TimedText3GPPSource.h b/media/libstagefright/timedtext/TimedText3GPPSource.h index dfc6418764a4..4ec3d8a13dfb 100644 --- a/media/libstagefright/timedtext/TimedText3GPPSource.h +++ b/media/libstagefright/timedtext/TimedText3GPPSource.h @@ -37,6 +37,7 @@ public: Parcel *parcel, const MediaSource::ReadOptions *options = NULL); virtual status_t extractGlobalDescriptions(Parcel *parcel); + virtual sp<MetaData> getFormat(); protected: virtual ~TimedText3GPPSource(); diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp index c70870ea690f..ed8389401926 100644 --- a/media/libstagefright/timedtext/TimedTextDriver.cpp +++ b/media/libstagefright/timedtext/TimedTextDriver.cpp @@ -20,10 +20,13 @@ #include <binder/IPCThreadState.h> +#include <media/mediaplayer.h> #include <media/MediaPlayerInterface.h> +#include <media/stagefright/DataSource.h> +#include <media/stagefright/MediaDefs.h> #include <media/stagefright/MediaErrors.h> #include <media/stagefright/MediaSource.h> -#include <media/stagefright/DataSource.h> +#include <media/stagefright/MetaData.h> #include <media/stagefright/Utils.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/ALooper.h> @@ -47,24 +50,22 @@ TimedTextDriver::TimedTextDriver( } TimedTextDriver::~TimedTextDriver() { - mTextInBandVector.clear(); - mTextOutOfBandVector.clear(); + mTextSourceVector.clear(); mLooper->stop(); } -status_t TimedTextDriver::setTimedTextTrackIndex_l(int32_t index) { - if (index >= - (int)(mTextInBandVector.size() + mTextOutOfBandVector.size())) { +status_t TimedTextDriver::selectTrack_l(int32_t index) { + if (index >= (int)(mTextSourceVector.size())) { return BAD_VALUE; } sp<TimedTextSource> source; - if (index < mTextInBandVector.size()) { - source = mTextInBandVector.itemAt(index); - } else { - source = mTextOutOfBandVector.itemAt(index - mTextInBandVector.size()); - } + source = mTextSourceVector.itemAt(index); mPlayer->setDataSource(source); + if (mState == UNINITIALIZED) { + mState = PAUSED; + } + mCurrentTrackIndex = index; return OK; } @@ -73,13 +74,10 @@ status_t TimedTextDriver::start() { switch (mState) { case UNINITIALIZED: return INVALID_OPERATION; - case STOPPED: - mPlayer->start(); - break; case PLAYING: return OK; case PAUSED: - mPlayer->resume(); + mPlayer->start(); break; default: TRESPASS(); @@ -88,10 +86,6 @@ status_t TimedTextDriver::start() { return OK; } -status_t TimedTextDriver::stop() { - return pause(); -} - // TODO: Test if pause() works properly. // Scenario 1: start - pause - resume // Scenario 2: start - seek @@ -101,8 +95,6 @@ status_t TimedTextDriver::pause() { switch (mState) { case UNINITIALIZED: return INVALID_OPERATION; - case STOPPED: - return OK; case PLAYING: mPlayer->pause(); break; @@ -115,45 +107,17 @@ status_t TimedTextDriver::pause() { return OK; } -status_t TimedTextDriver::resume() { - return start(); -} - -status_t TimedTextDriver::seekToAsync(int64_t timeUs) { - mPlayer->seekToAsync(timeUs); - return OK; -} - -status_t TimedTextDriver::setTimedTextTrackIndex(int32_t index) { - // TODO: This is current implementation for MediaPlayer::disableTimedText(). - // Find better way for readability. - if (index < 0) { - mPlayer->pause(); - return OK; - } - +status_t TimedTextDriver::selectTrack(int32_t index) { status_t ret = OK; Mutex::Autolock autoLock(mLock); switch (mState) { case UNINITIALIZED: - ret = INVALID_OPERATION; - break; case PAUSED: - ret = setTimedTextTrackIndex_l(index); + ret = selectTrack_l(index); break; case PLAYING: mPlayer->pause(); - ret = setTimedTextTrackIndex_l(index); - if (ret != OK) { - break; - } - mPlayer->start(); - break; - case STOPPED: - // TODO: The only difference between STOPPED and PAUSED is this - // part. Revise the flow from "MediaPlayer::enableTimedText()" and - // remove one of the status, PAUSED and STOPPED, if possible. - ret = setTimedTextTrackIndex_l(index); + ret = selectTrack_l(index); if (ret != OK) { break; } @@ -165,6 +129,24 @@ status_t TimedTextDriver::setTimedTextTrackIndex(int32_t index) { return ret; } +status_t TimedTextDriver::unselectTrack(int32_t index) { + if (mCurrentTrackIndex != index) { + return INVALID_OPERATION; + } + status_t err = pause(); + if (err != OK) { + return err; + } + Mutex::Autolock autoLock(mLock); + mState = UNINITIALIZED; + return OK; +} + +status_t TimedTextDriver::seekToAsync(int64_t timeUs) { + mPlayer->seekToAsync(timeUs); + return OK; +} + status_t TimedTextDriver::addInBandTextSource( const sp<MediaSource>& mediaSource) { sp<TimedTextSource> source = @@ -173,25 +155,17 @@ status_t TimedTextDriver::addInBandTextSource( return ERROR_UNSUPPORTED; } Mutex::Autolock autoLock(mLock); - mTextInBandVector.add(source); - if (mState == UNINITIALIZED) { - mState = STOPPED; - } + mTextSourceVector.add(source); return OK; } status_t TimedTextDriver::addOutOfBandTextSource( - const Parcel &request) { + const char *uri, const char *mimeType) { // TODO: Define "TimedTextSource::CreateFromURI(uri)" // and move below lines there..? - // String values written in Parcel are UTF-16 values. - const String16 uri16 = request.readString16(); - String8 uri = String8(request.readString16()); - - uri.toLower(); // To support local subtitle file only for now - if (strncasecmp("file://", uri.string(), 7)) { + if (strncasecmp("file://", uri, 7)) { return ERROR_UNSUPPORTED; } sp<DataSource> dataSource = @@ -201,7 +175,7 @@ status_t TimedTextDriver::addOutOfBandTextSource( } sp<TimedTextSource> source; - if (uri.getPathExtension() == String8(".srt")) { + if (strcasecmp(mimeType, MEDIA_MIMETYPE_TEXT_SUBRIP)) { source = TimedTextSource::CreateTimedTextSource( dataSource, TimedTextSource::OUT_OF_BAND_FILE_SRT); } @@ -211,12 +185,38 @@ status_t TimedTextDriver::addOutOfBandTextSource( } Mutex::Autolock autoLock(mLock); + mTextSourceVector.add(source); + return OK; +} - mTextOutOfBandVector.add(source); - if (mState == UNINITIALIZED) { - mState = STOPPED; +status_t TimedTextDriver::addOutOfBandTextSource( + int fd, off64_t offset, size_t length, const char *mimeType) { + // Not supported yet. This requires DataSource::sniff to detect various text + // formats such as srt/smi/ttml. + return ERROR_UNSUPPORTED; +} + +void TimedTextDriver::getTrackInfo(Parcel *parcel) { + Mutex::Autolock autoLock(mLock); + Vector<sp<TimedTextSource> >::const_iterator iter; + parcel->writeInt32(mTextSourceVector.size()); + for (iter = mTextSourceVector.begin(); + iter != mTextSourceVector.end(); ++iter) { + sp<MetaData> meta = (*iter)->getFormat(); + if (meta != NULL) { + // There are two fields. + parcel->writeInt32(2); + + // track type. + parcel->writeInt32(MEDIA_TRACK_TYPE_TIMEDTEXT); + + const char *lang = "und"; + meta->findCString(kKeyMediaLanguage, &lang); + parcel->writeString16(String16(lang)); + } else { + parcel->writeInt32(0); + } } - return OK; } } // namespace android diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp index bda7b4639d4f..8717914f984c 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.cpp +++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp @@ -56,10 +56,6 @@ void TimedTextPlayer::pause() { (new AMessage(kWhatPause, id()))->post(); } -void TimedTextPlayer::resume() { - start(); -} - void TimedTextPlayer::seekToAsync(int64_t timeUs) { sp<AMessage> msg = new AMessage(kWhatSeek, id()); msg->setInt64("seekTimeUs", timeUs); @@ -104,9 +100,9 @@ void TimedTextPlayer::onMessageReceived(const sp<AMessage> &msg) { if (obj != NULL) { sp<ParcelEvent> parcelEvent; parcelEvent = static_cast<ParcelEvent*>(obj.get()); - notifyListener(MEDIA_TIMED_TEXT, &(parcelEvent->parcel)); + notifyListener(&(parcelEvent->parcel)); } else { - notifyListener(MEDIA_TIMED_TEXT); + notifyListener(); } doRead(); break; @@ -119,14 +115,18 @@ void TimedTextPlayer::onMessageReceived(const sp<AMessage> &msg) { mSource->stop(); } mSource = static_cast<TimedTextSource*>(obj.get()); - mSource->start(); + status_t err = mSource->start(); + if (err != OK) { + notifyError(err); + break; + } Parcel parcel; - if (mSource->extractGlobalDescriptions(&parcel) == OK && - parcel.dataSize() > 0) { - notifyListener(MEDIA_TIMED_TEXT, &parcel); - } else { - notifyListener(MEDIA_TIMED_TEXT); + err = mSource->extractGlobalDescriptions(&parcel); + if (err != OK) { + notifyError(err); + break; } + notifyListener(&parcel); break; } } @@ -141,8 +141,12 @@ void TimedTextPlayer::doSeekAndRead(int64_t seekTimeUs) { void TimedTextPlayer::doRead(MediaSource::ReadOptions* options) { int64_t timeUs = 0; sp<ParcelEvent> parcelEvent = new ParcelEvent(); - mSource->read(&timeUs, &(parcelEvent->parcel), options); - postTextEvent(parcelEvent, timeUs); + status_t err = mSource->read(&timeUs, &(parcelEvent->parcel), options); + if (err != OK) { + notifyError(err); + } else { + postTextEvent(parcelEvent, timeUs); + } } void TimedTextPlayer::postTextEvent(const sp<ParcelEvent>& parcel, int64_t timeUs) { @@ -151,7 +155,7 @@ void TimedTextPlayer::postTextEvent(const sp<ParcelEvent>& parcel, int64_t timeU int64_t positionUs, delayUs; int32_t positionMs = 0; listener->getCurrentPosition(&positionMs); - positionUs = positionMs * 1000; + positionUs = positionMs * 1000ll; if (timeUs <= positionUs + kAdjustmentProcessingTimeUs) { delayUs = 0; @@ -167,13 +171,20 @@ void TimedTextPlayer::postTextEvent(const sp<ParcelEvent>& parcel, int64_t timeU } } -void TimedTextPlayer::notifyListener(int msg, const Parcel *parcel) { +void TimedTextPlayer::notifyError(int error) { + sp<MediaPlayerBase> listener = mListener.promote(); + if (listener != NULL) { + listener->sendEvent(MEDIA_INFO, MEDIA_INFO_TIMED_TEXT_ERROR, error); + } +} + +void TimedTextPlayer::notifyListener(const Parcel *parcel) { sp<MediaPlayerBase> listener = mListener.promote(); if (listener != NULL) { if (parcel != NULL && (parcel->dataSize() > 0)) { - listener->sendEvent(msg, 0, 0, parcel); + listener->sendEvent(MEDIA_TIMED_TEXT, 0, 0, parcel); } else { // send an empty timed text to clear the screen - listener->sendEvent(msg); + listener->sendEvent(MEDIA_TIMED_TEXT); } } } diff --git a/media/libstagefright/timedtext/TimedTextPlayer.h b/media/libstagefright/timedtext/TimedTextPlayer.h index 837beeb0ee3e..b869f187d819 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.h +++ b/media/libstagefright/timedtext/TimedTextPlayer.h @@ -40,7 +40,6 @@ public: void start(); void pause(); - void resume(); void seekToAsync(int64_t timeUs); void setDataSource(sp<TimedTextSource> source); @@ -68,7 +67,8 @@ private: void doRead(MediaSource::ReadOptions* options = NULL); void onTextEvent(); void postTextEvent(const sp<ParcelEvent>& parcel = NULL, int64_t timeUs = -1); - void notifyListener(int msg, const Parcel *parcel = NULL); + void notifyError(int error = 0); + void notifyListener(const Parcel *parcel = NULL); DISALLOW_EVIL_CONSTRUCTORS(TimedTextPlayer); }; diff --git a/media/libstagefright/timedtext/TimedTextSRTSource.cpp b/media/libstagefright/timedtext/TimedTextSRTSource.cpp index 3752d34469a5..c44a99b400df 100644 --- a/media/libstagefright/timedtext/TimedTextSRTSource.cpp +++ b/media/libstagefright/timedtext/TimedTextSRTSource.cpp @@ -21,8 +21,10 @@ #include <binder/Parcel.h> #include <media/stagefright/foundation/AString.h> #include <media/stagefright/DataSource.h> +#include <media/stagefright/MediaDefs.h> // for MEDIA_MIMETYPE_xxx #include <media/stagefright/MediaErrors.h> #include <media/stagefright/MediaSource.h> +#include <media/stagefright/MetaData.h> #include "TimedTextSRTSource.h" #include "TextDescriptions.h" @@ -31,6 +33,7 @@ namespace android { TimedTextSRTSource::TimedTextSRTSource(const sp<DataSource>& dataSource) : mSource(dataSource), + mMetaData(new MetaData), mIndex(0) { } @@ -42,10 +45,14 @@ status_t TimedTextSRTSource::start() { if (err != OK) { reset(); } + // TODO: Need to detect the language, because SRT doesn't give language + // information explicitly. + mMetaData->setCString(kKeyMediaLanguage, ""); return err; } void TimedTextSRTSource::reset() { + mMetaData->clear(); mTextVector.clear(); mIndex = 0; } @@ -272,4 +279,8 @@ status_t TimedTextSRTSource::extractAndAppendLocalDescriptions( return OK; } +sp<MetaData> TimedTextSRTSource::getFormat() { + return mMetaData; +} + } // namespace android diff --git a/media/libstagefright/timedtext/TimedTextSRTSource.h b/media/libstagefright/timedtext/TimedTextSRTSource.h index acc01f94d9f5..62710a01e735 100644 --- a/media/libstagefright/timedtext/TimedTextSRTSource.h +++ b/media/libstagefright/timedtext/TimedTextSRTSource.h @@ -39,12 +39,14 @@ public: int64_t *timeUs, Parcel *parcel, const MediaSource::ReadOptions *options = NULL); + virtual sp<MetaData> getFormat(); protected: virtual ~TimedTextSRTSource(); private: sp<DataSource> mSource; + sp<MetaData> mMetaData; struct TextInfo { int64_t endTimeUs; diff --git a/media/libstagefright/timedtext/TimedTextSource.cpp b/media/libstagefright/timedtext/TimedTextSource.cpp index ffbe1c3bca41..953f7b5f45d2 100644 --- a/media/libstagefright/timedtext/TimedTextSource.cpp +++ b/media/libstagefright/timedtext/TimedTextSource.cpp @@ -59,4 +59,8 @@ sp<TimedTextSource> TimedTextSource::CreateTimedTextSource( return NULL; } +sp<MetaData> TimedTextSource::getFormat() { + return NULL; +} + } // namespace android diff --git a/media/libstagefright/timedtext/TimedTextSource.h b/media/libstagefright/timedtext/TimedTextSource.h index 06bae7150db4..93493426267c 100644 --- a/media/libstagefright/timedtext/TimedTextSource.h +++ b/media/libstagefright/timedtext/TimedTextSource.h @@ -25,6 +25,7 @@ namespace android { class DataSource; +class MetaData; class Parcel; class TimedTextSource : public RefBase { @@ -48,6 +49,7 @@ class TimedTextSource : public RefBase { virtual status_t extractGlobalDescriptions(Parcel *parcel) { return INVALID_OPERATION; } + virtual sp<MetaData> getFormat(); protected: virtual ~TimedTextSource() { } diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk index 86692e7e1fb9..5164213b6fbc 100644 --- a/services/audioflinger/Android.mk +++ b/services/audioflinger/Android.mk @@ -12,8 +12,8 @@ LOCAL_SRC_FILES:= \ # AudioResamplerCubic.cpp.arm LOCAL_C_INCLUDES := \ - system/media/audio_effects/include \ - system/media/audio_utils/include + $(call include-path-for, audio-effects) \ + $(call include-path-for, audio-utils) LOCAL_SHARED_LIBRARIES := \ libaudioutils \ diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 1d4f12b404f7..d83d19a79bdb 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -61,9 +61,13 @@ #include <audio_utils/primitives.h> -#include <cpustats/ThreadCpuUsage.h> #include <powermanager/PowerManager.h> + // #define DEBUG_CPU_USAGE 10 // log statistics every n wall clock seconds +#ifdef DEBUG_CPU_USAGE +#include <cpustats/CentralTendencyStatistics.h> +#include <cpustats/ThreadCpuUsage.h> +#endif #include <common_time/cc_helper.h> #include <common_time/local_clock.h> @@ -1194,6 +1198,10 @@ status_t AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args write(fd, buffer, strlen(buffer)); } + snprintf(buffer, SIZE, "io handle: %d\n", mId); + result.append(buffer); + snprintf(buffer, SIZE, "TID: %d\n", getTid()); + result.append(buffer); snprintf(buffer, SIZE, "standby: %d\n", mStandby); result.append(buffer); snprintf(buffer, SIZE, "Sample rate: %d\n", mSampleRate); @@ -1945,30 +1953,83 @@ AudioFlinger::MixerThread::~MixerThread() class CpuStats { public: - void sample(); + CpuStats(); + void sample(const String8 &title); #ifdef DEBUG_CPU_USAGE private: - ThreadCpuUsage mCpu; + ThreadCpuUsage mCpuUsage; // instantaneous thread CPU usage in wall clock ns + CentralTendencyStatistics mWcStats; // statistics on thread CPU usage in wall clock ns + + CentralTendencyStatistics mHzStats; // statistics on thread CPU usage in cycles + + int mCpuNum; // thread's current CPU number + int mCpukHz; // frequency of thread's current CPU in kHz #endif }; -void CpuStats::sample() { +CpuStats::CpuStats() +#ifdef DEBUG_CPU_USAGE + : mCpuNum(-1), mCpukHz(-1) +#endif +{ +} + +void CpuStats::sample(const String8 &title) { #ifdef DEBUG_CPU_USAGE - const CentralTendencyStatistics& stats = mCpu.statistics(); - mCpu.sampleAndEnable(); - unsigned n = stats.n(); - // mCpu.elapsed() is expensive, so don't call it every loop + // get current thread's delta CPU time in wall clock ns + double wcNs; + bool valid = mCpuUsage.sampleAndEnable(wcNs); + + // record sample for wall clock statistics + if (valid) { + mWcStats.sample(wcNs); + } + + // get the current CPU number + int cpuNum = sched_getcpu(); + + // get the current CPU frequency in kHz + int cpukHz = mCpuUsage.getCpukHz(cpuNum); + + // check if either CPU number or frequency changed + if (cpuNum != mCpuNum || cpukHz != mCpukHz) { + mCpuNum = cpuNum; + mCpukHz = cpukHz; + // ignore sample for purposes of cycles + valid = false; + } + + // if no change in CPU number or frequency, then record sample for cycle statistics + if (valid && mCpukHz > 0) { + double cycles = wcNs * cpukHz * 0.000001; + mHzStats.sample(cycles); + } + + unsigned n = mWcStats.n(); + // mCpuUsage.elapsed() is expensive, so don't call it every loop if ((n & 127) == 1) { - long long elapsed = mCpu.elapsed(); + long long elapsed = mCpuUsage.elapsed(); if (elapsed >= DEBUG_CPU_USAGE * 1000000000LL) { double perLoop = elapsed / (double) n; double perLoop100 = perLoop * 0.01; - double mean = stats.mean(); - double stddev = stats.stddev(); - double minimum = stats.minimum(); - double maximum = stats.maximum(); - mCpu.resetStatistics(); - ALOGI("CPU usage over past %.1f secs (%u mixer loops at %.1f mean ms per loop):\n us per mix loop: mean=%.0f stddev=%.0f min=%.0f max=%.0f\n %% of wall: mean=%.1f stddev=%.1f min=%.1f max=%.1f", + double perLoop1k = perLoop * 0.001; + double mean = mWcStats.mean(); + double stddev = mWcStats.stddev(); + double minimum = mWcStats.minimum(); + double maximum = mWcStats.maximum(); + double meanCycles = mHzStats.mean(); + double stddevCycles = mHzStats.stddev(); + double minCycles = mHzStats.minimum(); + double maxCycles = mHzStats.maximum(); + mCpuUsage.resetElapsed(); + mWcStats.reset(); + mHzStats.reset(); + ALOGD("CPU usage for %s over past %.1f secs\n" + " (%u mixer loops at %.1f mean ms per loop):\n" + " us per mix loop: mean=%.0f stddev=%.0f min=%.0f max=%.0f\n" + " %% of wall: mean=%.1f stddev=%.1f min=%.1f max=%.1f\n" + " MHz: mean=%.1f, stddev=%.1f, min=%.1f max=%.1f", + title.string(), elapsed * .000000001, n, perLoop * .000001, mean * .001, stddev * .001, @@ -1977,7 +2038,12 @@ void CpuStats::sample() { mean / perLoop100, stddev / perLoop100, minimum / perLoop100, - maximum / perLoop100); + maximum / perLoop100, + meanCycles / perLoop1k, + stddevCycles / perLoop1k, + minCycles / perLoop1k, + maxCycles / perLoop1k); + } } #endif @@ -2023,16 +2089,14 @@ if (mType == MIXER) { sleepTimeShift = 0; } - // MIXER CpuStats cpuStats; + const String8 myName(String8::format("thread %p type %d TID %d", this, mType, gettid())); acquireWakeLock(); while (!exitPending()) { -if (mType == MIXER) { - cpuStats.sample(); -} + cpuStats.sample(myName); Vector< sp<EffectChain> > effectChains; @@ -2069,9 +2133,9 @@ if (mType == MIXER) { releaseWakeLock_l(); // wait until we have something to do... - ALOGV("Thread %p type %d TID %d going to sleep", this, mType, gettid()); + ALOGV("%s going to sleep", myName.string()); mWaitWorkCV.wait(mLock); - ALOGV("Thread %p type %d TID %d waking up", this, mType, gettid()); + ALOGV("%s waking up", myName.string()); acquireWakeLock_l(); mPrevMixerStatus = MIXER_IDLE; diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 6f89f6eab6b3..0c5a8278c581 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -5443,15 +5443,16 @@ public final class ActivityManagerService extends ActivityManagerNative "removeSubTask()"); long ident = Binder.clearCallingIdentity(); try { - return mMainStack.removeTaskActivitiesLocked(taskId, subTaskIndex) != null; + return mMainStack.removeTaskActivitiesLocked(taskId, subTaskIndex, + true) != null; } finally { Binder.restoreCallingIdentity(ident); } } } - private void cleanUpRemovedTaskLocked(ActivityRecord root, boolean killProcesses) { - TaskRecord tr = root.task; + private void cleanUpRemovedTaskLocked(TaskRecord tr, int flags) { + final boolean killProcesses = (flags&ActivityManager.REMOVE_TASK_KILL_PROCESS) != 0; Intent baseIntent = new Intent( tr.intent != null ? tr.intent : tr.affinityIntent); ComponentName component = baseIntent.getComponent(); @@ -5462,7 +5463,7 @@ public final class ActivityManagerService extends ActivityManagerNative // Find any running services associated with this app. ArrayList<ServiceRecord> services = new ArrayList<ServiceRecord>(); - for (ServiceRecord sr : mServiceMap.getAllServices(root.userId)) { + for (ServiceRecord sr : mServiceMap.getAllServices(tr.userId)) { if (sr.packageName.equals(component.getPackageName())) { services.add(sr); } @@ -5517,11 +5518,11 @@ public final class ActivityManagerService extends ActivityManagerNative "removeTask()"); long ident = Binder.clearCallingIdentity(); try { - ActivityRecord r = mMainStack.removeTaskActivitiesLocked(taskId, -1); + ActivityRecord r = mMainStack.removeTaskActivitiesLocked(taskId, -1, + false); if (r != null) { mRecentTasks.remove(r.task); - cleanUpRemovedTaskLocked(r, - (flags&ActivityManager.REMOVE_TASK_KILL_PROCESS) != 0); + cleanUpRemovedTaskLocked(r.task, flags); return true; } else { TaskRecord tr = null; @@ -5539,6 +5540,8 @@ public final class ActivityManagerService extends ActivityManagerNative // Caller is just removing a recent task that is // not actively running. That is easy! mRecentTasks.remove(i); + cleanUpRemovedTaskLocked(tr, flags); + return true; } else { Slog.w(TAG, "removeTask: task " + taskId + " does not have activities to remove, " @@ -9360,7 +9363,7 @@ public final class ActivityManagerService extends ActivityManagerNative boolean dumpProvidersLocked(FileDescriptor fd, PrintWriter pw, String[] args, int opti, boolean dumpAll, String dumpPackage) { - boolean needSep = false; + boolean needSep = true; ItemMatcher matcher = new ItemMatcher(); matcher.build(args, opti); diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index edebbac9747b..a375d307fe48 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -4011,10 +4011,13 @@ final class ActivityStack { return info; } - public ActivityRecord removeTaskActivitiesLocked(int taskId, int subTaskIndex) { + public ActivityRecord removeTaskActivitiesLocked(int taskId, int subTaskIndex, + boolean taskRequired) { TaskAccessInfo info = getTaskAccessInfoLocked(taskId, false); if (info.root == null) { - Slog.w(TAG, "removeTaskLocked: unknown taskId " + taskId); + if (taskRequired) { + Slog.w(TAG, "removeTaskLocked: unknown taskId " + taskId); + } return null; } @@ -4025,7 +4028,9 @@ final class ActivityStack { } if (subTaskIndex >= info.subtasks.size()) { - Slog.w(TAG, "removeTaskLocked: unknown subTaskIndex " + subTaskIndex); + if (taskRequired) { + Slog.w(TAG, "removeTaskLocked: unknown subTaskIndex " + subTaskIndex); + } return null; } diff --git a/services/java/com/android/server/am/ContentProviderRecord.java b/services/java/com/android/server/am/ContentProviderRecord.java index f338cfcb7737..608b09ad07e3 100644 --- a/services/java/com/android/server/am/ContentProviderRecord.java +++ b/services/java/com/android/server/am/ContentProviderRecord.java @@ -157,7 +157,7 @@ class ContentProviderRecord extends ContentProviderHolder { sb.append("ContentProviderRecord{"); sb.append(Integer.toHexString(System.identityHashCode(this))); sb.append(' '); - sb.append(info.name); + sb.append(name.flattenToShortString()); sb.append('}'); return stringName = sb.toString(); } diff --git a/services/java/com/android/server/am/ProviderMap.java b/services/java/com/android/server/am/ProviderMap.java index 2021e0d1bdb8..ccc928f3aeb9 100644 --- a/services/java/com/android/server/am/ProviderMap.java +++ b/services/java/com/android/server/am/ProviderMap.java @@ -183,16 +183,20 @@ public class ProviderMap { r.dump(pw, " "); } else { pw.print(" * "); - pw.print(r.name.toShortString()); - /* - if (r.app != null) { - pw.println(":"); - pw.print(" "); - pw.println(r.app); - } else { - pw.println(); + pw.println(r); + if (r.proc != null) { + pw.print(" proc="); + pw.println(r.proc); + } + if (r.launchingApp != null) { + pw.print(" launchingApp="); + pw.println(r.launchingApp); + } + if (r.clients.size() > 0 || r.externalProcessNoHandleCount > 0) { + pw.print(" "); pw.print(r.clients.size()); + pw.print(" clients, "); pw.print(r.externalProcessNoHandleCount); + pw.println(" external handles"); } - */ } } } @@ -217,7 +221,7 @@ public class ProviderMap { pw.println(" "); pw.println(" Published content providers (by class):"); dumpProvidersByClassLocked(pw, dumpAll, mGlobalByClass); - pw.println(" "); + pw.println(""); } if (mProvidersByClassPerUser.size() > 1) { diff --git a/services/java/com/android/server/am/TaskRecord.java b/services/java/com/android/server/am/TaskRecord.java index 67873ccefdcb..e3ebcc610f4f 100644 --- a/services/java/com/android/server/am/TaskRecord.java +++ b/services/java/com/android/server/am/TaskRecord.java @@ -39,7 +39,7 @@ class TaskRecord extends ThumbnailHolder { boolean askedCompatMode;// Have asked the user about compat mode for this task. String stringName; // caching of toString() result. - int userId; // user for which this task was created + int userId; // user for which this task was created TaskRecord(int _taskId, ActivityInfo info, Intent _intent) { taskId = _taskId; diff --git a/services/java/com/android/server/wm/AppWindowToken.java b/services/java/com/android/server/wm/AppWindowToken.java index b84fbdbd6629..5ca09e78bb8a 100644 --- a/services/java/com/android/server/wm/AppWindowToken.java +++ b/services/java/com/android/server/wm/AppWindowToken.java @@ -27,6 +27,7 @@ import android.util.Slog; import android.view.IApplicationToken; import android.view.View; import android.view.WindowManager; +import android.view.WindowManagerPolicy; import android.view.animation.Animation; import android.view.animation.Transformation; @@ -37,7 +38,7 @@ import java.util.ArrayList; * Version of WindowToken that is specifically for a particular application (or * really activity) that is displaying windows. */ -class AppWindowToken extends WindowToken implements WindowManagerService.StepAnimator { +class AppWindowToken extends WindowToken { // Non-null only for application tokens. final IApplicationToken appToken; @@ -195,8 +196,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.StepAni } } - @Override - public boolean stepAnimation(long currentTime) { + + private boolean stepAnimation(long currentTime) { if (animation == null) { return false; } @@ -216,7 +217,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.StepAni } // This must be called while inside a transaction. - boolean startAndFinishAnimationLocked(long currentTime, int dw, int dh) { + boolean stepAnimationLocked(long currentTime, int dw, int dh) { if (!service.mDisplayFrozen && service.mPolicy.isScreenOnFully()) { // We will run animations as long as the display isn't frozen. @@ -240,7 +241,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.StepAni animating = true; } // we're done! - return true; + return stepAnimation(currentTime); } } else if (animation != null) { // If the display is frozen, and there is a pending animation, @@ -255,6 +256,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.StepAni return false; } + service.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM; clearAnimation(); animating = false; if (animLayerAdjustment != 0) { diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java index 7b5bf08165cb..ab084f9aa48f 100644 --- a/services/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java @@ -29,7 +29,7 @@ import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; -class ScreenRotationAnimation implements WindowManagerService.StepAnimator { +class ScreenRotationAnimation { static final String TAG = "ScreenRotationAnimation"; static final boolean DEBUG_STATE = false; static final boolean DEBUG_TRANSFORMS = false; @@ -41,7 +41,6 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { BlackFrame mBlackFrame; int mWidth, mHeight; - int mSnapshotRotation; int mSnapshotDeltaRotation; int mOriginalRotation; int mOriginalWidth, mOriginalHeight; @@ -125,8 +124,7 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { if (mBlackFrame != null) { mBlackFrame.printTo(prefix + " ", pw); } - pw.print(prefix); pw.print("mSnapshotRotation="); pw.print(mSnapshotRotation); - pw.print(" mSnapshotDeltaRotation="); pw.print(mSnapshotDeltaRotation); + pw.print(prefix); pw.print(" mSnapshotDeltaRotation="); pw.print(mSnapshotDeltaRotation); pw.print(" mCurRotation="); pw.println(mCurRotation); pw.print(prefix); pw.print("mOriginalRotation="); pw.print(mOriginalRotation); pw.print(" mOriginalWidth="); pw.print(mOriginalWidth); @@ -173,7 +171,6 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { mContext = context; // Screenshot does NOT include rotation! - mSnapshotRotation = 0; if (originalRotation == Surface.ROTATION_90 || originalRotation == Surface.ROTATION_270) { mWidth = originalHeight; @@ -197,7 +194,7 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { try { mSurface = new Surface(session, 0, "FreezeSurface", -1, mWidth, mHeight, PixelFormat.OPAQUE, Surface.FX_SURFACE_SCREENSHOT | Surface.HIDDEN); - if (mSurface == null || !mSurface.isValid()) { + if (!mSurface.isValid()) { // Screenshot failed, punt. mSurface = null; return; @@ -281,7 +278,7 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { // Compute the transformation matrix that must be applied // to the snapshot to make it stay in the same original position // with the current screen rotation. - int delta = deltaRotation(rotation, mSnapshotRotation); + int delta = deltaRotation(rotation, Surface.ROTATION_0); createRotationMatrix(delta, mWidth, mHeight, mSnapshotInitialMatrix); if (DEBUG_STATE) Slog.v(TAG, "**** ROTATION: " + delta); @@ -540,8 +537,7 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { || mRotateFrameAnimation != null; } - @Override - public boolean stepAnimation(long now) { + private boolean stepAnimation(long now) { if (mFinishAnimReady && mFinishAnimStartTime < 0) { if (DEBUG_STATE) Slog.v(TAG, "Step: finish anim now ready"); @@ -704,20 +700,18 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { } void updateSurfaces() { - if (!mMoreStartExit && !mMoreFinishExit && !mMoreRotateExit) { - if (mSurface != null) { + if (mSurface != null) { + if (!mMoreStartExit && !mMoreFinishExit && !mMoreRotateExit) { if (DEBUG_STATE) Slog.v(TAG, "Exit animations done, hiding screenshot surface"); mSurface.hide(); } } - if (!mMoreStartFrame && !mMoreFinishFrame && !mMoreRotateFrame) { - if (mBlackFrame != null) { + if (mBlackFrame != null) { + if (!mMoreStartFrame && !mMoreFinishFrame && !mMoreRotateFrame) { if (DEBUG_STATE) Slog.v(TAG, "Frame animations done, hiding black frame"); mBlackFrame.hide(); - } - } else { - if (mBlackFrame != null) { + } else { mBlackFrame.setMatrix(mFrameTransformation.getMatrix()); } } @@ -725,7 +719,7 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { setSnapshotTransform(mSnapshotFinalMatrix, mExitTransformation.getAlpha()); } - public boolean startAndFinishAnimationLocked(long now) { + public boolean stepAnimationLocked(long now) { if (!isAnimating()) { if (DEBUG_STATE) Slog.v(TAG, "Step: no animations running"); mFinishAnimReady = false; @@ -763,8 +757,8 @@ class ScreenRotationAnimation implements WindowManagerService.StepAnimator { } mAnimRunning = true; } - - return true; + + return stepAnimation(now); } public Transformation getEnterTransformation() { diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 22949f397462..f4c4069e3c33 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -461,6 +461,7 @@ public class WindowManagerService extends IWindowManager.Stub = new ArrayList<IRotationWatcher>(); int mDeferredRotationPauseCount; + int mPendingLayoutChanges = 0; boolean mLayoutNeeded = true; boolean mTraversalScheduled = false; boolean mDisplayFrozen = false; @@ -617,18 +618,6 @@ public class WindowManagerService extends IWindowManager.Stub final AnimationRunnable mAnimationRunnable = new AnimationRunnable(); boolean mAnimationScheduled; - interface StepAnimator { - /** - * Continue the stepping of an ongoing animation. When the animation completes this method - * must disable the animation on the StepAnimator. - * @param currentTime Animation time in milliseconds. Use SystemClock.uptimeMillis(). - * @return True if the animation is still going on, false if the animation has completed - * and stepAnimation has cleared the animation locally. - */ - boolean stepAnimation(long currentTime); - } - final ArrayList<StepAnimator> mStepAnimators = new ArrayList<StepAnimator>(); - final class DragInputEventReceiver extends InputEventReceiver { public DragInputEventReceiver(InputChannel inputChannel, Looper looper) { super(inputChannel, looper); @@ -1592,8 +1581,7 @@ public class WindowManagerService extends IWindowManager.Stub + w.isReadyForDisplay() + " drawpending=" + w.mDrawPending + " commitdrawpending=" + w.mCommitDrawPending); if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay() - && (mWallpaperTarget == w - || (!w.mDrawPending && !w.mCommitDrawPending))) { + && (mWallpaperTarget == w || w.isDrawnLw())) { if (DEBUG_WALLPAPER) Slog.v(TAG, "Found wallpaper activity: #" + i + "=" + w); foundW = w; @@ -2699,8 +2687,7 @@ public class WindowManagerService extends IWindowManager.Stub win.mEnterAnimationPending = true; } if (displayed) { - if (win.mSurface != null && !win.mDrawPending - && !win.mCommitDrawPending && !mDisplayFrozen + if (win.isDrawnLw() && !mDisplayFrozen && mDisplayEnabled && mPolicy.isScreenOnFully()) { applyEnterAnimationLocked(win); } @@ -2995,15 +2982,27 @@ public class WindowManagerService extends IWindowManager.Stub } void applyEnterAnimationLocked(WindowState win) { - int transit = WindowManagerPolicy.TRANSIT_SHOW; + final int transit; if (win.mEnterAnimationPending) { win.mEnterAnimationPending = false; transit = WindowManagerPolicy.TRANSIT_ENTER; + } else { + transit = WindowManagerPolicy.TRANSIT_SHOW; } applyAnimationLocked(win, transit, true); } + /** + * Choose the correct animation and set it to the passed WindowState. + * @param win The window to add the animation to. + * @param transit If WindowManagerPolicy.TRANSIT_PREVIEW_DONE and the app window has been drawn + * then the animation will be app_starting_exit. Any other value loads the animation from + * the switch statement below. + * @param isEntrance The animation type the last time this was called. Used to keep from + * loading the same animation twice. + * @return true if an animation has been loaded. + */ boolean applyAnimationLocked(WindowState win, int transit, boolean isEntrance) { if (win.mLocalAnimating && win.mAnimationIsEntrance == isEntrance) { @@ -3982,8 +3981,7 @@ public class WindowManagerService extends IWindowManager.Stub // If we are being set visible, and the starting window is // not yet displayed, then make sure it doesn't get displayed. WindowState swin = wtoken.startingWindow; - if (swin != null && (swin.mDrawPending - || swin.mCommitDrawPending)) { + if (swin != null && !swin.isDrawnLw()) { swin.mPolicyVisibility = false; swin.mPolicyVisibilityAfterAnim = false; } @@ -7643,20 +7641,6 @@ public class WindowManagerService extends IWindowManager.Stub } /** - * Run through each of the animating objects saved in mStepAnimators. - */ - private void stepAnimations() { - final long currentTime = SystemClock.uptimeMillis(); - for (final StepAnimator stepAnimator : mStepAnimators) { - final boolean more = stepAnimator.stepAnimation(currentTime); - if (DEBUG_ANIM) { - Slog.v(TAG, "stepAnimations: " + currentTime + ": Stepped " + stepAnimator - + (more ? " more" : " done")); - } - } - } - - /** * Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method. * Update animations of all applications, including those associated with exiting/removed apps. * @@ -7670,36 +7654,88 @@ public class WindowManagerService extends IWindowManager.Stub final int NAT = mAppTokens.size(); for (i=0; i<NAT; i++) { final AppWindowToken appToken = mAppTokens.get(i); - if (appToken.startAndFinishAnimationLocked(currentTime, innerDw, innerDh)) { - mStepAnimators.add(appToken); + if (appToken.stepAnimationLocked(currentTime, innerDw, innerDh)) { mInnerFields.mAnimating = true; } } final int NEAT = mExitingAppTokens.size(); for (i=0; i<NEAT; i++) { final AppWindowToken appToken = mExitingAppTokens.get(i); - if (appToken.startAndFinishAnimationLocked(currentTime, innerDw, innerDh)) { - mStepAnimators.add(appToken); + if (appToken.stepAnimationLocked(currentTime, innerDw, innerDh)) { mInnerFields.mAnimating = true; } } - if (mScreenRotationAnimation != null) { - if (mScreenRotationAnimation.isAnimating() || - mScreenRotationAnimation.mFinishAnimReady) { - if (mScreenRotationAnimation.startAndFinishAnimationLocked(currentTime)) { - mInnerFields.mUpdateRotation = false; - mInnerFields.mAnimating = true; - mStepAnimators.add(mScreenRotationAnimation); + if (mScreenRotationAnimation != null && + (mScreenRotationAnimation.isAnimating() || + mScreenRotationAnimation.mFinishAnimReady)) { + if (mScreenRotationAnimation.stepAnimationLocked(currentTime)) { + mInnerFields.mUpdateRotation = false; + mInnerFields.mAnimating = true; + } else { + mInnerFields.mUpdateRotation = true; + mScreenRotationAnimation.kill(); + mScreenRotationAnimation = null; + } + } + } + + private void animateAndUpdateSurfaces(final long currentTime, final int dw, final int dh, + final int innerDw, final int innerDh, + final boolean recoveringMemory) { + // Update animations of all applications, including those + // associated with exiting/removed apps + Surface.openTransaction(); + + try { + mPendingLayoutChanges = performAnimationsLocked(currentTime, dw, dh, + innerDw, innerDh); + updateWindowsAppsAndRotationAnimationsLocked(currentTime, innerDw, innerDh); + + // THIRD LOOP: Update the surfaces of all windows. + + if (mScreenRotationAnimation != null) { + mScreenRotationAnimation.updateSurfaces(); + } + + final int N = mWindows.size(); + for (int i=N-1; i>=0; i--) { + WindowState w = mWindows.get(i); + prepareSurfaceLocked(w, recoveringMemory); + } + + if (mDimAnimator != null && mDimAnimator.mDimShown) { + mInnerFields.mAnimating |= + mDimAnimator.updateSurface(mInnerFields.mDimming, currentTime, + mDisplayFrozen || !mDisplayEnabled || !mPolicy.isScreenOnFully()); + } + + if (!mInnerFields.mBlurring && mBlurShown) { + if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR " + mBlurSurface + + ": HIDE"); + try { + mBlurSurface.hide(); + } catch (IllegalArgumentException e) { + Slog.w(TAG, "Illegal argument exception hiding blur surface"); + } + mBlurShown = false; + } + + if (mBlackFrame != null) { + if (mScreenRotationAnimation != null) { + mBlackFrame.setMatrix( + mScreenRotationAnimation.getEnterTransformation().getMatrix()); } else { - mInnerFields.mUpdateRotation = true; - mScreenRotationAnimation.kill(); - mScreenRotationAnimation = null; + mBlackFrame.clearMatrix(); } } + } catch (RuntimeException e) { + Log.wtf(TAG, "Unhandled exception in Window Manager", e); + } finally { + Surface.closeTransaction(); } } - + /** * Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method. * @@ -7711,9 +7747,7 @@ public class WindowManagerService extends IWindowManager.Stub */ private int updateWindowsAndWallpaperLocked(final long currentTime, final int dw, final int dh, final int innerDw, final int innerDh) { - - mPolicy.beginAnimationLw(dw, dh); - + int changes = 0; for (int i = mWindows.size() - 1; i >= 0; i--) { WindowState w = mWindows.get(i); @@ -7727,6 +7761,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_WALLPAPER) Slog.v(TAG, "First draw done in potential wallpaper target " + w); mInnerFields.mWallpaperMayChange = true; + changes |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } @@ -7749,13 +7784,7 @@ public class WindowManagerService extends IWindowManager.Stub } final boolean wasAnimating = w.mWasAnimating; - - - final boolean nowAnimating = w.startAndFinishAnimationLocked(currentTime); - if (nowAnimating) { - mStepAnimators.add(w); - mInnerFields.mAnimating = true; - } + final boolean nowAnimating = w.stepAnimationLocked(currentTime); if (DEBUG_WALLPAPER) { Slog.v(TAG, w + ": wasAnimating=" + wasAnimating + @@ -7806,6 +7835,7 @@ public class WindowManagerService extends IWindowManager.Stub if (wasAnimating && !w.mAnimating && mWallpaperTarget == w) { mInnerFields.mWallpaperMayChange = true; + changes |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } if (mPolicy.doesForceHide(w, attrs)) { @@ -7814,6 +7844,7 @@ public class WindowManagerService extends IWindowManager.Stub "Animation started that could impact force hide: " + w); mInnerFields.mWallpaperForceHidingChanged = true; + changes |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; mFocusMayChange = true; } else if (w.isReadyForDisplay() && w.mAnimation == null) { mInnerFields.mForceHiding = true; @@ -7852,10 +7883,9 @@ public class WindowManagerService extends IWindowManager.Stub if (changed && (attrs.flags & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) { mInnerFields.mWallpaperMayChange = true; + changes |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } - - mPolicy.animatingWindowLw(w, attrs); } final AppWindowToken atoken = w.mAppToken; @@ -7900,10 +7930,11 @@ public class WindowManagerService extends IWindowManager.Stub } } else if (w.mReadyToShow) { w.performShowLocked(); + changes |= WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM; } } // end forall windows - return mPolicy.finishAnimationLw(); + return changes; } /** @@ -8322,6 +8353,72 @@ public class WindowManagerService extends IWindowManager.Stub return changes; } + private void updateResizingWindows(final WindowState w) { + if (!w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) { + w.mContentInsetsChanged |= + !w.mLastContentInsets.equals(w.mContentInsets); + w.mVisibleInsetsChanged |= + !w.mLastVisibleInsets.equals(w.mVisibleInsets); + boolean configChanged = + w.mConfiguration != mCurConfiguration + && (w.mConfiguration == null + || mCurConfiguration.diff(w.mConfiguration) != 0); + if (DEBUG_CONFIGURATION && configChanged) { + Slog.v(TAG, "Win " + w + " config changed: " + + mCurConfiguration); + } + if (localLOGV) Slog.v(TAG, "Resizing " + w + + ": configChanged=" + configChanged + + " last=" + w.mLastFrame + " frame=" + w.mFrame); + w.mLastFrame.set(w.mFrame); + if (w.mContentInsetsChanged + || w.mVisibleInsetsChanged + || w.mSurfaceResized + || configChanged) { + if (DEBUG_RESIZE || DEBUG_ORIENTATION) { + Slog.v(TAG, "Resize reasons: " + + " contentInsetsChanged=" + w.mContentInsetsChanged + + " visibleInsetsChanged=" + w.mVisibleInsetsChanged + + " surfaceResized=" + w.mSurfaceResized + + " configChanged=" + configChanged); + } + + w.mLastContentInsets.set(w.mContentInsets); + w.mLastVisibleInsets.set(w.mVisibleInsets); + makeWindowFreezingScreenIfNeededLocked(w); + // If the orientation is changing, then we need to + // hold off on unfreezing the display until this + // window has been redrawn; to do that, we need + // to go through the process of getting informed + // by the application when it has finished drawing. + if (w.mOrientationChanging) { + if (DEBUG_ORIENTATION) Slog.v(TAG, + "Orientation start waiting for draw in " + + w + ", surface " + w.mSurface); + w.mDrawPending = true; + w.mCommitDrawPending = false; + w.mReadyToShow = false; + if (w.mAppToken != null) { + w.mAppToken.allDrawn = false; + } + } + if (!mResizingWindows.contains(w)) { + if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG, + "Resizing window " + w + " to " + w.mSurfaceW + + "x" + w.mSurfaceH); + mResizingWindows.add(w); + } + } else if (w.mOrientationChanging) { + if (w.isDrawnLw()) { + if (DEBUG_ORIENTATION) Slog.v(TAG, + "Orientation not waiting for draw in " + + w + ", surface " + w.mSurface); + w.mOrientationChanging = false; + } + } + } + } + /** * Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method. * @@ -8343,6 +8440,16 @@ public class WindowManagerService extends IWindowManager.Stub // cases while they are hidden such as when first showing a // window. + if (w.mSurface == null) { + if (w.mOrientationChanging) { + if (DEBUG_ORIENTATION) { + Slog.v(TAG, "Orientation change skips hidden " + w); + } + w.mOrientationChanging = false; + } + return; + } + boolean displayed = false; w.computeShownFrameLocked(); @@ -8407,69 +8514,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - if (!w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) { - w.mContentInsetsChanged |= - !w.mLastContentInsets.equals(w.mContentInsets); - w.mVisibleInsetsChanged |= - !w.mLastVisibleInsets.equals(w.mVisibleInsets); - boolean configChanged = - w.mConfiguration != mCurConfiguration - && (w.mConfiguration == null - || mCurConfiguration.diff(w.mConfiguration) != 0); - if (DEBUG_CONFIGURATION && configChanged) { - Slog.v(TAG, "Win " + w + " config changed: " - + mCurConfiguration); - } - if (localLOGV) Slog.v(TAG, "Resizing " + w - + ": configChanged=" + configChanged - + " last=" + w.mLastFrame + " frame=" + w.mFrame); - w.mLastFrame.set(w.mFrame); - if (w.mContentInsetsChanged - || w.mVisibleInsetsChanged - || w.mSurfaceResized - || configChanged) { - if (DEBUG_RESIZE || DEBUG_ORIENTATION) { - Slog.v(TAG, "Resize reasons: " - + " contentInsetsChanged=" + w.mContentInsetsChanged - + " visibleInsetsChanged=" + w.mVisibleInsetsChanged - + " surfaceResized=" + w.mSurfaceResized - + " configChanged=" + configChanged); - } - - w.mLastContentInsets.set(w.mContentInsets); - w.mLastVisibleInsets.set(w.mVisibleInsets); - makeWindowFreezingScreenIfNeededLocked(w); - // If the orientation is changing, then we need to - // hold off on unfreezing the display until this - // window has been redrawn; to do that, we need - // to go through the process of getting informed - // by the application when it has finished drawing. - if (w.mOrientationChanging) { - if (DEBUG_ORIENTATION) Slog.v(TAG, - "Orientation start waiting for draw in " - + w + ", surface " + w.mSurface); - w.mDrawPending = true; - w.mCommitDrawPending = false; - w.mReadyToShow = false; - if (w.mAppToken != null) { - w.mAppToken.allDrawn = false; - } - } - if (!mResizingWindows.contains(w)) { - if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG, - "Resizing window " + w + " to " + w.mSurfaceW - + "x" + w.mSurfaceH); - mResizingWindows.add(w); - } - } else if (w.mOrientationChanging) { - if (!w.mDrawPending && !w.mCommitDrawPending) { - if (DEBUG_ORIENTATION) Slog.v(TAG, - "Orientation not waiting for draw in " - + w + ", surface " + w.mSurface); - w.mOrientationChanging = false; - } - } - } + updateResizingWindows(w); if (w.mAttachedHidden || !w.isReadyForDisplay()) { if (!w.mLastHidden) { @@ -8538,8 +8583,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - if (w.mLastHidden && !w.mDrawPending - && !w.mCommitDrawPending + if (w.mLastHidden && w.isDrawnLw() && !w.mReadyToShow) { if (SHOW_TRANSACTIONS) logSurface(w, "SHOW (performLayout)", null); @@ -8561,7 +8605,7 @@ public class WindowManagerService extends IWindowManager.Stub if (displayed) { if (w.mOrientationChanging) { - if (w.mDrawPending || w.mCommitDrawPending) { + if (!w.isDrawnLw()) { mInnerFields.mOrientationChangeComplete = false; if (DEBUG_ORIENTATION) Slog.v(TAG, "Orientation continue waiting for draw in " + w); @@ -8678,6 +8722,67 @@ public class WindowManagerService extends IWindowManager.Stub } } + private final int performAnimationsLocked(long currentTime, int dw, int dh, + int innerDw, int innerDh) { + ++mTransactionSequence; + + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: seq=" + + mTransactionSequence + " mAnimating=" + + mInnerFields.mAnimating); + + mInnerFields.mTokenMayBeDrawn = false; + mInnerFields.mWallpaperMayChange = false; + mInnerFields.mForceHiding = false; + mInnerFields.mDetachedWallpaper = null; + mInnerFields.mWindowAnimationBackground = null; + mInnerFields.mWindowAnimationBackgroundColor = 0; + + int changes = updateWindowsAndWallpaperLocked(currentTime, dw, dh, innerDw, innerDh); + + if (mInnerFields.mTokenMayBeDrawn) { + changes |= testTokenMayBeDrawnLocked(); + } + + // If we are ready to perform an app transition, check through + // all of the app tokens to be shown and see if they are ready + // to go. + if (mAppTransitionReady) { + changes |= handleAppTransitionReadyLocked(); + } + + mInnerFields.mAdjResult = 0; + + if (!mInnerFields.mAnimating && mAppTransitionRunning) { + // We have finished the animation of an app transition. To do + // this, we have delayed a lot of operations like showing and + // hiding apps, moving apps in Z-order, etc. The app token list + // reflects the correct Z-order, but the window list may now + // be out of sync with it. So here we will just rebuild the + // entire app window list. Fun! + changes |= handleAnimatingStoppedAndTransitionLocked(); + } + + if (mInnerFields.mWallpaperForceHidingChanged && changes == 0 && !mAppTransitionReady) { + // At this point, there was a window with a wallpaper that + // was force hiding other windows behind it, but now it + // is going away. This may be simple -- just animate + // away the wallpaper and its window -- or it may be + // hard -- the wallpaper now needs to be shown behind + // something that was hidden. + changes |= animateAwayWallpaperLocked(); + } + + changes |= testWallpaperAndBackgroundLocked(); + + if (mLayoutNeeded) { + changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT; + } + + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: changes=0x" + + Integer.toHexString(changes)); + return changes; + } + // "Something has changed! Let's make it correct now." private final void performLayoutAndPlaceSurfacesLockedInner( boolean recoveringMemory) { @@ -8741,7 +8846,6 @@ public class WindowManagerService extends IWindowManager.Stub try { mInnerFields.mWallpaperForceHidingChanged = false; int repeats = 0; - int changes = 0; do { repeats++; @@ -8751,20 +8855,20 @@ public class WindowManagerService extends IWindowManager.Stub break; } - if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) { + if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) { if ((adjustWallpaperWindowsLocked()&ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) { assignLayersLocked(); mLayoutNeeded = true; } } - if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) { + if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) { if (DEBUG_LAYOUT) Slog.v(TAG, "Computing new config from layout"); if (updateOrientationFromAppTokensLocked(true)) { mLayoutNeeded = true; mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION); } } - if ((changes & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { + if ((mPendingLayoutChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) { mLayoutNeeded = true; } @@ -8775,107 +8879,34 @@ public class WindowManagerService extends IWindowManager.Stub Slog.w(TAG, "Layout repeat skipped after too many iterations"); } - ++mTransactionSequence; - - if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: seq=" - + mTransactionSequence + " mAnimating=" - + mInnerFields.mAnimating); - - mInnerFields.mTokenMayBeDrawn = false; - mInnerFields.mWallpaperMayChange = false; - mInnerFields.mForceHiding = false; - mInnerFields.mDetachedWallpaper = null; - mInnerFields.mWindowAnimationBackground = null; - mInnerFields.mWindowAnimationBackgroundColor = 0; - - mStepAnimators.clear(); - changes = updateWindowsAndWallpaperLocked(currentTime, dw, dh, innerDw, innerDh); - - if (mInnerFields.mTokenMayBeDrawn) { - changes |= testTokenMayBeDrawnLocked(); - } - - // If we are ready to perform an app transition, check through - // all of the app tokens to be shown and see if they are ready - // to go. - if (mAppTransitionReady) { - changes |= handleAppTransitionReadyLocked(); - } - - mInnerFields.mAdjResult = 0; - - if (!mInnerFields.mAnimating && mAppTransitionRunning) { - // We have finished the animation of an app transition. To do - // this, we have delayed a lot of operations like showing and - // hiding apps, moving apps in Z-order, etc. The app token list - // reflects the correct Z-order, but the window list may now - // be out of sync with it. So here we will just rebuild the - // entire app window list. Fun! - changes |= handleAnimatingStoppedAndTransitionLocked(); - } - - if (mInnerFields.mWallpaperForceHidingChanged && changes == 0 && !mAppTransitionReady) { - // At this point, there was a window with a wallpaper that - // was force hiding other windows behind it, but now it - // is going away. This may be simple -- just animate - // away the wallpaper and its window -- or it may be - // hard -- the wallpaper now needs to be shown behind - // something that was hidden. - changes |= animateAwayWallpaperLocked(); - } - - changes |= testWallpaperAndBackgroundLocked(); - - if (mLayoutNeeded) { - changes |= PhoneWindowManager.FINISH_LAYOUT_REDO_LAYOUT; + // FIRST AND ONE HALF LOOP: Make WindowManagerPolicy think + // it is animating. + mPendingLayoutChanges = 0; + mPolicy.beginAnimationLw(dw, dh); + for (i = mWindows.size() - 1; i >= 0; i--) { + WindowState w = mWindows.get(i); + if (w.mSurface != null) { + mPolicy.animatingWindowLw(w, w.mAttrs); + } } + mPendingLayoutChanges |= mPolicy.finishAnimationLw(); + + } while (mPendingLayoutChanges != 0); - if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: changes=0x" - + Integer.toHexString(changes)); - } while (changes != 0); - - // Update animations of all applications, including those - // associated with exiting/removed apps - - updateWindowsAppsAndRotationAnimationsLocked(currentTime, innerDw, innerDh); - - stepAnimations(); - - // THIRD LOOP: Update the surfaces of all windows. - - final boolean someoneLosingFocus = mLosingFocus.size() != 0; + final boolean someoneLosingFocus = !mLosingFocus.isEmpty(); mInnerFields.mObscured = false; mInnerFields.mBlurring = false; mInnerFields.mDimming = false; mInnerFields.mSyswin = false; - - if (mScreenRotationAnimation != null) { - mScreenRotationAnimation.updateSurfaces(); - } - + final int N = mWindows.size(); - for (i=N-1; i>=0; i--) { WindowState w = mWindows.get(i); + //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing"); + w.mContentChanged = false; - if (w.mSurface != null) { - prepareSurfaceLocked(w, recoveringMemory); - } else if (w.mOrientationChanging) { - if (DEBUG_ORIENTATION) { - Slog.v(TAG, "Orientation change skips hidden " + w); - } - w.mOrientationChanging = false; - } - - if (w.mContentChanged) { - //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing"); - w.mContentChanged = false; - } - - final boolean canBeSeen = w.isDisplayedLw(); - - if (someoneLosingFocus && w == mCurrentFocus && canBeSeen) { + if (someoneLosingFocus && w == mCurrentFocus && w.isDisplayedLw()) { focusDisplayed = true; } @@ -8894,37 +8925,15 @@ public class WindowManagerService extends IWindowManager.Stub updateWallpaperVisibilityLocked(); } } - - if (mDimAnimator != null && mDimAnimator.mDimShown) { - mInnerFields.mAnimating |= - mDimAnimator.updateSurface(mInnerFields.mDimming, currentTime, - mDisplayFrozen || !mDisplayEnabled || !mPolicy.isScreenOnFully()); - } - - if (!mInnerFields.mBlurring && mBlurShown) { - if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR " + mBlurSurface - + ": HIDE"); - try { - mBlurSurface.hide(); - } catch (IllegalArgumentException e) { - Slog.w(TAG, "Illegal argument exception hiding blur surface"); - } - mBlurShown = false; - } - - if (mBlackFrame != null) { - if (mScreenRotationAnimation != null) { - mBlackFrame.setMatrix( - mScreenRotationAnimation.getEnterTransformation().getMatrix()); - } else { - mBlackFrame.clearMatrix(); - } - } } catch (RuntimeException e) { Log.wtf(TAG, "Unhandled exception in Window Manager", e); + } finally { + Surface.closeTransaction(); } - Surface.closeTransaction(); + // Update animations of all applications, including those + // associated with exiting/removed apps + animateAndUpdateSurfaces(currentTime, dw, dh, innerDw, innerDh, recoveringMemory); if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces"); @@ -9049,6 +9058,13 @@ public class WindowManagerService extends IWindowManager.Stub if (wallpaperDestroyed) { needRelayout = adjustWallpaperWindowsLocked() != 0; } + if ((mPendingLayoutChanges & ( + WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER | + ADJUST_WALLPAPER_LAYERS_CHANGED | + WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG | + WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT)) != 0) { + needRelayout = true; + } if (needRelayout) { requestTraversalLocked(); } else if (mInnerFields.mAnimating) { diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index e11c87a7b90f..42ce291801cd 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -54,8 +54,7 @@ import java.util.ArrayList; /** * A window in the window manager. */ -final class WindowState implements WindowManagerPolicy.WindowState, - WindowManagerService.StepAnimator { +final class WindowState implements WindowManagerPolicy.WindowState { static final boolean DEBUG_VISIBILITY = WindowManagerService.DEBUG_VISIBILITY; static final boolean SHOW_TRANSACTIONS = WindowManagerService.SHOW_TRANSACTIONS; static final boolean SHOW_LIGHT_TRANSACTIONS = WindowManagerService.SHOW_LIGHT_TRANSACTIONS; @@ -995,8 +994,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, return true; } - @Override - public boolean stepAnimation(long currentTime) { + private boolean stepAnimation(long currentTime) { if ((mAnimation == null) || !mLocalAnimating || (mAnimState != ANIM_STATE_RUNNING)) { return false; } @@ -1013,14 +1011,14 @@ final class WindowState implements WindowManagerPolicy.WindowState, // This must be called while inside a transaction. Returns true if // there is more animation to run. - boolean startAndFinishAnimationLocked(long currentTime) { + boolean stepAnimationLocked(long currentTime) { // Save the animation state as it was before this step so WindowManagerService can tell if // we just started or just stopped animating by comparing mWasAnimating with isAnimating(). mWasAnimating = mAnimating; if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) { // We will run animations as long as the display isn't frozen. - if (!mDrawPending && !mCommitDrawPending && mAnimation != null) { + if (isDrawnLw() && mAnimation != null) { mHasTransformation = true; mHasLocalTransformation = true; if (!mLocalAnimating) { @@ -1038,7 +1036,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, } if ((mAnimation != null) && mLocalAnimating && (mAnimState != ANIM_STATE_STOPPING)) { - return true; + return stepAnimation(currentTime); } if (WindowManagerService.DEBUG_ANIM) Slog.v( WindowManagerService.TAG, "Finished animation in " + this + @@ -1133,6 +1131,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, } finishExit(); + mService.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM; if (mAppToken != null) { mAppToken.updateReportedVisibilityLocked(); @@ -1479,8 +1478,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, */ public boolean isDisplayedLw() { final AppWindowToken atoken = mAppToken; - return mSurface != null && mPolicyVisibility && !mDestroying - && !mDrawPending && !mCommitDrawPending + return isDrawnLw() && mPolicyVisibility && ((!mAttachedHidden && (atoken == null || !atoken.hiddenRequested)) || mAnimating); @@ -1501,7 +1499,6 @@ final class WindowState implements WindowManagerPolicy.WindowState, * complete UI in to. */ public boolean isDrawnLw() { - final AppWindowToken atoken = mAppToken; return mSurface != null && !mDestroying && !mDrawPending && !mCommitDrawPending; } @@ -1513,9 +1510,8 @@ final class WindowState implements WindowManagerPolicy.WindowState, boolean isOpaqueDrawn() { return (mAttrs.format == PixelFormat.OPAQUE || mAttrs.type == TYPE_WALLPAPER) - && mSurface != null && mAnimation == null - && (mAppToken == null || mAppToken.animation == null) - && !mDrawPending && !mCommitDrawPending; + && isDrawnLw() && mAnimation == null + && (mAppToken == null || mAppToken.animation == null); } /** @@ -1608,6 +1604,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, boolean showLw(boolean doAnimation, boolean requestAnim) { if (mPolicyVisibility && mPolicyVisibilityAfterAnim) { + // Already showing. return false; } if (DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Policy visibility true: " + this); @@ -1647,6 +1644,7 @@ final class WindowState implements WindowManagerPolicy.WindowState, boolean current = doAnimation ? mPolicyVisibilityAfterAnim : mPolicyVisibility; if (!current) { + // Already hiding. return false; } if (doAnimation) { diff --git a/tests/SmokeTest/tests/src/com/android/smoketest/ProcessErrorsTest.java b/tests/SmokeTest/tests/src/com/android/smoketest/ProcessErrorsTest.java index 3efd65885e5a..b3a260050a52 100644 --- a/tests/SmokeTest/tests/src/com/android/smoketest/ProcessErrorsTest.java +++ b/tests/SmokeTest/tests/src/com/android/smoketest/ProcessErrorsTest.java @@ -120,13 +120,20 @@ public class ProcessErrorsTest extends AndroidTestCase { * The method will launch the app, wait for 7 seconds, check for apps in the error state, send * the Home intent, wait for 2 seconds, and then return. */ - public Collection<ProcessErrorStateInfo> runOneActivity(ResolveInfo app) { + public Collection<ProcessError> runOneActivity(ResolveInfo app) { final long appLaunchWait = 7000; final long homeLaunchWait = 2000; Log.i(TAG, String.format("Running activity %s/%s", app.activityInfo.packageName, app.activityInfo.name)); + // We check for any Crash or ANR dialogs that are already up, and we ignore them. This is + // so that we don't report crashes that were caused by prior apps (which those particular + // tests should have caught and reported already). Otherwise, test failures would cascade + // from the initial broken app to many/all of the tests following that app's launch. + final Collection<ProcessError> preErrProcs = + ProcessError.fromCollection(mActivityManager.getProcessesInErrorState()); + // launch app, and wait 7 seconds for it to start/settle final Intent intent = intentForActivity(app); getContext().startActivity(intent); @@ -136,10 +143,6 @@ public class ProcessErrorsTest extends AndroidTestCase { // ignore } - // See if there are any errors - final Collection<ProcessErrorStateInfo> errProcs = - mActivityManager.getProcessesInErrorState(); - // Send the "home" intent and wait 2 seconds for us to get there getContext().startActivity(mHomeIntent); try { @@ -148,28 +151,35 @@ public class ProcessErrorsTest extends AndroidTestCase { // ignore } + // See if there are any errors. We wait until down here to give ANRs as much time as + // possible to occur. + final Collection<ProcessError> errProcs = + ProcessError.fromCollection(mActivityManager.getProcessesInErrorState()); + // Take the difference between the error processes we see now, and the ones that were + // present when we started + if (errProcs != null && preErrProcs != null) { + errProcs.removeAll(preErrProcs); + } + return errProcs; } /** * A test that runs all Launcher-launchable activities and verifies that no ANRs or crashes * happened while doing so. - * <p /> - * FIXME: Doesn't detect multiple crashing apps properly, since the crash dialog for the - * FIXME: first app doesn't go away. */ public void testRunAllActivities() throws Exception { final Set<ProcessError> errSet = new HashSet<ProcessError>(); for (ResolveInfo app : getLauncherActivities(mPackageManager)) { - final Collection<ProcessErrorStateInfo> errProcs = runOneActivity(app); + final Collection<ProcessError> errProcs = runOneActivity(app); if (errProcs != null) { - errSet.addAll(ProcessError.fromCollection(errProcs)); + errSet.addAll(errProcs); } } if (!errSet.isEmpty()) { - fail(String.format("Got %d errors: %s", errSet.size(), + fail(String.format("Got %d errors:\n%s", errSet.size(), reportWrappedListContents(errSet))); } } @@ -200,19 +210,21 @@ public class ProcessErrorsTest extends AndroidTestCase { String condition; switch (entry.condition) { case ActivityManager.ProcessErrorStateInfo.CRASHED: - condition = "CRASHED"; + condition = "a CRASH"; break; case ActivityManager.ProcessErrorStateInfo.NOT_RESPONDING: - condition = "ANR"; + condition = "an ANR"; break; default: - condition = "<unknown>"; + condition = "an unknown error"; break; } - builder.append("Process error ").append(condition).append(" "); - builder.append(" ").append(entry.shortMsg); - builder.append(" detected in ").append(entry.processName).append(" ").append(entry.tag); + builder.append(String.format("Process %s encountered %s (%s)", entry.processName, + condition, entry.shortMsg)); + if (entry.condition == ActivityManager.ProcessErrorStateInfo.CRASHED) { + builder.append(String.format(" with stack trace:\n%s\n", entry.stackTrace)); + } builder.append("\n"); } return builder.toString(); @@ -231,6 +243,10 @@ public class ProcessErrorsTest extends AndroidTestCase { public static Collection<ProcessError> fromCollection(Collection<ProcessErrorStateInfo> in) { + if (in == null) { + return null; + } + List<ProcessError> out = new ArrayList<ProcessError>(in.size()); for (ProcessErrorStateInfo info : in) { out.add(new ProcessError(info)); diff --git a/tests/SmokeTest/tests/src/com/android/smoketest/SmokeTestRunner.java b/tests/SmokeTest/tests/src/com/android/smoketest/SmokeTestRunner.java index 40b11c5af4d9..51331fe84e82 100644 --- a/tests/SmokeTest/tests/src/com/android/smoketest/SmokeTestRunner.java +++ b/tests/SmokeTest/tests/src/com/android/smoketest/SmokeTestRunner.java @@ -73,13 +73,13 @@ public class SmokeTestRunner extends InstrumentationTestRunner { @Override public void runTest() throws Exception { final Set<ProcessError> errSet = new HashSet<ProcessError>(); - final Collection<ProcessErrorStateInfo> errProcs = runOneActivity(app); + final Collection<ProcessError> errProcs = runOneActivity(app); if (errProcs != null) { - errSet.addAll(ProcessError.fromCollection(errProcs)); + errSet.addAll(errProcs); } if (!errSet.isEmpty()) { - fail(String.format("Got %d errors: %s", errSet.size(), + fail(String.format("Got %d errors:\n%s", errSet.size(), reportWrappedListContents(errSet))); } } diff --git a/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java b/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java new file mode 100644 index 000000000000..0100dc591039 --- /dev/null +++ b/tools/layoutlib/bridge/src/com/android/internal/policy/PolicyManager.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.policy; + +import com.android.ide.common.rendering.api.LayoutLog; +import com.android.layoutlib.bridge.Bridge; +import com.android.layoutlib.bridge.impl.RenderAction; + +import android.content.Context; +import android.view.BridgeInflater; +import android.view.FallbackEventHandler; +import android.view.KeyEvent; +import android.view.LayoutInflater; +import android.view.View; +import android.view.Window; +import android.view.WindowManagerPolicy; + +/** + * Custom implementation of PolicyManager that does nothing to run in LayoutLib. + * + */ +public class PolicyManager { + + public static Window makeNewWindow(Context context) { + // this will likely crash somewhere beyond so we log it. + Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, + "Call to PolicyManager.makeNewWindow is not supported", null); + return null; + } + + public static LayoutInflater makeNewLayoutInflater(Context context) { + return new BridgeInflater(context, RenderAction.getCurrentContext().getProjectCallback()); + } + + public static WindowManagerPolicy makeNewWindowManager() { + // this will likely crash somewhere beyond so we log it. + Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, + "Call to PolicyManager.makeNewWindowManager is not supported", null); + return null; + } + + public static FallbackEventHandler makeNewFallbackEventHandler(Context context) { + return new FallbackEventHandler() { + @Override + public void setView(View v) { + } + + @Override + public void preDispatchKeyEvent(KeyEvent event) { + } + + @Override + public boolean dispatchKeyEvent(KeyEvent event) { + return false; + } + }; + } +} diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index ff882099b177..66481fd1b73c 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -29,6 +29,7 @@ import com.android.ide.common.rendering.api.SessionParams; import com.android.layoutlib.bridge.impl.FontLoader; import com.android.layoutlib.bridge.impl.RenderDrawable; import com.android.layoutlib.bridge.impl.RenderSessionImpl; +import com.android.layoutlib.bridge.util.DynamicIdMap; import com.android.ninepatch.NinePatchChunk; import com.android.resources.ResourceType; import com.android.tools.layoutlib.create.MethodAdapter; @@ -78,7 +79,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { private final static ReentrantLock sLock = new ReentrantLock(); /** - * Maps from id to resource type/name. This is for android.R only. + * Maps from id to resource type/name. This is for com.android.internal.R */ private final static Map<Integer, Pair<ResourceType, String>> sRMap = new HashMap<Integer, Pair<ResourceType, String>>(); @@ -89,11 +90,17 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { private final static Map<IntArray, String> sRArrayMap = new HashMap<IntArray, String>(); /** * Reverse map compared to sRMap, resource type -> (resource name -> id). - * This is for android.R only. + * This is for com.android.internal.R. */ - private final static Map<ResourceType, Map<String, Integer>> sRFullMap = + private final static Map<ResourceType, Map<String, Integer>> sRevRMap = new EnumMap<ResourceType, Map<String,Integer>>(ResourceType.class); + // framework resources are defined as 0x01XX#### where XX is the resource type (layout, + // drawable, etc...). Using FF as the type allows for 255 resource types before we get a + // collision which should be fine. + private final static int DYNAMIC_ID_SEED_START = 0x01ff0000; + private final static DynamicIdMap sDynamicIds = new DynamicIdMap(DYNAMIC_ID_SEED_START); + private final static Map<Object, Map<String, SoftReference<Bitmap>>> sProjectBitmapCache = new HashMap<Object, Map<String, SoftReference<Bitmap>>>(); private final static Map<Object, Map<String, SoftReference<NinePatchChunk>>> sProject9PatchCache = @@ -257,7 +264,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { ResourceType resType = ResourceType.getEnum(resTypeName); if (resType != null) { Map<String, Integer> fullMap = new HashMap<String, Integer>(); - sRFullMap.put(resType, fullMap); + sRevRMap.put(resType, fullMap); for (Field f : inner.getDeclaredFields()) { // only process static final fields. Since the final attribute may have @@ -459,7 +466,14 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { * does not match any resource. */ public static Pair<ResourceType, String> resolveResourceId(int value) { - return sRMap.get(value); + Pair<ResourceType, String> pair = sRMap.get(value); + if (pair == null) { + pair = sDynamicIds.resolveId(value); + if (pair == null) { + System.out.println(String.format("Missing id: %1$08X (%1$d)", value)); + } + } + return pair; } /** @@ -478,12 +492,17 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { * @return an {@link Integer} containing the resource id, or null if no resource were found. */ public static Integer getResourceId(ResourceType type, String name) { - Map<String, Integer> map = sRFullMap.get(type); + Map<String, Integer> map = sRevRMap.get(type); + Integer value = null; if (map != null) { - return map.get(name); + value = map.get(name); } - return null; + if (value == null) { + value = sDynamicIds.getId(type, name); + } + + return value; } /** @@ -598,6 +617,4 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { sFramework9PatchCache.put(value, new SoftReference<NinePatchChunk>(ninePatch)); } } - - } diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java index 6c49bab86146..1555d6124951 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java @@ -60,6 +60,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; +import android.os.PowerManager; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.TypedValue; @@ -431,6 +432,10 @@ public final class BridgeContext extends Context { return null; } + if (POWER_SERVICE.equals(service)) { + return new PowerManager(new BridgePowerManager(), new Handler()); + } + throw new UnsupportedOperationException("Unsupported Service: " + service); } diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java new file mode 100644 index 000000000000..6071a6ba31f7 --- /dev/null +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java @@ -0,0 +1,132 @@ +/* + * Copyright (C) 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.layoutlib.bridge.android; + +import android.os.IBinder; +import android.os.IPowerManager; +import android.os.RemoteException; +import android.os.WorkSource; + +/** + * Fake implementation of IPowerManager. + * + */ +public class BridgePowerManager implements IPowerManager { + + @Override + public boolean isScreenOn() throws RemoteException { + return true; + } + + @Override + public IBinder asBinder() { + // pass for now. + return null; + } + + @Override + public void acquireWakeLock(int arg0, IBinder arg1, String arg2, WorkSource arg3) + throws RemoteException { + // pass for now. + } + + @Override + public void clearUserActivityTimeout(long arg0, long arg1) throws RemoteException { + // pass for now. + } + + @Override + public void crash(String arg0) throws RemoteException { + // pass for now. + } + + @Override + public int getSupportedWakeLockFlags() throws RemoteException { + // pass for now. + return 0; + } + + @Override + public void goToSleep(long arg0) throws RemoteException { + // pass for now. + } + + @Override + public void goToSleepWithReason(long arg0, int arg1) throws RemoteException { + // pass for now. + } + + @Override + public void preventScreenOn(boolean arg0) throws RemoteException { + // pass for now. + } + + @Override + public void reboot(String arg0) throws RemoteException { + // pass for now. + } + + @Override + public void releaseWakeLock(IBinder arg0, int arg1) throws RemoteException { + // pass for now. + } + + @Override + public void setAttentionLight(boolean arg0, int arg1) throws RemoteException { + // pass for now. + } + + @Override + public void setAutoBrightnessAdjustment(float arg0) throws RemoteException { + // pass for now. + } + + @Override + public void setBacklightBrightness(int arg0) throws RemoteException { + // pass for now. + } + + @Override + public void setMaximumScreenOffTimeount(int arg0) throws RemoteException { + // pass for now. + } + + @Override + public void setPokeLock(int arg0, IBinder arg1, String arg2) throws RemoteException { + // pass for now. + } + + @Override + public void setStayOnSetting(int arg0) throws RemoteException { + // pass for now. + } + + @Override + public void updateWakeLockWorkSource(IBinder arg0, WorkSource arg1) throws RemoteException { + // pass for now. + } + + @Override + public void userActivity(long arg0, boolean arg1) throws RemoteException { + // pass for now. + } + + @Override + public void userActivityWithForce(long arg0, boolean arg1, boolean arg2) throws RemoteException { + // pass for now. + } +} diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java new file mode 100644 index 000000000000..a1fae95fc1ae --- /dev/null +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.layoutlib.bridge.util; + +import com.android.resources.ResourceType; +import com.android.util.Pair; + +import android.util.SparseArray; + +import java.util.HashMap; +import java.util.Map; + +public class DynamicIdMap { + + private final Map<Pair<ResourceType, String>, Integer> mDynamicIds = new HashMap<Pair<ResourceType, String>, Integer>(); + private final SparseArray<Pair<ResourceType, String>> mRevDynamicIds = new SparseArray<Pair<ResourceType, String>>(); + private int mDynamicSeed; + + public DynamicIdMap(int seed) { + mDynamicSeed = seed; + } + + public void reset(int seed) { + mDynamicIds.clear(); + mRevDynamicIds.clear(); + mDynamicSeed = seed; + } + + /** + * Returns a dynamic integer for the given resource type/name, creating it if it doesn't + * already exist. + * + * @param type the type of the resource + * @param name the name of the resource + * @return an integer. + */ + public Integer getId(ResourceType type, String name) { + return getId(Pair.of(type, name)); + } + + /** + * Returns a dynamic integer for the given resource type/name, creating it if it doesn't + * already exist. + * + * @param resource the type/name of the resource + * @return an integer. + */ + public Integer getId(Pair<ResourceType, String> resource) { + Integer value = mDynamicIds.get(resource); + if (value == null) { + value = Integer.valueOf(++mDynamicSeed); + mDynamicIds.put(resource, value); + mRevDynamicIds.put(value, resource); + } + + return value; + } + + public Pair<ResourceType, String> resolveId(int id) { + return mRevDynamicIds.get(id); + } +} diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java index 4b33474c65a8..170cd6a8b5cb 100644 --- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java +++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java @@ -183,10 +183,11 @@ public final class CreateInfo implements ICreateInfo { */ private final static String[] RENAMED_CLASSES = new String[] { - "android.os.ServiceManager", "android.os._Original_ServiceManager", - "android.view.SurfaceView", "android.view._Original_SurfaceView", + "android.os.ServiceManager", "android.os._Original_ServiceManager", + "android.view.SurfaceView", "android.view._Original_SurfaceView", "android.view.accessibility.AccessibilityManager", "android.view.accessibility._Original_AccessibilityManager", - "android.webkit.WebView", "android.webkit._Original_WebView", + "android.webkit.WebView", "android.webkit._Original_WebView", + "com.android.internal.policy.PolicyManager", "com.android.internal.policy._Original_PolicyManager", }; /** diff --git a/voip/jni/rtp/Android.mk b/voip/jni/rtp/Android.mk index 08152942c66c..49b711d4b84e 100644 --- a/voip/jni/rtp/Android.mk +++ b/voip/jni/rtp/Android.mk @@ -50,7 +50,7 @@ LOCAL_C_INCLUDES += \ frameworks/base/media/libstagefright/codecs/amrnb/enc/src \ frameworks/base/media/libstagefright/codecs/amrnb/dec/include \ frameworks/base/media/libstagefright/codecs/amrnb/dec/src \ - system/media/audio_effects/include + $(call include-path-for, audio-effects) LOCAL_CFLAGS += -fvisibility=hidden |