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
ViewGroup: prevent NotFoundException caused by log message
This commit is contained in:
@@ -685,7 +685,7 @@ public final class AssetManager {
|
||||
*/
|
||||
/*package*/ native final int getResourceIdentifier(String name, String type, String defPackage);
|
||||
|
||||
/*package*/ /*native*/ final String getResourceName(int resid) {
|
||||
public /*native*/ final String getResourceName(int resid) {
|
||||
String name = getResourcePackageName(resid);
|
||||
String type = getResourceTypeName(resid);
|
||||
if (type != null)
|
||||
|
||||
@@ -359,7 +359,7 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
public void setClipToPadding(boolean clipToPadding) {}
|
||||
|
||||
public View findViewById(int id) {
|
||||
Slog.v(TAG, "findViewById: looking for id: " + String.format("%x", id) + "(" + getResources().getResourceName(id) + ")" + " | checking: " + this + ",id: " + String.format("%x", this.getId()) + ", id_str: " + this.getIdName());
|
||||
Slog.v(TAG, "findViewById: looking for id: " + String.format("%x", id) + "(" + getResources().getAssets().getResourceName(id) + ")" + " | checking: " + this + ",id: " + String.format("%x", this.getId()) + ", id_str: " + this.getIdName());
|
||||
if (this.id == id) {
|
||||
Slog.v(TAG, "findViewById: found: "+this+" | id: " + String.format("%x", this.getId()) + ", id_str: " + this.getIdName());
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user