Messaging: Let there be lambdas

Change-Id: Iee1fc46c92ea9159abb10d92d34baee937bdee0c
This commit is contained in:
Michael W
2024-12-26 14:55:12 +01:00
parent c1b4aa4dfe
commit d43b6ff1c4
84 changed files with 991 additions and 1697 deletions
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,12 +43,7 @@ public class BugleWidgetProvider extends BaseWidgetProvider {
@Override
protected void updateWidget(final Context context, final int appWidgetId) {
if (OsUtil.hasRequiredPermissions()) {
SafeAsyncTask.executeOnThreadPool(new Runnable() {
@Override
public void run() {
rebuildWidget(context, appWidgetId);
}
});
SafeAsyncTask.executeOnThreadPool(() -> rebuildWidget(context, appWidgetId));
} else {
AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId,
UiUtils.getWidgetMissingPermissionView(context));
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -148,12 +149,7 @@ public class WidgetConversationProvider extends BaseWidgetProvider {
// widget dependent on ConversationListItemData. However, we have to update
// the widget regardless, even with those missing pieces. Here we update the
// widget again in the background.
SafeAsyncTask.executeOnThreadPool(new Runnable() {
@Override
public void run() {
rebuildWidget(context, appWidgetId);
}
});
SafeAsyncTask.executeOnThreadPool(() -> rebuildWidget(context, appWidgetId));
}
}