Merge "Fix work challenge background size." into nyc-dev

This commit is contained in:
Abodunrinwa Toki
2016-03-10 18:42:02 +00:00
committed by Android (Google) Code Review
7 changed files with 20 additions and 8 deletions

View File

@@ -204,6 +204,12 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
}
private void setWorkChallengeBackground(View baseView, int userId) {
View mainContent = getActivity().findViewById(com.android.settings.R.id.main_content);
if (mainContent != null) {
// Remove the main content padding so that the background image is full screen.
mainContent.setPadding(0, 0, 0, 0);
}
DevicePolicyManager dpm = (DevicePolicyManager) getActivity().getSystemService(
Context.DEVICE_POLICY_SERVICE);
baseView.setBackground(new ColorDrawable(dpm.getOrganizationColorForUser(userId)));