Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10d69ea7 authored by Mihai Popa's avatar Mihai Popa
Browse files

[Magnifier - 18] Make #update() public

The CL adds the Magnifier#update() method in the public API. The method
is used to refresh the content of the magnifier, whenever this is
desired (usually when there is a chance that the magnifier content
became stale).

The initial plan was that this method would not be included in the
public API. This was relying on a feature request we made to the
graphics team, asking for support to have a callback called whenever the
surface the magnifier is attached to changes. This way, we could
refresh the magnifier content whenever the surface changes, without
requiring the user to call #update(). Once the feature request is
implemented (probably in Q according to the last discussion), we will be
able to deprecate #update().

Bug: 63531115
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I62c5794c3227e6a5d36d351c10d6bcf18e1d931a
parent cbd5a384
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52292,6 +52292,7 @@ package android.widget {
    ctor public Magnifier(android.view.View);
    method public void dismiss();
    method public void show(float, float);
    method public void update();
  }
  public class MediaController extends android.widget.FrameLayout {
+0 −2
Original line number Diff line number Diff line
@@ -182,8 +182,6 @@ public final class Magnifier {
    /**
     * Forces the magnifier to update its content. It uses the previous coordinates passed to
     * {@link #show(float, float)}. This only happens if the magnifier is currently showing.
     *
     * @hide
     */
    public void update() {
        if (mWindow.isShowing()) {