mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Migrate from Plugin SearchTarget to API search Target [1/3]
Setup architecture for separation between aosp and quickstep search as setup for switch to android.app.SearchTarget Bug: 177223401 Test: manual Change-Id: Iefd069a34d5e5551bf731e9171958e93377774aa
This commit is contained in:
@@ -43,6 +43,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.allapps.search.DefaultSearchAdapterProvider;
|
||||
import com.android.launcher3.allapps.search.SearchAdapterProvider;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
import com.android.launcher3.logging.InstanceIdSequence;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
@@ -187,7 +189,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
logAppLaunch(item, instanceId);
|
||||
}
|
||||
return true;
|
||||
} catch (NullPointerException|ActivityNotFoundException|SecurityException e) {
|
||||
} catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
|
||||
Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
|
||||
Log.e(TAG, "Unable to launch. tag=" + item + " intent=" + intent, e);
|
||||
}
|
||||
@@ -290,4 +292,12 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
display.getSize(mwSize);
|
||||
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns {@link SearchAdapterProvider} for build variant specific search result
|
||||
* views
|
||||
*/
|
||||
public SearchAdapterProvider createSearchAdapterProvider() {
|
||||
return new DefaultSearchAdapterProvider(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user