Skip to content
Commit 62eed6be authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Todd Kennedy
Browse files

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
parent d4718e18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment