mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-21 22:07:15 +00:00
Showing app version in debug mode
This commit is contained in:
parent
7d3dd2bbae
commit
efd1fb93bb
2 changed files with 27 additions and 4 deletions
|
@ -73,7 +73,9 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
|
|||
public TextView tvRoaming;
|
||||
|
||||
public LinearLayout llConfiguration;
|
||||
public TextView tvUid;
|
||||
public TextView tvPackage;
|
||||
public TextView tvVersion;
|
||||
public TextView tvDisabled;
|
||||
public TextView tvInternet;
|
||||
public CheckBox cbUsing;
|
||||
|
@ -98,7 +100,9 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
|
|||
tvRoaming = (TextView) itemView.findViewById(R.id.tvRoaming);
|
||||
|
||||
llConfiguration = (LinearLayout) itemView.findViewById(R.id.llConfiguration);
|
||||
tvUid = (TextView) itemView.findViewById(R.id.tvUid);
|
||||
tvPackage = (TextView) itemView.findViewById(R.id.tvPackage);
|
||||
tvVersion = (TextView) itemView.findViewById(R.id.tvVersion);
|
||||
tvDisabled = (TextView) itemView.findViewById(R.id.tvDisabled);
|
||||
tvInternet = (TextView) itemView.findViewById(R.id.tvInternet);
|
||||
cbUsing = (CheckBox) itemView.findViewById(R.id.cbUsing);
|
||||
|
@ -223,10 +227,14 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
|
|||
holder.tvRoaming.setVisibility(rule.roaming && (!rule.other_blocked || rule.unused) ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
holder.llConfiguration.setVisibility(rule.attributes ? View.VISIBLE : View.GONE);
|
||||
if (!debuggable || rule.info.applicationInfo == null)
|
||||
holder.tvPackage.setText(rule.info.packageName);
|
||||
else
|
||||
holder.tvPackage.setText(rule.info.applicationInfo.uid + " " + rule.info.packageName);
|
||||
|
||||
holder.tvUid.setVisibility(debuggable ? View.VISIBLE : View.GONE);
|
||||
holder.tvUid.setText(rule.info.applicationInfo == null ? "?" : Integer.toString(rule.info.applicationInfo.uid));
|
||||
|
||||
holder.tvPackage.setText(rule.info.packageName);
|
||||
|
||||
holder.tvVersion.setVisibility(debuggable ? View.VISIBLE : View.GONE);
|
||||
holder.tvVersion.setText(rule.info.versionName + '/' + rule.info.versionCode);
|
||||
|
||||
holder.tvDisabled.setVisibility(rule.disabled ? View.VISIBLE : View.GONE);
|
||||
holder.tvInternet.setVisibility(rule.internet ? View.GONE : View.VISIBLE);
|
||||
|
|
|
@ -102,6 +102,13 @@
|
|||
android:paddingTop="0dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPackage"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -109,6 +116,14 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInternet"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue