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:
LuK1337
2021-05-20 22:07:13 +02:00
committed by Bruno Martins
parent 3a38117e81
commit feae6f7481
2 changed files with 2 additions and 10 deletions

View File

@@ -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

View File

@@ -3001,8 +3001,10 @@ public final class LineageSettings {
/**
* The hostname for this device
* @deprecated
* @hide
*/
@Deprecated
public static final String DEVICE_HOSTNAME = "device_hostname";
/**