Android 9.0 System Settings removes the developer mode function

1 Overview

  In the 9.0 system rom product customization development, in the native system, you can click the version number 5 times to open the developer mode function. In product development, because the product development needs to prevent users from opening the developer mode function, it is required to remove it
. The function of the developer mode, this part needs to find the relevant function point in the system Settings and remove it

2. System Settings removes the core class of the developer mode function

    packages\apps\Settings\src\com\android\settings\SettingsActivity.java
    packages\apps\Settings\src\com\android\settings\deviceinfo\BuildNumberPreferenceController.java

3. Realization and analysis of the core functions of the system Settings without the developer mode function
  3.1 SettingsActivity.java about the secondary menu display of the developer mode option

        @Override
        protected void onResume() {
            super.onResume();
     
            mDevelopmentSettingsListener = new BroadcastReceiver() {
                @Override
                public void onReceive(Context context, Intent intent) {
                    updateTilesList();
                }
            };
            LocalBroadcastManager.getInstance(this).registerReceiver(mDevelopmentSettingsListener,
  

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/130476661