You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
LayoutInflater: catch non critical exception in generateLayoutParams
This commit is contained in:
@@ -178,12 +178,16 @@ public class LayoutInflater {
|
|||||||
Slog.v(TAG, "Creating params from root: " + root);
|
Slog.v(TAG, "Creating params from root: " + root);
|
||||||
|
|
||||||
// Create layout params that match root, if supplied
|
// Create layout params that match root, if supplied
|
||||||
params = root.generateLayoutParams(attrs);
|
try {
|
||||||
params.resolveLayoutDirection(root.getLayoutDirection());
|
params = root.generateLayoutParams(attrs);
|
||||||
if (!attachToRoot) {
|
params.resolveLayoutDirection(root.getLayoutDirection());
|
||||||
// Set the layout params for temp if we are not
|
if (!attachToRoot) {
|
||||||
// attaching. (If we are, we use addView, below)
|
// Set the layout params for temp if we are not
|
||||||
temp.setLayoutParams(params);
|
// attaching. (If we are, we use addView, below)
|
||||||
|
temp.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
Slog.w(TAG, "Exception in generateLayoutParams:", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user