From a17800612ba45e9ca1826cb67adf0ca2e7883561 Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 18 Feb 2020 15:06:20 -0800 Subject: [WifiTrackerLib] Add subscription management API to WifiEntry Add APIs for starting subscription management flows from WifiEntry. Bug: 146652802 Test: atest WifiTrackerLibTests Change-Id: I869a83586d28ad362a28f65d4564a9c01360dee4 --- .../src/com/android/wifitrackerlib/WifiEntry.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libs') diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java index 4753cf3c3..4f186ef26 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java @@ -386,6 +386,17 @@ public abstract class WifiEntry implements Comparable { /** Returns whether subscription of the entry is expired */ public abstract boolean isExpired(); + /** Returns whether a user can manage their subscription through this WifiEntry */ + public boolean canManageSubscription() { + // Subclasses should implement this method. + return false; + }; + + /** Allows the user to manage their subscription via an external flow */ + public void manageSubscription() { + // Subclasses should implement this method. + }; + /** Returns the ScanResult information of a WifiEntry */ abstract String getScanResultDescription(); -- cgit v1.2.3