View attr debug: avoid 'Invalid ID 0x00000000'
The view attribute debugging feature is intended to be used only if either - Settings.Global.DEBUG_VIEW_ATTRIBUTES is set (debug all packages) - Settings.Global.DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE is set (debug the named package) During the start of an app the package name hasn't been set yet. In this case the code that checks whether to enable view attribute debugging defaults the package name to the empty string. The code also defaults DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE to the empty string. Unless DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE contains a value, this leads to every app briefly entering view attribute debug mode until the package name has been set. The end result is a warning from the native asset manager: 09-19 01:14:58.717 E/system_server( 1601): Invalid ID 0x00000000. Prevent apps from unintentionally entering view attribute debug mode by defaulting the package name to "<unknown-app>" instead of the empty string. Bug: 141258558 Test: manual (launch any app, check logcat doesn't contain 'Invalid ID 0x00000000') Change-Id: Ia7e1d725b648dba95d0ad5cc87345ba62569b7e7
Loading
Please register or sign in to comment