SetupWizard: Don't show wizard for guest account

Change-Id: Ie03e22bcbd035b47b55a9774b9e6fc21d407291b
This commit is contained in:
cretin45 2015-02-04 16:50:37 -08:00
parent 508cfbb0f3
commit 17c2db964e

View File

@ -19,11 +19,13 @@ package com.cyanogenmod.setupwizard.ui;
import android.animation.Animator;
import android.app.Activity;
import android.app.AppGlobals;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.os.UserManager;
import android.provider.Settings;
import android.view.MotionEvent;
import android.view.View;
@ -107,6 +109,10 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
} catch (Settings.SettingNotFoundException e) {
// Continue with setup
}
UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE);
if (userManager.isGuestUser()) {
finishSetup();
}
registerReceiver(mSetupData, mSetupData.getIntentFilter());
}