Merge "Add @WorkerThread Annotations to RPC calling methods in QsbContainerView." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fbf2d5e717
@@ -38,6 +38,7 @@ import android.util.Log;
|
||||
import android.util.Xml;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.LauncherProvider.SqlArguments;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
@@ -531,6 +532,7 @@ public class AutoInstallsLayout {
|
||||
protected class SearchWidgetParser extends PendingWidgetParser {
|
||||
@Override
|
||||
@Nullable
|
||||
@WorkerThread
|
||||
public ComponentName getComponentName(XmlPullParser parser) {
|
||||
return QsbContainerView.getSearchComponentName(mContext);
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
@@ -65,6 +66,7 @@ public class QsbContainerView extends FrameLayout {
|
||||
* @param context
|
||||
* @return String
|
||||
*/
|
||||
@WorkerThread
|
||||
@Nullable
|
||||
public static String getSearchWidgetPackageName(@NonNull Context context) {
|
||||
String providerPkg = Settings.Global.getString(context.getContentResolver(),
|
||||
@@ -84,6 +86,7 @@ public class QsbContainerView extends FrameLayout {
|
||||
* @param context
|
||||
* @return AppWidgetProviderInfo
|
||||
*/
|
||||
@WorkerThread
|
||||
@Nullable
|
||||
public static AppWidgetProviderInfo getSearchWidgetProviderInfo(@NonNull Context context) {
|
||||
String providerPkg = getSearchWidgetPackageName(context);
|
||||
@@ -110,6 +113,7 @@ public class QsbContainerView extends FrameLayout {
|
||||
/**
|
||||
* returns componentName for searchWidget if package name is known.
|
||||
*/
|
||||
@WorkerThread
|
||||
@Nullable
|
||||
public static ComponentName getSearchComponentName(@NonNull Context context) {
|
||||
AppWidgetProviderInfo providerInfo =
|
||||
@@ -317,6 +321,7 @@ public class QsbContainerView extends FrameLayout {
|
||||
* If widgetCategory is not supported, or no such widget is found, returns the first widget
|
||||
* provided by the package.
|
||||
*/
|
||||
@WorkerThread
|
||||
protected AppWidgetProviderInfo getSearchWidgetProvider() {
|
||||
return getSearchWidgetProviderInfo(getContext());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user