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:
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user