Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit feae6f74 authored by LuK1337's avatar LuK1337 Committed by Bruno Martins
Browse files

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
parent 3a38117e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -3001,8 +3001,10 @@ public final class LineageSettings {

        /**
         * The hostname for this device
         * @deprecated
         * @hide
         */
        @Deprecated
        public static final String DEVICE_HOSTNAME = "device_hostname";

        /**