diff options
| author | Alex Klyubin <klyubin@google.com> | 2015-02-03 11:12:59 -0800 |
|---|---|---|
| committer | Alex Klyubin <klyubin@google.com> | 2015-02-11 11:06:40 -0800 |
| commit | b9f8a5204a1b0b3919fa921e858d04124c582828 (patch) | |
| tree | c4faa0b3e8d1db30fc8a2deb3bb13b38de5a9364 /core/java/android/hardware/soundtrigger | |
| parent | 3fbbe396faffeec6b46796087ad1e075e9a21f0d (diff) | |
| download | frameworks_base-b9f8a5204a1b0b3919fa921e858d04124c582828.zip frameworks_base-b9f8a5204a1b0b3919fa921e858d04124c582828.tar.gz frameworks_base-b9f8a5204a1b0b3919fa921e858d04124c582828.tar.bz2 | |
Move hidden ApplicationInfo flags into a separate field.
The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).
The new privateFlags field is not public API and should not be used
for flags that are public API.
The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.
NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.
Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
Diffstat (limited to 'core/java/android/hardware/soundtrigger')
| -rw-r--r-- | core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java index 518a874..cc018e9 100644 --- a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java +++ b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java @@ -104,7 +104,7 @@ public class KeyphraseEnrollmentInfo { try { ai = pm.getApplicationInfo( ri.activityInfo.packageName, PackageManager.GET_META_DATA); - if ((ai.flags & ApplicationInfo.FLAG_PRIVILEGED) == 0) { + if ((ai.privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) == 0) { // The application isn't privileged (/system/priv-app). // The enrollment application needs to be a privileged system app. Slog.w(TAG, ai.packageName + "is not a privileged system app"); |
