diff options
author | Jay Shrauner <shrauner@google.com> | 2014-11-17 16:53:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-17 16:53:09 +0000 |
commit | 3501f858cc014d19faa97cdf2ca837e7319e1c34 (patch) | |
tree | 8a105c52a3a39d6b0edaa3b51cc71646ccb7d1c5 /src | |
parent | 24c7ea60ce73408f7e491be9c78950fe7db8f960 (diff) | |
parent | c26847394d34fd343a22bcb1458a899cd67d0edd (diff) | |
download | android_packages_services_Telephony-3501f858cc014d19faa97cdf2ca837e7319e1c34.tar.gz android_packages_services_Telephony-3501f858cc014d19faa97cdf2ca837e7319e1c34.tar.bz2 android_packages_services_Telephony-3501f858cc014d19faa97cdf2ca837e7319e1c34.zip |
Merge "Don't create if not primary user" into lmp-mr1-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/phone/CallFeaturesSetting.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java index 2755bd787..7e670aa2b 100644 --- a/src/com/android/phone/CallFeaturesSetting.java +++ b/src/com/android/phone/CallFeaturesSetting.java @@ -52,6 +52,7 @@ import android.text.TextUtils; import android.util.Log; import android.view.MenuItem; import android.widget.ListAdapter; +import android.widget.Toast; import com.android.ims.ImsManager; import com.android.internal.telephony.CallForwardInfo; @@ -1123,6 +1124,14 @@ public class CallFeaturesSetting extends PreferenceActivity super.onCreate(icicle); if (DBG) log("onCreate: Intent is " + getIntent()); + // Make sure we are running as the primary user. + if (UserHandle.myUserId() != UserHandle.USER_OWNER) { + Toast.makeText(this, R.string.call_settings_primary_user_only, + Toast.LENGTH_SHORT).show(); + finish(); + return; + } + mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); mVmProviderSettingsUtil = new VoicemailProviderSettingsUtil(getApplicationContext()); |