Add background image for work challenge

If the challenge shown is for a work profile, add the default image and
color to the background of the fragment.

Change-Id: I148c6cd3a835a84c7bac78b020839dfdae4a6c36
This commit is contained in:
Benjamin Franz
2016-01-13 12:16:25 +00:00
parent 45bc64afcb
commit 194300dff3
18 changed files with 448 additions and 326 deletions

View File

@@ -18,8 +18,10 @@ package com.android.settings;
import android.app.Fragment;
import android.app.KeyguardManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.UserManager;
import android.view.MenuItem;
import android.view.WindowManager;
@@ -33,7 +35,12 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
@Override
protected void onCreate(Bundle savedState) {
if (getIntent().getBooleanExtra(ConfirmDeviceCredentialBaseFragment.DARK_THEME, false)) {
int credentialOwnerUserId = Utils.getCredentialOwnerUserId(this,
Utils.getUserIdFromBundle(this, getIntent().getExtras()));
if (Utils.isManagedProfile(UserManager.get(this), credentialOwnerUserId)) {
setTheme(R.style.Theme_ConfirmDeviceCredentialsWork);
} else if (getIntent().getBooleanExtra(
ConfirmDeviceCredentialBaseFragment.DARK_THEME, false)) {
setTheme(R.style.Theme_ConfirmDeviceCredentialsDark);
mDark = true;
}