Revert "Prevent accounts page directly opening in screen pinning mode"
This reverts commit f3242dab35
.
Reason for revert: use another way to handle this.
Change-Id: I83c97db5189cfda3a09f5249d8591ea91dbd3bcb
This commit is contained in:
@@ -15,17 +15,11 @@
|
||||
*/
|
||||
package com.android.settings.accounts;
|
||||
|
||||
import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED;
|
||||
import static android.provider.Settings.EXTRA_AUTHORITIES;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
@@ -46,14 +40,6 @@ public class AccountDashboardFragment extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "AccountDashboardFrag";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
if (isLockTaskModePinned()) {
|
||||
Log.w(TAG, "Devices lock task mode pinned.");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
@@ -97,13 +83,6 @@ public class AccountDashboardFragment extends DashboardFragment {
|
||||
return controllers;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
boolean isLockTaskModePinned() {
|
||||
final ActivityManager activityManager =
|
||||
getContext().getSystemService(ActivityManager.class);
|
||||
return activityManager.getLockTaskModeState() == LOCK_TASK_MODE_PINNED;
|
||||
}
|
||||
|
||||
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user