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

Commit af0fec4b authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [2467803, 2467786, 2467717, 2467598, 2467823, 2467734,...

Merge cherrypicks of [2467803, 2467786, 2467717, 2467598, 2467823, 2467734, 2467671, 2467718, 2467599, 2467753, 2467672, 2467600, 2467735, 2467841, 2467638, 2467824, 2467736, 2467754, 2467737, 2467674] into oc-release

Change-Id: Id09e872fb1d3bb98329812eecb69e201e95698d6
parents 430f5c3d d3e4d4f2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -360,6 +360,9 @@ public class CaptivePortalLoginActivity extends Activity {
                return;
            } else if (mPagesLoaded == 2) {
                // Prevent going back to empty first page.
                // Fix for missing focus, see b/62449959 for details. Remove it once we get a
                // newer version of WebView (60.x.y).
                view.requestFocus();
                view.clearHistory();
            }
            testForCaptivePortal();
+1 −3
Original line number Diff line number Diff line
@@ -28,10 +28,8 @@ import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.InputType;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
@@ -248,9 +246,9 @@ public class PasswordTextView extends View {
            mText = mText.substring(0, length - 1);
            CharState charState = mTextChars.get(length - 1);
            charState.startRemoveAnimation(0, 0);
            sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length() - 1, 1, 0);
        }
        userActivity();
        sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length() - 1, 1, 0);
    }

    public String getText() {
+4 −0
Original line number Diff line number Diff line
@@ -334,6 +334,10 @@ public class MobileSignalController extends SignalController<
    }

    private boolean isRoaming() {
        // During a carrier change, roaming indications need to be supressed.
        if (isCarrierNetworkChangeActive()) {
            return false;
        }
        if (isCdma()) {
            final int iconMode = mServiceState.getCdmaEriIconMode();
            return mServiceState.getCdmaEriIconIndex() != EriInfo.ROAMING_INDICATOR_OFF
+73 −0
Original line number Diff line number Diff line
@@ -496,6 +496,79 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
              DEFAULT_ICON /* typeIcon */);
    }

    @Test
    public void testCarrierNetworkChange_roamingBeforeNetworkChange() {
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;

      setupDefaultSignal();
      setLevel(strength);
      setGsmRoaming(true);

      // Verify baseline
      verifyLastMobileDataIndicators(true /* visible */,
              strength /* strengthIcon */,
              DEFAULT_ICON /* typeIcon */,
              true /* roaming */);

      // API call is made
      setCarrierNetworkChange(true /* enabled */);

      // Carrier network change is true, show special indicator, no roaming.
      verifyLastMobileDataIndicators(true /* visible */,
              SignalDrawable.getCarrierChangeState(SignalStrength.NUM_SIGNAL_STRENGTH_BINS),
              0 /* typeIcon */,
              false /* roaming */);

      // Revert back
      setCarrierNetworkChange(false /* enabled */);

      // Verify back in previous state
      verifyLastMobileDataIndicators(true /* visible */,
              strength /* strengthIcon */,
              DEFAULT_ICON /* typeIcon */,
              true /* roaming */);
    }

    @Test
    public void testCarrierNetworkChange_roamingAfterNetworkChange() {
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;

      setupDefaultSignal();
      setLevel(strength);

      // Verify baseline
      verifyLastMobileDataIndicators(true /* visible */,
              strength /* strengthIcon */,
              DEFAULT_ICON /* typeIcon */,
              false /* roaming */);

      // API call is made
      setCarrierNetworkChange(true /* enabled */);

      // Carrier network change is true, show special indicator, no roaming.
      verifyLastMobileDataIndicators(true /* visible */,
              SignalDrawable.getCarrierChangeState(SignalStrength.NUM_SIGNAL_STRENGTH_BINS),
              0 /* typeIcon */,
              false /* roaming */);

      setGsmRoaming(true);

      // Roaming should not show.
      verifyLastMobileDataIndicators(true /* visible */,
              SignalDrawable.getCarrierChangeState(SignalStrength.NUM_SIGNAL_STRENGTH_BINS),
              0 /* typeIcon */,
              false /* roaming */);

      // Revert back
      setCarrierNetworkChange(false /* enabled */);

      // Verify back in previous state
      verifyLastMobileDataIndicators(true /* visible */,
              strength /* strengthIcon */,
              DEFAULT_ICON /* typeIcon */,
              true /* roaming */);
    }

    private void verifyEmergencyOnly(boolean isEmergencyOnly) {
        ArgumentCaptor<Boolean> emergencyOnly = ArgumentCaptor.forClass(Boolean.class);
        Mockito.verify(mCallbackHandler, Mockito.atLeastOnce()).setEmergencyCallsOnly(
+6 −4
Original line number Diff line number Diff line
@@ -5666,14 +5666,16 @@ public class BackupManagerService {
                PerformFullTransportBackupTask pftbt = null;
                synchronized (mQueueLock) {
                    if (mRunningFullBackupTask != null) {
                        if (DEBUG_SCHEDULING) {
                            Slog.i(TAG, "Telling running backup to stop");
                        }
                        pftbt = mRunningFullBackupTask;
                    }
                }
                if (pftbt != null) {
                    if (DEBUG_SCHEDULING) {
                        Slog.i(TAG, "Telling running backup to stop");
                    }
                    pftbt.handleCancel(true);
                }
            }
        };
        new Thread(endFullBackupRunnable, "end-full-backup").start();
    }
Loading