Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Certain applications can only function properly in specific compatibility modes during runtime. Therefore, there is a need to design a universal compatibility settings framework. This framework should be capable of reading user configuration values and determining whether to enable compatibility configuration features. This document serves as a guide for developers on how to develop their own compatibility framework and incorporate new compatibility configuration options.


1. Adding Configuration

First, add the following configuration to the file "comp_config.xml" located in the directory "openfde/boringdroidsystemui/tree/fde_w/app/main/res/raw/":

Code Block
        "en":"Allow to hide the title bar",
        "en":"test text",

Field Descriptions:

  • keycode: Compatibility Configuration Key

  • keydesc: Compatibility Description used for display purposes. Requires configuration in both Chinese and English.

  • defaultvalue: Default value

  • inputtype: Currently supports three types: switch, input, and select.

  • notes: Notes to guide users on how to use the configuration. Requires configuration in both Chinese and English.

  • optionjson: If the inputtype is select, the optionjson option needs to be configured.

2. Framework Interface Invocation

Asynchronous Method:

Code Block
CompatibleConfig.queryTrainingData(Context context, String packageName, String keycode)

Synchronous Method:

Code Block
CompatibleConfig.queryValueData(Context context, String packageName, String keycode)

Parameter Descriptions:

  • context: Context object

  • packageName: Package name

  • keycode: Compatibility Configuration Key