Fix work challenge background size.

Bug: 26820717
Change-Id: Icd984b7bb7517ac01a3fa5ca26d060ea33b58a99
This commit is contained in:
Abodunrinwa Toki
2016-03-08 18:07:35 +00:00
parent 24711aa63e
commit 80c082f066
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)));