2016-10-11 17:08:54 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-10-11 17:08:54 +00:00
|
|
|
*
|
2018-05-11 02:06:46 +00:00
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
2016-10-11 17:08:54 +00:00
|
|
|
'use strict';
|
|
|
|
|
2018-05-10 22:44:52 +00:00
|
|
|
const NativeModules = require('NativeModules');
|
2016-10-11 17:08:54 +00:00
|
|
|
|
|
|
|
function emptyCallback() {}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
alertWithArgs: function(args, callback) {
|
|
|
|
// TODO(5998984): Polyfill it correctly with DialogManagerAndroid
|
2017-02-18 00:39:50 +00:00
|
|
|
NativeModules.DialogManagerAndroid.showAlert(
|
2018-05-11 02:06:46 +00:00
|
|
|
args,
|
|
|
|
emptyCallback,
|
|
|
|
callback || emptyCallback,
|
|
|
|
);
|
2016-10-11 17:08:54 +00:00
|
|
|
},
|
|
|
|
};
|