Merge branch 'readonly-p4-donut' into donut
This commit is contained in:
committed by
The Android Open Source Project
commit
257eef353d
@@ -2616,6 +2616,17 @@
|
|||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="density"
|
||||||
|
type="int"
|
||||||
|
transient="false"
|
||||||
|
volatile="false"
|
||||||
|
value="16843372"
|
||||||
|
static="true"
|
||||||
|
final="true"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</field>
|
||||||
<field name="dependency"
|
<field name="dependency"
|
||||||
type="int"
|
type="int"
|
||||||
transient="false"
|
transient="false"
|
||||||
@@ -31651,6 +31662,17 @@
|
|||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="supportsDensities"
|
||||||
|
type="int[]"
|
||||||
|
transient="false"
|
||||||
|
volatile="false"
|
||||||
|
value="null"
|
||||||
|
static="false"
|
||||||
|
final="false"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</field>
|
||||||
<field name="taskAffinity"
|
<field name="taskAffinity"
|
||||||
type="java.lang.String"
|
type="java.lang.String"
|
||||||
transient="false"
|
transient="false"
|
||||||
@@ -33641,6 +33663,17 @@
|
|||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="GET_SUPPORTS_DENSITIES"
|
||||||
|
type="int"
|
||||||
|
transient="false"
|
||||||
|
volatile="false"
|
||||||
|
value="32768"
|
||||||
|
static="true"
|
||||||
|
final="true"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</field>
|
||||||
<field name="GET_UNINSTALLED_PACKAGES"
|
<field name="GET_UNINSTALLED_PACKAGES"
|
||||||
type="int"
|
type="int"
|
||||||
transient="false"
|
transient="false"
|
||||||
|
|||||||
@@ -161,6 +161,14 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
public int uid;
|
public int uid;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The list of densities in DPI that application supprots. This
|
||||||
|
* field is only set if the {@link PackageManager#GET_SUPPORTS_DENSITIES} flag was
|
||||||
|
* used when retrieving the structure.
|
||||||
|
*/
|
||||||
|
public int[] supportsDensities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When false, indicates that all components within this application are
|
* When false, indicates that all components within this application are
|
||||||
* considered disabled, regardless of their individually set enabled status.
|
* considered disabled, regardless of their individually set enabled status.
|
||||||
@@ -181,8 +189,9 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
pw.println(prefix + "sharedLibraryFiles=" + sharedLibraryFiles);
|
pw.println(prefix + "sharedLibraryFiles=" + sharedLibraryFiles);
|
||||||
pw.println(prefix + "dataDir=" + dataDir);
|
pw.println(prefix + "dataDir=" + dataDir);
|
||||||
pw.println(prefix + "enabled=" + enabled);
|
pw.println(prefix + "enabled=" + enabled);
|
||||||
pw.println(prefix+"manageSpaceActivityName="+manageSpaceActivityName);
|
pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName);
|
||||||
pw.println(prefix+"description=0x"+Integer.toHexString(descriptionRes));
|
pw.println(prefix + "description=0x"+Integer.toHexString(descriptionRes));
|
||||||
|
pw.println(prefix + "supportsDensities=" + supportsDensities);
|
||||||
super.dumpBack(pw, prefix);
|
super.dumpBack(pw, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,6 +237,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
enabled = orig.enabled;
|
enabled = orig.enabled;
|
||||||
manageSpaceActivityName = orig.manageSpaceActivityName;
|
manageSpaceActivityName = orig.manageSpaceActivityName;
|
||||||
descriptionRes = orig.descriptionRes;
|
descriptionRes = orig.descriptionRes;
|
||||||
|
supportsDensities = orig.supportsDensities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -257,6 +267,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
dest.writeInt(enabled ? 1 : 0);
|
dest.writeInt(enabled ? 1 : 0);
|
||||||
dest.writeString(manageSpaceActivityName);
|
dest.writeString(manageSpaceActivityName);
|
||||||
dest.writeInt(descriptionRes);
|
dest.writeInt(descriptionRes);
|
||||||
|
dest.writeIntArray(supportsDensities);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<ApplicationInfo> CREATOR
|
public static final Parcelable.Creator<ApplicationInfo> CREATOR
|
||||||
@@ -285,8 +296,9 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
enabled = source.readInt() != 0;
|
enabled = source.readInt() != 0;
|
||||||
manageSpaceActivityName = source.readString();
|
manageSpaceActivityName = source.readString();
|
||||||
descriptionRes = source.readInt();
|
descriptionRes = source.readInt();
|
||||||
|
supportsDensities = source.createIntArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the textual description of the application. This
|
* Retrieve the textual description of the application. This
|
||||||
* will call back on the given PackageManager to load the description from
|
* will call back on the given PackageManager to load the description from
|
||||||
|
|||||||
@@ -165,6 +165,12 @@ public abstract class PackageManager {
|
|||||||
*/
|
*/
|
||||||
public static final int GET_CONFIGURATIONS = 0x00004000;
|
public static final int GET_CONFIGURATIONS = 0x00004000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link ApplicationInfo} flag: return the
|
||||||
|
* {@link ApplicationInfo#supportsDensities} that the package supports.
|
||||||
|
*/
|
||||||
|
public static final int GET_SUPPORTS_DENSITIES = 0x00008000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permission check result: this is returned by {@link #checkPermission}
|
* Permission check result: this is returned by {@link #checkPermission}
|
||||||
* if the permission has been granted to the given package.
|
* if the permission has been granted to the given package.
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import java.security.cert.CertificateEncodingException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.jar.JarEntry;
|
import java.util.jar.JarEntry;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
|
|
||||||
@@ -771,6 +772,14 @@ public class PackageParser {
|
|||||||
pkg.usesLibraries.toArray(pkg.usesLibraryFiles);
|
pkg.usesLibraries.toArray(pkg.usesLibraryFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int size = pkg.supportsDensityList.size();
|
||||||
|
if (size > 0) {
|
||||||
|
int densities[] = pkg.supportsDensities = new int[size];
|
||||||
|
List<Integer> densityList = pkg.supportsDensityList;
|
||||||
|
for (int i = 0; i < size; i++) {
|
||||||
|
densities[i] = densityList.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
return pkg;
|
return pkg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1222,6 +1231,21 @@ public class PackageParser {
|
|||||||
|
|
||||||
XmlUtils.skipCurrentTag(parser);
|
XmlUtils.skipCurrentTag(parser);
|
||||||
|
|
||||||
|
} else if (tagName.equals("supports-density")) {
|
||||||
|
sa = res.obtainAttributes(attrs,
|
||||||
|
com.android.internal.R.styleable.AndroidManifestSupportsDensity);
|
||||||
|
|
||||||
|
int density = sa.getInteger(
|
||||||
|
com.android.internal.R.styleable.AndroidManifestSupportsDensity_density, -1);
|
||||||
|
|
||||||
|
sa.recycle();
|
||||||
|
|
||||||
|
if (density != -1 && !owner.supportsDensityList.contains(density)) {
|
||||||
|
owner.supportsDensityList.add(density);
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlUtils.skipCurrentTag(parser);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!RIGID_PARSER) {
|
if (!RIGID_PARSER) {
|
||||||
Log.w(TAG, "Problem in package " + mArchiveSourcePath + ":");
|
Log.w(TAG, "Problem in package " + mArchiveSourcePath + ":");
|
||||||
@@ -2103,6 +2127,9 @@ public class PackageParser {
|
|||||||
// We store the application meta-data independently to avoid multiple unwanted references
|
// We store the application meta-data independently to avoid multiple unwanted references
|
||||||
public Bundle mAppMetaData = null;
|
public Bundle mAppMetaData = null;
|
||||||
|
|
||||||
|
public final ArrayList<Integer> supportsDensityList = new ArrayList<Integer>();
|
||||||
|
public int[] supportsDensities = null;
|
||||||
|
|
||||||
// If this is a 3rd party app, this is the path of the zip file.
|
// If this is a 3rd party app, this is the path of the zip file.
|
||||||
public String mPath;
|
public String mPath;
|
||||||
|
|
||||||
@@ -2276,6 +2303,10 @@ public class PackageParser {
|
|||||||
&& p.usesLibraryFiles != null) {
|
&& p.usesLibraryFiles != null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ((flags & PackageManager.GET_SUPPORTS_DENSITIES) != 0
|
||||||
|
&& p.supportsDensities != null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2293,6 +2324,9 @@ public class PackageParser {
|
|||||||
if ((flags & PackageManager.GET_SHARED_LIBRARY_FILES) != 0) {
|
if ((flags & PackageManager.GET_SHARED_LIBRARY_FILES) != 0) {
|
||||||
ai.sharedLibraryFiles = p.usesLibraryFiles;
|
ai.sharedLibraryFiles = p.usesLibraryFiles;
|
||||||
}
|
}
|
||||||
|
if ((flags & PackageManager.GET_SUPPORTS_DENSITIES) != 0) {
|
||||||
|
ai.supportsDensities = p.supportsDensities;
|
||||||
|
}
|
||||||
return ai;
|
return ai;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -953,7 +953,20 @@ public interface WindowManager extends ViewManager {
|
|||||||
sb.append('}');
|
sb.append('}');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void scaleUp(float scale) {
|
||||||
|
if (scale != 1.0f) {
|
||||||
|
x *= scale;
|
||||||
|
y *= scale;
|
||||||
|
if (width > 0) {
|
||||||
|
width *= scale;
|
||||||
|
}
|
||||||
|
if (height > 0) {
|
||||||
|
height *= scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private CharSequence mTitle = "";
|
private CharSequence mTitle = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -769,6 +769,15 @@
|
|||||||
<attr name="name" />
|
<attr name="name" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
<!-- The <code>supports-density</code> specifies a screen density that this
|
||||||
|
package supports. Application can specify multiple densities it supports.
|
||||||
|
<p>This appears as a child tag of the
|
||||||
|
{@link #AndroidManifestApplication application} tag. -->
|
||||||
|
<declare-styleable name="AndroidManifestSupportsDensity" parent="AndroidManifestApplication">
|
||||||
|
<!-- Required value of the density in dip (device independent pixel). -->
|
||||||
|
<attr name="density" format="integer" />
|
||||||
|
</declare-styleable>
|
||||||
|
|
||||||
<!-- The <code>provider</code> tag declares a
|
<!-- The <code>provider</code> tag declares a
|
||||||
{@link android.content.ContentProvider} class that is available
|
{@link android.content.ContentProvider} class that is available
|
||||||
as part of the package's application components, supplying structured
|
as part of the package's application components, supplying structured
|
||||||
|
|||||||
@@ -1093,6 +1093,7 @@
|
|||||||
|
|
||||||
<public type="attr" name="tension" id="0x0101026a" />
|
<public type="attr" name="tension" id="0x0101026a" />
|
||||||
<public type="attr" name="extraTension" id="0x0101026b" />
|
<public type="attr" name="extraTension" id="0x0101026b" />
|
||||||
|
<public type="attr" name="density" id="0x0101026c" />
|
||||||
|
|
||||||
<public type="anim" name="anticipate_interpolator" id="0x010a0007" />
|
<public type="anim" name="anticipate_interpolator" id="0x010a0007" />
|
||||||
<public type="anim" name="overshoot_interpolator" id="0x010a0008" />
|
<public type="anim" name="overshoot_interpolator" id="0x010a0008" />
|
||||||
@@ -1103,8 +1104,3 @@
|
|||||||
<public type="drawable" name="stat_sys_vp_phone_call_on_hold" id="0x0108022e" />
|
<public type="drawable" name="stat_sys_vp_phone_call_on_hold" id="0x0108022e" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user