* {@link #hasSystemFeature}: The device supports freeform window management.
* Windows have title bars and can be moved and resized.
*/
+ // If this feature is present, you also need to set
+ // com.android.internal.R.config_freeformWindowManagement to true in your configuration overlay.
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_FREEFORM_WINDOW_MANAGEMENT
= "android.software.freeform_window_management";
long startTime = SystemClock.uptimeMillis();
TypedArray ar = mResources.obtainTypedArray(
com.android.internal.R.array.preloaded_drawables);
- int N = preloadDrawables(runtime, ar);
+ int N = preloadDrawables(ar);
ar.recycle();
Log.i(TAG, "...preloaded " + N + " resources in "
+ (SystemClock.uptimeMillis()-startTime) + "ms.");
startTime = SystemClock.uptimeMillis();
ar = mResources.obtainTypedArray(
com.android.internal.R.array.preloaded_color_state_lists);
- N = preloadColorStateLists(runtime, ar);
+ N = preloadColorStateLists(ar);
ar.recycle();
Log.i(TAG, "...preloaded " + N + " resources in "
+ (SystemClock.uptimeMillis()-startTime) + "ms.");
+
+ if (mResources.getBoolean(
+ com.android.internal.R.bool.config_freeformWindowManagement)) {
+ startTime = SystemClock.uptimeMillis();
+ ar = mResources.obtainTypedArray(
+ com.android.internal.R.array.preloaded_freeform_multi_window_drawables);
+ N = preloadDrawables(ar);
+ ar.recycle();
+ Log.i(TAG, "...preloaded " + N + " resource in "
+ + (SystemClock.uptimeMillis() - startTime) + "ms.");
+ }
}
mResources.finishPreloading();
} catch (RuntimeException e) {
}
}
- private static int preloadColorStateLists(VMRuntime runtime, TypedArray ar) {
+ private static int preloadColorStateLists(TypedArray ar) {
int N = ar.length();
for (int i=0; i<N; i++) {
int id = ar.getResourceId(i, 0);
}
- private static int preloadDrawables(VMRuntime runtime, TypedArray ar) {
+ private static int preloadDrawables(TypedArray ar) {
int N = ar.length();
for (int i=0; i<N; i++) {
int id = ar.getResourceId(i, 0);
<item>@color/search_url_text_material_light</item>
</array>
+ <array name="preloaded_freeform_multi_window_drawables">
+ <item>@drawable/decor_maximize_button_dark</item>
+ <item>@drawable/decor_maximize_button_light</item>
+ </array>
+
<!-- Used in LocalePicker -->
<string-array translatable="false" name="special_locale_codes">
<!-- http://b/17150708 - ensure that the list of languages says "Arabic"
<!-- The BT name of the keyboard packaged with the device. If this is defined, SystemUI will
automatically try to pair with it when the device exits tablet mode. -->
<string translatable="false" name="config_packagedKeyboardName"></string>
+
+ <!-- The device supports freeform window management. Windows have title bars and can be moved
+ and resized. If you set this to true, you also need to add
+ PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT feature to your device specification.
+ The duplication is necessary, because this information is used before the features are
+ available to the system.-->
+ <bool name="config_freeformWindowManagement">false</bool>
</resources>
<java-symbol type="bool" name="config_wifi_enable_wifi_firmware_debugging" />
<java-symbol type="bool" name="config_supportMicNearUltrasound" />
<java-symbol type="bool" name="config_supportSpeakerNearUltrasound" />
+ <java-symbol type="bool" name="config_freeformWindowManagement" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
<java-symbol type="array" name="networkAttributes" />
<java-symbol type="array" name="preloaded_color_state_lists" />
<java-symbol type="array" name="preloaded_drawables" />
+ <java-symbol type="array" name="preloaded_freeform_multi_window_drawables" />
<java-symbol type="array" name="sim_colors" />
<java-symbol type="array" name="special_locale_codes" />
<java-symbol type="array" name="special_locale_names" />