Merge "Fix the crash while tapping "app data usage" as second user" into qt-dev
am: 3d16fc9519
Change-Id: I9bd04562a2d86e80c5401434eef5c45baaa6be87
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