diff options
37 files changed, 338 insertions, 172 deletions
diff --git a/api/current.xml b/api/current.xml index 14ec888d86ca..8ed7d936ad2a 100644 --- a/api/current.xml +++ b/api/current.xml @@ -265240,21 +265240,6 @@ visibility="protected" > </method> -<method name="getOption" - return="java.lang.Object" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="optID" type="int"> -</parameter> -<exception name="SocketException" type="java.net.SocketException"> -</exception> -</method> <method name="getOutputStream" return="java.io.OutputStream" abstract="true" @@ -265309,23 +265294,6 @@ <exception name="IOException" type="java.io.IOException"> </exception> </method> -<method name="setOption" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="optID" type="int"> -</parameter> -<parameter name="val" type="java.lang.Object"> -</parameter> -<exception name="SocketException" type="java.net.SocketException"> -</exception> -</method> <method name="setPerformancePreferences" return="void" abstract="false" @@ -265704,19 +265672,6 @@ <parameter name="p" type="java.security.Permission"> </parameter> </method> -<method name="isValidIP6Address" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="ipAddress" type="java.lang.String"> -</parameter> -</method> </class> <class name="SocketTimeoutException" extends="java.io.InterruptedIOException" @@ -279451,9 +279406,77 @@ visibility="public" > </constructor> +<method name="getInstance" + return="java.security.Policy" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="type" type="java.lang.String"> +</parameter> +<parameter name="params" type="java.security.Policy.Parameters"> +</parameter> +<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException"> +</exception> +</method> +<method name="getInstance" + return="java.security.Policy" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="type" type="java.lang.String"> +</parameter> +<parameter name="params" type="java.security.Policy.Parameters"> +</parameter> +<parameter name="provider" type="java.lang.String"> +</parameter> +<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException"> +</exception> +<exception name="NoSuchProviderException" type="java.security.NoSuchProviderException"> +</exception> +</method> +<method name="getInstance" + return="java.security.Policy" + abstract="false" + native="false" + synchronized="false" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="type" type="java.lang.String"> +</parameter> +<parameter name="params" type="java.security.Policy.Parameters"> +</parameter> +<parameter name="provider" type="java.security.Provider"> +</parameter> +<exception name="NoSuchAlgorithmException" type="java.security.NoSuchAlgorithmException"> +</exception> +</method> +<method name="getParameters" + return="java.security.Policy.Parameters" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getPermissions" return="java.security.PermissionCollection" - abstract="true" + abstract="false" native="false" synchronized="false" static="false" @@ -279488,6 +279511,28 @@ visibility="public" > </method> +<method name="getProvider" + return="java.security.Provider" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> +<method name="getType" + return="java.lang.String" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="implies" return="boolean" abstract="false" @@ -279505,7 +279550,7 @@ </method> <method name="refresh" return="void" - abstract="true" + abstract="false" native="false" synchronized="false" static="false" @@ -279527,6 +279572,93 @@ <parameter name="policy" type="java.security.Policy"> </parameter> </method> +<field name="UNSUPPORTED_EMPTY_COLLECTION" + type="java.security.PermissionCollection" + transient="false" + volatile="false" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +</class> +<interface name="Policy.Parameters" + abstract="true" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +</interface> +<class name="PolicySpi" + extends="java.lang.Object" + abstract="true" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<constructor name="PolicySpi" + type="java.security.PolicySpi" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</constructor> +<method name="engineGetPermissions" + return="java.security.PermissionCollection" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="codesource" type="java.security.CodeSource"> +</parameter> +</method> +<method name="engineGetPermissions" + return="java.security.PermissionCollection" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="domain" type="java.security.ProtectionDomain"> +</parameter> +</method> +<method name="engineImplies" + return="boolean" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +<parameter name="domain" type="java.security.ProtectionDomain"> +</parameter> +<parameter name="permission" type="java.security.Permission"> +</parameter> +</method> +<method name="engineRefresh" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="protected" +> +</method> </class> <interface name="Principal" abstract="true" diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java index 4dc88b31f1d9..d7a041243acb 100644 --- a/core/java/android/app/NativeActivity.java +++ b/core/java/android/app/NativeActivity.java @@ -3,8 +3,6 @@ package android.app; import com.android.internal.view.IInputMethodCallback; import com.android.internal.view.IInputMethodSession; -import dalvik.system.PathClassLoader; - import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; @@ -168,17 +166,14 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, // If the application does not have (Java) code, then no ClassLoader // has been set up for it. We will need to do our own search for // the native code. - path = ai.applicationInfo.dataDir + "/lib/" + System.mapLibraryName(libname); - if (!(new File(path)).exists()) { - path = null; + File libraryFile = new File(ai.applicationInfo.nativeLibraryDir, + System.mapLibraryName(libname)); + if (libraryFile.exists()) { + path = libraryFile.getPath(); } } if (path == null) { - path = ((PathClassLoader)getClassLoader()).findLibrary(libname); - } - - if (path == null) { throw new IllegalArgumentException("Unable to find native library: " + libname); } diff --git a/core/java/android/app/backup/SharedPreferencesBackupHelper.java b/core/java/android/app/backup/SharedPreferencesBackupHelper.java index 23b170360daa..213bd31698de 100644 --- a/core/java/android/app/backup/SharedPreferencesBackupHelper.java +++ b/core/java/android/app/backup/SharedPreferencesBackupHelper.java @@ -16,6 +16,7 @@ package android.app.backup; +import android.app.QueuedWork; import android.content.Context; import android.content.SharedPreferences; import android.os.ParcelFileDescriptor; @@ -94,7 +95,11 @@ public class SharedPreferencesBackupHelper extends FileBackupHelperBase implemen public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState) { Context context = mContext; - + + // If a SharedPreference has an outstanding write in flight, + // wait for it to finish flushing to disk. + QueuedWork.waitToFinish(); + // make filenames for the prefGroups String[] prefGroups = mPrefGroups; final int N = prefGroups.length; @@ -123,4 +128,3 @@ public class SharedPreferencesBackupHelper extends FileBackupHelperBase implemen } } } - diff --git a/core/java/android/content/pm/Signature.java b/core/java/android/content/pm/Signature.java index 1bb38577fbca..d4e5cc13b1c1 100644 --- a/core/java/android/content/pm/Signature.java +++ b/core/java/android/content/pm/Signature.java @@ -20,6 +20,7 @@ import android.content.ComponentName; import android.os.Parcel; import android.os.Parcelable; +import java.lang.ref.SoftReference; import java.util.Arrays; /** @@ -30,7 +31,7 @@ public class Signature implements Parcelable { private final byte[] mSignature; private int mHashCode; private boolean mHaveHashCode; - private String mString; + private SoftReference<String> mStringRef; /** * Create Signature from an existing raw byte array. @@ -96,10 +97,13 @@ public class Signature implements Parcelable { * cached so future calls will return the same String. */ public String toCharsString() { - if (mString != null) return mString; - String str = new String(toChars()); - mString = str; - return mString; + String str = mStringRef == null ? null : mStringRef.get(); + if (str != null) { + return str; + } + str = new String(toChars()); + mStringRef = new SoftReference<String>(str); + return str; } /** diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java index 6212e1b7bbc1..2c5c9090eb14 100644 --- a/core/java/android/hardware/SensorEvent.java +++ b/core/java/android/hardware/SensorEvent.java @@ -84,14 +84,14 @@ public class SensorEvent { * sensor itself (<b>Fs</b>) using the relation: * </p> * - * <b><center>Ad = - Fs / mass</center></b> + * <b><center>Ad = - ∑Fs / mass</center></b> * * <p> * In particular, the force of gravity is always influencing the measured * acceleration: * </p> * - * <b><center>Ad = -g - F / mass</center></b> + * <b><center>Ad = -g - ∑F / mass</center></b> * * <p> * For this reason, when the device is sitting on a table (and obviously not diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 4d2ba713a856..924c9d48f5d4 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -143,7 +143,7 @@ public class ViewConfiguration { /** * Max distance to overscroll for edge effects */ - private static final int OVERSCROLL_DISTANCE = 2; + private static final int OVERSCROLL_DISTANCE = 0; /** * Max distance to overfling for edge effects diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 7942c56cd9db..55d9b6c1636f 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Vybrat vše"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Označit text"</string> <string name="cut" msgid="3092569408438626261">"Vyjmout"</string> <string name="copy" msgid="2681946229533511987">"Kopírovat"</string> <string name="paste" msgid="5629880836805036433">"Vložit"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index bab18f2f56d8..9e6865ef4f61 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Vælg alle"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Marker tekst"</string> <string name="cut" msgid="3092569408438626261">"Klip"</string> <string name="copy" msgid="2681946229533511987">"Kopier"</string> <string name="paste" msgid="5629880836805036433">"Indsæt"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index c20aa16f1d27..1e1556ff2a8e 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Alles auswählen"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Text auswählen"</string> <string name="cut" msgid="3092569408438626261">"Ausschneiden"</string> <string name="copy" msgid="2681946229533511987">"Kopieren"</string> <string name="paste" msgid="5629880836805036433">"Einfügen"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index ab29601feade..a0bb65b1c01f 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Επιλογή όλων"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Επιλογή κειμένου"</string> <string name="cut" msgid="3092569408438626261">"Αποκοπή"</string> <string name="copy" msgid="2681946229533511987">"Αντιγραφή"</string> <string name="paste" msgid="5629880836805036433">"Επικόλληση"</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index fce56cd96e1b..b07d79a7dc04 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Seleccionar todos"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Seleccionar texto"</string> <string name="cut" msgid="3092569408438626261">"Cortar"</string> <string name="copy" msgid="2681946229533511987">"Copiar"</string> <string name="paste" msgid="5629880836805036433">"Pegar"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index 4fdaf3c4d17e..35e19a81ec7f 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Seleccionar todo"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Seleccionar texto"</string> <string name="cut" msgid="3092569408438626261">"Cortar"</string> <string name="copy" msgid="2681946229533511987">"Copiar"</string> <string name="paste" msgid="5629880836805036433">"Pegar"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 9f0fa0ba43e7..e826abadc9ae 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Tout sélectionner"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Sélectionner le texte"</string> <string name="cut" msgid="3092569408438626261">"Couper"</string> <string name="copy" msgid="2681946229533511987">"Copier"</string> <string name="paste" msgid="5629880836805036433">"Coller"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index 4731f391b32e..46b735e4c65f 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Seleziona tutto"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Seleziona testo"</string> <string name="cut" msgid="3092569408438626261">"Taglia"</string> <string name="copy" msgid="2681946229533511987">"Copia"</string> <string name="paste" msgid="5629880836805036433">"Incolla"</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index a9613f43b932..802c6a33e4cf 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"すべて選択"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"テキストを選択"</string> <string name="cut" msgid="3092569408438626261">"切り取り"</string> <string name="copy" msgid="2681946229533511987">"コピー"</string> <string name="paste" msgid="5629880836805036433">"貼り付け"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index d6ab5ad5caae..165c5e54ded1 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"모두 선택"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"텍스트 선택"</string> <string name="cut" msgid="3092569408438626261">"잘라내기"</string> <string name="copy" msgid="2681946229533511987">"복사"</string> <string name="paste" msgid="5629880836805036433">"붙여넣기"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 021b20ef39e8..b4af7a6a0d96 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Merk alt"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Merk tekst"</string> <string name="cut" msgid="3092569408438626261">"Klipp ut"</string> <string name="copy" msgid="2681946229533511987">"Kopier"</string> <string name="paste" msgid="5629880836805036433">"Lim inn"</string> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index a74db2bbfcee..8829f27785d3 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Alles selecteren"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Tekst selecteren"</string> <string name="cut" msgid="3092569408438626261">"Knippen"</string> <string name="copy" msgid="2681946229533511987">"Kopiëren"</string> <string name="paste" msgid="5629880836805036433">"Plakken"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index f5ed50c85649..dd9747d1f536 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Zaznacz wszystko"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Zaznacz tekst"</string> <string name="cut" msgid="3092569408438626261">"Wytnij"</string> <string name="copy" msgid="2681946229533511987">"Kopiuj"</string> <string name="paste" msgid="5629880836805036433">"Wklej"</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 7914a3dd5201..cce7ff9bdea3 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Seleccionar tudo"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Seleccionar texto"</string> <string name="cut" msgid="3092569408438626261">"Cortar"</string> <string name="copy" msgid="2681946229533511987">"Copiar"</string> <string name="paste" msgid="5629880836805036433">"Colar"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index c9c792e4f202..7163fce72429 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Selecionar tudo"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Selecionar texto"</string> <string name="cut" msgid="3092569408438626261">"Recortar"</string> <string name="copy" msgid="2681946229533511987">"Copiar"</string> <string name="paste" msgid="5629880836805036433">"Colar"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 786571bc163d..043e094c00c3 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Выбрать все"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Выбрать текст"</string> <string name="cut" msgid="3092569408438626261">"Вырезать"</string> <string name="copy" msgid="2681946229533511987">"Копировать"</string> <string name="paste" msgid="5629880836805036433">"Вставить"</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 8a115697eec2..e32746ab24d2 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Välj alla"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Markera text"</string> <string name="cut" msgid="3092569408438626261">"Klipp ut"</string> <string name="copy" msgid="2681946229533511987">"Kopiera"</string> <string name="paste" msgid="5629880836805036433">"Klistra in"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index b45d5bb9e297..bd87446c40f5 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"Tümünü seç"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"Metin seç"</string> <string name="cut" msgid="3092569408438626261">"Kes"</string> <string name="copy" msgid="2681946229533511987">"Kopyala"</string> <string name="paste" msgid="5629880836805036433">"Yapıştır"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 88c38e5f0732..aa1f93fc1f3a 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"全选"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"选择文字"</string> <string name="cut" msgid="3092569408438626261">"剪切"</string> <string name="copy" msgid="2681946229533511987">"复制"</string> <string name="paste" msgid="5629880836805036433">"粘贴"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 7d3c27a544d9..fdce81369482 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -703,8 +703,7 @@ <string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string> <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string> <string name="selectAll" msgid="6876518925844129331">"全部選取"</string> - <!-- no translation found for selectText (4862359311088898878) --> - <skip /> + <!-- outdated translation 3889149123626888637 --> <string name="selectText" msgid="4862359311088898878">"選取文字"</string> <string name="cut" msgid="3092569408438626261">"剪下"</string> <string name="copy" msgid="2681946229533511987">"複製"</string> <string name="paste" msgid="5629880836805036433">"貼上"</string> diff --git a/media/libeffects/lvm/lib/Reverb/src/LVREV_ApplyNewSettings.c b/media/libeffects/lvm/lib/Reverb/src/LVREV_ApplyNewSettings.c index 6a8b39bd7d9c..9a40f683e533 100644 --- a/media/libeffects/lvm/lib/Reverb/src/LVREV_ApplyNewSettings.c +++ b/media/libeffects/lvm/lib/Reverb/src/LVREV_ApplyNewSettings.c @@ -526,7 +526,7 @@ LVREV_ReturnStatus_en LVREV_ApplyNewSettings (LVREV_Instance_st *pPrivate) (pPrivate->NewParams.OperatingMode == LVM_MODE_ON)) { pPrivate->BypassMixer.Target2 = ((LVM_INT32)(pPrivate->NewParams.Level * 32767)/100)<<16; - pPrivate->BypassMixer.Target1 = LVREV_HEADROOM << 16; + pPrivate->BypassMixer.Target1 = 0x00000000; if ((pPrivate->NewParams.Level == 0) && (pPrivate->bFirstControl == LVM_FALSE)) { pPrivate->BypassMixer.CallbackSet2 = LVM_TRUE; @@ -542,7 +542,7 @@ LVREV_ReturnStatus_en LVREV_ApplyNewSettings (LVREV_Instance_st *pPrivate) if(pPrivate->NewParams.OperatingMode == LVM_MODE_ON) { pPrivate->BypassMixer.Target2 = ((LVM_INT32)(pPrivate->NewParams.Level * 32767)/100)<<16; - pPrivate->BypassMixer.Target1 = LVREV_HEADROOM << 16; + pPrivate->BypassMixer.Target1 = 0x00000000; pPrivate->BypassMixer.CallbackSet2 = LVM_FALSE; OperatingMode = LVM_MODE_ON; @@ -558,7 +558,7 @@ LVREV_ReturnStatus_en LVREV_ApplyNewSettings (LVREV_Instance_st *pPrivate) else if (pPrivate->bFirstControl == LVM_FALSE) { pPrivate->BypassMixer.Target2 = 0x00000000; - pPrivate->BypassMixer.Target1 = 0x7FFFFFFF; + pPrivate->BypassMixer.Target1 = 0x00000000; pPrivate->BypassMixer.CallbackSet2 = LVM_TRUE; pPrivate->GainMixer.Target = 0x03FFFFFF; OperatingMode = LVM_MODE_ON; diff --git a/media/libeffects/lvm/lib/Reverb/src/LVREV_GetInstanceHandle.c b/media/libeffects/lvm/lib/Reverb/src/LVREV_GetInstanceHandle.c index c2b266a67cf8..ffa51384b2e9 100644 --- a/media/libeffects/lvm/lib/Reverb/src/LVREV_GetInstanceHandle.c +++ b/media/libeffects/lvm/lib/Reverb/src/LVREV_GetInstanceHandle.c @@ -238,8 +238,8 @@ LVREV_ReturnStatus_en LVREV_GetInstanceHandle(LVREV_Handle_t *phInsta pLVREV_Private->BypassMixer.pGeneralPurpose1 = LVM_NULL; pLVREV_Private->BypassMixer.pCallBack1 = LVM_NULL; pLVREV_Private->BypassMixer.CallbackSet1 = LVM_FALSE; - pLVREV_Private->BypassMixer.Current1 = 0x7fffffff; - pLVREV_Private->BypassMixer.Target1 = 0x7fffffff; + pLVREV_Private->BypassMixer.Current1 = 0x00000000; + pLVREV_Private->BypassMixer.Target1 = 0x00000000; pLVREV_Private->RoomSizeInms = 100; // 100 msec diff --git a/media/libeffects/lvm/lib/StereoWidening/src/LVCS_Control.c b/media/libeffects/lvm/lib/StereoWidening/src/LVCS_Control.c index a3ba42b63e77..ce6d4105a4a7 100644 --- a/media/libeffects/lvm/lib/StereoWidening/src/LVCS_Control.c +++ b/media/libeffects/lvm/lib/StereoWidening/src/LVCS_Control.c @@ -202,7 +202,9 @@ LVCS_ReturnStatus_en LVCS_Control(LVCS_Handle_t hInstance, /* Set the reverb delay timeout */ if(pInstance->bInOperatingModeTransition != LVM_TRUE){ pInstance->bTimerDone = LVM_FALSE; - pInstance->TimerParams.TimeInMs = (LVM_INT16)(((pInstance->Reverberation.DelaySize << 2)/pInstance->TimerParams.SamplingRate) + 1); + pInstance->TimerParams.TimeInMs = + (LVM_INT16)(((pInstance->Reverberation.DelaySize << 2) + /pInstance->TimerParams.SamplingRate) + 1); LVM_Timer_Init ( &pInstance->TimerInstance, &pInstance->TimerParams); } diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp index 7297811e76fc..e86ed99e5bd4 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp @@ -275,7 +275,6 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->pBundledContext->PcmInPtr = NULL; return -EINVAL; } - #endif /* Saved strength is used to return the exact strength that was used in the set to the get @@ -565,9 +564,6 @@ int LvmBundle_init(EffectContext *pContext){ params.SpeakerType = LVM_HEADPHONES; pContext->pBundledContext->SampleRate = LVM_FS_44100; - pContext->pBundledContext->SamplesToExitCountEq = 44100*2*2; // 2 secs Stereo - pContext->pBundledContext->SamplesToExitCountBb = 44100*2*2; // 2 secs Stereo - pContext->pBundledContext->SamplesToExitCountVirt = 44100*2*2; // 2 secs Stereo /* Concert Sound parameters */ params.VirtualizerOperatingMode = LVM_MODE_OFF; @@ -2431,7 +2427,7 @@ extern "C" int Effect_process(effect_interface_t self, if(pContext->pBundledContext->SamplesToExitCountBb > 0){ status2Sec = -ENODATA; pContext->pBundledContext->SamplesToExitCountBb -= outBuffer->frameCount * 2; // STEREO - //LOGV("\tEffect_process: Waiting for 2 secs to turn off BASS_BOOST, %d samples left", + //LOGV("\tEffect_process: Waiting to turn off BASS_BOOST, %d samples left", // pContext->pBundledContext->SamplesToExitCountBb); } else { status = -ENODATA; @@ -2897,11 +2893,11 @@ extern "C" int Effect_command(effect_interface_t self, pContext->pBundledContext->NumberEffectsEnabled++; android::LvmEffect_enable(pContext); pContext->pBundledContext->SamplesToExitCountEq = - (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*1); // 0.1 secs Stereo + (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo pContext->pBundledContext->SamplesToExitCountBb = - (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*6); // 2 secs Stereo + (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo pContext->pBundledContext->SamplesToExitCountVirt = - (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*1); // 2 secs Stereo + (LVM_INT32)(pContext->pBundledContext->SamplesPerSecond*0.1); // 0.1 secs Stereo LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE Samples to Exit = %d", pContext->pBundledContext->SamplesToExitCountBb); //LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE NumberEffectsEnabled = %d", diff --git a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp index 10c3e92a2e1a..45ef416fc712 100755 --- a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp +++ b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp @@ -152,6 +152,7 @@ struct ReverbContext{ bool preset; uint16_t curPreset; uint16_t nextPreset; + int SamplesToExitCount; }; #define REVERB_DEFAULT_PRESET REVERB_PRESET_MEDIUMROOM @@ -212,6 +213,7 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, desc = gDescriptors[i]; if (memcmp(uuid, &desc->uuid, sizeof(effect_uuid_t)) == 0) { + LOGV("\tEffectCreate - UUID matched Reverb type %d, UUID = %x", i, desc->uuid.timeLow); break; } } @@ -228,6 +230,9 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, pContext->auxiliary = false; if ((desc->flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY){ pContext->auxiliary = true; + LOGV("\tEffectCreate - AUX"); + }else{ + LOGV("\tEffectCreate - INS"); } pContext->preset = false; @@ -236,6 +241,9 @@ extern "C" int EffectCreate(effect_uuid_t *uuid, // force reloading preset at first call to process() pContext->curPreset = REVERB_PRESET_LAST + 1; pContext->nextPreset = REVERB_DEFAULT_PRESET; + LOGV("\tEffectCreate - PRESET"); + }else{ + LOGV("\tEffectCreate - ENVIRONMENTAL"); } LOGV("\tEffectCreate - Calling Reverb_init"); @@ -389,22 +397,19 @@ int process( LVM_INT16 *pIn, int frameCount, ReverbContext *pContext){ - LVM_INT16 samplesPerFrame = 0; + LVM_INT16 samplesPerFrame = 1; LVREV_ReturnStatus_en LvmStatus = LVREV_SUCCESS; /* Function call status */ LVM_INT16 *OutFrames16; // Check that the input is either mono or stereo - if(pContext->config.inputCfg.channels == CHANNEL_STEREO){ + if (pContext->config.inputCfg.channels == CHANNEL_STEREO) { samplesPerFrame = 2; - } else if (pContext->config.inputCfg.channels == CHANNEL_MONO){ - samplesPerFrame = 1; - } else { + } else if (pContext->config.inputCfg.channels != CHANNEL_MONO) { LOGV("\tLVREV_ERROR : process invalid PCM format"); return -EINVAL; } - OutFrames16 = (LVM_INT16 *)pContext->OutFrames32; // Check for NULL pointers @@ -437,43 +442,49 @@ int process( LVM_INT16 *pIn, //pContext->config.outputCfg.channels, CHANNEL_STEREO); if (pContext->preset && pContext->curPreset == REVERB_PRESET_NONE) { - memset(pContext->OutFrames32, 0, frameCount * sizeof(LVM_INT32) * 2); + memset(pContext->OutFrames32, 0, frameCount * sizeof(LVM_INT32) * 2); //always stereo here } else { - /* Process the samples */ - LvmStatus = LVREV_Process(pContext->hInstance, /* Instance handle */ - pContext->InFrames32, /* Input buffer */ - pContext->OutFrames32, /* Output buffer */ - frameCount); /* Number of samples to read */ - } - - if (!pContext->auxiliary) { - for (int i=0; i<frameCount*2; i++){ - pContext->OutFrames32[i] += pContext->InFrames32[i]; + if(pContext->bEnabled == LVM_FALSE && pContext->SamplesToExitCount > 0) { + memset(pContext->InFrames32, + 0, + frameCount * sizeof(LVM_INT32) * 2); //always stereo here } + + /* Process the samples */ + LvmStatus = LVREV_Process(pContext->hInstance, /* Instance handle */ + pContext->InFrames32, /* Input buffer */ + pContext->OutFrames32, /* Output buffer */ + frameCount); /* Number of samples to read */ } LVM_ERROR_CHECK(LvmStatus, "LVREV_Process", "process") if(LvmStatus != LVREV_SUCCESS) return -EINVAL; // Convert to 16 bits - for(int i=0; i<frameCount*2; i++){ // Always stereo - OutFrames16[i] = clamp16(pContext->OutFrames32[i]>>8); + if (pContext->auxiliary) { + for (int i=0; i < frameCount*2; i++) { //always stereo here + OutFrames16[i] = clamp16(pContext->OutFrames32[i]>>8); + } + } else { + for (int i=0; i < frameCount*2; i++) { //always stereo here + OutFrames16[i] = clamp16((pContext->OutFrames32[i]>>8) + (LVM_INT32)pIn[i]); + } } #ifdef LVM_PCM - fwrite(OutFrames16, frameCount*sizeof(LVM_INT16)*samplesPerFrame, 1, pContext->PcmOutPtr); + fwrite(OutFrames16, frameCount*sizeof(LVM_INT16)*2, 1, pContext->PcmOutPtr); fflush(pContext->PcmOutPtr); #endif // Accumulate if required if (pContext->config.outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE){ //LOGV("\tBuffer access is ACCUMULATE"); - for (int i=0; i<frameCount*2; i++){ + for (int i=0; i<frameCount*2; i++){ //always stereo here pOut[i] = clamp16((int32_t)pOut[i] + (int32_t)OutFrames16[i]); } }else{ //LOGV("\tBuffer access is WRITE"); - memcpy(pOut, OutFrames16, frameCount*sizeof(LVM_INT16)*2); // 2 is for stereo output + memcpy(pOut, OutFrames16, frameCount*sizeof(LVM_INT16)*2); } return 0; @@ -560,6 +571,7 @@ int Reverb_configure(ReverbContext *pContext, effect_config_t *pConfig){ //LOGV("\tReverb_configure calling memcpy"); memcpy(&pContext->config, pConfig, sizeof(effect_config_t)); + switch (pConfig->inputCfg.samplingRate) { case 8000: SampleRate = LVM_FS_8000; @@ -741,6 +753,8 @@ int Reverb_init(ReverbContext *pContext){ params.Damping = 21; params.RoomSize = 100; + pContext->SamplesToExitCount = (params.T60 * pContext->config.inputCfg.samplingRate)/1000; + /* Saved strength is used to return the exact strength that was used in the set to the get * because we map the original strength range of 0:1000 to 1:15, and this will avoid * quantisation like effect when returning @@ -1082,7 +1096,8 @@ int16_t ReverbGetRoomLevel(ReverbContext *pContext){ //LOGV("\tReverbGetRoomLevel, Level = %d, pContext->SavedRoomLevel = %d, " // "pContext->SavedReverbLevel = %d, CombinedLevel = %d, level = %d", - //ActiveParams.Level, pContext->SavedRoomLevel, pContext->SavedReverbLevel, CombinedLevel, level); + // ActiveParams.Level, pContext->SavedRoomLevel, + // pContext->SavedReverbLevel, CombinedLevel, level); if(ActiveParams.Level != level){ LOGV("\tLVM_ERROR : (ignore at start up) ReverbGetRoomLevel() has wrong level -> %d %d\n", @@ -1129,6 +1144,8 @@ void ReverbSetDecayTime(ReverbContext *pContext, uint32_t time){ LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "ReverbSetDecayTime") //LOGV("\tReverbSetDecayTime() just Set -> %d\n", ActiveParams.T60); + pContext->SamplesToExitCount = (ActiveParams.T60 * pContext->config.inputCfg.samplingRate)/1000; + //LOGV("\tReverbSetDecayTime() just Set SamplesToExitCount-> %d\n",pContext->SamplesToExitCount); pContext->SavedDecayTime = time; //LOGV("\tReverbSetDecayTime end"); return; @@ -1769,8 +1786,12 @@ extern "C" int Reverb_process(effect_interface_t self, return -EINVAL; } if (pContext->bEnabled == LVM_FALSE){ - LOGV("\tReverb_process() ERROR Effect is not enabled"); - return -ENODATA; + if( pContext->SamplesToExitCount > 0){ + pContext->SamplesToExitCount -= outBuffer->frameCount; + }else{ + LOGV("\tReverb_process() ERROR Effect is not enabled %d", pContext->SamplesToExitCount); + return -ENODATA; + } } //LOGV("\tReverb_process() Calling process with %d frames", outBuffer->frameCount); /* Process all the available frames, block processing is handled internalLY by the LVM bundle */ @@ -1791,6 +1812,9 @@ extern "C" int Reverb_command(effect_interface_t self, void *pReplyData){ android::ReverbContext * pContext = (android::ReverbContext *) self; int retsize; + LVREV_ControlParams_st ActiveParams; /* Current control Parameters */ + LVREV_ReturnStatus_en LvmStatus=LVREV_SUCCESS; /* Function call status */ + if (pContext == NULL){ LOGV("\tLVM_ERROR : Reverb_command ERROR pContext == NULL"); @@ -1917,6 +1941,12 @@ extern "C" int Reverb_command(effect_interface_t self, } *(int *)pReplyData = 0; pContext->bEnabled = LVM_TRUE; + /* Get the current settings */ + LvmStatus = LVREV_GetControlParameters(pContext->hInstance, &ActiveParams); + LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "EFFECT_CMD_ENABLE") + pContext->SamplesToExitCount = + (ActiveParams.T60 * pContext->config.inputCfg.samplingRate)/1000; + //LOGV("\tEFFECT_CMD_ENABLE SamplesToExitCount = %d", pContext->SamplesToExitCount); break; case EFFECT_CMD_DISABLE: //LOGV("\tReverb_command cmdCode Case: " @@ -1939,8 +1969,8 @@ extern "C" int Reverb_command(effect_interface_t self, case EFFECT_CMD_SET_DEVICE: case EFFECT_CMD_SET_VOLUME: case EFFECT_CMD_SET_AUDIO_MODE: - //LOGV("\tReverb_command cmdCode Case: " - // "EFFECT_CMD_SET_DEVICE/EFFECT_CMD_SET_VOLUME/EFFECT_CMD_SET_AUDIO_MODE start"); + //LOGV("\tReverb_command cmdCode Case: " + // "EFFECT_CMD_SET_DEVICE/EFFECT_CMD_SET_VOLUME/EFFECT_CMD_SET_AUDIO_MODE start"); break; default: diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index c05e3e598aaa..e391c72c8d7c 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -209,7 +209,7 @@ status_t AACEncoder::read( CHECK_EQ(mBufferGroup->acquire_buffer(&buffer), OK); uint8_t *outPtr = (uint8_t *)buffer->data(); bool readFromSource = false; - int64_t wallClockTimeUs = 0; + int64_t wallClockTimeUs = -1; if (mFrameCount == 0) { memcpy(outPtr, mAudioSpecificConfigData, 2); @@ -240,8 +240,9 @@ status_t AACEncoder::read( CHECK_EQ(align, 0); int64_t timeUs; - CHECK(mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)); - wallClockTimeUs = timeUs; + if (mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)) { + wallClockTimeUs = timeUs; + } if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) { mAnchorTimeUs = timeUs; } @@ -298,7 +299,7 @@ status_t AACEncoder::read( int64_t mediaTimeUs = ((mFrameCount - 1) * 1000000LL * kNumSamplesPerFrame) / mSampleRate; buffer->meta_data()->setInt64(kKeyTime, mAnchorTimeUs + mediaTimeUs); - if (readFromSource) { + if (readFromSource && wallClockTimeUs != -1) { buffer->meta_data()->setInt64(kKeyDriftTime, mediaTimeUs - wallClockTimeUs); } ++mFrameCount; diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp index dab139001ab3..858e6d03b168 100644 --- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp +++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp @@ -148,7 +148,7 @@ status_t AMRNBEncoder::read( ReadOptions::SeekMode mode; CHECK(options == NULL || !options->getSeekTo(&seekTimeUs, &mode)); bool readFromSource = false; - int64_t wallClockTimeUs = 0; + int64_t wallClockTimeUs = -1; while (mNumInputSamples < kNumSamplesPerFrame) { if (mInputBuffer == NULL) { @@ -171,8 +171,9 @@ status_t AMRNBEncoder::read( readFromSource = true; int64_t timeUs; - CHECK(mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)); - wallClockTimeUs = timeUs; + if (mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)) { + wallClockTimeUs = timeUs; + } if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) { mAnchorTimeUs = timeUs; } @@ -227,7 +228,7 @@ status_t AMRNBEncoder::read( buffer->meta_data()->setInt64( kKeyTime, mAnchorTimeUs + mediaTimeUs); - if (readFromSource) { + if (readFromSource && wallClockTimeUs != -1) { buffer->meta_data()->setInt64(kKeyDriftTime, mediaTimeUs - wallClockTimeUs); } diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp index b62eb5b92f86..cd2841311564 100644 --- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp +++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp @@ -199,7 +199,7 @@ status_t AMRWBEncoder::read( ReadOptions::SeekMode mode; CHECK(options == NULL || !options->getSeekTo(&seekTimeUs, &mode)); bool readFromSource = false; - int64_t wallClockTimeUs = 0; + int64_t wallClockTimeUs = -1; while (mNumInputSamples < kNumSamplesPerFrame) { if (mInputBuffer == NULL) { @@ -221,8 +221,9 @@ status_t AMRWBEncoder::read( CHECK_EQ(align, 0); int64_t timeUs; - CHECK(mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)); - wallClockTimeUs = timeUs; + if (mInputBuffer->meta_data()->findInt64(kKeyDriftTime, &timeUs)) { + wallClockTimeUs = timeUs; + } if (mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)) { mAnchorTimeUs = timeUs; } @@ -285,7 +286,7 @@ status_t AMRWBEncoder::read( int64_t mediaTimeUs = mNumFramesOutput * 20000LL; buffer->meta_data()->setInt64(kKeyTime, mAnchorTimeUs + mediaTimeUs); - if (readFromSource) { + if (readFromSource && wallClockTimeUs != -1) { buffer->meta_data()->setInt64(kKeyDriftTime, mediaTimeUs - wallClockTimeUs); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java index 8f2da7abd794..af736aa33195 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java @@ -46,6 +46,7 @@ import android.os.Handler; import android.os.Message; import android.os.ServiceManager; import android.os.SystemClock; +import android.text.TextUtils; import android.util.Slog; import android.util.Log; import android.view.Display; @@ -462,7 +463,11 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks } // Restart the ticker if it's still running - tick(notification); + if (notification.notification.tickerText != null + && !TextUtils.equals(notification.notification.tickerText, + oldEntry.notification.notification.tickerText)) { + tick(notification); + } // Recalculate the position of the sliding windows and the titles. setAreThereNotifications(); diff --git a/services/java/com/android/server/sip/SipSessionListenerProxy.java b/services/java/com/android/server/sip/SipSessionListenerProxy.java index 700420449fee..7234196473c1 100644 --- a/services/java/com/android/server/sip/SipSessionListenerProxy.java +++ b/services/java/com/android/server/sip/SipSessionListenerProxy.java @@ -19,6 +19,7 @@ package com.android.server.sip; import android.net.sip.ISipSession; import android.net.sip.ISipSessionListener; import android.net.sip.SipProfile; +import android.os.DeadObjectException; import android.util.Log; /** Class to help safely run a callback in a different thread. */ @@ -49,7 +50,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onCalling(session); } catch (Throwable t) { - Log.w(TAG, "onCalling()", t); + handle(t, "onCalling()"); } } }); @@ -63,7 +64,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRinging(session, caller, sessionDescription); } catch (Throwable t) { - Log.w(TAG, "onRinging()", t); + handle(t, "onRinging()"); } } }); @@ -76,7 +77,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRingingBack(session); } catch (Throwable t) { - Log.w(TAG, "onRingingBack()", t); + handle(t, "onRingingBack()"); } } }); @@ -90,7 +91,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onCallEstablished(session, sessionDescription); } catch (Throwable t) { - Log.w(TAG, "onCallEstablished()", t); + handle(t, "onCallEstablished()"); } } }); @@ -103,7 +104,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onCallEnded(session); } catch (Throwable t) { - Log.w(TAG, "onCallEnded()", t); + handle(t, "onCallEnded()"); } } }); @@ -116,7 +117,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onCallBusy(session); } catch (Throwable t) { - Log.w(TAG, "onCallBusy()", t); + handle(t, "onCallBusy()"); } } }); @@ -130,7 +131,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onCallChangeFailed(session, className, message); } catch (Throwable t) { - Log.w(TAG, "onCallChangeFailed()", t); + handle(t, "onCallChangeFailed()"); } } }); @@ -144,7 +145,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onError(session, className, message); } catch (Throwable t) { - Log.w(TAG, "onError()", t); + handle(t, "onError()"); } } }); @@ -157,7 +158,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRegistering(session); } catch (Throwable t) { - Log.w(TAG, "onRegistering()", t); + handle(t, "onRegistering()"); } } }); @@ -171,7 +172,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRegistrationDone(session, duration); } catch (Throwable t) { - Log.w(TAG, "onRegistrationDone()", t); + handle(t, "onRegistrationDone()"); } } }); @@ -185,7 +186,7 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRegistrationFailed(session, className, message); } catch (Throwable t) { - Log.w(TAG, "onRegistrationFailed()", t); + handle(t, "onRegistrationFailed()"); } } }); @@ -198,9 +199,19 @@ class SipSessionListenerProxy extends ISipSessionListener.Stub { try { mListener.onRegistrationTimeout(session); } catch (Throwable t) { - Log.w(TAG, "onRegistrationTimeout()", t); + handle(t, "onRegistrationTimeout()"); } } }); } + + private void handle(Throwable t, String message) { + if (t instanceof DeadObjectException) { + mListener = null; + // This creates race but it's harmless. Just don't log the error + // when it happens. + } else if (mListener != null) { + Log.w(TAG, message, t); + } + } } diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhone.java b/telephony/java/com/android/internal/telephony/sip/SipPhone.java index 1325dd34f08a..6eb619a1b908 100755 --- a/telephony/java/com/android/internal/telephony/sip/SipPhone.java +++ b/telephony/java/com/android/internal/telephony/sip/SipPhone.java @@ -107,6 +107,10 @@ public class SipPhone extends SipPhoneBase { return mProfile.getUriString(); } + public boolean equals(SipPhone phone) { + return getSipUri().equals(phone.getSipUri()); + } + public boolean canTake(Object incomingCall) { synchronized (SipPhone.class) { if (!(incomingCall instanceof SipAudioCall)) return false; |