Switch to public API for surface view when rendering preview

Bug: 152003916
Test: Manual
Change-Id: I539ed2876d869366fa7635f4467d19e8488b7a1a
This commit is contained in:
Tracy Zhou committed 2020-04-06 14:39:52 -07:00
1 parent 43ef145a99
commit bb353d3741
3 files changed
+130 -52

No files matched your search

@@ -20,7 +20,6 @@ import android.util.Xml;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.InvariantDeviceProfile.GridOption;
import com.android.launcher3.R;
import com.android.launcher3.uioverrides.PreviewSurfaceRenderer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -201,12 +200,11 @@ public class GridOptionsProvider extends ContentProvider {
}
@Override
public Bundle call(String method, String arg, Bundle extras) {
public Bundle call(String method, String arg, Bundle extras) {
if (!METHOD_GET_PREVIEW.equals(method)) {
return null;
}
PreviewSurfaceRenderer.render(getContext(), extras);
return null;
return new PreviewSurfaceRenderer(getContext(), extras).render();
}
}