WIP: Bug 1701283 - Catch security exceptions thrown by Android Autofill Manager r=geckoview-reviewers,aklotz

Differential Revision: https://phabricator.services.mozilla.com/D111465
This commit is contained in:
owlishDeveloper 2021-04-12 18:46:07 +00:00
Родитель c5a6213621
Коммит 612a8706c7
1 изменённых файлов: 28 добавлений и 23 удалений

Просмотреть файл

@ -35,6 +35,7 @@ import androidx.annotation.UiThread;
import androidx.core.view.ViewCompat;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.DisplayCutout;
@ -913,6 +914,7 @@ public class GeckoView extends FrameLayout {
return;
}
try {
switch (notification) {
case Autofill.Notify.SESSION_STARTED:
// This line seems necessary for auto-fill to work on the initial page.
@ -937,6 +939,9 @@ public class GeckoView extends FrameLayout {
AutofillValue.forText(node.getValue()));
break;
}
} catch (final SecurityException e) {
Log.e(LOGTAG, "Failed to call Autofill Manager API: ", e);
}
}
}
}