Merge "Fix the crash while tapping "app data usage" as second user" into qt-dev

am: 3d16fc9519

Change-Id: Id2aa3c501378686d1b3a1b352b8fa15132bc396f
This commit is contained in:
Sunny Shao
2019-05-30 00:00:24 -07:00
committed by android-build-merger
4 changed files with 124 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.network;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.os.UserManager;
import android.provider.SearchIndexableResource;
import com.android.settings.R;
@@ -66,5 +67,10 @@ public class MobileNetworkListFragment extends DashboardFragment {
result.add(sir);
return result;
}
@Override
protected boolean isPageSearchEnabled(Context context) {
return context.getSystemService(UserManager.class).isAdminUser();
}
};
}

View File

@@ -277,5 +277,11 @@ public class MobileNetworkSettings extends RestrictedDashboardFragment {
result.add(sir);
return result;
}
/** suppress full page if user is not admin */
@Override
protected boolean isPageSearchEnabled(Context context) {
return context.getSystemService(UserManager.class).isAdminUser();
}
};
}