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

Commit b56c4e32 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" am: eeb7c0d1

Original change: https://android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/1640984

Change-Id: Id6c9cc843e7cdfe25c3bb56040d9759203949e56
parents bde1785a eeb7c0d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public abstract class CaptivePortalDataShimImpl implements CaptivePortalDataShim
    }

    @Override
    public String getVenueFriendlyName() {
    public CharSequence getVenueFriendlyName() {
        // Not supported in API level 29
        return null;
    }
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ public class CaptivePortalDataShimImpl
    }

    @Override
    public String getVenueFriendlyName() {
    public CharSequence getVenueFriendlyName() {
        return mData.getVenueFriendlyName();
    }

+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ public interface CaptivePortalDataShim {
    /**
     * @see CaptivePortalData#getVenueFriendlyName()
     */
    String getVenueFriendlyName();
    CharSequence getVenueFriendlyName();

    /**
     * @see CaptivePortalData#getUserPortalUrlSource()
+4 −4
Original line number Diff line number Diff line
@@ -237,8 +237,8 @@ public class NetworkStackNotifier {

            // If the venue friendly name is available (in Passpoint use-case), display it.
            // Otherwise, display the SSID.
            final String friendlyName = capportData.getVenueFriendlyName();
            final String venueDisplayName = TextUtils.isEmpty(friendlyName)
            final CharSequence friendlyName = capportData.getVenueFriendlyName();
            final CharSequence venueDisplayName = TextUtils.isEmpty(friendlyName)
                    ? getSsid(networkStatus) : friendlyName;

            builder = getNotificationBuilder(channel, networkStatus, res, venueDisplayName)
@@ -284,9 +284,9 @@ public class NetworkStackNotifier {

    private Notification.Builder getNotificationBuilder(@NonNull String channelId,
            @NonNull TrackedNetworkStatus networkStatus, @NonNull Resources res,
            @NonNull String ssid) {
            @NonNull CharSequence networkIdentifier) {
        return new Notification.Builder(mContext, channelId)
                .setContentTitle(ssid)
                .setContentTitle(networkIdentifier)
                .setSmallIcon(R.drawable.icon_wifi);
    }