Bug 592088 - support progress indicators in android status bar notifications r=blassey a=blocking-fennec
This commit is contained in:
@@ -112,6 +112,7 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jGetClipboardText = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getClipboardText", "()Ljava/lang/String;");
|
||||
jSetClipboardText = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "setClipboardText", "(Ljava/lang/String;)V");
|
||||
jShowAlertNotification = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "showAlertNotification", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
|
||||
jAlertsProgressListener_OnProgress = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "alertsProgressListener_OnProgress", "(Ljava/lang/String;JJLjava/lang/String;)V");
|
||||
jShowFilePicker = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "showFilePicker", "()Ljava/lang/String;");
|
||||
|
||||
|
||||
@@ -461,6 +462,22 @@ AndroidBridge::ShowAlertNotification(const nsAString& aImageUrl,
|
||||
mJNIEnv->CallStaticVoidMethodA(mGeckoAppShellClass, jShowAlertNotification, args);
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::AlertsProgressListener_OnProgress(const nsAString& aAlertName,
|
||||
PRInt64 aProgress,
|
||||
PRInt64 aProgressMax,
|
||||
const nsAString& aAlertText)
|
||||
{
|
||||
ALOG("AlertsProgressListener_OnProgress");
|
||||
|
||||
AutoLocalJNIFrame jniFrame;
|
||||
|
||||
jstring jstrName = mJNIEnv->NewString(nsPromiseFlatString(aAlertName).get(), aAlertName.Length());
|
||||
jstring jstrText = mJNIEnv->NewString(nsPromiseFlatString(aAlertText).get(), aAlertText.Length());
|
||||
mJNIEnv->CallStaticVoidMethod(mGeckoAppShellClass, jAlertsProgressListener_OnProgress,
|
||||
jstrName, aProgress, aProgressMax, jstrText);
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::ShowFilePicker(nsAString& aFilePath)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user