mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
commit
ab95925327
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue