diff options
-rw-r--r-- | api/current.xml | 37 | ||||
-rw-r--r-- | cmds/runtime/main_runtime.cpp | 2 | ||||
-rw-r--r-- | core/java/android/app/DeviceAdminInfo.java | 19 | ||||
-rw-r--r-- | core/java/android/app/DevicePolicyManager.java | 2 | ||||
-rw-r--r-- | core/java/android/speech/RecognitionService.java | 14 | ||||
-rw-r--r-- | core/res/res/values/attrs.xml | 12 | ||||
-rw-r--r-- | core/res/res/values/strings.xml | 9 | ||||
-rw-r--r-- | include/media/mediametadataretriever.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/MetaData.h | 1 | ||||
-rw-r--r-- | media/java/android/media/MediaMetadataRetriever.java | 6 | ||||
-rw-r--r-- | media/libstagefright/MP3Extractor.cpp | 1 | ||||
-rw-r--r-- | media/libstagefright/MPEG4Extractor.cpp | 5 | ||||
-rw-r--r-- | media/libstagefright/StagefrightMediaScanner.cpp | 1 | ||||
-rw-r--r-- | media/libstagefright/StagefrightMetadataRetriever.cpp | 1 | ||||
-rw-r--r-- | services/java/com/android/server/DevicePolicyManagerService.java | 2 | ||||
-rw-r--r-- | test-runner/android/test/ProviderTestCase2.java | 9 |
16 files changed, 79 insertions, 43 deletions
diff --git a/api/current.xml b/api/current.xml index b2a2bc1..d3ec86a 100644 --- a/api/current.xml +++ b/api/current.xml @@ -20396,7 +20396,7 @@ type="int" transient="false" volatile="false" - value="4" + value="3" static="true" final="true" deprecated="not deprecated" @@ -20414,17 +20414,6 @@ visibility="public" > </field> -<field name="USES_POLICY_LIMIT_UNLOCK" - type="int" - transient="false" - volatile="false" - value="3" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="USES_POLICY_RESET_PASSWORD" type="int" transient="false" @@ -20451,7 +20440,7 @@ type="int" transient="false" volatile="false" - value="5" + value="4" static="true" final="true" deprecated="not deprecated" @@ -135928,6 +135917,28 @@ <parameter name="listener" type="android.speech.RecognitionService.Callback"> </parameter> </method> +<field name="SERVICE_INTERFACE" + type="java.lang.String" + transient="false" + volatile="false" + value=""android.speech.RecognitionService"" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> +<field name="SERVICE_META_DATA" + type="java.lang.String" + transient="false" + volatile="false" + value=""android.speech"" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> </class> <class name="RecognitionService.Callback" extends="java.lang.Object" diff --git a/cmds/runtime/main_runtime.cpp b/cmds/runtime/main_runtime.cpp index 21e0e4d..83cb533 100644 --- a/cmds/runtime/main_runtime.cpp +++ b/cmds/runtime/main_runtime.cpp @@ -19,7 +19,7 @@ #include <private/utils/Static.h> -#include <ui/ISurfaceComposer.h> +#include <surfaceflinger/ISurfaceComposer.h> #include <android_runtime/AndroidRuntime.h> diff --git a/core/java/android/app/DeviceAdminInfo.java b/core/java/android/app/DeviceAdminInfo.java index ab9c44f..031bc8e 100644 --- a/core/java/android/app/DeviceAdminInfo.java +++ b/core/java/android/app/DeviceAdminInfo.java @@ -80,23 +80,15 @@ public final class DeviceAdminInfo implements Parcelable { public static final int USES_POLICY_RESET_PASSWORD = 2; /** - * A type of policy that this device admin can use: able to limit the + * A type of policy that this device admin can use: able to force the device + * to lock via{@link DevicePolicyManager#lockNow} or limit the * maximum lock timeout for the device via * {@link DevicePolicyManager#setMaximumTimeToLock}. * - * <p>To control this policy, the device admin must have a "limit-unlock" - * tag in the "uses-policies" section of its meta-data. - */ - public static final int USES_POLICY_LIMIT_UNLOCK = 3; - - /** - * A type of policy that this device admin can use: able to force the device - * to lock via{@link DevicePolicyManager#lockNow}. - * * <p>To control this policy, the device admin must have a "force-lock" * tag in the "uses-policies" section of its meta-data. */ - public static final int USES_POLICY_FORCE_LOCK = 4; + public static final int USES_POLICY_FORCE_LOCK = 3; /** * A type of policy that this device admin can use: able to factory @@ -106,7 +98,7 @@ public final class DeviceAdminInfo implements Parcelable { * <p>To control this policy, the device admin must have a "wipe-data" * tag in the "uses-policies" section of its meta-data. */ - public static final int USES_POLICY_WIPE_DATA = 5; + public static final int USES_POLICY_WIPE_DATA = 4; /** @hide */ public static class PolicyInfo { @@ -140,9 +132,6 @@ public final class DeviceAdminInfo implements Parcelable { sPoliciesDisplayOrder.add(new PolicyInfo(USES_POLICY_WATCH_LOGIN, "watch-login", com.android.internal.R.string.policylab_watchLogin, com.android.internal.R.string.policydesc_watchLogin)); - sPoliciesDisplayOrder.add(new PolicyInfo(USES_POLICY_LIMIT_UNLOCK, "limit-unlock", - com.android.internal.R.string.policylab_limitUnlock, - com.android.internal.R.string.policydesc_limitUnlock)); sPoliciesDisplayOrder.add(new PolicyInfo(USES_POLICY_FORCE_LOCK, "force-lock", com.android.internal.R.string.policylab_forceLock, com.android.internal.R.string.policydesc_forceLock)); diff --git a/core/java/android/app/DevicePolicyManager.java b/core/java/android/app/DevicePolicyManager.java index 847e879..82c43dc 100644 --- a/core/java/android/app/DevicePolicyManager.java +++ b/core/java/android/app/DevicePolicyManager.java @@ -410,7 +410,7 @@ public class DevicePolicyManager { * the length that the user can set. It takes effect immediately. * * <p>The calling device admin must have requested - * {@link DeviceAdminInfo#USES_POLICY_LIMIT_UNLOCK} to be able to call + * {@link DeviceAdminInfo#USES_POLICY_FORCE_LOCK} to be able to call * this method; if it has not, a security exception will be thrown. * * @param admin Which {@link DeviceAdmin} this request is associated with. diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java index 0d74960..5de6cf0 100644 --- a/core/java/android/speech/RecognitionService.java +++ b/core/java/android/speech/RecognitionService.java @@ -16,6 +16,8 @@ package android.speech; +import android.annotation.SdkConstant; +import android.annotation.SdkConstant.SdkConstantType; import android.app.Service; import android.content.Intent; import android.content.pm.PackageManager; @@ -32,6 +34,18 @@ import android.util.Log; * implementation of this service is state-less. */ public abstract class RecognitionService extends Service { + /** + * The {@link Intent} that must be declared as handled by the service. + */ + @SdkConstant(SdkConstantType.SERVICE_ACTION) + public static final String SERVICE_INTERFACE = "android.speech.RecognitionService"; + + /** + * Name under which a RecognitionService component publishes information about itself. + * This meta-data should reference an XML resource containing a + * <code><{@link android.R.styleable#RecognitionService recognition-service}></code> tag. + */ + public static final String SERVICE_META_DATA = "android.speech"; /** Log messages identifier */ private static final String TAG = "RecognitionService"; diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 794a9f0..ff8cdc9 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -1452,7 +1452,7 @@ included in that tag. --> <declare-styleable name="InputMethod"> <!-- Component name of an activity that allows the user to modify - the settings for this input method. --> + the settings for this service. --> <attr name="settingsActivity" format="string" /> <!-- Set to true in all of the configurations for which this input method should be considered an option as the default. --> @@ -3494,8 +3494,6 @@ meta-data entry. Described here are the attributes that can be included in that tag. --> <declare-styleable name="Wallpaper"> - <!-- Component name of an activity that allows the user to modify - the current settings for this wallpaper. --> <attr name="settingsActivity" /> <!-- Reference to a the wallpaper's thumbnail bitmap. --> @@ -3586,5 +3584,13 @@ <!-- Use "horizontal" for a row, "vertical" for a column. The default is horizontal. --> <attr name="orientation" /> </declare-styleable> + + <!-- Use <code>recognition-service</code> as the root tag of the XML resource that + describes a {@link android.speech.RecognitionService}, which is reference from + its {@link android.speech.RecognitionService#SERVICE_META_DATA} meta-data entry. + Described here are the attributes that can be included in that tag. --> + <declare-styleable name="RecognitionService"> + <attr name="settingsActivity" /> + </declare-styleable> </resources> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 7f66111..9e596ef 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1218,16 +1218,11 @@ <string name="policydesc_resetPassword">Force your password to a new value, requiring the administrator give it to you before you can log in.</string> - <!-- Title of policy access to limiting the user's unlock timeout --> - <string name="policylab_limitUnlock">Limit lock timeout</string> - <!-- Description of policy access to limiting the user's unlock timeout --> - <string name="policydesc_limitUnlock">Restrict the unlock timeout - durations you can select.</string> <!-- Title of policy access to force lock the device --> <string name="policylab_forceLock">Force lock</string> <!-- Description of policy access to limiting the user's password choices --> - <string name="policydesc_forceLock">Force the device to immediately lock, - requiring that you re-enter its password.</string> + <string name="policydesc_forceLock">Control when device locks, + requiring you re-enter its password.</string> <!-- Title of policy access to wipe the user's data --> <string name="policylab_wipeData">Erase all data</string> <!-- Description of policy access to wipe the user's data --> diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h index 022b849..9b12410 100644 --- a/include/media/mediametadataretriever.h +++ b/include/media/mediametadataretriever.h @@ -55,6 +55,7 @@ enum { METADATA_KEY_WRITER = 21, METADATA_KEY_MIMETYPE = 22, METADATA_KEY_DISC_NUMBER = 23, + METADATA_KEY_ALBUMARTIST = 24, // Add more here... }; diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index 8f423f7..45cc4f6 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -51,6 +51,7 @@ enum { kKeyAlbum = 'albu', // cstring kKeyArtist = 'arti', // cstring + kKeyAlbumArtist = 'aart', // cstring kKeyComposer = 'comp', // cstring kKeyGenre = 'genr', // cstring kKeyTitle = 'titl', // cstring diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java index 04f8b5d..681751b 100644 --- a/media/java/android/media/MediaMetadataRetriever.java +++ b/media/java/android/media/MediaMetadataRetriever.java @@ -21,10 +21,10 @@ import android.content.Context; import android.content.res.AssetFileDescriptor; import android.graphics.Bitmap; import android.net.Uri; -import android.os.ParcelFileDescriptor; + import java.io.FileDescriptor; -import java.io.IOException; import java.io.FileNotFoundException; +import java.io.IOException; /** * MediaMetadataRetriever class provides a unified interface for retrieving @@ -256,5 +256,7 @@ public class MediaMetadataRetriever public static final int METADATA_KEY_VIDEO_WIDTH = 20; public static final int METADATA_KEY_WRITER = 21; public static final int METADATA_KEY_MIMETYPE = 22; + public static final int METADATA_KEY_DISCNUMBER = 23; + public static final int METADATA_KEY_ALBUMARTIST = 24; // Add more here... } diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp index 79b7674..ab38bca 100644 --- a/media/libstagefright/MP3Extractor.cpp +++ b/media/libstagefright/MP3Extractor.cpp @@ -731,6 +731,7 @@ sp<MetaData> MP3Extractor::getMetaData() { static const Map kMap[] = { { kKeyAlbum, "TALB", "TAL" }, { kKeyArtist, "TPE1", "TP1" }, + { kKeyAlbumArtist, "TPE2", "TP2" }, { kKeyComposer, "TCOM", "TCM" }, { kKeyGenre, "TCON", "TCO" }, { kKeyTitle, "TIT2", "TT2" }, diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 1ff38ee..666ed08 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1045,6 +1045,11 @@ status_t MPEG4Extractor::parseMetaData(off_t offset, size_t size) { metadataKey = kKeyArtist; break; } + case FOURCC('a', 'A', 'R', 'T'): + { + metadataKey = kKeyAlbumArtist; + break; + } case FOURCC(0xa9, 'd', 'a', 'y'): { metadataKey = kKeyYear; diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp index 22f701c..b1eca2b 100644 --- a/media/libstagefright/StagefrightMediaScanner.cpp +++ b/media/libstagefright/StagefrightMediaScanner.cpp @@ -194,6 +194,7 @@ status_t StagefrightMediaScanner::processFile( { "discnumber", METADATA_KEY_DISC_NUMBER }, { "album", METADATA_KEY_ALBUM }, { "artist", METADATA_KEY_ARTIST }, + { "albumartist", METADATA_KEY_ALBUMARTIST }, { "composer", METADATA_KEY_COMPOSER }, { "genre", METADATA_KEY_GENRE }, { "title", METADATA_KEY_TITLE }, diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index f617fe8..df6235f 100644 --- a/media/libstagefright/StagefrightMetadataRetriever.cpp +++ b/media/libstagefright/StagefrightMetadataRetriever.cpp @@ -308,6 +308,7 @@ void StagefrightMetadataRetriever::parseMetaData() { { kKeyDiscNumber, METADATA_KEY_DISC_NUMBER }, { kKeyAlbum, METADATA_KEY_ALBUM }, { kKeyArtist, METADATA_KEY_ARTIST }, + { kKeyAlbumArtist, METADATA_KEY_ALBUMARTIST }, { kKeyAuthor, METADATA_KEY_AUTHOR }, { kKeyComposer, METADATA_KEY_COMPOSER }, { kKeyDate, METADATA_KEY_DATE }, diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java index 1625d9f..0a6c72e 100644 --- a/services/java/com/android/server/DevicePolicyManagerService.java +++ b/services/java/com/android/server/DevicePolicyManagerService.java @@ -608,7 +608,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { throw new NullPointerException("ComponentName is null"); } ActiveAdmin ap = getActiveAdminForCallerLocked(who, - DeviceAdminInfo.USES_POLICY_LIMIT_UNLOCK); + DeviceAdminInfo.USES_POLICY_FORCE_LOCK); if (ap.maximumTimeToUnlock != timeMs) { ap.maximumTimeToUnlock = timeMs; diff --git a/test-runner/android/test/ProviderTestCase2.java b/test-runner/android/test/ProviderTestCase2.java index a923d2a..f3655fc 100644 --- a/test-runner/android/test/ProviderTestCase2.java +++ b/test-runner/android/test/ProviderTestCase2.java @@ -8,6 +8,8 @@ import android.test.mock.MockContext; import android.test.mock.MockContentResolver; import android.database.DatabaseUtils; +import java.io.File; + /** * This TestCase class provides a framework for isolated testing of a single * ContentProvider. It uses a {@link android.test.mock.MockContentResolver} to @@ -33,6 +35,13 @@ public abstract class ProviderTestCase2<T extends ContentProvider> extends Andro public Resources getResources() { return getContext().getResources(); } + + @Override + public File getDir(String name, int mode) { + // name the directory so the directory will be seperated from + // one created through the regular Context + return getContext().getDir("mockcontext2_" + name, mode); + } } public ProviderTestCase2(Class<T> providerClass, String providerAuthority) { |