Auto merge of #24065 - paulrouget:androidAlert, r=jdm

Implement window.alert on Android

Makes it easier to debug our webxr demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24065)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-08-27 23:36:23 -04:00 committed by GitHub
commit ab95925327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@
package org.mozilla.servo;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
@ -131,6 +132,10 @@ public class MainActivity extends Activity implements Servo.Client {
@Override
public void onAlert(String message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(message);
AlertDialog alert = builder.create();
alert.show();
}
@Override