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

Commit c0a86341 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Rename ImpressionAttestation to ScreenshotHash" into sc-dev am: 3191bf6c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13429135

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibee152b65142cad0eeb8b98e7023e402852dfb82
parents 8536ddd2 3191bf6c
Loading
Loading
Loading
Loading
+24 −23
Original line number Diff line number Diff line
@@ -9604,29 +9604,6 @@ package android.service.attention {
}
package android.service.attestation {
  public abstract class ImpressionAttestationService extends android.app.Service {
    ctor public ImpressionAttestationService();
    method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method @Nullable public abstract android.service.attestation.ImpressionToken onGenerateImpressionToken(@NonNull byte[], @NonNull android.hardware.HardwareBuffer, @NonNull android.graphics.Rect, @NonNull String);
    method public abstract boolean onVerifyImpressionToken(@NonNull byte[], @NonNull android.service.attestation.ImpressionToken);
  }
  public final class ImpressionToken implements android.os.Parcelable {
    ctor public ImpressionToken(long, @NonNull android.graphics.Rect, @NonNull String, @NonNull byte[], @NonNull byte[]);
    method public int describeContents();
    method @NonNull public android.graphics.Rect getBoundsInWindow();
    method @NonNull public String getHashingAlgorithm();
    method @NonNull public byte[] getHmac();
    method @NonNull public byte[] getImageHash();
    method public long getScreenshotTimeMillis();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.attestation.ImpressionToken> CREATOR;
  }
}
package android.service.autofill {
  public abstract class AutofillFieldClassificationService extends android.app.Service {
@@ -10192,6 +10169,30 @@ package android.service.rotationresolver {
}
package android.service.screenshot {
  public final class ScreenshotHash implements android.os.Parcelable {
    ctor public ScreenshotHash(long, @NonNull android.graphics.Rect, @NonNull String, @NonNull byte[], @NonNull byte[]);
    method public int describeContents();
    method @NonNull public android.graphics.Rect getBoundsInWindow();
    method @NonNull public String getHashingAlgorithm();
    method @NonNull public byte[] getHmac();
    method @NonNull public byte[] getImageHash();
    method public long getScreenshotTimeMillis();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.screenshot.ScreenshotHash> CREATOR;
  }
  public abstract class ScreenshotHasherService extends android.app.Service {
    ctor public ScreenshotHasherService();
    method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method @Nullable public abstract android.service.screenshot.ScreenshotHash onGenerateScreenshotHash(@NonNull byte[], @NonNull android.hardware.HardwareBuffer, @NonNull android.graphics.Rect, @NonNull String);
    method public abstract boolean onVerifyScreenshotHash(@NonNull byte[], @NonNull android.service.screenshot.ScreenshotHash);
    field public static final String SERVICE_INTERFACE = "android.service.screenshot.ScreenshotHasherService";
  }
}
package android.service.search {
  public abstract class SearchUiService extends android.app.Service {
+0 −2
Original line number Diff line number Diff line
chaviw@google.com
ogunwale@google.com
+12 −12
Original line number Diff line number Diff line
@@ -14,43 +14,43 @@
 * limitations under the License.
 */

package android.service.attestation;
package android.service.screenshot;

import android.graphics.Rect;
import android.hardware.HardwareBuffer;
import android.os.RemoteCallback;
import android.service.attestation.ImpressionToken;
import android.service.screenshot.ScreenshotHash;

/**
 * Service used to handle impression attestation requests.
 * Service used to handle ScreenshotHash requests.
 *
 * @hide
 */
oneway interface IImpressionAttestationService {
oneway interface IScreenshotHasherService {
    /**
     * Generates the impression token that can be used to validate that the system generated the
     * Generates the ScreenshotHash token that can be used to validate that the system generated the
     * token.
     *
     * @param salt The salt to use when generating the hmac. This should be unique to the caller so
     *        the token cannot be verified by any other process.
     * @param screenshot The screenshot to generate the hash and add to the token.
     * @param bounds The size and position of the content being attested in the window.
     * @param bounds The size and position of the content being screenshot in the window.
     * @param hashAlgorithm The String for the hashing algorithm to use based on values in
     *        {@link #SERVICE_META_DATA_KEY_AVAILABLE_ALGORITHMS}.
     * @param Callback The callback invoked to send back the impression token.
     * @param Callback The callback invoked to send back the ScreenshotHash token.
     */
    void generateImpressionToken(in byte[] salt, in HardwareBuffer screenshot, in Rect bounds,
    void generateScreenshotHash(in byte[] salt, in HardwareBuffer screenshot, in Rect bounds,
                                 in String hashAlgorithm, in RemoteCallback callback);

    /**
     * Call to verify that the impressionToken passed in was generated by the system. The result
     * Call to verify that the ScreenshotHash passed in was generated by the system. The result
     * will be sent in the callback as a boolean with the key {@link #EXTRA_VERIFICATION_STATUS}.
     *
     * @param salt The salt value to use when verifying the hmac. This should be the same value that
     *        was passed to {@link generateImpressionToken()} to generate the token.
     * @param impressionToken The token to verify that it was generated by the system.
     *        was passed to {@link generateScreenshotHash()} to generate the token.
     * @param screenshotHash The hash to verify that it was generated by the system.
     * @param callback The callback invoked to send back the verification status.
     */
    void verifyImpressionToken(in byte[] salt, in ImpressionToken impressionToken,
    void verifyScreenshotHash(in byte[] salt, in ScreenshotHash screenshotHash,
                               in RemoteCallback callback);
}
+1 −0
Original line number Diff line number Diff line
include /services/core/java/com/android/server/wm/OWNERS
+2 −2
Original line number Diff line number Diff line
@@ -14,6 +14,6 @@
 * limitations under the License.
 */

package android.service.attestation;
package android.service.screenshot;

parcelable ImpressionToken;
 No newline at end of file
parcelable ScreenshotHash;
Loading