Home
last modified time | relevance | path

Searched refs:AnomalyDatabaseHelper (Results 1 – 17 of 17) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryDatabaseManagerTest.java27 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
94 AnomalyDatabaseHelper.State.NEW, NOW); in allAnomalyFunctions()
96 AnomalyDatabaseHelper.State.NEW, TWO_DAYS_BEFORE); in allAnomalyFunctions()
100 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
105 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
112 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
119 AnomalyDatabaseHelper.State.NEW, NOW); in updateAnomalies_updateSuccessfully()
121 AnomalyDatabaseHelper.State.NEW, NOW); in updateAnomalies_updateSuccessfully()
128 AnomalyDatabaseHelper.State.HANDLED); in updateAnomalies_updateSuccessfully()
132 AnomalyDatabaseHelper.State.NEW); in updateAnomalies_updateSuccessfully()
[all …]
DRestrictedAppDetailsTest.java42 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
133 .queryActionTime(AnomalyDatabaseHelper.ActionType.RESTRICTION); in refreshUi_displayPreference()
DBatteryUtilsTest.java55 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
371 eq(AnomalyDatabaseHelper.ActionType.RESTRICTION), eq(UID), in testSetForceAppStandby_restrictApp_recordTime()
379 verify(mBatteryDatabaseManager).deleteAction(AnomalyDatabaseHelper.ActionType.RESTRICTION, in testSetForceAppStandby_unrestrictApp_deleteTime()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/
DBatteryDatabaseManager.java22 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.ANOMAL…
23 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.ANOMAL…
24 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.PACKAG…
25 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.TIME_S…
26 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.UID;
27 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.Tables.TABLE_ACTION;
28 import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.Tables.TABLE_ANOMALY;
40 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.ActionColumns;
56 private AnomalyDatabaseHelper mDatabaseHelper;
59 mDatabaseHelper = AnomalyDatabaseHelper.getInstance(context); in BatteryDatabaseManager()
[all …]
DAnomalyDatabaseHelper.java32 public class AnomalyDatabaseHelper extends SQLiteOpenHelper { class
137 private static AnomalyDatabaseHelper sSingleton;
139 public static synchronized AnomalyDatabaseHelper getInstance(Context context) { in getInstance()
141 sSingleton = new AnomalyDatabaseHelper(context.getApplicationContext()); in getInstance()
146 private AnomalyDatabaseHelper(Context context) { in AnomalyDatabaseHelper() method in AnomalyDatabaseHelper
DAnomalyDetectionJobService.java166 AnomalyDatabaseHelper.State.AUTO_HANDLED, in saveAnomalyToDatabase()
170 AnomalyDatabaseHelper.State.NEW, in saveAnomalyToDatabase()
DBatteryTipUtils.java135 .queryAllAnomalies(timeAfterMs, AnomalyDatabaseHelper.State.NEW); in detectAnomalies()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DRestrictAppDetectorTest.java34 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
126 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.NEW)); in testDetect_hasAnomaly_tipNew()
138 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.NEW)); in testDetect_hasAutoHandledAnomaly_tipHandled()
140 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.AUTO_HANDLED)); in testDetect_hasAutoHandledAnomaly_tipHandled()
152 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.NEW)); in testDetect_typeNewHasUninstalledAnomaly_removeIt()
167 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.NEW)); in testDetect_typeNewHasRestrictedAnomaly_removeIt()
185 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.NEW)); in testDetect_typeHandledHasUnRestrictedAnomaly_removeIt()
187 .queryAllAnomalies(anyLong(), eq(AnomalyDatabaseHelper.State.AUTO_HANDLED)); in testDetect_typeHandledHasUnRestrictedAnomaly_removeIt()
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/
DDatabaseTestUtils.java21 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
43 AnomalyDatabaseHelper helper = AnomalyDatabaseHelper.getInstance(context); in clearAnomalyDb()
46 ReflectionHelpers.setStaticField(AnomalyDatabaseHelper.class, "sSingleton", null); in clearAnomalyDb()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DAnomalyCleanupJobServiceTest.java114 AnomalyDatabaseHelper.State.NEW, TIMESTAMP_NOW); in onStartJob_cleanUpDataBefore30days()
116 AnomalyDatabaseHelper.State.NEW, TIMESTAMP_31_DAYS_BEFORE); in onStartJob_cleanUpDataBefore30days()
122 AnomalyDatabaseHelper.State.NEW); in onStartJob_cleanUpDataBefore30days()
DAnomalyDetectionJobServiceTest.java233 eq(AnomalyDatabaseHelper.State.AUTO_HANDLED), anyLong()); in saveAnomalyToDatabase_normalAppWithAutoRestriction_save()
258 eq(AnomalyDatabaseHelper.State.NEW), anyLong()); in saveAnomalyToDatabase_normalAppWithoutAutoRestriction_save()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/actions/
DOpenRestrictAppFragmentAction.java25 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
62 AnomalyDatabaseHelper.State.HANDLED)); in handlePositiveAction()
DRestrictAppAction.java27 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
82 mBatteryDatabaseManager.updateAnomalies(appInfos, AnomalyDatabaseHelper.State.HANDLED); in handlePositiveAction()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DRestrictAppDetector.java25 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
78 oneDayBeforeMs, AnomalyDatabaseHelper.State.AUTO_HANDLED); in detect()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/actions/
DOpenRestrictAppFragmentActionTest.java26 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
98 AnomalyDatabaseHelper.State.HANDLED); in testHandlePositiveAction()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryUtils.java44 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
343 batteryDatabaseManager.insertAction(AnomalyDatabaseHelper.ActionType.RESTRICTION, in setForceAppStandby()
346 batteryDatabaseManager.deleteAction(AnomalyDatabaseHelper.ActionType.RESTRICTION, in setForceAppStandby()
DRestrictedAppDetails.java39 import com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper;
148 .queryActionTime(AnomalyDatabaseHelper.ActionType.RESTRICTION); in refreshUi()