Various improvements and fixes (#128)
- Fix for display orientation assumption in Display app - Update logo (added colours) - Fix for double stopping the Files app - Deny registration of apps and services that are already registered - Updated `ideas.md` for these changes - Other cleanup
This commit is contained in:
committed by
GitHub
parent
1b89065c99
commit
49bf8e824c
@@ -16,14 +16,19 @@ void addApp(const AppManifest* manifest) {
|
||||
TT_LOG_I(TAG, "Registering manifest %s", manifest->id.c_str());
|
||||
|
||||
hash_mutex.acquire(TtWaitForever);
|
||||
app_manifest_map[manifest->id] = manifest;
|
||||
|
||||
if (app_manifest_map[manifest->id] == nullptr) {
|
||||
app_manifest_map[manifest->id] = manifest;
|
||||
} else {
|
||||
TT_LOG_E(TAG, "App id in use: %s", manifest->id.c_str());
|
||||
}
|
||||
|
||||
hash_mutex.release();
|
||||
}
|
||||
|
||||
_Nullable const AppManifest * findAppById(const std::string& id) {
|
||||
hash_mutex.acquire(TtWaitForever);
|
||||
auto iterator = app_manifest_map.find(id);
|
||||
_Nullable const AppManifest* result = iterator != app_manifest_map.end() ? iterator->second : nullptr;
|
||||
_Nullable const AppManifest* result = app_manifest_map[id.c_str()];
|
||||
hash_mutex.release();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user