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

Commit ad769435 authored by Neil Fuller's avatar Neil Fuller
Browse files

Remove android.telephony.action.NETWORK_SET_TIME

Remove the now-unused android.telephony.action.NETWORK_SET_TIME
intent.

Bug: 140712361
Test: treehugger
Test: atest com.android.server.timedetector
Change-Id: Ifa64d0dfa82a2db7742c0b3fcc76ad73b231a9f9
parent 10076e75
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10467,7 +10467,6 @@ package android.telephony {
    field public static final String ACTION_EMERGENCY_ASSISTANCE = "android.telephony.action.EMERGENCY_ASSISTANCE";
    field public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED";
    field public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED";
    field public static final String ACTION_NETWORK_SET_TIME = "android.telephony.action.NETWORK_SET_TIME";
    field public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE = "com.android.omadm.service.CONFIGURATION_UPDATE";
    field public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS = "android.telephony.action.SHOW_NOTICE_ECM_BLOCK_OTHERS";
    field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
+0 −4
Original line number Diff line number Diff line
@@ -639,10 +639,6 @@

    <protected-broadcast android:name="android.intent.action.DEVICE_CUSTOMIZATION_READY" />

    <!-- NETWORK_SET_TIME moved from com.android.phone to system server. It should ultimately be
         removed. -->
    <protected-broadcast android:name="android.telephony.action.NETWORK_SET_TIME" />

    <!-- For tether entitlement recheck-->
    <protected-broadcast
        android:name="com.android.server.connectivity.tethering.PROVISIONING_RECHECK_ALARM" />
+0 −4
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.annotation.Nullable;
import android.app.timedetector.ManualTimeSuggestion;
import android.app.timedetector.NetworkTimeSuggestion;
import android.app.timedetector.PhoneTimeSuggestion;
import android.content.Intent;
import android.os.TimestampedValue;

import java.io.PrintWriter;
@@ -73,9 +72,6 @@ public interface TimeDetectorStrategy {

        /** Release the wake lock acquired by a call to {@link #acquireWakeLock()}. */
        void releaseWakeLock();

        /** Send the supplied intent as a stick broadcast. */
        void sendStickyBroadcast(@NonNull Intent intent);
    }

    /** Initialize the strategy. */
+0 −7
Original line number Diff line number Diff line
@@ -20,11 +20,9 @@ import android.annotation.NonNull;
import android.app.AlarmManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Slog;

@@ -112,11 +110,6 @@ public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrat
        mWakeLock.release();
    }

    @Override
    public void sendStickyBroadcast(@NonNull Intent intent) {
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }

    private void checkWakeLockHeld() {
        if (!mWakeLock.isHeld()) {
            Slog.wtf(TAG, "WakeLock " + mWakeLock + " not held");
+0 −13
Original line number Diff line number Diff line
@@ -23,9 +23,7 @@ import android.app.AlarmManager;
import android.app.timedetector.ManualTimeSuggestion;
import android.app.timedetector.NetworkTimeSuggestion;
import android.app.timedetector.PhoneTimeSuggestion;
import android.content.Intent;
import android.os.TimestampedValue;
import android.telephony.TelephonyManager;
import android.util.LocalLog;
import android.util.Slog;

@@ -535,17 +533,6 @@ public final class TimeDetectorStrategyImpl implements TimeDetectorStrategy {
        } else {
            mLastAutoSystemClockTimeSet = null;
        }

        // Historically, Android has sent a TelephonyManager.ACTION_NETWORK_SET_TIME broadcast only
        // when setting the time using NITZ.
        if (origin == ORIGIN_PHONE) {
            // Send a broadcast that telephony code used to send after setting the clock.
            // TODO Remove this broadcast as soon as there are no remaining listeners.
            Intent intent = new Intent(TelephonyManager.ACTION_NETWORK_SET_TIME);
            intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
            intent.putExtra("time", newSystemClockMillis);
            mCallback.sendStickyBroadcast(intent);
        }
    }

    /**
Loading