No standard way to get an app’s name and icon

Bug #1555542 reported by Matthew Paul Thomas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
New
Undecided
Unassigned

Bug Description

Several different pieces of the system have implemented their own functions for getting the display name and icon of an app.

Examples:
* Dash Apps scope
* App permission prompts
  trust-store src/core/trust/mir/click_desktop_entry_app_info_resolver.cpp
* System Settings “Storage” screen
  ubuntu-system-settings plugins/about/click.cpp
* System Settings “App permissions” screens
  ubuntu-system-settings plugins/security-privacy/trust-store-model.cpp

This duplication has the same basic problems as any code duplication: inconsistency, inefficiency, and insecurity.

Inconsistency: For example, different parts of the OS have already had problems with inconsistent rendering of icons (bug 1363015).

Inefficiency: For example, when Ubuntu Touch switches from Click to Snappy, all these pieces of code will need revamping separately.

Insecurity: For example, none of these pieces of code seem to handle a name that is 10000 characters long, contains line feed characters, or contains Bidi_Control characters that cause it to overwrite the surrounding text. Defences like that should not need implementing in multiple places.

The obvious solution is to have an API for returning the display name and/or icon of a given app. Maybe apps themselves should not be able to access this API for apps other than themselves (because that would give them a way of telling whether a particular app is installed). But parts of the OS should.

If the UI toolkit is not the appropriate component to provide this API, please move it to the appropriate component.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.