Conditionally remove settings that aren't required on the tablet.

Bug: 2985267

Changes not done : SD card related stuff, as we need some way still
to figure out if there is a real SD card in the device.

Change-Id: I21c41f18ebe6c050981918481a7f6d69f04b65d0
This commit is contained in:
Amith Yamasani
2010-09-11 14:17:31 -07:00
parent cc0e4db618
commit 60133dd036
7 changed files with 68 additions and 39 deletions

View File

@@ -16,23 +16,24 @@
package com.android.settings;
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.SystemProperties;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.SystemProperties;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import java.util.List;
public class Utils {
/**
@@ -207,4 +208,13 @@ public class Utils {
public static boolean isMonkeyRunning() {
return SystemProperties.getBoolean("ro.monkey", false);
}
/**
* Returns whether the device is voice-capable (meaning, it is also a phone).
*/
public static boolean isVoiceCapable(Context context) {
TelephonyManager telephony =
(TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
return telephony != null && telephony.isVoiceCapable();
}
}