Refactor the OpenSupportedLinks
- Use the AppInfoWithHeader to replace the DashboardFragment. - It provide the AppHeader controller and handle the app update/remove event. Fixes: 147996227 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.applications.OpenSupportedLinksTest Change-Id: I1633c39fc926805a379c5c31845897914e5181a6
This commit is contained in:
@@ -28,7 +28,6 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
||||
@@ -50,8 +49,6 @@ public class AppLaunchSettings extends AppInfoWithHeader implements OnClickListe
|
||||
private static final String FRAGMENT_OPEN_SUPPORTED_LINKS =
|
||||
"com.android.settings.applications.OpenSupportedLinks";
|
||||
|
||||
public static final String KEY_PACKAGE_INFO = "pkg_info";
|
||||
|
||||
private static final Intent sBrowserIntent;
|
||||
|
||||
static {
|
||||
@@ -79,7 +76,8 @@ public class AppLaunchSettings extends AppInfoWithHeader implements OnClickListe
|
||||
mAppLinkState = findPreference(KEY_APP_LINK_STATE);
|
||||
mAppLinkState.setOnPreferenceClickListener(preference -> {
|
||||
final Bundle args = new Bundle();
|
||||
args.putParcelable(KEY_PACKAGE_INFO, this.mPackageInfo);
|
||||
args.putString(ARG_PACKAGE_NAME, mPackageName);
|
||||
args.putInt(ARG_PACKAGE_UID, mUserId);
|
||||
|
||||
new SubSettingLauncher(this.getContext())
|
||||
.setDestination(FRAGMENT_OPEN_SUPPORTED_LINKS)
|
||||
@@ -145,7 +143,6 @@ public class AppLaunchSettings extends AppInfoWithHeader implements OnClickListe
|
||||
private void setAppLinkStateSummary() {
|
||||
final int state = mPm.getIntentVerificationStatusAsUser(mPackageName,
|
||||
UserHandle.myUserId());
|
||||
Log.d("[sunny]", "setAppLinkStateSummary+ state=" + state);
|
||||
mAppLinkState.setSummary(linkStateToResourceId(state));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user