Skip to content

Commit

Permalink
Merge pull request #5359 from brave/hotfix_for_SI_centerpoint_1.8.x
Browse files Browse the repository at this point in the history
Hotfix for si centerpoint 1.8.x (Uplift to 1.8.x)
  • Loading branch information
kjozwiak authored Apr 26, 2020
2 parents 6ec00d1 + 0768407 commit 51b6425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ NTPBackgroundImagesBridge::CreateWallpaper() {
if (!image_path || !logo_image_path)
return base::android::ScopedJavaLocalRef<jobject>();

auto focal_point_x = data.FindIntPath("focalPoint.x");
auto focal_point_y = data.FindIntPath("focalPoint.y");
auto focal_point_x = data.FindIntPath("wallpaperFocalPointX");
auto focal_point_y = data.FindIntPath("wallpaperFocalPointY");
auto* logo_destination_url = data.FindStringPath("logo.destinationUrl");

return Java_NTPBackgroundImagesBridge_createWallpaper(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ base::Value NTPBackgroundImagesData::GetBackgroundAt(size_t index) {
wallpaper_image_urls()[index]);
data.SetStringKey("wallpaperImagePath",
backgrounds[index].image_file.AsUTF8Unsafe());
data.SetIntKey("wallpaperFocalPointX", backgrounds[index].focal_point.x());
data.SetIntKey("wallpaperFocalPointY", backgrounds[index].focal_point.y());
base::Value logo_data(base::Value::Type::DICTIONARY);
logo_data.SetStringKey("image", logo_image_url());
logo_data.SetStringKey("imagePath", logo_image_file.AsUTF8Unsafe());
Expand Down

0 comments on commit 51b6425

Please sign in to comment.