lineage-sdk: Mark DEVICE_HOSTNAME as deprecated and drop code using it
* AOSP feature is now in place, which uses device name as DHCP hostname. Change-Id: I4adbaca2d980017e5cd81e200729f03b245c6a3e
This commit is contained in:
@@ -17,10 +17,8 @@
|
||||
package org.lineageos.platform.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemProperties;
|
||||
|
||||
import lineageos.app.LineageContextConstants;
|
||||
import lineageos.providers.LineageSettings;
|
||||
|
||||
/** @hide */
|
||||
public class LineageSettingsService extends LineageSystemService {
|
||||
@@ -41,14 +39,6 @@ public class LineageSettingsService extends LineageSystemService {
|
||||
|
||||
@Override
|
||||
public void onBootPhase(int phase) {
|
||||
if (phase == PHASE_BOOT_COMPLETED) {
|
||||
// Load custom hostname
|
||||
String hostname = LineageSettings.Secure.getString(mContext.getContentResolver(),
|
||||
LineageSettings.Secure.DEVICE_HOSTNAME);
|
||||
if (hostname != null) {
|
||||
SystemProperties.set("net.hostname", hostname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3001,8 +3001,10 @@ public final class LineageSettings {
|
||||
|
||||
/**
|
||||
* The hostname for this device
|
||||
* @deprecated
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String DEVICE_HOSTNAME = "device_hostname";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user