Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85a27e7f authored by Danny Lin's avatar Danny Lin
Browse files

PermissionController: Remove warning from permission dashboard

This usage dashboard is in a usable state and helps track down rogue
apps, so remove the warning.

Change-Id: Ie51e56655cd5d69687dbdc7a2a5216bd6cf3559d
parent 9a470c1b
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ import static java.util.concurrent.TimeUnit.DAYS;
import static java.util.concurrent.TimeUnit.HOURS;
import static java.util.concurrent.TimeUnit.MINUTES;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.ActionBar;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -37,7 +35,6 @@ import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
import android.text.Html;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
@@ -364,33 +361,6 @@ public class PermissionUsageFragment extends SettingsWithLargeHeader implements
        }
        screen.removeAll();

        Preference countsWarningPreference = new Preference(getContext()) {
            @Override
            public void onBindViewHolder(PreferenceViewHolder holder) {
                super.onBindViewHolder(holder);
                ((TextView) holder.itemView.findViewById(android.R.id.title))
                        .setTextColor(Color.RED);
                holder.itemView.setBackgroundColor(Color.YELLOW);
            }
        };

        StringBuffer accounts = new StringBuffer();
        for (UserHandle user : getContext().getSystemService(UserManager.class).getAllProfiles()) {
            for (Account account : getContext().createContextAsUser(user, 0).getSystemService(AccountManager.class).getAccounts()) {
                accounts.append(", " + account.name);
            }
        }
        if (accounts.length() > 0) {
            accounts.delete(0, 2);
        }

        countsWarningPreference.setTitle(Html.fromHtml("<b>INTERNAL ONLY</b> - For debugging.<br/><br/>"
                + "- Access counts do not reflect amount of private data accessed.<br/>"
                + "- Data might not be accurate.<br/><br/>"
                + "Accounts: " + accounts, Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH));
        countsWarningPreference.setIcon(R.drawable.ic_info);
        screen.addPreference(countsWarningPreference);

        boolean seenSystemApp = false;

        final TimeFilterItem timeFilterItem = mFilterTimes.get(mFilterTimeIndex);