SetupWizard: Temporary compile fixes.

Change-Id: Iffdbb3b38aef75f14dcb0957df8dda13f844159b
This commit is contained in:
Adnan Begovic
2015-10-14 12:44:53 -07:00
parent f29f92dcac
commit 307e587a3a
6 changed files with 46 additions and 49 deletions

View File

@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.pm.ComponentInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.hardware.fingerprint.FingerprintManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
@@ -36,8 +37,7 @@ import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.android.internal.os.IKillSwitchService;
import com.android.internal.widget.LockPatternUtils;
/*import com.android.internal.os.IKillSwitchService;*/
import com.cyanogenmod.setupwizard.SetupWizardApp;
import com.google.android.gms.common.ConnectionResult;
@@ -90,7 +90,7 @@ public class SetupWizardUtils {
android.provider.Settings.Global.putInt(context.getContentResolver(),
android.provider.Settings.Global.MOBILE_DATA + phoneId, enabled ? 1 : 0);
int subId = SubscriptionManager.getDefaultDataSubId();
tm.setDataEnabledUsingSubId(subId, enabled);
tm.setDataEnabled(subId, enabled);
} else {
android.provider.Settings.Global.putInt(context.getContentResolver(),
android.provider.Settings.Global.MOBILE_DATA, enabled ? 1 : 0);
@@ -131,7 +131,7 @@ public class SetupWizardUtils {
}
public static boolean isDeviceLocked() {
IBinder b = ServiceManager.getService(Context.KILLSWITCH_SERVICE);
/* IBinder b = ServiceManager.getService(Context.KILLSWITCH_SERVICE);
IKillSwitchService service = IKillSwitchService.Stub.asInterface(b);
if (service != null) {
try {
@@ -139,7 +139,7 @@ public class SetupWizardUtils {
} catch (Exception e) {
// silently fail
}
}
}*/
return false;
}
@@ -152,7 +152,7 @@ public class SetupWizardUtils {
}
public static boolean hasKillSwitch() {
IBinder b = ServiceManager.getService(Context.KILLSWITCH_SERVICE);
/* IBinder b = ServiceManager.getService(Context.KILLSWITCH_SERVICE);
IKillSwitchService service = IKillSwitchService.Stub.asInterface(b);
if (service != null) {
try {
@@ -160,7 +160,7 @@ public class SetupWizardUtils {
} catch (Exception e) {
// silently fail
}
}
} */
return false;
}
@@ -278,8 +278,9 @@ public class SetupWizardUtils {
}
public static boolean hasFingerprint(Context context) {
LockPatternUtils lockPatternUtils = new LockPatternUtils(context);
return lockPatternUtils.isFingerprintInstalled(context);
FingerprintManager fingerprintManager = (FingerprintManager)
context.getSystemService(Context.FINGERPRINT_SERVICE);
return fingerprintManager.isHardwareDetected();
}
public static final ComponentName mTvwifisettingsActivity =