resolve merge conflicts of e8411c4454
to master
Test: make RunSettingsRoboTests Test: I solemnly swear I tested this conflict resolution. Change-Id: I7575438bf364f3f4a6ea0372e6216fd5d5a5bb69
This commit is contained in:
@@ -17,20 +17,14 @@
|
||||
package com.android.settings.dashboard.suggestions;
|
||||
|
||||
import android.app.AutomaticZenRule;
|
||||
import android.app.IWallpaperManager;
|
||||
import android.app.IWallpaperManager.Stub;
|
||||
import android.app.IWallpaperManagerCallback;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.WallpaperManager;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.ims.ImsManager;
|
||||
import com.android.settings.Settings.CameraLiftTriggerSuggestionActivity;
|
||||
@@ -51,10 +45,14 @@ import java.util.Collection;
|
||||
*/
|
||||
public class SuggestionsChecks {
|
||||
|
||||
private static final String TAG = "SuggestionsChecks";
|
||||
private final Context mContext;
|
||||
|
||||
private final WallpaperManagerWrapper mWallpaperManager;
|
||||
|
||||
public SuggestionsChecks(Context context) {
|
||||
mContext = context.getApplicationContext();
|
||||
mWallpaperManager = new WallpaperManagerWrapper(mContext);
|
||||
}
|
||||
|
||||
public boolean isSuggestionComplete(Tile suggestion) {
|
||||
@@ -80,7 +78,7 @@ public class SuggestionsChecks {
|
||||
}
|
||||
|
||||
SuggestionFeatureProvider provider =
|
||||
FeatureFactory.getFactory(mContext).getSuggestionFeatureProvider(mContext);
|
||||
FeatureFactory.getFactory(mContext).getSuggestionFeatureProvider(mContext);
|
||||
if (provider != null && provider.isPresent(className)) {
|
||||
return provider.isSuggestionCompleted(mContext);
|
||||
}
|
||||
@@ -118,16 +116,9 @@ public class SuggestionsChecks {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean hasWallpaperSet() {
|
||||
IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE);
|
||||
IWallpaperManager service = Stub.asInterface(b);
|
||||
try {
|
||||
return !service.isSetWallpaperAllowed(mContext.getOpPackageName()) ||
|
||||
service.getWallpaper(mCallback, WallpaperManager.FLAG_SYSTEM,
|
||||
new Bundle(), mContext.getUserId()) != null;
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
return false;
|
||||
@VisibleForTesting
|
||||
boolean hasWallpaperSet() {
|
||||
return mWallpaperManager.getWallpaperId(WallpaperManager.FLAG_SYSTEM) > 0;
|
||||
}
|
||||
|
||||
private boolean isFingerprintEnabled() {
|
||||
@@ -143,11 +134,4 @@ public class SuggestionsChecks {
|
||||
Settings.Secure.CAMERA_LIFT_TRIGGER_ENABLED, 0);
|
||||
return triggerEnabled == 1;
|
||||
}
|
||||
|
||||
private final IWallpaperManagerCallback mCallback = new IWallpaperManagerCallback.Stub() {
|
||||
@Override
|
||||
public void onWallpaperChanged() throws RemoteException {
|
||||
// Don't care.
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user