Loading api/current.txt +33 −29 Original line number Diff line number Diff line Loading @@ -179,9 +179,9 @@ package android { public static final class R.attr { ctor public R.attr(); field public static final int absListViewStyle = 16842858; // 0x101006a field public static final int accessibilityEventTypes = 16843643; // 0x101037b field public static final int accessibilityFeedbackType = 16843645; // 0x101037d field public static final int accessibilityFlags = 16843647; // 0x101037f field public static final int accessibilityEventTypes = 16843645; // 0x101037d field public static final int accessibilityFeedbackType = 16843647; // 0x101037f field public static final int accessibilityFlags = 16843649; // 0x1010381 field public static final int accountPreferences = 16843423; // 0x101029f field public static final int accountType = 16843407; // 0x101028f field public static final int action = 16842797; // 0x101002d Loading @@ -201,7 +201,7 @@ package android { field public static final int actionModeCopyDrawable = 16843538; // 0x1010312 field public static final int actionModeCutDrawable = 16843537; // 0x1010311 field public static final int actionModePasteDrawable = 16843539; // 0x1010313 field public static final int actionModeSelectAllDrawable = 16843641; // 0x1010379 field public static final int actionModeSelectAllDrawable = 16843643; // 0x101037b field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6 field public static final int actionViewClass = 16843516; // 0x10102fc field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd Loading Loading @@ -273,7 +273,7 @@ package android { field public static final int cacheColorHint = 16843009; // 0x1010101 field public static final int calendarViewShown = 16843596; // 0x101034c field public static final int calendarViewStyle = 16843613; // 0x101035d field public static final int canRetrieveWindowContent = 16843648; // 0x1010380 field public static final int canRetrieveWindowContent = 16843650; // 0x1010382 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final int centerBright = 16842956; // 0x10100cc Loading Loading @@ -306,10 +306,11 @@ package android { field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab field public static final int colorForeground = 16842800; // 0x1010030 field public static final int colorForegroundInverse = 16843270; // 0x1010206 field public static final int columnCount = 16843633; // 0x1010371 field public static final int columnCount = 16843635; // 0x1010373 field public static final int columnDelay = 16843215; // 0x10101cf field public static final int columnOrderPreserved = 16843634; // 0x1010372 field public static final int columnOrderPreserved = 16843636; // 0x1010374 field public static final int columnWidth = 16843031; // 0x1010117 field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365 field public static final int completionHint = 16843122; // 0x1010172 field public static final int completionHintView = 16843123; // 0x1010173 field public static final int completionThreshold = 16843124; // 0x1010174 Loading Loading @@ -452,7 +453,7 @@ package android { field public static final int fromXScale = 16843202; // 0x10101c2 field public static final int fromYDelta = 16843208; // 0x10101c8 field public static final int fromYScale = 16843204; // 0x10101c4 field public static final int fullBackupAgent = 16843629; // 0x101036d field public static final int fullBackupAgent = 16843631; // 0x101036f field public static final int fullBright = 16842954; // 0x10100ca field public static final int fullDark = 16842950; // 0x10100c6 field public static final int functionalTest = 16842787; // 0x1010023 Loading Loading @@ -483,7 +484,7 @@ package android { field public static final int hint = 16843088; // 0x1010150 field public static final int homeAsUpIndicator = 16843531; // 0x101030b field public static final int homeLayout = 16843549; // 0x101031d field public static final int horizontalDirection = 16843628; // 0x101036c field public static final int horizontalDirection = 16843630; // 0x101036e field public static final int horizontalDivider = 16843053; // 0x101012d field public static final int horizontalGap = 16843327; // 0x101023f field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353 Loading Loading @@ -531,7 +532,7 @@ package android { field public static final int installLocation = 16843447; // 0x10102b7 field public static final int interpolator = 16843073; // 0x1010141 field public static final int isAlwaysSyncable = 16843571; // 0x1010333 field public static final int isAuxiliary = 16843642; // 0x101037a field public static final int isAuxiliary = 16843644; // 0x101037c field public static final int isDefault = 16843297; // 0x1010221 field public static final int isIndicator = 16843079; // 0x1010147 field public static final int isModifier = 16843334; // 0x1010246 Loading Loading @@ -583,8 +584,8 @@ package android { field public static final int layout_centerInParent = 16843151; // 0x101018f field public static final int layout_centerVertical = 16843153; // 0x1010191 field public static final int layout_column = 16843084; // 0x101014c field public static final int layout_columnSpan = 16843639; // 0x1010377 field public static final int layout_columnWeight = 16843640; // 0x1010378 field public static final int layout_columnSpan = 16843641; // 0x1010379 field public static final int layout_columnWeight = 16843642; // 0x101037a field public static final int layout_gravity = 16842931; // 0x10100b3 field public static final int layout_height = 16842997; // 0x10100f5 field public static final int layout_margin = 16842998; // 0x10100f6 Loading @@ -592,9 +593,9 @@ package android { field public static final int layout_marginLeft = 16842999; // 0x10100f7 field public static final int layout_marginRight = 16843001; // 0x10100f9 field public static final int layout_marginTop = 16843000; // 0x10100f8 field public static final int layout_row = 16843636; // 0x1010374 field public static final int layout_rowSpan = 16843637; // 0x1010375 field public static final int layout_rowWeight = 16843638; // 0x1010376 field public static final int layout_row = 16843638; // 0x1010376 field public static final int layout_rowSpan = 16843639; // 0x1010377 field public static final int layout_rowWeight = 16843640; // 0x1010378 field public static final int layout_scale = 16843155; // 0x1010193 field public static final int layout_span = 16843085; // 0x101014d field public static final int layout_toLeftOf = 16843138; // 0x1010182 Loading Loading @@ -660,7 +661,7 @@ package android { field public static final int nextFocusUp = 16842979; // 0x10100e3 field public static final int noHistory = 16843309; // 0x101022d field public static final int normalScreens = 16843397; // 0x1010285 field public static final int notificationTimeout = 16843646; // 0x101037e field public static final int notificationTimeout = 16843648; // 0x1010380 field public static final int numColumns = 16843032; // 0x1010118 field public static final int numStars = 16843076; // 0x1010144 field public static final deprecated int numeric = 16843109; // 0x1010165 Loading @@ -677,7 +678,7 @@ package android { field public static final int overScrollFooter = 16843459; // 0x10102c3 field public static final int overScrollHeader = 16843458; // 0x10102c2 field public static final int overScrollMode = 16843457; // 0x10102c1 field public static final int packageNames = 16843644; // 0x101037c field public static final int packageNames = 16843646; // 0x101037e field public static final int padding = 16842965; // 0x10100d5 field public static final int paddingBottom = 16842969; // 0x10100d9 field public static final int paddingLeft = 16842966; // 0x10100d6 Loading Loading @@ -755,6 +756,7 @@ package android { field public static final int reqNavigation = 16843306; // 0x101022a field public static final int reqTouchScreen = 16843303; // 0x1010227 field public static final int required = 16843406; // 0x101028e field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int resizeMode = 16843619; // 0x1010363 field public static final int resizeable = 16843405; // 0x101028d field public static final int resource = 16842789; // 0x1010025 Loading @@ -766,11 +768,11 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int rowCount = 16843631; // 0x101036f field public static final int rowCount = 16843633; // 0x1010371 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241 field public static final int rowHeight = 16843058; // 0x1010132 field public static final int rowOrderPreserved = 16843632; // 0x1010370 field public static final int rowOrderPreserved = 16843634; // 0x1010372 field public static final int saveEnabled = 16842983; // 0x10100e7 field public static final int scaleGravity = 16843262; // 0x10101fe field public static final int scaleHeight = 16843261; // 0x10101fd Loading Loading @@ -857,14 +859,14 @@ package android { field public static final int state_active = 16842914; // 0x10100a2 field public static final int state_checkable = 16842911; // 0x101009f field public static final int state_checked = 16842912; // 0x10100a0 field public static final int state_drag_can_accept = 16843621; // 0x1010365 field public static final int state_drag_hovered = 16843622; // 0x1010366 field public static final int state_drag_can_accept = 16843623; // 0x1010367 field public static final int state_drag_hovered = 16843624; // 0x1010368 field public static final int state_empty = 16842921; // 0x10100a9 field public static final int state_enabled = 16842910; // 0x101009e field public static final int state_expanded = 16842920; // 0x10100a8 field public static final int state_first = 16842916; // 0x10100a4 field public static final int state_focused = 16842908; // 0x101009c field public static final int state_hovered = 16843620; // 0x1010364 field public static final int state_hovered = 16843622; // 0x1010366 field public static final int state_last = 16842918; // 0x10100a6 field public static final int state_long_pressable = 16843324; // 0x101023c field public static final int state_middle = 16842917; // 0x10100a5 Loading @@ -875,7 +877,7 @@ package android { field public static final int state_window_focused = 16842909; // 0x101009d field public static final int staticWallpaperPreview = 16843569; // 0x1010331 field public static final int stepSize = 16843078; // 0x1010146 field public static final int stopWithTask = 16843623; // 0x1010367 field public static final int stopWithTask = 16843625; // 0x1010369 field public static final int streamType = 16843273; // 0x1010209 field public static final int stretchColumns = 16843081; // 0x1010149 field public static final int stretchMode = 16843030; // 0x1010116 Loading @@ -883,7 +885,7 @@ package android { field public static final int subtitleTextStyle = 16843513; // 0x10102f9 field public static final int suggestActionMsg = 16843228; // 0x10101dc field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd field public static final int suggestionsEnabled = 16843630; // 0x101036e field public static final int suggestionsEnabled = 16843632; // 0x1010370 field public static final int summary = 16843241; // 0x10101e9 field public static final int summaryColumn = 16843426; // 0x10102a2 field public static final int summaryOff = 16843248; // 0x10101f0 Loading Loading @@ -951,9 +953,9 @@ package android { field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314 field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e field public static final int textEditSuggestionItemLayout = 16843627; // 0x101036b field public static final int textEditSuggestionsBottomWindowLayout = 16843625; // 0x1010369 field public static final int textEditSuggestionsTopWindowLayout = 16843626; // 0x101036a field public static final int textEditSuggestionItemLayout = 16843629; // 0x101036d field public static final int textEditSuggestionsBottomWindowLayout = 16843627; // 0x101036b field public static final int textEditSuggestionsTopWindowLayout = 16843628; // 0x101036c field public static final int textFilterEnabled = 16843007; // 0x10100ff field public static final int textIsSelectable = 16843542; // 0x1010316 field public static final int textOff = 16843045; // 0x1010125 Loading @@ -965,7 +967,7 @@ package android { field public static final int textSelectHandleWindowStyle = 16843464; // 0x10102c8 field public static final int textSize = 16842901; // 0x1010095 field public static final int textStyle = 16842903; // 0x1010097 field public static final int textSuggestionsWindowStyle = 16843624; // 0x1010368 field public static final int textSuggestionsWindowStyle = 16843626; // 0x101036a field public static final int textViewStyle = 16842884; // 0x1010084 field public static final int theme = 16842752; // 0x1010000 field public static final int thickness = 16843360; // 0x1010260 Loading Loading @@ -1001,7 +1003,7 @@ package android { field public static final int unfocusedMonthDateColor = 16843588; // 0x1010344 field public static final int unselectedAlpha = 16843278; // 0x101020e field public static final int updatePeriodMillis = 16843344; // 0x1010250 field public static final int useDefaultMargins = 16843635; // 0x1010373 field public static final int useDefaultMargins = 16843637; // 0x1010375 field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310 field public static final int useLevel = 16843167; // 0x101019f field public static final int userVisible = 16843409; // 0x1010291 Loading Loading @@ -5500,6 +5502,7 @@ package android.content.pm { field public static final int FLAG_VM_SAFE_MODE = 16384; // 0x4000 field public java.lang.String backupAgentName; field public java.lang.String className; field public int compatibleWidthLimitDp; field public java.lang.String dataDir; field public int descriptionRes; field public boolean enabled; Loading @@ -5509,6 +5512,7 @@ package android.content.pm { field public java.lang.String permission; field public java.lang.String processName; field public java.lang.String publicSourceDir; field public int requiresSmallestWidthDp; field public java.lang.String[] sharedLibraryFiles; field public java.lang.String sourceDir; field public int targetSdkVersion; core/java/android/app/ActivityThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -1534,7 +1534,7 @@ public final class ActivityThread { synchronized (this) { ContextImpl context = getSystemContext(); context.init(new LoadedApk(this, "android", context, info, new CompatibilityInfo(info, 0, false)), null, this); new CompatibilityInfo(info, 0, 0, false)), null, this); } } Loading core/java/android/content/pm/ApplicationInfo.java +24 −0 Original line number Diff line number Diff line Loading @@ -329,6 +329,22 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public int flags = 0; /** * The required smallest screen width the application can run on. If 0, * nothing has been specified. Comes from * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. */ public int requiresSmallestWidthDp = 0; /** * The maximum smallest screen width the application is designed for. If 0, * nothing has been specified. Comes from * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. */ public int compatibleWidthLimitDp = 0; /** * Full path to the location of this package. */ Loading Loading @@ -410,6 +426,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { pw.println(prefix + "taskAffinity=" + taskAffinity); pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) + " theme=0x" + Integer.toHexString(theme)); pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp + " compatibleWidthLimitDp=" + compatibleWidthLimitDp); pw.println(prefix + "sourceDir=" + sourceDir); if (sourceDir == null) { if (publicSourceDir != null) { Loading Loading @@ -469,6 +487,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { className = orig.className; theme = orig.theme; flags = orig.flags; requiresSmallestWidthDp = orig.requiresSmallestWidthDp; compatibleWidthLimitDp = orig.compatibleWidthLimitDp; sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; nativeLibraryDir = orig.nativeLibraryDir; Loading Loading @@ -502,6 +522,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(className); dest.writeInt(theme); dest.writeInt(flags); dest.writeInt(requiresSmallestWidthDp); dest.writeInt(compatibleWidthLimitDp); dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(nativeLibraryDir); Loading Loading @@ -536,6 +558,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { className = source.readString(); theme = source.readInt(); flags = source.readInt(); requiresSmallestWidthDp = source.readInt(); compatibleWidthLimitDp = source.readInt(); sourceDir = source.readString(); publicSourceDir = source.readString(); nativeLibraryDir = source.readString(); Loading core/java/android/content/pm/PackageParser.java +7 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,13 @@ public class PackageParser { sa = res.obtainAttributes(attrs, com.android.internal.R.styleable.AndroidManifestSupportsScreens); pkg.applicationInfo.requiresSmallestWidthDp = sa.getInteger( com.android.internal.R.styleable.AndroidManifestSupportsScreens_requiresSmallestWidthDp, 0); pkg.applicationInfo.compatibleWidthLimitDp = sa.getInteger( com.android.internal.R.styleable.AndroidManifestSupportsScreens_compatibleWidthLimitDp, 0); // This is a trick to get a boolean and still able to detect // if a value was actually set. supportsSmallScreens = sa.getInteger( Loading core/java/android/content/res/CompatibilityInfo.java +93 −67 Original line number Diff line number Diff line Loading @@ -110,9 +110,34 @@ public class CompatibilityInfo implements Parcelable { */ public final float applicationInvertedScale; public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, boolean forceCompat) { public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw, boolean forceCompat) { int compatFlags = 0; if (appInfo.requiresSmallestWidthDp != 0 || appInfo.compatibleWidthLimitDp != 0) { // New style screen requirements spec. int required = appInfo.requiresSmallestWidthDp != 0 ? appInfo.requiresSmallestWidthDp : appInfo.compatibleWidthLimitDp; int compat = appInfo.compatibleWidthLimitDp != 0 ? appInfo.compatibleWidthLimitDp : appInfo.requiresSmallestWidthDp; if (compat < required) { compat = required; } if (compat >= sw) { compatFlags |= NEVER_COMPAT; } else if (forceCompat) { compatFlags |= NEEDS_SCREEN_COMPAT; } // Modern apps always support densities. applicationDensity = DisplayMetrics.DENSITY_DEVICE; applicationScale = 1.0f; applicationInvertedScale = 1.0f; } else { // We can't rely on the application always setting // FLAG_RESIZEABLE_FOR_SCREENS so will compute it based on various input. boolean anyResizeable = false; Loading Loading @@ -191,6 +216,7 @@ public class CompatibilityInfo implements Parcelable { applicationInvertedScale = 1.0f / applicationScale; compatFlags |= SCALING_REQUIRED; } } mCompatibilityFlags = compatFlags; } Loading Loading
api/current.txt +33 −29 Original line number Diff line number Diff line Loading @@ -179,9 +179,9 @@ package android { public static final class R.attr { ctor public R.attr(); field public static final int absListViewStyle = 16842858; // 0x101006a field public static final int accessibilityEventTypes = 16843643; // 0x101037b field public static final int accessibilityFeedbackType = 16843645; // 0x101037d field public static final int accessibilityFlags = 16843647; // 0x101037f field public static final int accessibilityEventTypes = 16843645; // 0x101037d field public static final int accessibilityFeedbackType = 16843647; // 0x101037f field public static final int accessibilityFlags = 16843649; // 0x1010381 field public static final int accountPreferences = 16843423; // 0x101029f field public static final int accountType = 16843407; // 0x101028f field public static final int action = 16842797; // 0x101002d Loading @@ -201,7 +201,7 @@ package android { field public static final int actionModeCopyDrawable = 16843538; // 0x1010312 field public static final int actionModeCutDrawable = 16843537; // 0x1010311 field public static final int actionModePasteDrawable = 16843539; // 0x1010313 field public static final int actionModeSelectAllDrawable = 16843641; // 0x1010379 field public static final int actionModeSelectAllDrawable = 16843643; // 0x101037b field public static final int actionOverflowButtonStyle = 16843510; // 0x10102f6 field public static final int actionViewClass = 16843516; // 0x10102fc field public static final int activatedBackgroundIndicator = 16843517; // 0x10102fd Loading Loading @@ -273,7 +273,7 @@ package android { field public static final int cacheColorHint = 16843009; // 0x1010101 field public static final int calendarViewShown = 16843596; // 0x101034c field public static final int calendarViewStyle = 16843613; // 0x101035d field public static final int canRetrieveWindowContent = 16843648; // 0x1010380 field public static final int canRetrieveWindowContent = 16843650; // 0x1010382 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final int centerBright = 16842956; // 0x10100cc Loading Loading @@ -306,10 +306,11 @@ package android { field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab field public static final int colorForeground = 16842800; // 0x1010030 field public static final int colorForegroundInverse = 16843270; // 0x1010206 field public static final int columnCount = 16843633; // 0x1010371 field public static final int columnCount = 16843635; // 0x1010373 field public static final int columnDelay = 16843215; // 0x10101cf field public static final int columnOrderPreserved = 16843634; // 0x1010372 field public static final int columnOrderPreserved = 16843636; // 0x1010374 field public static final int columnWidth = 16843031; // 0x1010117 field public static final int compatibleWidthLimitDp = 16843621; // 0x1010365 field public static final int completionHint = 16843122; // 0x1010172 field public static final int completionHintView = 16843123; // 0x1010173 field public static final int completionThreshold = 16843124; // 0x1010174 Loading Loading @@ -452,7 +453,7 @@ package android { field public static final int fromXScale = 16843202; // 0x10101c2 field public static final int fromYDelta = 16843208; // 0x10101c8 field public static final int fromYScale = 16843204; // 0x10101c4 field public static final int fullBackupAgent = 16843629; // 0x101036d field public static final int fullBackupAgent = 16843631; // 0x101036f field public static final int fullBright = 16842954; // 0x10100ca field public static final int fullDark = 16842950; // 0x10100c6 field public static final int functionalTest = 16842787; // 0x1010023 Loading Loading @@ -483,7 +484,7 @@ package android { field public static final int hint = 16843088; // 0x1010150 field public static final int homeAsUpIndicator = 16843531; // 0x101030b field public static final int homeLayout = 16843549; // 0x101031d field public static final int horizontalDirection = 16843628; // 0x101036c field public static final int horizontalDirection = 16843630; // 0x101036e field public static final int horizontalDivider = 16843053; // 0x101012d field public static final int horizontalGap = 16843327; // 0x101023f field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353 Loading Loading @@ -531,7 +532,7 @@ package android { field public static final int installLocation = 16843447; // 0x10102b7 field public static final int interpolator = 16843073; // 0x1010141 field public static final int isAlwaysSyncable = 16843571; // 0x1010333 field public static final int isAuxiliary = 16843642; // 0x101037a field public static final int isAuxiliary = 16843644; // 0x101037c field public static final int isDefault = 16843297; // 0x1010221 field public static final int isIndicator = 16843079; // 0x1010147 field public static final int isModifier = 16843334; // 0x1010246 Loading Loading @@ -583,8 +584,8 @@ package android { field public static final int layout_centerInParent = 16843151; // 0x101018f field public static final int layout_centerVertical = 16843153; // 0x1010191 field public static final int layout_column = 16843084; // 0x101014c field public static final int layout_columnSpan = 16843639; // 0x1010377 field public static final int layout_columnWeight = 16843640; // 0x1010378 field public static final int layout_columnSpan = 16843641; // 0x1010379 field public static final int layout_columnWeight = 16843642; // 0x101037a field public static final int layout_gravity = 16842931; // 0x10100b3 field public static final int layout_height = 16842997; // 0x10100f5 field public static final int layout_margin = 16842998; // 0x10100f6 Loading @@ -592,9 +593,9 @@ package android { field public static final int layout_marginLeft = 16842999; // 0x10100f7 field public static final int layout_marginRight = 16843001; // 0x10100f9 field public static final int layout_marginTop = 16843000; // 0x10100f8 field public static final int layout_row = 16843636; // 0x1010374 field public static final int layout_rowSpan = 16843637; // 0x1010375 field public static final int layout_rowWeight = 16843638; // 0x1010376 field public static final int layout_row = 16843638; // 0x1010376 field public static final int layout_rowSpan = 16843639; // 0x1010377 field public static final int layout_rowWeight = 16843640; // 0x1010378 field public static final int layout_scale = 16843155; // 0x1010193 field public static final int layout_span = 16843085; // 0x101014d field public static final int layout_toLeftOf = 16843138; // 0x1010182 Loading Loading @@ -660,7 +661,7 @@ package android { field public static final int nextFocusUp = 16842979; // 0x10100e3 field public static final int noHistory = 16843309; // 0x101022d field public static final int normalScreens = 16843397; // 0x1010285 field public static final int notificationTimeout = 16843646; // 0x101037e field public static final int notificationTimeout = 16843648; // 0x1010380 field public static final int numColumns = 16843032; // 0x1010118 field public static final int numStars = 16843076; // 0x1010144 field public static final deprecated int numeric = 16843109; // 0x1010165 Loading @@ -677,7 +678,7 @@ package android { field public static final int overScrollFooter = 16843459; // 0x10102c3 field public static final int overScrollHeader = 16843458; // 0x10102c2 field public static final int overScrollMode = 16843457; // 0x10102c1 field public static final int packageNames = 16843644; // 0x101037c field public static final int packageNames = 16843646; // 0x101037e field public static final int padding = 16842965; // 0x10100d5 field public static final int paddingBottom = 16842969; // 0x10100d9 field public static final int paddingLeft = 16842966; // 0x10100d6 Loading Loading @@ -755,6 +756,7 @@ package android { field public static final int reqNavigation = 16843306; // 0x101022a field public static final int reqTouchScreen = 16843303; // 0x1010227 field public static final int required = 16843406; // 0x101028e field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int resizeMode = 16843619; // 0x1010363 field public static final int resizeable = 16843405; // 0x101028d field public static final int resource = 16842789; // 0x1010025 Loading @@ -766,11 +768,11 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int rowCount = 16843631; // 0x101036f field public static final int rowCount = 16843633; // 0x1010371 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241 field public static final int rowHeight = 16843058; // 0x1010132 field public static final int rowOrderPreserved = 16843632; // 0x1010370 field public static final int rowOrderPreserved = 16843634; // 0x1010372 field public static final int saveEnabled = 16842983; // 0x10100e7 field public static final int scaleGravity = 16843262; // 0x10101fe field public static final int scaleHeight = 16843261; // 0x10101fd Loading Loading @@ -857,14 +859,14 @@ package android { field public static final int state_active = 16842914; // 0x10100a2 field public static final int state_checkable = 16842911; // 0x101009f field public static final int state_checked = 16842912; // 0x10100a0 field public static final int state_drag_can_accept = 16843621; // 0x1010365 field public static final int state_drag_hovered = 16843622; // 0x1010366 field public static final int state_drag_can_accept = 16843623; // 0x1010367 field public static final int state_drag_hovered = 16843624; // 0x1010368 field public static final int state_empty = 16842921; // 0x10100a9 field public static final int state_enabled = 16842910; // 0x101009e field public static final int state_expanded = 16842920; // 0x10100a8 field public static final int state_first = 16842916; // 0x10100a4 field public static final int state_focused = 16842908; // 0x101009c field public static final int state_hovered = 16843620; // 0x1010364 field public static final int state_hovered = 16843622; // 0x1010366 field public static final int state_last = 16842918; // 0x10100a6 field public static final int state_long_pressable = 16843324; // 0x101023c field public static final int state_middle = 16842917; // 0x10100a5 Loading @@ -875,7 +877,7 @@ package android { field public static final int state_window_focused = 16842909; // 0x101009d field public static final int staticWallpaperPreview = 16843569; // 0x1010331 field public static final int stepSize = 16843078; // 0x1010146 field public static final int stopWithTask = 16843623; // 0x1010367 field public static final int stopWithTask = 16843625; // 0x1010369 field public static final int streamType = 16843273; // 0x1010209 field public static final int stretchColumns = 16843081; // 0x1010149 field public static final int stretchMode = 16843030; // 0x1010116 Loading @@ -883,7 +885,7 @@ package android { field public static final int subtitleTextStyle = 16843513; // 0x10102f9 field public static final int suggestActionMsg = 16843228; // 0x10101dc field public static final int suggestActionMsgColumn = 16843229; // 0x10101dd field public static final int suggestionsEnabled = 16843630; // 0x101036e field public static final int suggestionsEnabled = 16843632; // 0x1010370 field public static final int summary = 16843241; // 0x10101e9 field public static final int summaryColumn = 16843426; // 0x10102a2 field public static final int summaryOff = 16843248; // 0x10101f0 Loading Loading @@ -951,9 +953,9 @@ package android { field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314 field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e field public static final int textEditSuggestionItemLayout = 16843627; // 0x101036b field public static final int textEditSuggestionsBottomWindowLayout = 16843625; // 0x1010369 field public static final int textEditSuggestionsTopWindowLayout = 16843626; // 0x101036a field public static final int textEditSuggestionItemLayout = 16843629; // 0x101036d field public static final int textEditSuggestionsBottomWindowLayout = 16843627; // 0x101036b field public static final int textEditSuggestionsTopWindowLayout = 16843628; // 0x101036c field public static final int textFilterEnabled = 16843007; // 0x10100ff field public static final int textIsSelectable = 16843542; // 0x1010316 field public static final int textOff = 16843045; // 0x1010125 Loading @@ -965,7 +967,7 @@ package android { field public static final int textSelectHandleWindowStyle = 16843464; // 0x10102c8 field public static final int textSize = 16842901; // 0x1010095 field public static final int textStyle = 16842903; // 0x1010097 field public static final int textSuggestionsWindowStyle = 16843624; // 0x1010368 field public static final int textSuggestionsWindowStyle = 16843626; // 0x101036a field public static final int textViewStyle = 16842884; // 0x1010084 field public static final int theme = 16842752; // 0x1010000 field public static final int thickness = 16843360; // 0x1010260 Loading Loading @@ -1001,7 +1003,7 @@ package android { field public static final int unfocusedMonthDateColor = 16843588; // 0x1010344 field public static final int unselectedAlpha = 16843278; // 0x101020e field public static final int updatePeriodMillis = 16843344; // 0x1010250 field public static final int useDefaultMargins = 16843635; // 0x1010373 field public static final int useDefaultMargins = 16843637; // 0x1010375 field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310 field public static final int useLevel = 16843167; // 0x101019f field public static final int userVisible = 16843409; // 0x1010291 Loading Loading @@ -5500,6 +5502,7 @@ package android.content.pm { field public static final int FLAG_VM_SAFE_MODE = 16384; // 0x4000 field public java.lang.String backupAgentName; field public java.lang.String className; field public int compatibleWidthLimitDp; field public java.lang.String dataDir; field public int descriptionRes; field public boolean enabled; Loading @@ -5509,6 +5512,7 @@ package android.content.pm { field public java.lang.String permission; field public java.lang.String processName; field public java.lang.String publicSourceDir; field public int requiresSmallestWidthDp; field public java.lang.String[] sharedLibraryFiles; field public java.lang.String sourceDir; field public int targetSdkVersion;
core/java/android/app/ActivityThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -1534,7 +1534,7 @@ public final class ActivityThread { synchronized (this) { ContextImpl context = getSystemContext(); context.init(new LoadedApk(this, "android", context, info, new CompatibilityInfo(info, 0, false)), null, this); new CompatibilityInfo(info, 0, 0, false)), null, this); } } Loading
core/java/android/content/pm/ApplicationInfo.java +24 −0 Original line number Diff line number Diff line Loading @@ -329,6 +329,22 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public int flags = 0; /** * The required smallest screen width the application can run on. If 0, * nothing has been specified. Comes from * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. */ public int requiresSmallestWidthDp = 0; /** * The maximum smallest screen width the application is designed for. If 0, * nothing has been specified. Comes from * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. */ public int compatibleWidthLimitDp = 0; /** * Full path to the location of this package. */ Loading Loading @@ -410,6 +426,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { pw.println(prefix + "taskAffinity=" + taskAffinity); pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) + " theme=0x" + Integer.toHexString(theme)); pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp + " compatibleWidthLimitDp=" + compatibleWidthLimitDp); pw.println(prefix + "sourceDir=" + sourceDir); if (sourceDir == null) { if (publicSourceDir != null) { Loading Loading @@ -469,6 +487,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { className = orig.className; theme = orig.theme; flags = orig.flags; requiresSmallestWidthDp = orig.requiresSmallestWidthDp; compatibleWidthLimitDp = orig.compatibleWidthLimitDp; sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; nativeLibraryDir = orig.nativeLibraryDir; Loading Loading @@ -502,6 +522,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(className); dest.writeInt(theme); dest.writeInt(flags); dest.writeInt(requiresSmallestWidthDp); dest.writeInt(compatibleWidthLimitDp); dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(nativeLibraryDir); Loading Loading @@ -536,6 +558,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { className = source.readString(); theme = source.readInt(); flags = source.readInt(); requiresSmallestWidthDp = source.readInt(); compatibleWidthLimitDp = source.readInt(); sourceDir = source.readString(); publicSourceDir = source.readString(); nativeLibraryDir = source.readString(); Loading
core/java/android/content/pm/PackageParser.java +7 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,13 @@ public class PackageParser { sa = res.obtainAttributes(attrs, com.android.internal.R.styleable.AndroidManifestSupportsScreens); pkg.applicationInfo.requiresSmallestWidthDp = sa.getInteger( com.android.internal.R.styleable.AndroidManifestSupportsScreens_requiresSmallestWidthDp, 0); pkg.applicationInfo.compatibleWidthLimitDp = sa.getInteger( com.android.internal.R.styleable.AndroidManifestSupportsScreens_compatibleWidthLimitDp, 0); // This is a trick to get a boolean and still able to detect // if a value was actually set. supportsSmallScreens = sa.getInteger( Loading
core/java/android/content/res/CompatibilityInfo.java +93 −67 Original line number Diff line number Diff line Loading @@ -110,9 +110,34 @@ public class CompatibilityInfo implements Parcelable { */ public final float applicationInvertedScale; public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, boolean forceCompat) { public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw, boolean forceCompat) { int compatFlags = 0; if (appInfo.requiresSmallestWidthDp != 0 || appInfo.compatibleWidthLimitDp != 0) { // New style screen requirements spec. int required = appInfo.requiresSmallestWidthDp != 0 ? appInfo.requiresSmallestWidthDp : appInfo.compatibleWidthLimitDp; int compat = appInfo.compatibleWidthLimitDp != 0 ? appInfo.compatibleWidthLimitDp : appInfo.requiresSmallestWidthDp; if (compat < required) { compat = required; } if (compat >= sw) { compatFlags |= NEVER_COMPAT; } else if (forceCompat) { compatFlags |= NEEDS_SCREEN_COMPAT; } // Modern apps always support densities. applicationDensity = DisplayMetrics.DENSITY_DEVICE; applicationScale = 1.0f; applicationInvertedScale = 1.0f; } else { // We can't rely on the application always setting // FLAG_RESIZEABLE_FOR_SCREENS so will compute it based on various input. boolean anyResizeable = false; Loading Loading @@ -191,6 +216,7 @@ public class CompatibilityInfo implements Parcelable { applicationInvertedScale = 1.0f / applicationScale; compatFlags |= SCALING_REQUIRED; } } mCompatibilityFlags = compatFlags; } Loading