aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSam Mortimer <sam@mortimer.me.uk>2017-09-18 19:44:11 -0700
committerSam Mortimer <sam@mortimer.me.uk>2017-10-06 09:40:24 -0700
commit542742b751c961881ff88322aec08c91f4185037 (patch)
treeeea4b42dd4ff4670933c1fb203673222780b6a17 /tests
parent5ede05bdca6e034d84ff77224e5ce8d6b8029ef6 (diff)
downloadlineage-sdk-542742b751c961881ff88322aec08c91f4185037.tar.gz
lineage-sdk-542742b751c961881ff88322aec08c91f4185037.tar.bz2
lineage-sdk-542742b751c961881ff88322aec08c91f4185037.zip
lineage-sdk: rebrand step 2: update file contents
Change-Id: I9881acc57cdc0aeea2b296aac12a8af932d30aea
Diffstat (limited to 'tests')
-rw-r--r--tests/Android.mk10
-rw-r--r--tests/AndroidManifest.xml56
-rw-r--r--tests/README.md4
-rw-r--r--tests/res/values/strings.xml6
-rw-r--r--tests/src/org/lineageos/tests/LineageOSTestApplication.java4
-rw-r--r--tests/src/org/lineageos/tests/TestActivity.java2
-rw-r--r--tests/src/org/lineageos/tests/alarmclock/LineageAlarmClockTest.java22
-rw-r--r--tests/src/org/lineageos/tests/common/MockIBinderStubForInterface.java2
-rw-r--r--tests/src/org/lineageos/tests/common/ThreadServiceTestCase.java2
-rw-r--r--tests/src/org/lineageos/tests/customtiles/DummySettings.java2
-rw-r--r--tests/src/org/lineageos/tests/customtiles/LineageStatusBarTest.java120
-rw-r--r--tests/src/org/lineageos/tests/customtiles/unit/CustomTileBuilderTest.java20
-rw-r--r--tests/src/org/lineageos/tests/customtiles/unit/CustomTileTest.java14
-rw-r--r--tests/src/org/lineageos/tests/customtiles/unit/LineageStatusBarManagerTest.java46
-rw-r--r--tests/src/org/lineageos/tests/customtiles/unit/StatusBarPanelCustomTileTest.java16
-rw-r--r--tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalProviderTest.java14
-rw-r--r--tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalViewTest.java12
-rw-r--r--tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/ViewProviderService.java4
-rw-r--r--tests/src/org/lineageos/tests/hardware/LineageHardwareTest.java122
-rw-r--r--tests/src/org/lineageos/tests/hardware/unit/DisplayModeTest.java8
-rw-r--r--tests/src/org/lineageos/tests/hardware/unit/LineageHardwareManagerTest.java22
-rw-r--r--tests/src/org/lineageos/tests/hardware/unit/LiveDisplayManagerTest.java26
-rw-r--r--tests/src/org/lineageos/tests/hardware/unit/PersistentStorageTest.java18
-rw-r--r--tests/src/org/lineageos/tests/hardware/unit/UniqueDeviceIDTest.java24
-rw-r--r--tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java4
-rw-r--r--tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java4
-rw-r--r--tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java16
-rw-r--r--tests/src/org/lineageos/tests/media/unit/LineageAudioManagerTest.java36
-rw-r--r--tests/src/org/lineageos/tests/power/unit/PerfomanceManagerTest.java44
-rw-r--r--tests/src/org/lineageos/tests/profiles/ProfileTest.java22
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/AirplaneModeSettingsTest.java4
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/BrightnessSettingsTest.java4
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/ConnectionSettingsTest.java4
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/LockSettingsTest.java6
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/ProfileManagerTest.java38
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/ProfileTest.java20
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/RingModeSettingsTest.java4
-rw-r--r--tests/src/org/lineageos/tests/profiles/unit/StreamSettingsTest.java4
-rw-r--r--tests/src/org/lineageos/tests/providers/LineageSettingsTest.java54
-rw-r--r--tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java10
-rw-r--r--tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java14
-rw-r--r--tests/src/org/lineageos/tests/telephony/LineageTelephonyTest.java70
-rw-r--r--tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestBuilderTest.java4
-rw-r--r--tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestTest.java4
-rw-r--r--tests/src/org/lineageos/tests/themes/unit/ThemeManagerTest.java22
-rw-r--r--tests/src/org/lineageos/tests/themes/unit/ThemesContractTests.java4
-rw-r--r--tests/src/org/lineageos/tests/util/ColorUtilTest.java4
-rw-r--r--tests/src/org/lineageos/tests/versioning/VersioningTest.java18
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/BinderTransactionTest.java18
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/BuildTest.java14
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/ClassPathException.java2
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/ClassPathTest.java6
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/MagicalDexHelper.java2
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java14
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java10
-rw-r--r--tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java28
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/DayForecastBuilderTest.java6
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/LineageWeatherManagerTest.java56
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/MockWeatherProviderService.java6
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/ServiceRequestResultBuilderTest.java10
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/WeatherInfoBuilderTest.java6
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/WeatherLocationBuilderTest.java4
-rw-r--r--tests/src/org/lineageos/tests/weather/unit/WeatherProviderServiceTest.java34
63 files changed, 603 insertions, 603 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index 5046bc4e..2cbb309f 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -19,7 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := \
- org.cyanogenmod.platform.sdk \
+ org.lineageos.platform.sdk \
android-support-test \
mockito-target
@@ -27,7 +27,7 @@ LOCAL_DEX_PREOPT := false
LOCAL_SRC_FILES := $(call all-subdir-java-files, src/)
-LOCAL_PACKAGE_NAME := CMPlatformTests
+LOCAL_PACKAGE_NAME := LineagePlatformTests
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PROGUARD_ENABLED := optimization shrinktests
@@ -35,12 +35,12 @@ LOCAL_PROGUARD_FLAG_FILES := proguard.flags
include $(BUILD_PACKAGE)
-# Register as CMTS
+# Register as LineageTS
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := \
- org.cyanogenmod.platform.sdk \
+ org.lineageos.platform.sdk \
android-support-test \
mockito-target
@@ -53,4 +53,4 @@ LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PROGUARD_ENABLED := optimization shrinktests
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-include $(BUILD_CMTS_PACKAGE)
+include $(BUILD_LineageTS_PACKAGE)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index fe3099a6..d5892938 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.cyanogenmod.tests"
+ package="org.lineageos.tests"
android:versionCode="1"
android:versionName="1.0">
@@ -11,53 +11,53 @@
<uses-permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-permission android:name="cyanogenmod.permission.BIND_CUSTOM_TILE_LISTENER_SERVICE"/>
- <uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE"/>
- <uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS"/>
- <uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS"/>
- <uses-permission android:name="cyanogenmod.permission.MODIFY_NETWORK_SETTINGS" />
- <uses-permission android:name="cyanogenmod.permission.MODIFY_SOUND_SETTINGS" />
- <uses-permission android:name="cyanogenmod.permission.MANAGE_ALARMS" />
- <uses-permission android:name="cyanogenmod.permission.READ_ALARMS" />
- <uses-permission android:name="cyanogenmod.permission.MODIFY_MSIM_PHONE_STATE" />
- <uses-permission android:name="cyanogenmod.permission.READ_MSIM_PHONE_STATE" />
- <uses-permission android:name="cyanogenmod.permission.HARDWARE_ABSTRACTION_ACCESS" />
- <uses-permission android:name="cyanogenmod.permission.MODIFY_PROFILES" />
- <uses-permission android:name="cyanogenmod.permission.MANAGE_PERSISTENT_STORAGE" />
- <uses-permission android:name="cyanogenmod.permission.PERFORMANCE_ACCESS" />
- <uses-permission android:name="cyanogenmod.permission.READ_THEMES" />
- <uses-permission android:name="cyanogenmod.permission.WRITE_THEMES" />
- <uses-permission android:name="cyanogenmod.permission.ACCESS_THEME_MANAGER" />
- <uses-permission android:name="cyanogenmod.permission.MANAGE_LIVEDISPLAY" />
- <uses-permission android:name="cyanogenmod.permission.OBSERVE_AUDIO_SESSIONS" />
- <uses-permission android:name="cyanogenmod.permission.ACCESS_WEATHER_MANAGER" />
+ <uses-permission android:name="lineageos.permission.BIND_CUSTOM_TILE_LISTENER_SERVICE"/>
+ <uses-permission android:name="lineageos.permission.PUBLISH_CUSTOM_TILE"/>
+ <uses-permission android:name="lineageos.permission.WRITE_SETTINGS"/>
+ <uses-permission android:name="lineageos.permission.WRITE_SECURE_SETTINGS"/>
+ <uses-permission android:name="lineageos.permission.MODIFY_NETWORK_SETTINGS" />
+ <uses-permission android:name="lineageos.permission.MODIFY_SOUND_SETTINGS" />
+ <uses-permission android:name="lineageos.permission.MANAGE_ALARMS" />
+ <uses-permission android:name="lineageos.permission.READ_ALARMS" />
+ <uses-permission android:name="lineageos.permission.MODIFY_MSIM_PHONE_STATE" />
+ <uses-permission android:name="lineageos.permission.READ_MSIM_PHONE_STATE" />
+ <uses-permission android:name="lineageos.permission.HARDWARE_ABSTRACTION_ACCESS" />
+ <uses-permission android:name="lineageos.permission.MODIFY_PROFILES" />
+ <uses-permission android:name="lineageos.permission.MANAGE_PERSISTENT_STORAGE" />
+ <uses-permission android:name="lineageos.permission.PERFORMANCE_ACCESS" />
+ <uses-permission android:name="lineageos.permission.READ_THEMES" />
+ <uses-permission android:name="lineageos.permission.WRITE_THEMES" />
+ <uses-permission android:name="lineageos.permission.ACCESS_THEME_MANAGER" />
+ <uses-permission android:name="lineageos.permission.MANAGE_LIVEDISPLAY" />
+ <uses-permission android:name="lineageos.permission.OBSERVE_AUDIO_SESSIONS" />
+ <uses-permission android:name="lineageos.permission.ACCESS_WEATHER_MANAGER" />
<uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
- <application android:name=".CyanogenModTestApplication"
+ <application android:name=".LineageOSTestApplication"
android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<uses-library android:name="android.test.runner" />
- <activity android:name=".customtiles.CMStatusBarTest"
+ <activity android:name=".customtiles.LineageStatusBarTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
- <activity android:name=".settings.CMPartnerInterfaceTest"
+ <activity android:name=".settings.LineagePartnerInterfaceTest"
android:label="@string/settings_tests_activity_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
- <activity android:name=".alarmclock.CMAlarmClockTest"
+ <activity android:name=".alarmclock.LineageAlarmClockTest"
android:label="@string/alarm_tests_activity_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
- <activity android:name=".telephony.CMTelephonyTest"
+ <activity android:name=".telephony.LineageTelephonyTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
@@ -78,7 +78,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
- <activity android:name=".hardware.CMHardwareTest"
+ <activity android:name=".hardware.LineageHardwareTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
@@ -92,5 +92,5 @@
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="org.cyanogenmod.tests" />
+ android:targetPackage="org.lineageos.tests" />
</manifest>
diff --git a/tests/README.md b/tests/README.md
index 9d323573..9aebffc8 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,7 +1,7 @@
-## CM Platform SDK Tests
+## Lineage Platform SDK Tests
The tests package contains both functional manual tests as well as unit
tests which can be ran utilizing the InstrumentationTestRunner from android.
To run the tests (on a live device):
- ```adb shell am instrument -w org.cyanogenmod.tests/android.support.test.runner.AndroidJUnitRunner```
+ ```adb shell am instrument -w org.lineageos.tests/android.support.test.runner.AndroidJUnitRunner```
diff --git a/tests/res/values/strings.xml b/tests/res/values/strings.xml
index 6195f2bc..5cbd37c5 100644
--- a/tests/res/values/strings.xml
+++ b/tests/res/values/strings.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">CM Platform Tests</string>
- <string name="settings_tests_activity_name">CM Platform Settings Tests</string>
- <string name="alarm_tests_activity_name">CM Platform Alarm Clock Tests</string>
+ <string name="app_name">Lineage Platform Tests</string>
+ <string name="settings_tests_activity_name">Lineage Platform Settings Tests</string>
+ <string name="alarm_tests_activity_name">Lineage Platform Alarm Clock Tests</string>
</resources>
diff --git a/tests/src/org/lineageos/tests/LineageOSTestApplication.java b/tests/src/org/lineageos/tests/LineageOSTestApplication.java
index a7389082..0eb754e9 100644
--- a/tests/src/org/lineageos/tests/LineageOSTestApplication.java
+++ b/tests/src/org/lineageos/tests/LineageOSTestApplication.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests;
+package org.lineageos.tests;
import android.app.Application;
import android.content.Context;
@@ -22,7 +22,7 @@ import android.content.Context;
/**
* Created by adnan on 2/4/16.
*/
-public class CyanogenModTestApplication extends Application {
+public class LineageOSTestApplication extends Application {
private static Context sApplicationContext;
@Override
diff --git a/tests/src/org/lineageos/tests/TestActivity.java b/tests/src/org/lineageos/tests/TestActivity.java
index e692df48..9c8d8604 100644
--- a/tests/src/org/lineageos/tests/TestActivity.java
+++ b/tests/src/org/lineageos/tests/TestActivity.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests;
+package org.lineageos.tests;
import android.app.ListActivity;
import android.os.Bundle;
diff --git a/tests/src/org/lineageos/tests/alarmclock/LineageAlarmClockTest.java b/tests/src/org/lineageos/tests/alarmclock/LineageAlarmClockTest.java
index 83a1c1fb..a37860b5 100644
--- a/tests/src/org/lineageos/tests/alarmclock/LineageAlarmClockTest.java
+++ b/tests/src/org/lineageos/tests/alarmclock/LineageAlarmClockTest.java
@@ -1,4 +1,4 @@
-package org.cyanogenmod.tests.alarmclock;
+package org.lineageos.tests.alarmclock;
import android.content.Intent;
import android.database.Cursor;
@@ -7,15 +7,15 @@ import android.net.Uri;
import android.provider.AlarmClock;
import android.util.Log;
import android.widget.Toast;
-import cyanogenmod.alarmclock.ClockContract;
-import cyanogenmod.alarmclock.CyanogenModAlarmClock;
-import org.cyanogenmod.tests.TestActivity;
+import lineageos.alarmclock.ClockContract;
+import lineageos.alarmclock.LineageOSAlarmClock;
+import org.lineageos.tests.TestActivity;
/**
- * Tests functionality added in {@link cyanogenmod.alarmclock.CyanogenModAlarmClock}
+ * Tests functionality added in {@link lineageos.alarmclock.LineageOSAlarmClock}
*/
-public class CMAlarmClockTest extends TestActivity {
- private static final String TAG = "CMAlarmClockTest";
+public class LineageAlarmClockTest extends TestActivity {
+ private static final String TAG = "LineageAlarmClockTest";
private static final String[] ALARM_QUERY_COLUMNS = {
ClockContract.AlarmsColumns._ID,
@@ -51,7 +51,7 @@ public class CMAlarmClockTest extends TestActivity {
},
new Test("Test create alarm") {
public void run() {
- Intent intent = CyanogenModAlarmClock.createAlarmIntent(CMAlarmClockTest.this);
+ Intent intent = LineageOSAlarmClock.createAlarmIntent(LineageAlarmClockTest.this);
intent.putExtra(AlarmClock.EXTRA_HOUR, 13);
intent.putExtra(AlarmClock.EXTRA_MINUTES, 35);
intent.putExtra(AlarmClock.EXTRA_MESSAGE, "Test from third party!");
@@ -117,10 +117,10 @@ public class CMAlarmClockTest extends TestActivity {
* @return The Intent to launch that will perform this action.
*/
private Intent getIntentToSetAlarmEnabled(long alarmId, boolean enabledState) {
- Intent intent = new Intent(CyanogenModAlarmClock.ACTION_SET_ALARM_ENABLED);
+ Intent intent = new Intent(LineageOSAlarmClock.ACTION_SET_ALARM_ENABLED);
intent.setPackage("com.android.deskclock");
- intent.putExtra(CyanogenModAlarmClock.EXTRA_ALARM_ID, alarmId);
- intent.putExtra(CyanogenModAlarmClock.EXTRA_ENABLED, enabledState);
+ intent.putExtra(LineageOSAlarmClock.EXTRA_ALARM_ID, alarmId);
+ intent.putExtra(LineageOSAlarmClock.EXTRA_ENABLED, enabledState);
return intent;
}
diff --git a/tests/src/org/lineageos/tests/common/MockIBinderStubForInterface.java b/tests/src/org/lineageos/tests/common/MockIBinderStubForInterface.java
index e2f77028..79c61744 100644
--- a/tests/src/org/lineageos/tests/common/MockIBinderStubForInterface.java
+++ b/tests/src/org/lineageos/tests/common/MockIBinderStubForInterface.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.common;
+package org.lineageos.tests.common;
import android.os.IBinder;
import android.os.IInterface;
diff --git a/tests/src/org/lineageos/tests/common/ThreadServiceTestCase.java b/tests/src/org/lineageos/tests/common/ThreadServiceTestCase.java
index 4404377d..55807c5c 100644
--- a/tests/src/org/lineageos/tests/common/ThreadServiceTestCase.java
+++ b/tests/src/org/lineageos/tests/common/ThreadServiceTestCase.java
@@ -1,4 +1,4 @@
-package org.cyanogenmod.tests.common;
+package org.lineageos.tests.common;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;
diff --git a/tests/src/org/lineageos/tests/customtiles/DummySettings.java b/tests/src/org/lineageos/tests/customtiles/DummySettings.java
index ef7f1e6b..90333743 100644
--- a/tests/src/org/lineageos/tests/customtiles/DummySettings.java
+++ b/tests/src/org/lineageos/tests/customtiles/DummySettings.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles;
+package org.lineageos.tests.customtiles;
import android.os.Bundle;
import android.preference.PreferenceActivity;
diff --git a/tests/src/org/lineageos/tests/customtiles/LineageStatusBarTest.java b/tests/src/org/lineageos/tests/customtiles/LineageStatusBarTest.java
index 38ddca8a..f904b025 100644
--- a/tests/src/org/lineageos/tests/customtiles/LineageStatusBarTest.java
+++ b/tests/src/org/lineageos/tests/customtiles/LineageStatusBarTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles;
+package org.lineageos.tests.customtiles;
import android.app.PendingIntent;
import android.content.Intent;
@@ -24,21 +24,21 @@ import android.net.Uri;
import android.os.Handler;
import android.widget.RemoteViews;
-import cyanogenmod.app.CustomTile;
-import cyanogenmod.app.CMStatusBarManager;
+import lineageos.app.CustomTile;
+import lineageos.app.LineageStatusBarManager;
-import org.cyanogenmod.tests.R;
+import org.lineageos.tests.R;
-import org.cyanogenmod.tests.TestActivity;
+import org.lineageos.tests.TestActivity;
import java.util.ArrayList;
-public class CMStatusBarTest extends TestActivity {
+public class LineageStatusBarTest extends TestActivity {
private static final int CUSTOM_TILE_ID = 1337;
private static final int CUSTOM_TILE_SETTINGS_ID = 1336;
private CustomTile mCustomTile;
- private CMStatusBarManager mCMStatusBarManager;
+ private LineageStatusBarManager mLineageStatusBarManager;
Handler mHandler = new Handler();
@@ -49,23 +49,23 @@ public class CMStatusBarTest extends TestActivity {
@Override
protected Test[] tests() {
- mCMStatusBarManager = CMStatusBarManager.getInstance(this);
+ mLineageStatusBarManager = LineageStatusBarManager.getInstance(this);
return mTests;
}
private Test[] mTests = new Test[] {
new Test("test publish tile") {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
- mCustomTile = new CustomTile.Builder(CMStatusBarTest.this)
+ mCustomTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test From SDK")
.setIcon(R.drawable.ic_launcher)
.setOnClickIntent(intent)
.setContentDescription("Content description")
.build();
- mCMStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
+ mLineageStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
}
},
@@ -74,17 +74,17 @@ public class CMStatusBarTest extends TestActivity {
int resourceInt = R.drawable.ic_whatshot_white_24dp;
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
resourceInt);
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
- mCustomTile = new CustomTile.Builder(CMStatusBarTest.this)
+ mCustomTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test From SDK - remote icon")
.setIcon(bitmap)
.setOnClickIntent(intent)
.shouldCollapsePanel(true)
.setContentDescription("Content description")
.build();
- mCMStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
+ mLineageStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
}
},
@@ -92,17 +92,17 @@ public class CMStatusBarTest extends TestActivity {
public void run() {
mHandler.postDelayed(new Runnable() {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
- mCustomTile = new CustomTile.Builder(CMStatusBarTest.this)
+ mCustomTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test 3 seconds")
.setIcon(R.drawable.ic_launcher)
.setOnClickIntent(intent)
.shouldCollapsePanel(true)
.setContentDescription("Content description")
.build();
- mCMStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
+ mLineageStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
}
}, 3000);
}
@@ -112,14 +112,14 @@ public class CMStatusBarTest extends TestActivity {
public void run() {
if (mCustomTile != null) {
mCustomTile.label = "Update From SDK";
- mCMStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
+ mLineageStatusBarManager.publishTile(CUSTOM_TILE_ID, mCustomTile);
}
}
},
new Test("test remove tile") {
public void run() {
- mCMStatusBarManager.removeTile(CUSTOM_TILE_ID);
+ mLineageStatusBarManager.removeTile(CUSTOM_TILE_ID);
}
},
@@ -127,7 +127,7 @@ public class CMStatusBarTest extends TestActivity {
public void run() {
mHandler.postDelayed(new Runnable() {
public void run() {
- mCMStatusBarManager.removeTile(CUSTOM_TILE_ID);
+ mLineageStatusBarManager.removeTile(CUSTOM_TILE_ID);
}
}, 3000);
}
@@ -135,65 +135,65 @@ public class CMStatusBarTest extends TestActivity {
new Test("test publish tile with settings") {
public void run() {
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Settings From SDK")
.setIcon(R.drawable.ic_launcher)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with long press") {
public void run() {
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Long press From SDK")
.setIcon(R.drawable.ic_launcher)
- .setOnLongClickIntent(PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this,DummySettings.class)
+ .setOnLongClickIntent(PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this,DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with delete intent") {
public void run() {
- Intent intent = new Intent(CMStatusBarTest.this, DummySettings.class);
+ Intent intent = new Intent(LineageStatusBarTest.this, DummySettings.class);
PendingIntent pendingIntent =
- PendingIntent.getActivity(CMStatusBarTest.this, 0, intent, 0);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ PendingIntent.getActivity(LineageStatusBarTest.this, 0, intent, 0);
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Settings From SDK")
.setIcon(R.drawable.ic_launcher)
.setDeleteIntent(pendingIntent)
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with custom uri") {
public void run() {
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setIcon(R.drawable.ic_launcher)
.setOnClickUri(Uri.parse("http://tasker.dinglisch.net"))
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with expanded list") {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedListItem> expandedListItems =
new ArrayList<CustomTile.ExpandedListItem>();
@@ -210,24 +210,24 @@ public class CMStatusBarTest extends TestActivity {
CustomTile.ListExpandedStyle listExpandedStyle =
new CustomTile.ListExpandedStyle();
listExpandedStyle.setListItems(expandedListItems);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Expanded List Style From SDK")
.setIcon(R.drawable.ic_launcher)
.setExpandedStyle(listExpandedStyle)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with expanded list with bitmaps") {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedListItem> expandedListItems =
new ArrayList<CustomTile.ExpandedListItem>();
@@ -247,24 +247,24 @@ public class CMStatusBarTest extends TestActivity {
CustomTile.ListExpandedStyle listExpandedStyle =
new CustomTile.ListExpandedStyle();
listExpandedStyle.setListItems(expandedListItems);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Expanded List Style From SDK")
.setIcon(R.drawable.ic_launcher)
.setExpandedStyle(listExpandedStyle)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with expanded grid") {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedGridItem> expandedGridItems =
new ArrayList<CustomTile.ExpandedGridItem>();
@@ -280,24 +280,24 @@ public class CMStatusBarTest extends TestActivity {
CustomTile.GridExpandedStyle gridExpandedStyle =
new CustomTile.GridExpandedStyle();
gridExpandedStyle.setGridItems(expandedGridItems);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Expanded Grid Style From SDK")
.setIcon(R.drawable.ic_launcher)
.setExpandedStyle(gridExpandedStyle)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
new Test("test publish tile with expanded grid with bitmaps") {
public void run() {
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
- new Intent(CMStatusBarTest.this, CMStatusBarTest.class)
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
+ new Intent(LineageStatusBarTest.this, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedGridItem> expandedGridItems =
new ArrayList<CustomTile.ExpandedGridItem>();
@@ -316,16 +316,16 @@ public class CMStatusBarTest extends TestActivity {
CustomTile.GridExpandedStyle gridExpandedStyle =
new CustomTile.GridExpandedStyle();
gridExpandedStyle.setGridItems(expandedGridItems);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Expanded Grid Style From SDK")
.setIcon(R.drawable.ic_launcher)
.setExpandedStyle(gridExpandedStyle)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
@@ -338,7 +338,7 @@ public class CMStatusBarTest extends TestActivity {
Intent daneshIntent = new Intent(Intent.ACTION_VIEW)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setData(Uri.parse("http://www.reddit.com/r/daneshsayings"));
- PendingIntent intent = PendingIntent.getActivity(CMStatusBarTest.this, 0,
+ PendingIntent intent = PendingIntent.getActivity(LineageStatusBarTest.this, 0,
daneshIntent, 0);
contentView.setOnClickPendingIntent(R.id.whats_hot_click, intent);
@@ -346,16 +346,16 @@ public class CMStatusBarTest extends TestActivity {
new CustomTile.RemoteExpandedStyle();
remoteExpandedStyle.setRemoteViews(contentView);
- CustomTile customTile = new CustomTile.Builder(CMStatusBarTest.this)
+ CustomTile customTile = new CustomTile.Builder(LineageStatusBarTest.this)
.setLabel("Test Expanded Remote Style From SDK")
.setIcon(R.drawable.ic_launcher)
.setExpandedStyle(remoteExpandedStyle)
- .setOnSettingsClickIntent(new Intent(CMStatusBarTest.this,
+ .setOnSettingsClickIntent(new Intent(LineageStatusBarTest.this,
DummySettings.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
.setContentDescription("Content description")
.build();
- CMStatusBarManager.getInstance(CMStatusBarTest.this)
+ LineageStatusBarManager.getInstance(LineageStatusBarTest.this)
.publishTile(CUSTOM_TILE_SETTINGS_ID, customTile);
}
},
diff --git a/tests/src/org/lineageos/tests/customtiles/unit/CustomTileBuilderTest.java b/tests/src/org/lineageos/tests/customtiles/unit/CustomTileBuilderTest.java
index 1368af5d..73e13d06 100644
--- a/tests/src/org/lineageos/tests/customtiles/unit/CustomTileBuilderTest.java
+++ b/tests/src/org/lineageos/tests/customtiles/unit/CustomTileBuilderTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles.unit;
+package org.lineageos.tests.customtiles.unit;
import android.app.PendingIntent;
import android.content.Intent;
@@ -24,11 +24,11 @@ import android.net.Uri;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.CustomTile;
-import org.cyanogenmod.tests.R;
-import org.cyanogenmod.tests.customtiles.CMStatusBarTest;
-import org.cyanogenmod.tests.customtiles.DummySettings;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.CustomTile;
+import org.lineageos.tests.R;
+import org.lineageos.tests.customtiles.LineageStatusBarTest;
+import org.lineageos.tests.customtiles.DummySettings;
import java.util.ArrayList;
@@ -40,9 +40,9 @@ public class CustomTileBuilderTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- // Only run this if we support cm status bar service
+ // Only run this if we support lineage status bar service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.STATUSBAR));
+ LineageContextConstants.Features.STATUSBAR));
}
@SmallTest
@@ -186,7 +186,7 @@ public class CustomTileBuilderTest extends AndroidTestCase {
@MediumTest
public void testCustomTileBuilderExpandedListStyleSet() {
PendingIntent intent = PendingIntent.getActivity(mContext, 0,
- new Intent(mContext, CMStatusBarTest.class)
+ new Intent(mContext, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedListItem> expandedListItems =
new ArrayList<CustomTile.ExpandedListItem>();
@@ -223,7 +223,7 @@ public class CustomTileBuilderTest extends AndroidTestCase {
@MediumTest
public void testCustomTileBuilderExpandedGridStyleSet() {
PendingIntent intent = PendingIntent.getActivity(mContext, 0,
- new Intent(mContext, CMStatusBarTest.class)
+ new Intent(mContext, LineageStatusBarTest.class)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), 0);
ArrayList<CustomTile.ExpandedGridItem> expandedGridItems =
new ArrayList<CustomTile.ExpandedGridItem>();
diff --git a/tests/src/org/lineageos/tests/customtiles/unit/CustomTileTest.java b/tests/src/org/lineageos/tests/customtiles/unit/CustomTileTest.java
index 3863453f..a6f91419 100644
--- a/tests/src/org/lineageos/tests/customtiles/unit/CustomTileTest.java
+++ b/tests/src/org/lineageos/tests/customtiles/unit/CustomTileTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles.unit;
+package org.lineageos.tests.customtiles.unit;
import android.app.PendingIntent;
import android.content.Intent;
@@ -25,11 +25,11 @@ import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.widget.RemoteViews;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.CustomTile;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.CustomTile;
-import org.cyanogenmod.tests.R;
-import org.cyanogenmod.tests.customtiles.DummySettings;
+import org.lineageos.tests.R;
+import org.lineageos.tests.customtiles.DummySettings;
import java.util.ArrayList;
@@ -40,9 +40,9 @@ public class CustomTileTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- // Only run this if we support cm status bar service
+ // Only run this if we support lineage status bar service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.STATUSBAR));
+ LineageContextConstants.Features.STATUSBAR));
}
@SmallTest
diff --git a/tests/src/org/lineageos/tests/customtiles/unit/LineageStatusBarManagerTest.java b/tests/src/org/lineageos/tests/customtiles/unit/LineageStatusBarManagerTest.java
index e894462d..cc027479 100644
--- a/tests/src/org/lineageos/tests/customtiles/unit/LineageStatusBarManagerTest.java
+++ b/tests/src/org/lineageos/tests/customtiles/unit/LineageStatusBarManagerTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles.unit;
+package org.lineageos.tests.customtiles.unit;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -30,38 +30,38 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.text.TextUtils;
import android.util.Log;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.CMStatusBarManager;
-import cyanogenmod.app.CustomTile;
-import cyanogenmod.app.CustomTileListenerService;
-import cyanogenmod.app.ICMStatusBarManager;
-import org.cyanogenmod.tests.R;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.LineageStatusBarManager;
+import lineageos.app.CustomTile;
+import lineageos.app.CustomTileListenerService;
+import lineageos.app.ILineageStatusBarManager;
+import org.lineageos.tests.R;
import java.util.concurrent.CountDownLatch;
-public class CMStatusBarManagerTest extends AndroidTestCase {
- private static final String TAG = CMStatusBarManagerTest.class.getSimpleName();
+public class LineageStatusBarManagerTest extends AndroidTestCase {
+ private static final String TAG = LineageStatusBarManagerTest.class.getSimpleName();
private static final int COUNTDOWN = 1;
- private CMStatusBarManager mCMStatusBarManager;
+ private LineageStatusBarManager mLineageStatusBarManager;
@Override
protected void setUp() throws Exception {
super.setUp();
- // Only run this if we support cm status bar service
+ // Only run this if we support lineage status bar service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.STATUSBAR));
- mCMStatusBarManager = CMStatusBarManager.getInstance(mContext);
+ LineageContextConstants.Features.STATUSBAR));
+ mLineageStatusBarManager = LineageStatusBarManager.getInstance(mContext);
}
@SmallTest
public void testManagerExists() {
- assertNotNull(mCMStatusBarManager);
+ assertNotNull(mLineageStatusBarManager);
}
@SmallTest
public void testManagerServiceIsAvailable() {
- ICMStatusBarManager icmHardwareManagerService = mCMStatusBarManager.getService();
- assertNotNull(icmHardwareManagerService);
+ ILineageStatusBarManager ilineageHardwareManagerService = mLineageStatusBarManager.getService();
+ assertNotNull(ilineageHardwareManagerService);
}
@MediumTest
@@ -115,12 +115,12 @@ public class CMStatusBarManagerTest extends AndroidTestCase {
super.onListenerConnected();
Log.d(TAG, "Connected");
// publish
- mCMStatusBarManager.publishTileAsUser(null, 1337, expectedCustomTile,
+ mLineageStatusBarManager.publishTileAsUser(null, 1337, expectedCustomTile,
expectedUserHandle);
}
@Override
- public void onCustomTilePosted(cyanogenmod.app.StatusBarPanelCustomTile sbc) {
+ public void onCustomTilePosted(lineageos.app.StatusBarPanelCustomTile sbc) {
super.onCustomTilePosted(sbc);
Log.d(TAG, "Posted " + sbc.getCustomTile());
if (TextUtils.equals(expectedCustomTile.label, sbc.getCustomTile().label)) {
@@ -138,7 +138,7 @@ public class CMStatusBarManagerTest extends AndroidTestCase {
throw new AssertionError(e);
}
- mCMStatusBarManager.removeTileAsUser(null, 1337, expectedUserHandle);
+ mLineageStatusBarManager.removeTileAsUser(null, 1337, expectedUserHandle);
unregisterCustomTileListenerService(customTileListenerService);
}
@@ -155,11 +155,11 @@ public class CMStatusBarManagerTest extends AndroidTestCase {
super.onListenerConnected();
Log.d(TAG, "Connected");
// publish as user
- mCMStatusBarManager.publishTile(1338, expectedCustomTile);
+ mLineageStatusBarManager.publishTile(1338, expectedCustomTile);
}
@Override
- public void onCustomTilePosted(cyanogenmod.app.StatusBarPanelCustomTile sbc) {
+ public void onCustomTilePosted(lineageos.app.StatusBarPanelCustomTile sbc) {
super.onCustomTilePosted(sbc);
Log.d(TAG, "Posted " + sbc.getCustomTile());
if (TextUtils.equals(expectedCustomTile.label, sbc.getCustomTile().label)) {
@@ -168,7 +168,7 @@ public class CMStatusBarManagerTest extends AndroidTestCase {
}
@Override
- public void onCustomTileRemoved(cyanogenmod.app.StatusBarPanelCustomTile sbc) {
+ public void onCustomTileRemoved(lineageos.app.StatusBarPanelCustomTile sbc) {
super.onCustomTileRemoved(sbc);
Log.d(TAG, "Removed " + sbc.getCustomTile());
if (TextUtils.equals(expectedCustomTile.label, sbc.getCustomTile().label)) {
@@ -206,7 +206,7 @@ public class CMStatusBarManagerTest extends AndroidTestCase {
+ " custom tile listener service");
customTileListenerService.registerAsSystemService(mContext,
new ComponentName(mContext.getPackageName(),
- CMStatusBarManagerTest.this.getClass().getCanonicalName()),
+ LineageStatusBarManagerTest.this.getClass().getCanonicalName()),
UserHandle.USER_ALL);
} catch (RemoteException e) {
throw new AssertionError(e);
diff --git a/tests/src/org/lineageos/tests/customtiles/unit/StatusBarPanelCustomTileTest.java b/tests/src/org/lineageos/tests/customtiles/unit/StatusBarPanelCustomTileTest.java
index dd11e9b2..3dcc7e2a 100644
--- a/tests/src/org/lineageos/tests/customtiles/unit/StatusBarPanelCustomTileTest.java
+++ b/tests/src/org/lineageos/tests/customtiles/unit/StatusBarPanelCustomTileTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.customtiles.unit;
+package org.lineageos.tests.customtiles.unit;
import android.app.PendingIntent;
import android.content.Intent;
@@ -25,11 +25,11 @@ import android.os.UserHandle;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.CustomTile;
-import cyanogenmod.app.StatusBarPanelCustomTile;
-import org.cyanogenmod.tests.R;
-import org.cyanogenmod.tests.customtiles.DummySettings;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.CustomTile;
+import lineageos.app.StatusBarPanelCustomTile;
+import org.lineageos.tests.R;
+import org.lineageos.tests.customtiles.DummySettings;
import java.util.ArrayList;
@@ -40,9 +40,9 @@ public class StatusBarPanelCustomTileTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- // Only run this if we support cm status bar service
+ // Only run this if we support lineage status bar service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.STATUSBAR));
+ LineageContextConstants.Features.STATUSBAR));
}
@SmallTest
diff --git a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalProviderTest.java b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalProviderTest.java
index 2bb3a69c..e9e663c8 100644
--- a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalProviderTest.java
+++ b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalProviderTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.externalviews.keyguardexternalviews;
+package org.lineageos.tests.externalviews.keyguardexternalviews;
import android.content.Context;
import android.content.Intent;
@@ -24,12 +24,12 @@ import android.test.ServiceTestCase;
import android.view.*;
import android.widget.Space;
import android.widget.TextView;
-import cyanogenmod.externalviews.IExternalViewProviderFactory;
-import cyanogenmod.externalviews.IKeyguardExternalViewCallbacks;
-import cyanogenmod.externalviews.IKeyguardExternalViewProvider;
-import cyanogenmod.externalviews.KeyguardExternalViewProviderService;
-import org.cyanogenmod.tests.common.MockIBinderStubForInterface;
-import org.cyanogenmod.tests.common.ThreadServiceTestCase;
+import lineageos.externalviews.IExternalViewProviderFactory;
+import lineageos.externalviews.IKeyguardExternalViewCallbacks;
+import lineageos.externalviews.IKeyguardExternalViewProvider;
+import lineageos.externalviews.KeyguardExternalViewProviderService;
+import org.lineageos.tests.common.MockIBinderStubForInterface;
+import org.lineageos.tests.common.ThreadServiceTestCase;
import org.junit.Assert;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
diff --git a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalViewTest.java b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalViewTest.java
index f5567679..4c8896ab 100644
--- a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalViewTest.java
+++ b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/KeyguardExternalViewTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.externalviews.keyguardexternalviews;
+package org.lineageos.tests.externalviews.keyguardexternalviews;
import android.content.ComponentName;
import android.content.Context;
@@ -26,11 +26,11 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.test.AndroidTestCase;
import android.view.WindowManager;
-import cyanogenmod.externalviews.IExternalViewProviderFactory;
-import cyanogenmod.externalviews.IKeyguardExternalViewCallbacks;
-import cyanogenmod.externalviews.IKeyguardExternalViewProvider;
-import cyanogenmod.externalviews.KeyguardExternalView;
-import org.cyanogenmod.tests.common.MockIBinderStubForInterface;
+import lineageos.externalviews.IExternalViewProviderFactory;
+import lineageos.externalviews.IKeyguardExternalViewCallbacks;
+import lineageos.externalviews.IKeyguardExternalViewProvider;
+import lineageos.externalviews.KeyguardExternalView;
+import org.lineageos.tests.common.MockIBinderStubForInterface;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
diff --git a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/ViewProviderService.java b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/ViewProviderService.java
index 7f0f8dd7..6d669025 100644
--- a/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/ViewProviderService.java
+++ b/tests/src/org/lineageos/tests/externalviews/keyguardexternalviews/ViewProviderService.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.externalviews.keyguardexternalviews;
+package org.lineageos.tests.externalviews.keyguardexternalviews;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Space;
-import cyanogenmod.externalviews.KeyguardExternalViewProviderService;
+import lineageos.externalviews.KeyguardExternalViewProviderService;
import org.mockito.Mockito;
public class ViewProviderService extends KeyguardExternalViewProviderService {
diff --git a/tests/src/org/lineageos/tests/hardware/LineageHardwareTest.java b/tests/src/org/lineageos/tests/hardware/LineageHardwareTest.java
index 9c2c9d82..6d247473 100644
--- a/tests/src/org/lineageos/tests/hardware/LineageHardwareTest.java
+++ b/tests/src/org/lineageos/tests/hardware/LineageHardwareTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.hardware;
+package org.lineageos.tests.hardware;
import android.os.Bundle;
@@ -23,31 +23,31 @@ import android.widget.Toast;
import java.util.Arrays;
import java.util.List;
-import cyanogenmod.hardware.CMHardwareManager;
-import cyanogenmod.hardware.DisplayMode;
+import lineageos.hardware.LineageHardwareManager;
+import lineageos.hardware.DisplayMode;
-import org.cyanogenmod.tests.TestActivity;
+import org.lineageos.tests.TestActivity;
/**
* Created by adnan on 8/31/15.
*/
-public class CMHardwareTest extends TestActivity {
- private CMHardwareManager mHardwareManager;
+public class LineageHardwareTest extends TestActivity {
+ private LineageHardwareManager mHardwareManager;
private static final List<Integer> FEATURES = Arrays.asList(
- CMHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT,
- CMHardwareManager.FEATURE_COLOR_ENHANCEMENT,
- CMHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION,
- CMHardwareManager.FEATURE_DISPLAY_GAMMA_CALIBRATION,
- CMHardwareManager.FEATURE_HIGH_TOUCH_SENSITIVITY,
- CMHardwareManager.FEATURE_KEY_DISABLE,
- CMHardwareManager.FEATURE_LONG_TERM_ORBITS,
- CMHardwareManager.FEATURE_SERIAL_NUMBER,
- CMHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT,
- CMHardwareManager.FEATURE_TOUCH_HOVERING,
- CMHardwareManager.FEATURE_AUTO_CONTRAST,
- CMHardwareManager.FEATURE_DISPLAY_MODES,
- CMHardwareManager.FEATURE_PERSISTENT_STORAGE
+ LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT,
+ LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT,
+ LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION,
+ LineageHardwareManager.FEATURE_DISPLAY_GAMMA_CALIBRATION,
+ LineageHardwareManager.FEATURE_HIGH_TOUCH_SENSITIVITY,
+ LineageHardwareManager.FEATURE_KEY_DISABLE,
+ LineageHardwareManager.FEATURE_LONG_TERM_ORBITS,
+ LineageHardwareManager.FEATURE_SERIAL_NUMBER,
+ LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT,
+ LineageHardwareManager.FEATURE_TOUCH_HOVERING,
+ LineageHardwareManager.FEATURE_AUTO_CONTRAST,
+ LineageHardwareManager.FEATURE_DISPLAY_MODES,
+ LineageHardwareManager.FEATURE_PERSISTENT_STORAGE
);
private static final List<String> FEATURE_STRINGS = Arrays.asList(
@@ -67,19 +67,19 @@ public class CMHardwareTest extends TestActivity {
);
private static final List<Integer> BOOLEAN_FEATURES = Arrays.asList(
- CMHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT,
- CMHardwareManager.FEATURE_COLOR_ENHANCEMENT,
- CMHardwareManager.FEATURE_HIGH_TOUCH_SENSITIVITY,
- CMHardwareManager.FEATURE_KEY_DISABLE,
- CMHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT,
- CMHardwareManager.FEATURE_TOUCH_HOVERING,
- CMHardwareManager.FEATURE_AUTO_CONTRAST
+ LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT,
+ LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT,
+ LineageHardwareManager.FEATURE_HIGH_TOUCH_SENSITIVITY,
+ LineageHardwareManager.FEATURE_KEY_DISABLE,
+ LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT,
+ LineageHardwareManager.FEATURE_TOUCH_HOVERING,
+ LineageHardwareManager.FEATURE_AUTO_CONTRAST
);
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- mHardwareManager = CMHardwareManager.getInstance(this);
+ mHardwareManager = LineageHardwareManager.getInstance(this);
}
@Override
@@ -93,70 +93,70 @@ public class CMHardwareTest extends TestActivity {
}
private boolean vibratorSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_VIBRATOR)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_VIBRATOR)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Vibrator not supported",
+ Toast.makeText(LineageHardwareTest.this, "Vibrator not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean displayColorCalibrationSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Display Color Calibration not supported",
+ Toast.makeText(LineageHardwareTest.this, "Display Color Calibration not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean ltoSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_LONG_TERM_ORBITS)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_LONG_TERM_ORBITS)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Long Term Orbits not supported",
+ Toast.makeText(LineageHardwareTest.this, "Long Term Orbits not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean serialSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_SERIAL_NUMBER)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_SERIAL_NUMBER)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Serial number not supported",
+ Toast.makeText(LineageHardwareTest.this, "Serial number not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean uniqueDeviceIdSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_UNIQUE_DEVICE_ID)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_UNIQUE_DEVICE_ID)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Unique device ID not supported",
+ Toast.makeText(LineageHardwareTest.this, "Unique device ID not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean displayModesSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_DISPLAY_MODES)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Display modes not supported",
+ Toast.makeText(LineageHardwareTest.this, "Display modes not supported",
Toast.LENGTH_SHORT).show();
return false;
}
}
private boolean persistentStorageSupported() {
- if (mHardwareManager.isSupported(CMHardwareManager.FEATURE_PERSISTENT_STORAGE)) {
+ if (mHardwareManager.isSupported(LineageHardwareManager.FEATURE_PERSISTENT_STORAGE)) {
return true;
} else {
- Toast.makeText(CMHardwareTest.this, "Persistent storage not supported",
+ Toast.makeText(LineageHardwareTest.this, "Persistent storage not supported",
Toast.LENGTH_SHORT).show();
return false;
}
@@ -165,7 +165,7 @@ public class CMHardwareTest extends TestActivity {
private Test[] mTests = new Test[] {
new Test("Test get supported features") {
public void run() {
- Toast.makeText(CMHardwareTest.this, "Supported features " +
+ Toast.makeText(LineageHardwareTest.this, "Supported features " +
mHardwareManager.getSupportedFeatures(),
Toast.LENGTH_SHORT).show();
}
@@ -184,7 +184,7 @@ public class CMHardwareTest extends TestActivity {
builder.append("Feature " + feature + "\n")
.append("is supported " + supported + "\n");
}
- Toast.makeText(CMHardwareTest.this, "Supported features " +
+ Toast.makeText(LineageHardwareTest.this, "Supported features " +
builder.toString(),
Toast.LENGTH_SHORT).show();
}
@@ -198,7 +198,7 @@ public class CMHardwareTest extends TestActivity {
.append("is enabled " + mHardwareManager.isSupported(feature)
+ "\n");
}
- Toast.makeText(CMHardwareTest.this, "Features " +
+ Toast.makeText(LineageHardwareTest.this, "Features " +
builder.toString(),
Toast.LENGTH_SHORT).show();
}
@@ -207,7 +207,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (vibratorSupported()) {
- Toast.makeText(CMHardwareTest.this, "Vibrator intensity " +
+ Toast.makeText(LineageHardwareTest.this, "Vibrator intensity " +
mHardwareManager.getVibratorIntensity(),
Toast.LENGTH_SHORT).show();
}
@@ -217,7 +217,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (vibratorSupported()) {
- Toast.makeText(CMHardwareTest.this, "Vibrator default intensity " +
+ Toast.makeText(LineageHardwareTest.this, "Vibrator default intensity " +
mHardwareManager.getVibratorDefaultIntensity(),
Toast.LENGTH_SHORT).show();
}
@@ -227,7 +227,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (vibratorSupported()) {
- Toast.makeText(CMHardwareTest.this, "Vibrator max intensity " +
+ Toast.makeText(LineageHardwareTest.this, "Vibrator max intensity " +
mHardwareManager.getVibratorMaxIntensity(),
Toast.LENGTH_SHORT).show();
}
@@ -237,7 +237,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (vibratorSupported()) {
- Toast.makeText(CMHardwareTest.this, "Vibrator min intensity " +
+ Toast.makeText(LineageHardwareTest.this, "Vibrator min intensity " +
mHardwareManager.getVibratorMinIntensity(),
Toast.LENGTH_SHORT).show();
}
@@ -247,7 +247,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (vibratorSupported()) {
- Toast.makeText(CMHardwareTest.this, "Vibrator min intensity " +
+ Toast.makeText(LineageHardwareTest.this, "Vibrator min intensity " +
mHardwareManager.getVibratorWarningIntensity(),
Toast.LENGTH_SHORT).show();
}
@@ -257,7 +257,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayColorCalibrationSupported()) {
- Toast.makeText(CMHardwareTest.this, "Display Color Calibration " +
+ Toast.makeText(LineageHardwareTest.this, "Display Color Calibration " +
mHardwareManager.getDisplayColorCalibration(),
Toast.LENGTH_SHORT).show();
}
@@ -267,7 +267,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayColorCalibrationSupported()) {
- Toast.makeText(CMHardwareTest.this, "Default Display Color Calibration " +
+ Toast.makeText(LineageHardwareTest.this, "Default Display Color Calibration " +
mHardwareManager.getDisplayColorCalibrationDefault(),
Toast.LENGTH_SHORT).show();
}
@@ -277,7 +277,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayColorCalibrationSupported()) {
- Toast.makeText(CMHardwareTest.this, "Display Color Calibration Max " +
+ Toast.makeText(LineageHardwareTest.this, "Display Color Calibration Max " +
mHardwareManager.getDisplayColorCalibrationMax(),
Toast.LENGTH_SHORT).show();
}
@@ -287,7 +287,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayColorCalibrationSupported()) {
- Toast.makeText(CMHardwareTest.this, "Display Color Calibration Min " +
+ Toast.makeText(LineageHardwareTest.this, "Display Color Calibration Min " +
mHardwareManager.getDisplayColorCalibrationMin(),
Toast.LENGTH_SHORT).show();
}
@@ -305,7 +305,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (ltoSupported()) {
- Toast.makeText(CMHardwareTest.this, "Long Term Orbit Source " +
+ Toast.makeText(LineageHardwareTest.this, "Long Term Orbit Source " +
mHardwareManager.getLtoSource(),
Toast.LENGTH_SHORT).show();
}
@@ -315,7 +315,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (ltoSupported()) {
- Toast.makeText(CMHardwareTest.this, "Long Term Orbit Destination " +
+ Toast.makeText(LineageHardwareTest.this, "Long Term Orbit Destination " +
mHardwareManager.getLtoDestination(),
Toast.LENGTH_SHORT).show();
}
@@ -325,7 +325,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (ltoSupported()) {
- Toast.makeText(CMHardwareTest.this, "Long Term Orbit Download Interval " +
+ Toast.makeText(LineageHardwareTest.this, "Long Term Orbit Download Interval " +
mHardwareManager.getLtoDownloadInterval(),
Toast.LENGTH_SHORT).show();
}
@@ -335,7 +335,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (serialSupported()) {
- Toast.makeText(CMHardwareTest.this, "Serial number " +
+ Toast.makeText(LineageHardwareTest.this, "Serial number " +
mHardwareManager.getSerialNumber(),
Toast.LENGTH_SHORT).show();
}
@@ -345,7 +345,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (uniqueDeviceIdSupported()) {
- Toast.makeText(CMHardwareTest.this, "Unique Device ID " +
+ Toast.makeText(LineageHardwareTest.this, "Unique Device ID " +
mHardwareManager.getUniqueDeviceId(),
Toast.LENGTH_SHORT).show();
}
@@ -359,7 +359,7 @@ public class CMHardwareTest extends TestActivity {
for (DisplayMode displayMode : mHardwareManager.getDisplayModes()) {
builder.append("Display mode " + displayMode.name + "\n");
}
- Toast.makeText(CMHardwareTest.this, "Display modes: \n"
+ Toast.makeText(LineageHardwareTest.this, "Display modes: \n"
+ builder.toString(), Toast.LENGTH_SHORT).show();
}
}
@@ -368,7 +368,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayModesSupported()) {
- Toast.makeText(CMHardwareTest.this, "Default Display Mode " +
+ Toast.makeText(LineageHardwareTest.this, "Default Display Mode " +
mHardwareManager.getCurrentDisplayMode(),
Toast.LENGTH_SHORT).show();
}
@@ -378,7 +378,7 @@ public class CMHardwareTest extends TestActivity {
@Override
protected void run() {
if (displayModesSupported()) {
- Toast.makeText(CMHardwareTest.this, "Default Display Mode " +
+ Toast.makeText(LineageHardwareTest.this, "Default Display Mode " +
mHardwareManager.getCurrentDisplayMode(),
Toast.LENGTH_SHORT).show();
}
diff --git a/tests/src/org/lineageos/tests/hardware/unit/DisplayModeTest.java b/tests/src/org/lineageos/tests/hardware/unit/DisplayModeTest.java
index 4a3e1ef2..01a24771 100644
--- a/tests/src/org/lineageos/tests/hardware/unit/DisplayModeTest.java
+++ b/tests/src/org/lineageos/tests/hardware/unit/DisplayModeTest.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.hardware.unit;
+package org.lineageos.tests.hardware.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.hardware.DisplayMode;
+import lineageos.app.LineageContextConstants;
+import lineageos.hardware.DisplayMode;
/**
* Created by adnan on 9/1/15.
@@ -32,7 +32,7 @@ public class DisplayModeTest extends AndroidTestCase {
super.setUp();
// Only run this if we support hardware abstraction
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.HARDWARE_ABSTRACTION));
+ LineageContextConstants.Features.HARDWARE_ABSTRACTION));
}
@SmallTest
diff --git a/tests/src/org/lineageos/tests/hardware/unit/LineageHardwareManagerTest.java b/tests/src/org/lineageos/tests/hardware/unit/LineageHardwareManagerTest.java
index f8dfa4e3..01a8145f 100644
--- a/tests/src/org/lineageos/tests/hardware/unit/LineageHardwareManagerTest.java
+++ b/tests/src/org/lineageos/tests/hardware/unit/LineageHardwareManagerTest.java
@@ -14,37 +14,37 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.hardware.unit;
+package org.lineageos.tests.hardware.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.hardware.CMHardwareManager;
-import cyanogenmod.hardware.ICMHardwareService;
+import lineageos.app.LineageContextConstants;
+import lineageos.hardware.LineageHardwareManager;
+import lineageos.hardware.ILineageHardwareService;
/**
* Created by adnan on 9/1/15.
*/
-public class CMHardwareManagerTest extends AndroidTestCase {
- private CMHardwareManager mCMHardwareManager;
+public class LineageHardwareManagerTest extends AndroidTestCase {
+ private LineageHardwareManager mLineageHardwareManager;
@Override
protected void setUp() throws Exception {
super.setUp();
// Only run this if we support hardware abstraction
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.HARDWARE_ABSTRACTION));
- mCMHardwareManager = CMHardwareManager.getInstance(mContext);
+ LineageContextConstants.Features.HARDWARE_ABSTRACTION));
+ mLineageHardwareManager = LineageHardwareManager.getInstance(mContext);
}
@SmallTest
public void testManagerExists() {
- assertNotNull(mCMHardwareManager);
+ assertNotNull(mLineageHardwareManager);
}
@SmallTest
public void testManagerServiceIsAvailable() {
- ICMHardwareService icmStatusBarManager = mCMHardwareManager.getService();
- assertNotNull(icmStatusBarManager);
+ ILineageHardwareService ilineageStatusBarManager = mLineageHardwareManager.getService();
+ assertNotNull(ilineageStatusBarManager);
}
}
diff --git a/tests/src/org/lineageos/tests/hardware/unit/LiveDisplayManagerTest.java b/tests/src/org/lineageos/tests/hardware/unit/LiveDisplayManagerTest.java
index 09d74f35..2f0eec9c 100644
--- a/tests/src/org/lineageos/tests/hardware/unit/LiveDisplayManagerTest.java
+++ b/tests/src/org/lineageos/tests/hardware/unit/LiveDisplayManagerTest.java
@@ -1,4 +1,4 @@
-package org.cyanogenmod.tests.hardware.unit;
+package org.lineageos.tests.hardware.unit;
import android.content.Context;
import android.os.PowerManager;
@@ -7,19 +7,19 @@ import android.test.suitebuilder.annotation.SmallTest;
import org.junit.Assume;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.hardware.CMHardwareManager;
-import cyanogenmod.hardware.ILiveDisplayService;
-import cyanogenmod.hardware.LiveDisplayConfig;
-import cyanogenmod.hardware.LiveDisplayManager;
-import cyanogenmod.util.ColorUtils;
+import lineageos.app.LineageContextConstants;
+import lineageos.hardware.LineageHardwareManager;
+import lineageos.hardware.ILiveDisplayService;
+import lineageos.hardware.LiveDisplayConfig;
+import lineageos.hardware.LiveDisplayManager;
+import lineageos.util.ColorUtils;
public class LiveDisplayManagerTest extends AndroidTestCase {
private static final String TAG = "LiveDisplayManagerTest";
private LiveDisplayManager mLiveDisplay;
- private CMHardwareManager mHardware;
+ private LineageHardwareManager mHardware;
private PowerManager mPower;
private PowerManager.WakeLock mWakeLock;
@@ -33,7 +33,7 @@ public class LiveDisplayManagerTest extends AndroidTestCase {
super.setUp();
Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.LIVEDISPLAY));
+ LineageContextConstants.Features.LIVEDISPLAY));
mLiveDisplay = LiveDisplayManager.getInstance(mContext);
if (mLiveDisplay.getConfig().hasModeSupport()) {
@@ -41,7 +41,7 @@ public class LiveDisplayManagerTest extends AndroidTestCase {
}
mConfig = mLiveDisplay.getConfig();
- mHardware = CMHardwareManager.getInstance(mContext);
+ mHardware = LineageHardwareManager.getInstance(mContext);
mPower = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mWakeLock = mPower.newWakeLock(
PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.SCREEN_DIM_WAKE_LOCK, TAG);
@@ -125,15 +125,15 @@ public class LiveDisplayManagerTest extends AndroidTestCase {
public void testOutdoorMode() throws Exception {
Assume.assumeTrue(mConfig.hasFeature(LiveDisplayManager.MODE_OUTDOOR));
- assertTrue(mHardware.isSupported(CMHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
+ assertTrue(mHardware.isSupported(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
mLiveDisplay.setMode(LiveDisplayManager.MODE_OUTDOOR);
Thread.sleep(1000);
- assertTrue(mHardware.get(CMHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
+ assertTrue(mHardware.get(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
mLiveDisplay.setMode(LiveDisplayManager.MODE_OFF);
Thread.sleep(1000);
- assertFalse(mHardware.get(CMHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
+ assertFalse(mHardware.get(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT));
}
private void assertColorTemperature(int degK) throws Exception {
diff --git a/tests/src/org/lineageos/tests/hardware/unit/PersistentStorageTest.java b/tests/src/org/lineageos/tests/hardware/unit/PersistentStorageTest.java
index eb58905c..cd576fee 100644
--- a/tests/src/org/lineageos/tests/hardware/unit/PersistentStorageTest.java
+++ b/tests/src/org/lineageos/tests/hardware/unit/PersistentStorageTest.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.hardware.unit;
+package org.lineageos.tests.hardware.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.hardware.CMHardwareManager;
+import lineageos.app.LineageContextConstants;
+import lineageos.hardware.LineageHardwareManager;
import java.util.Arrays;
import java.util.Random;
@@ -27,15 +27,15 @@ import java.util.UUID;
public class PersistentStorageTest extends AndroidTestCase {
- private CMHardwareManager mHardwareManager;
+ private LineageHardwareManager mHardwareManager;
@Override
protected void setUp() throws Exception {
super.setUp();
// Only run this if we support hardware abstraction
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.HARDWARE_ABSTRACTION));
- mHardwareManager = CMHardwareManager.getInstance(mContext);
+ LineageContextConstants.Features.HARDWARE_ABSTRACTION));
+ mHardwareManager = LineageHardwareManager.getInstance(mContext);
}
@SmallTest
@@ -92,7 +92,7 @@ public class PersistentStorageTest extends AndroidTestCase {
@SmallTest
public void testPersistentString() {
- assertTrue(mHardwareManager.isSupported(CMHardwareManager.FEATURE_PERSISTENT_STORAGE));
+ assertTrue(mHardwareManager.isSupported(LineageHardwareManager.FEATURE_PERSISTENT_STORAGE));
String testKey = UUID.randomUUID().toString();
String testString = "IM IN UR STORAGE";
@@ -118,7 +118,7 @@ public class PersistentStorageTest extends AndroidTestCase {
@SmallTest
public void testPersistentInteger() {
- assertTrue(mHardwareManager.isSupported(CMHardwareManager.FEATURE_PERSISTENT_STORAGE));
+ assertTrue(mHardwareManager.isSupported(LineageHardwareManager.FEATURE_PERSISTENT_STORAGE));
String testKey = UUID.randomUUID().toString();
int testInt = 49152;
@@ -138,7 +138,7 @@ public class PersistentStorageTest extends AndroidTestCase {
@SmallTest
public void testPersistentBytes() {
- assertTrue(mHardwareManager.isSupported(CMHardwareManager.FEATURE_PERSISTENT_STORAGE));
+ assertTrue(mHardwareManager.isSupported(LineageHardwareManager.FEATURE_PERSISTENT_STORAGE));
String testKey = UUID.randomUUID().toString();
byte[] testArray = new byte[1024];
diff --git a/tests/src/org/lineageos/tests/hardware/unit/UniqueDeviceIDTest.java b/tests/src/org/lineageos/tests/hardware/unit/UniqueDeviceIDTest.java
index 9a0f13ab..381e97b0 100644
--- a/tests/src/org/lineageos/tests/hardware/unit/UniqueDeviceIDTest.java
+++ b/tests/src/org/lineageos/tests/hardware/unit/UniqueDeviceIDTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.hardware.unit;
+package org.lineageos.tests.hardware.unit;
import android.os.Build;
import android.os.SystemProperties;
@@ -22,28 +22,28 @@ import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.TextUtils;
-import cyanogenmod.hardware.CMHardwareManager;
+import lineageos.hardware.LineageHardwareManager;
public class UniqueDeviceIDTest extends AndroidTestCase {
private static final String TAG = UniqueDeviceIDTest.class.getSimpleName();
private static final int MINIMUM_LENGTH = 3;
- private CMHardwareManager mCMHardwareManager;
+ private LineageHardwareManager mLineageHardwareManager;
- //TODO: Use the TYPE declaration from CMHardwareManager public interface in future
+ //TODO: Use the TYPE declaration from LineageHardwareManager public interface in future
private static final int TYPE_MMC0_CID = 0;
@Override
protected void setUp() throws Exception {
super.setUp();
- mCMHardwareManager = CMHardwareManager.getInstance(mContext);
+ mLineageHardwareManager = LineageHardwareManager.getInstance(mContext);
}
@SmallTest
public void testGetSerialNumber() {
- final int feature = CMHardwareManager.FEATURE_SERIAL_NUMBER;
- if (mCMHardwareManager.isSupported(feature)) {
+ final int feature = LineageHardwareManager.FEATURE_SERIAL_NUMBER;
+ if (mLineageHardwareManager.isSupported(feature)) {
String notExpectedSerialNo = SystemProperties.get("ro.serialno");
- String actualSerialNo = mCMHardwareManager.getSerialNumber();
+ String actualSerialNo = mLineageHardwareManager.getSerialNumber();
assertNotNull(actualSerialNo);
assertNotSame(notExpectedSerialNo, actualSerialNo);
}
@@ -51,10 +51,10 @@ public class UniqueDeviceIDTest extends AndroidTestCase {
@SmallTest
public void testGetUniqueDeviceId() {
- final int feature = CMHardwareManager.FEATURE_UNIQUE_DEVICE_ID;
+ final int feature = LineageHardwareManager.FEATURE_UNIQUE_DEVICE_ID;
assertFeatureEnabledOnRetail(feature);
- if (mCMHardwareManager.isSupported(feature)) {
- String uniqueDeviceId = mCMHardwareManager.getUniqueDeviceId();
+ if (mLineageHardwareManager.isSupported(feature)) {
+ String uniqueDeviceId = mLineageHardwareManager.getUniqueDeviceId();
//FIXME: This is based off the default implementation in cyngn/hw, make more robust
assertNotNull(uniqueDeviceId);
assertTrue(uniqueDeviceId.length() >= MINIMUM_LENGTH);
@@ -64,7 +64,7 @@ public class UniqueDeviceIDTest extends AndroidTestCase {
private void assertFeatureEnabledOnRetail(int feature) {
if (TextUtils.equals(Build.TYPE, "user")) {
- assertTrue(mCMHardwareManager.isSupported(feature));
+ assertTrue(mLineageHardwareManager.isSupported(feature));
}
}
diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java
index 31d3df23..1c4f4034 100644
--- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java
+++ b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.livelockscreen.unit;
+package org.lineageos.tests.livelockscreen.unit;
import android.content.ComponentName;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.LiveLockScreenInfo;
+import lineageos.app.LiveLockScreenInfo;
public class LiveLockScreenInfoBuilderTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java
index c77c0a0a..01a1c9bd 100644
--- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java
+++ b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.livelockscreen.unit;
+package org.lineageos.tests.livelockscreen.unit;
import android.content.ComponentName;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.LiveLockScreenInfo;
+import lineageos.app.LiveLockScreenInfo;
public class LiveLockScreenInfoTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java
index 30ddb21a..8923276a 100644
--- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java
+++ b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.livelockscreen.unit;
+package org.lineageos.tests.livelockscreen.unit;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -22,11 +22,11 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.test.AndroidTestCase;
import android.test.mock.MockPackageManager;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.ILiveLockScreenManager;
-import cyanogenmod.app.LiveLockScreenInfo;
-import cyanogenmod.app.LiveLockScreenManager;
-import org.cyanogenmod.tests.common.MockIBinderStubForInterface;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.ILiveLockScreenManager;
+import lineageos.app.LiveLockScreenInfo;
+import lineageos.app.LiveLockScreenManager;
+import org.lineageos.tests.common.MockIBinderStubForInterface;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@@ -44,7 +44,7 @@ public class LiveLockScreenManagerTest extends AndroidTestCase {
PackageManager packageManager = Mockito.mock(MockPackageManager.class);
Mockito.doReturn(true).when(packageManager).hasSystemFeature(
- CMContextConstants.Features.LIVE_LOCK_SCREEN);
+ LineageContextConstants.Features.LIVE_LOCK_SCREEN);
// Something else is initializing the manager
Field f = LiveLockScreenManager.class.getDeclaredField("sInstance");
@@ -63,7 +63,7 @@ public class LiveLockScreenManagerTest extends AndroidTestCase {
Mockito.verify(mMockContext, Mockito.times(1)).getPackageManager();
Mockito.verify(packageManager, Mockito.times(1)).hasSystemFeature(
- Mockito.eq(CMContextConstants.Features.LIVE_LOCK_SCREEN));
+ Mockito.eq(LineageContextConstants.Features.LIVE_LOCK_SCREEN));
assertNotNull (mManager);
}
diff --git a/tests/src/org/lineageos/tests/media/unit/LineageAudioManagerTest.java b/tests/src/org/lineageos/tests/media/unit/LineageAudioManagerTest.java
index 807a5bd0..e35d3c88 100644
--- a/tests/src/org/lineageos/tests/media/unit/LineageAudioManagerTest.java
+++ b/tests/src/org/lineageos/tests/media/unit/LineageAudioManagerTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.media.unit;
+package org.lineageos.tests.media.unit;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -35,25 +35,25 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.media.AudioSessionInfo;
-import cyanogenmod.media.CMAudioManager;
-import cyanogenmod.media.ICMAudioService;
+import lineageos.app.LineageContextConstants;
+import lineageos.media.AudioSessionInfo;
+import lineageos.media.LineageAudioManager;
+import lineageos.media.ILineageAudioService;
-public class CMAudioManagerTest extends AndroidTestCase {
+public class LineageAudioManagerTest extends AndroidTestCase {
- private static final String TAG = "CMAudioManagerTest";
+ private static final String TAG = "LineageAudioManagerTest";
- private CMAudioManager mCMAudioManager;
+ private LineageAudioManager mLineageAudioManager;
@Override
protected void setUp() throws Exception {
super.setUp();
Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.AUDIO));
+ LineageContextConstants.Features.AUDIO));
- mCMAudioManager = CMAudioManager.getInstance(mContext);
+ mLineageAudioManager = LineageAudioManager.getInstance(mContext);
}
/**
@@ -61,7 +61,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
*/
@SmallTest
public void testManagerExists() {
- assertNotNull(mCMAudioManager);
+ assertNotNull(mLineageAudioManager);
}
/**
@@ -69,7 +69,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
*/
@SmallTest
public void testManagerServiceIsAvailable() {
- ICMAudioService service = CMAudioManager.getService();
+ ILineageAudioService service = LineageAudioManager.getService();
assertNotNull(service);
}
@@ -97,7 +97,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
}
/**
- * EXPECT: CMAudioManager.ACTION_AUDIO_SESSIONS_CHANGED should be broadcast when
+ * EXPECT: LineageAudioManager.ACTION_AUDIO_SESSIONS_CHANGED should be broadcast when
* audio sessions are opened and closed.
*
* We register a receiver for the broadcast, create an AudioTrack, and wait to
@@ -107,7 +107,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
@SmallTest
public void testSessionInfoBroadcast() throws Exception {
- IntentFilter filter = new IntentFilter(CMAudioManager.ACTION_AUDIO_SESSIONS_CHANGED);
+ IntentFilter filter = new IntentFilter(LineageAudioManager.ACTION_AUDIO_SESSIONS_CHANGED);
AudioSessionReceiver receiver = new AudioSessionReceiver(2);
mContext.registerReceiver(receiver, filter);
@@ -149,7 +149,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
*/
@SmallTest
public void testSymphonyOfDestruction() throws Exception {
- IntentFilter filter = new IntentFilter(CMAudioManager.ACTION_AUDIO_SESSIONS_CHANGED);
+ IntentFilter filter = new IntentFilter(LineageAudioManager.ACTION_AUDIO_SESSIONS_CHANGED);
AudioSessionReceiver receiver = new AudioSessionReceiver(SESSIONS * 2);
mContext.registerReceiver(receiver, filter);
@@ -202,9 +202,9 @@ public class CMAudioManagerTest extends AndroidTestCase {
public void onReceive(Context context, Intent intent) {
assertNotNull(intent);
- boolean added = intent.getBooleanExtra(CMAudioManager.EXTRA_SESSION_ADDED, false);
+ boolean added = intent.getBooleanExtra(LineageAudioManager.EXTRA_SESSION_ADDED, false);
- AudioSessionInfo info = intent.getParcelableExtra(CMAudioManager.EXTRA_SESSION_INFO);
+ AudioSessionInfo info = intent.getParcelableExtra(LineageAudioManager.EXTRA_SESSION_INFO);
Log.d(TAG, "onReceive: " + info);
assertNotNull(info);
@@ -239,7 +239,7 @@ public class CMAudioManagerTest extends AndroidTestCase {
};
private AudioSessionInfo findAudioSessionInfo(int sessionId) {
- List<AudioSessionInfo> infos = mCMAudioManager.listAudioSessions(AudioManager.STREAM_MUSIC);
+ List<AudioSessionInfo> infos = mLineageAudioManager.listAudioSessions(AudioManager.STREAM_MUSIC);
for (AudioSessionInfo info : infos) {
if (info.getSessionId() == sessionId) {
return info;
diff --git a/tests/src/org/lineageos/tests/power/unit/PerfomanceManagerTest.java b/tests/src/org/lineageos/tests/power/unit/PerfomanceManagerTest.java
index 17e24110..4259ef62 100644
--- a/tests/src/org/lineageos/tests/power/unit/PerfomanceManagerTest.java
+++ b/tests/src/org/lineageos/tests/power/unit/PerfomanceManagerTest.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.power.unit;
+package org.lineageos.tests.power.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.power.IPerformanceManager;
-import cyanogenmod.power.PerformanceManager;
-import cyanogenmod.power.PerformanceProfile;
+import lineageos.app.LineageContextConstants;
+import lineageos.power.IPerformanceManager;
+import lineageos.power.PerformanceManager;
+import lineageos.power.PerformanceProfile;
/**
* Code coverage for public facing {@link PerformanceManager} interfaces.
@@ -31,7 +31,7 @@ import cyanogenmod.power.PerformanceProfile;
public class PerfomanceManagerTest extends AndroidTestCase {
private static final String TAG = PerfomanceManagerTest.class.getSimpleName();
private static final int IMPOSSIBLE_POWER_PROFILE = -1;
- private PerformanceManager mCMPerformanceManager;
+ private PerformanceManager mLineagePerformanceManager;
private PerformanceProfile mSavedPerfProfile;
@Override
@@ -39,32 +39,32 @@ public class PerfomanceManagerTest extends AndroidTestCase {
super.setUp();
// Only run this if we support performance abstraction
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.PERFORMANCE));
- mCMPerformanceManager = PerformanceManager.getInstance(mContext);
+ LineageContextConstants.Features.PERFORMANCE));
+ mLineagePerformanceManager = PerformanceManager.getInstance(mContext);
// Save the perf profile for later restore.
- mSavedPerfProfile = mCMPerformanceManager.getPowerProfile(
- mCMPerformanceManager.getPowerProfile());
+ mSavedPerfProfile = mLineagePerformanceManager.getPowerProfile(
+ mLineagePerformanceManager.getPowerProfile());
}
@SmallTest
public void testManagerExists() {
- assertNotNull(mCMPerformanceManager);
+ assertNotNull(mLineagePerformanceManager);
}
@SmallTest
public void testManagerServiceIsAvailable() {
- IPerformanceManager icmStatusBarManager = mCMPerformanceManager.getService();
- assertNotNull(icmStatusBarManager);
+ IPerformanceManager ilineageStatusBarManager = mLineagePerformanceManager.getService();
+ assertNotNull(ilineageStatusBarManager);
}
@SmallTest
public void testPowerProfileCantBeSetIfNoneSupported() {
// Assert that if we attempt to set a power profile if none supported
// then we receive a failed response from the service.
- if (mCMPerformanceManager.getNumberOfProfiles() == 0) {
+ if (mLineagePerformanceManager.getNumberOfProfiles() == 0) {
for (int powerProfile = 0; powerProfile <
PerformanceManager.POSSIBLE_POWER_PROFILES.length; powerProfile++) {
- assertFalse(mCMPerformanceManager.setPowerProfile(powerProfile));
+ assertFalse(mLineagePerformanceManager.setPowerProfile(powerProfile));
}
}
}
@@ -82,15 +82,15 @@ public class PerfomanceManagerTest extends AndroidTestCase {
// TODO: Don't skip powersave. Skipped due to powersave being ignored while device plugged
for (int powerProfile = 1; powerProfile <
PerformanceManager.POSSIBLE_POWER_PROFILES.length; powerProfile++) {
- if (powerProfile < mCMPerformanceManager.getNumberOfProfiles()) {
+ if (powerProfile < mLineagePerformanceManager.getNumberOfProfiles()) {
//It is supported, set it and test if it was set
- if (mCMPerformanceManager.getPowerProfile() != powerProfile) {
- mCMPerformanceManager.setPowerProfile(powerProfile);
+ if (mLineagePerformanceManager.getPowerProfile() != powerProfile) {
+ mLineagePerformanceManager.setPowerProfile(powerProfile);
// Verify that it was set correctly.
- assertEquals(powerProfile, mCMPerformanceManager.getPowerProfile());
+ assertEquals(powerProfile, mLineagePerformanceManager.getPowerProfile());
}
} else {
- assertFalse(mCMPerformanceManager.setPowerProfile(powerProfile));
+ assertFalse(mLineagePerformanceManager.setPowerProfile(powerProfile));
}
}
}
@@ -98,7 +98,7 @@ public class PerfomanceManagerTest extends AndroidTestCase {
@SmallTest
public void testGetPerfProfileHasAppProfiles() {
// No application has power save by default
- assertEquals(false, mCMPerformanceManager.getProfileHasAppProfiles(
+ assertEquals(false, mLineagePerformanceManager.getProfileHasAppProfiles(
PerformanceManager.PROFILE_POWER_SAVE));
}
@@ -106,6 +106,6 @@ public class PerfomanceManagerTest extends AndroidTestCase {
protected void tearDown() throws Exception {
super.tearDown();
// Reset
- mCMPerformanceManager.setPowerProfile(mSavedPerfProfile.getId());
+ mLineagePerformanceManager.setPowerProfile(mSavedPerfProfile.getId());
}
}
diff --git a/tests/src/org/lineageos/tests/profiles/ProfileTest.java b/tests/src/org/lineageos/tests/profiles/ProfileTest.java
index 0d8d0386..1e77538d 100644
--- a/tests/src/org/lineageos/tests/profiles/ProfileTest.java
+++ b/tests/src/org/lineageos/tests/profiles/ProfileTest.java
@@ -14,22 +14,22 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles;
+package org.lineageos.tests.profiles;
import android.media.AudioManager;
import android.os.Bundle;
-import cyanogenmod.app.Profile;
-import cyanogenmod.app.Profile.Type;
+import lineageos.app.Profile;
+import lineageos.app.Profile.Type;
-import cyanogenmod.app.ProfileManager;
-import cyanogenmod.profiles.AirplaneModeSettings;
-import cyanogenmod.profiles.BrightnessSettings;
-import cyanogenmod.profiles.ConnectionSettings;
-import cyanogenmod.profiles.LockSettings;
-import cyanogenmod.profiles.RingModeSettings;
-import cyanogenmod.profiles.StreamSettings;
-import org.cyanogenmod.tests.TestActivity;
+import lineageos.app.ProfileManager;
+import lineageos.profiles.AirplaneModeSettings;
+import lineageos.profiles.BrightnessSettings;
+import lineageos.profiles.ConnectionSettings;
+import lineageos.profiles.LockSettings;
+import lineageos.profiles.RingModeSettings;
+import lineageos.profiles.StreamSettings;
+import org.lineageos.tests.TestActivity;
import java.util.ArrayList;
import java.util.UUID;
diff --git a/tests/src/org/lineageos/tests/profiles/unit/AirplaneModeSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/AirplaneModeSettingsTest.java
index d77639bc..25a0fb1e 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/AirplaneModeSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/AirplaneModeSettingsTest.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.profiles.AirplaneModeSettings;
+import lineageos.profiles.AirplaneModeSettings;
public class AirplaneModeSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/profiles/unit/BrightnessSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/BrightnessSettingsTest.java
index bb725e80..73814d88 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/BrightnessSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/BrightnessSettingsTest.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.profiles.BrightnessSettings;
+import lineageos.profiles.BrightnessSettings;
public class BrightnessSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/profiles/unit/ConnectionSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/ConnectionSettingsTest.java
index 780c0df9..4564727e 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/ConnectionSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/ConnectionSettingsTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.profiles.ConnectionSettings;
+import lineageos.profiles.ConnectionSettings;
public class ConnectionSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/profiles/unit/LockSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/LockSettingsTest.java
index 9da3c0f9..f3a47570 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/LockSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/LockSettingsTest.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.Profile;
-import cyanogenmod.profiles.LockSettings;
+import lineageos.app.Profile;
+import lineageos.profiles.LockSettings;
public class LockSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/profiles/unit/ProfileManagerTest.java b/tests/src/org/lineageos/tests/profiles/unit/ProfileManagerTest.java
index 47b801b5..c507e80b 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/ProfileManagerTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/ProfileManagerTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -23,11 +23,11 @@ import android.content.IntentFilter;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.Profile;
-import cyanogenmod.app.ProfileManager;
-import cyanogenmod.app.IProfileManager;
-import cyanogenmod.providers.CMSettings;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.Profile;
+import lineageos.app.ProfileManager;
+import lineageos.app.IProfileManager;
+import lineageos.providers.LineageSettings;
import java.util.Arrays;
import java.util.UUID;
@@ -44,7 +44,7 @@ public class ProfileManagerTest extends AndroidTestCase {
mProfileManager = ProfileManager.getInstance(mContext);
// Only run this if we support profiles service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.PROFILES));
+ LineageContextConstants.Features.PROFILES));
}
@SmallTest
@@ -62,32 +62,32 @@ public class ProfileManagerTest extends AndroidTestCase {
public void testManagerProfileIsEnabled() {
// first enable profiles
final String enabledValue = "1";
- assertTrue(CMSettings.System.putString(getContext().getContentResolver(),
- CMSettings.System.SYSTEM_PROFILES_ENABLED, enabledValue));
+ assertTrue(LineageSettings.System.putString(getContext().getContentResolver(),
+ LineageSettings.System.SYSTEM_PROFILES_ENABLED, enabledValue));
// check that we successfully enabled them via system setting
- assertEquals(enabledValue, CMSettings.System.getString(getContext().getContentResolver(),
- CMSettings.System.SYSTEM_PROFILES_ENABLED));
+ assertEquals(enabledValue, LineageSettings.System.getString(getContext().getContentResolver(),
+ LineageSettings.System.SYSTEM_PROFILES_ENABLED));
// check that profile manger returns true
assertTrue(mProfileManager.isProfilesEnabled());
// now disable the setting
final String disabledValue = "0";
- assertTrue(CMSettings.System.putString(getContext().getContentResolver(),
- CMSettings.System.SYSTEM_PROFILES_ENABLED, disabledValue));
+ assertTrue(LineageSettings.System.putString(getContext().getContentResolver(),
+ LineageSettings.System.SYSTEM_PROFILES_ENABLED, disabledValue));
// check that we successfully disable them via system setting
- assertEquals(disabledValue, CMSettings.System.getString(getContext().getContentResolver(),
- CMSettings.System.SYSTEM_PROFILES_ENABLED));
+ assertEquals(disabledValue, LineageSettings.System.getString(getContext().getContentResolver(),
+ LineageSettings.System.SYSTEM_PROFILES_ENABLED));
assertFalse(mProfileManager.isProfilesEnabled());
}
private void ensureProfilesEnabled() {
final String enabledValue = "1";
- assertTrue(CMSettings.System.putString(getContext().getContentResolver(),
- CMSettings.System.SYSTEM_PROFILES_ENABLED, enabledValue));
+ assertTrue(LineageSettings.System.putString(getContext().getContentResolver(),
+ LineageSettings.System.SYSTEM_PROFILES_ENABLED, enabledValue));
}
@SmallTest
@@ -130,7 +130,7 @@ public class ProfileManagerTest extends AndroidTestCase {
public void testGetProfileNames() {
ensureProfilesEnabled();
String[] expectedProfileNames = new String[5];
- // These defaults are pulled from the default xml in the cm platform resource package
+ // These defaults are pulled from the default xml in the lineage platform resource package
Profile expectedProfile1 = mProfileManager.getProfile(
UUID.fromString("6a181391-12ef-4f43-a701-32b11ed69449"));
Profile expectedProfile2 = mProfileManager.getProfile(
@@ -162,7 +162,7 @@ public class ProfileManagerTest extends AndroidTestCase {
public void testGetProfiles() {
ensureProfilesEnabled();
Profile[] expectedProfiles = new Profile[5];
- // These defaults are pulled from the default xml in the cm platform resource package
+ // These defaults are pulled from the default xml in the lineage platform resource package
Profile expectedProfile1 = mProfileManager.getProfile(
UUID.fromString("6a181391-12ef-4f43-a701-32b11ed69449"));
Profile expectedProfile2 = mProfileManager.getProfile(
diff --git a/tests/src/org/lineageos/tests/profiles/unit/ProfileTest.java b/tests/src/org/lineageos/tests/profiles/unit/ProfileTest.java
index 32c5b1ad..899b0066 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/ProfileTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/ProfileTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.media.AudioManager;
import android.os.Parcel;
@@ -23,14 +23,14 @@ import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.Profile;
-import cyanogenmod.profiles.AirplaneModeSettings;
-import cyanogenmod.profiles.BrightnessSettings;
-import cyanogenmod.profiles.ConnectionSettings;
-import cyanogenmod.profiles.LockSettings;
-import cyanogenmod.profiles.RingModeSettings;
-import cyanogenmod.profiles.StreamSettings;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.Profile;
+import lineageos.profiles.AirplaneModeSettings;
+import lineageos.profiles.BrightnessSettings;
+import lineageos.profiles.ConnectionSettings;
+import lineageos.profiles.LockSettings;
+import lineageos.profiles.RingModeSettings;
+import lineageos.profiles.StreamSettings;
import java.util.ArrayList;
import java.util.Arrays;
@@ -44,7 +44,7 @@ public class ProfileTest extends AndroidTestCase {
super.setUp();
// Only run this if we support profiles service
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.PROFILES));
+ LineageContextConstants.Features.PROFILES));
}
@MediumTest
diff --git a/tests/src/org/lineageos/tests/profiles/unit/RingModeSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/RingModeSettingsTest.java
index de2ae932..4c1bfd6e 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/RingModeSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/RingModeSettingsTest.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.profiles.RingModeSettings;
+import lineageos.profiles.RingModeSettings;
public class RingModeSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/profiles/unit/StreamSettingsTest.java b/tests/src/org/lineageos/tests/profiles/unit/StreamSettingsTest.java
index 8bf806ba..783d293e 100644
--- a/tests/src/org/lineageos/tests/profiles/unit/StreamSettingsTest.java
+++ b/tests/src/org/lineageos/tests/profiles/unit/StreamSettingsTest.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.profiles.unit;
+package org.lineageos.tests.profiles.unit;
import android.media.AudioManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.profiles.StreamSettings;
+import lineageos.profiles.StreamSettings;
public class StreamSettingsTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/providers/LineageSettingsTest.java b/tests/src/org/lineageos/tests/providers/LineageSettingsTest.java
index 181af3d7..d6f61e80 100644
--- a/tests/src/org/lineageos/tests/providers/LineageSettingsTest.java
+++ b/tests/src/org/lineageos/tests/providers/LineageSettingsTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.providers;
+package org.lineageos.tests.providers;
import android.content.ContentResolver;
import android.database.ContentObserver;
@@ -24,11 +24,11 @@ import android.os.UserHandle;
import android.provider.Settings;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
-import cyanogenmod.providers.CMSettings;
+import lineageos.providers.LineageSettings;
-public class CMSettingsTest extends AndroidTestCase{
+public class LineageSettingsTest extends AndroidTestCase{
private ContentResolver mContentResolver;
- private CMSettingsTestObserver mTestObserver;
+ private LineageSettingsTestObserver mTestObserver;
private static boolean sIsOnChangedCalled = false;
private static Uri sExpectedUriChange = null;
@@ -36,7 +36,7 @@ public class CMSettingsTest extends AndroidTestCase{
@Override
public void setUp() {
mContentResolver = getContext().getContentResolver();
- mTestObserver = new CMSettingsTestObserver(null);
+ mTestObserver = new LineageSettingsTestObserver(null);
}
@Override
@@ -46,34 +46,34 @@ public class CMSettingsTest extends AndroidTestCase{
@MediumTest
public void testPutAndGetSystemString() {
- final String key = CMSettings.System.__MAGICAL_TEST_PASSING_ENABLER;
+ final String key = LineageSettings.System.__MAGICAL_TEST_PASSING_ENABLER;
// put
final String expectedValue = "1";
- boolean isPutSuccessful = CMSettings.System.putString(mContentResolver, key, expectedValue);
+ boolean isPutSuccessful = LineageSettings.System.putString(mContentResolver, key, expectedValue);
assertTrue(isPutSuccessful);
// get
- String actualValue = CMSettings.System.getString(mContentResolver, key);
+ String actualValue = LineageSettings.System.getString(mContentResolver, key);
assertEquals(expectedValue, actualValue);
// setup observer
sIsOnChangedCalled = false;
- sExpectedUriChange = CMSettings.System.getUriFor(key);
+ sExpectedUriChange = LineageSettings.System.getUriFor(key);
mContentResolver.registerContentObserver(sExpectedUriChange, false, mTestObserver,
UserHandle.USER_ALL);
// replace
final String expectedReplaceValue = "0";
- isPutSuccessful = CMSettings.System.putString(mContentResolver, key, expectedReplaceValue);
+ isPutSuccessful = LineageSettings.System.putString(mContentResolver, key, expectedReplaceValue);
assertTrue(isPutSuccessful);
// get
- actualValue = CMSettings.System.getString(mContentResolver, key);
+ actualValue = LineageSettings.System.getString(mContentResolver, key);
assertEquals(expectedReplaceValue, actualValue);
// delete to clean up
- int rowsAffected = mContentResolver.delete(CMSettings.System.CONTENT_URI,
+ int rowsAffected = mContentResolver.delete(LineageSettings.System.CONTENT_URI,
Settings.NameValueTable.NAME + " = ?", new String[]{ key });
assertEquals(1, rowsAffected);
@@ -85,34 +85,34 @@ public class CMSettingsTest extends AndroidTestCase{
@MediumTest
public void testPutAndGetSecureString() {
/* TODO: FIXME
- final String key = CMSettings.Secure.__MAGICAL_TEST_PASSING_ENABLER;
+ final String key = LineageSettings.Secure.__MAGICAL_TEST_PASSING_ENABLER;
// put
final String expectedValue = "0";
- boolean isPutSuccessful = CMSettings.Secure.putString(mContentResolver, key, expectedValue);
+ boolean isPutSuccessful = LineageSettings.Secure.putString(mContentResolver, key, expectedValue);
assertTrue(isPutSuccessful);
// get
- String actualValue = CMSettings.Secure.getString(mContentResolver, key);
+ String actualValue = LineageSettings.Secure.getString(mContentResolver, key);
assertEquals(expectedValue, actualValue);
// setup observer
sIsOnChangedCalled = false;
- sExpectedUriChange = CMSettings.Secure.getUriFor(key);
+ sExpectedUriChange = LineageSettings.Secure.getUriFor(key);
mContentResolver.registerContentObserver(sExpectedUriChange, false, mTestObserver,
UserHandle.USER_ALL);
// replace
final String expectedReplaceValue = "1";
- isPutSuccessful = CMSettings.Secure.putString(mContentResolver, key, expectedReplaceValue);
+ isPutSuccessful = LineageSettings.Secure.putString(mContentResolver, key, expectedReplaceValue);
assertTrue(isPutSuccessful);
// get
- actualValue = CMSettings.Secure.getString(mContentResolver, key);
+ actualValue = LineageSettings.Secure.getString(mContentResolver, key);
assertEquals(expectedReplaceValue, actualValue);
// delete to clean up
- int rowsAffected = mContentResolver.delete(CMSettings.Secure.CONTENT_URI,
+ int rowsAffected = mContentResolver.delete(LineageSettings.Secure.CONTENT_URI,
Settings.NameValueTable.NAME + " = ?", new String[]{ key });
assertEquals(1, rowsAffected);
@@ -127,30 +127,30 @@ public class CMSettingsTest extends AndroidTestCase{
// put
final String expectedValue = "globalTestValue1";
- boolean isPutSuccessful = CMSettings.Global.putString(mContentResolver, key, expectedValue);
+ boolean isPutSuccessful = LineageSettings.Global.putString(mContentResolver, key, expectedValue);
assertTrue(isPutSuccessful);
// get
- String actualValue = CMSettings.Global.getString(mContentResolver, key);
+ String actualValue = LineageSettings.Global.getString(mContentResolver, key);
assertEquals(expectedValue, actualValue);
// setup observer
sIsOnChangedCalled = false;
- sExpectedUriChange = CMSettings.Global.getUriFor(key);
+ sExpectedUriChange = LineageSettings.Global.getUriFor(key);
mContentResolver.registerContentObserver(sExpectedUriChange, false, mTestObserver,
UserHandle.USER_OWNER);
// replace
final String expectedReplaceValue = "globalTestValue2";
- isPutSuccessful = CMSettings.Global.putString(mContentResolver, key, expectedReplaceValue);
+ isPutSuccessful = LineageSettings.Global.putString(mContentResolver, key, expectedReplaceValue);
assertTrue(isPutSuccessful);
// get
- actualValue = CMSettings.Global.getString(mContentResolver, key);
+ actualValue = LineageSettings.Global.getString(mContentResolver, key);
assertEquals(expectedReplaceValue, actualValue);
// delete to clean up
- int rowsAffected = mContentResolver.delete(CMSettings.Global.CONTENT_URI,
+ int rowsAffected = mContentResolver.delete(LineageSettings.Global.CONTENT_URI,
Settings.NameValueTable.NAME + " = ?", new String[]{ key });
assertEquals(1, rowsAffected);
@@ -159,9 +159,9 @@ public class CMSettingsTest extends AndroidTestCase{
}
}
- private class CMSettingsTestObserver extends ContentObserver {
+ private class LineageSettingsTestObserver extends ContentObserver {
- public CMSettingsTestObserver(Handler handler) {
+ public LineageSettingsTestObserver(Handler handler) {
super(handler);
}
diff --git a/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java b/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java
index 72f7eec1..49462792 100644
--- a/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java
+++ b/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java
@@ -1,12 +1,12 @@
-package org.cyanogenmod.tests.settings;
+package org.lineageos.tests.settings;
-import org.cyanogenmod.tests.TestActivity;
-import cyanogenmod.app.PartnerInterface;
+import org.lineageos.tests.TestActivity;
+import lineageos.app.PartnerInterface;
/**
- * Tests functionality added in {@link cyanogenmod.app.PartnerInterface}
+ * Tests functionality added in {@link lineageos.app.PartnerInterface}
*/
-public class CMPartnerInterfaceTest extends TestActivity {
+public class LineagePartnerInterfaceTest extends TestActivity {
// Zen Mode to 15 minutes
private static final long ZEN_MODE_DURATION_15_MINUTES_MS = 15 * 60000;
diff --git a/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java b/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java
index d81a6ac6..9d693c83 100644
--- a/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java
+++ b/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.settings.unit;
+package org.lineageos.tests.settings.unit;
import android.app.INotificationManager;
import android.content.Context;
@@ -35,17 +35,17 @@ import android.provider.Settings;
import android.text.format.DateUtils;
import android.util.Log;
-import cyanogenmod.app.CMContextConstants;
-import cyanogenmod.app.PartnerInterface;
+import lineageos.app.LineageContextConstants;
+import lineageos.app.PartnerInterface;
import java.util.List;
/**
* Unit test for PartnerInterface
*/
-public class CMPartnerInterfaceTest extends AndroidTestCase {
+public class LineagePartnerInterfaceTest extends AndroidTestCase {
- private static final String TAG = "CMPartnerInterfaceTest";
+ private static final String TAG = "LineagePartnerInterfaceTest";
private PartnerInterface mPartnerInterface;
@@ -54,7 +54,7 @@ public class CMPartnerInterfaceTest extends AndroidTestCase {
super.setUp();
// Only run this if we support partner interfaces
org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
- CMContextConstants.Features.PARTNER));
+ LineageContextConstants.Features.PARTNER));
mPartnerInterface = PartnerInterface.getInstance(getContext());
setupAirplaneModeTests();
@@ -221,7 +221,7 @@ public class CMPartnerInterfaceTest extends AndroidTestCase {
if (bufferSize != AudioRecord.ERROR_BAD_VALUE) {
AudioRecord recorder = new AudioRecord(
- cyanogenmod.media.MediaRecorder.AudioSource.HOTWORD,
+ lineageos.media.MediaRecorder.AudioSource.HOTWORD,
rate, channelConfig, audioFormat, bufferSize);
if (recorder.getState() == AudioRecord.STATE_INITIALIZED)
diff --git a/tests/src/org/lineageos/tests/telephony/LineageTelephonyTest.java b/tests/src/org/lineageos/tests/telephony/LineageTelephonyTest.java
index 1f184f72..76a508ee 100644
--- a/tests/src/org/lineageos/tests/telephony/LineageTelephonyTest.java
+++ b/tests/src/org/lineageos/tests/telephony/LineageTelephonyTest.java
@@ -1,15 +1,15 @@
-package org.cyanogenmod.tests.telephony;
+package org.lineageos.tests.telephony;
import android.telephony.SubscriptionManager;
import android.widget.Toast;
-import org.cyanogenmod.tests.TestActivity;
+import org.lineageos.tests.TestActivity;
-import cyanogenmod.app.CMTelephonyManager;
+import lineageos.app.LineageTelephonyManager;
/**
* Created by adnan on 8/6/15.
*/
-public class CMTelephonyTest extends TestActivity {
+public class LineageTelephonyTest extends TestActivity {
@Override
protected String tag() {
return null;
@@ -23,77 +23,77 @@ public class CMTelephonyTest extends TestActivity {
private Test[] mTests = new Test[] {
new Test("test retreive list of subscription information") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- Toast.makeText(CMTelephonyTest.this, "Test retrieve info "
- + cmTelephonyManager.getSubInformation().toString(),
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ Toast.makeText(LineageTelephonyTest.this, "Test retrieve info "
+ + lineageTelephonyManager.getSubInformation().toString(),
Toast.LENGTH_SHORT).show();
}
},
new Test("test is default subscription active") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- Toast.makeText(CMTelephonyTest.this, "Test default sub active "
- + cmTelephonyManager.isSubActive(
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ Toast.makeText(LineageTelephonyTest.this, "Test default sub active "
+ + lineageTelephonyManager.isSubActive(
SubscriptionManager.getDefaultSubscriptionId()),
Toast.LENGTH_SHORT).show();
}
},
new Test("test setSubState on default subscription") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- cmTelephonyManager.setSubState(SubscriptionManager.getDefaultSubscriptionId(), true);
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ lineageTelephonyManager.setSubState(SubscriptionManager.getDefaultSubscriptionId(), true);
}
},
new Test("test is data enabled on default sub") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- Toast.makeText(CMTelephonyTest.this, "Test default sub data "
- + cmTelephonyManager.isDataConnectionSelectedOnSub(
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ Toast.makeText(LineageTelephonyTest.this, "Test default sub data "
+ + lineageTelephonyManager.isDataConnectionSelectedOnSub(
SubscriptionManager.getDefaultSubscriptionId()),
Toast.LENGTH_SHORT).show();
}
},
new Test("test is data enabled") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- Toast.makeText(CMTelephonyTest.this, "Test data enabled "
- + cmTelephonyManager.isDataConnectionEnabled(),
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ Toast.makeText(LineageTelephonyTest.this, "Test data enabled "
+ + lineageTelephonyManager.isDataConnectionEnabled(),
Toast.LENGTH_SHORT).show();
}
},
new Test("test setDataConnectionState") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- cmTelephonyManager.setDataConnectionState(true);
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ lineageTelephonyManager.setDataConnectionState(true);
}
},
new Test("test setDataConnectionSelectedOnSub") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- cmTelephonyManager.setDataConnectionSelectedOnSub(
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ lineageTelephonyManager.setDataConnectionSelectedOnSub(
SubscriptionManager.getDefaultSubscriptionId());
}
},
new Test("test setDefaultPhoneSub") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- cmTelephonyManager.setDefaultPhoneSub(
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ lineageTelephonyManager.setDefaultPhoneSub(
SubscriptionManager.getDefaultSubscriptionId());
}
},
new Test("test setDefaultSmsSub") {
public void run() {
- CMTelephonyManager cmTelephonyManager =
- CMTelephonyManager.getInstance(CMTelephonyTest.this);
- cmTelephonyManager.setDefaultSmsSub(
+ LineageTelephonyManager lineageTelephonyManager =
+ LineageTelephonyManager.getInstance(LineageTelephonyTest.this);
+ lineageTelephonyManager.setDefaultSmsSub(
SubscriptionManager.getDefaultSubscriptionId());
}
},
diff --git a/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestBuilderTest.java b/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestBuilderTest.java
index ce796d2e..1c972ef5 100644
--- a/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestBuilderTest.java
+++ b/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestBuilderTest.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.themes.unit;
+package org.lineageos.tests.themes.unit;
import android.content.res.ThemeConfig;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.themes.ThemeChangeRequest;
+import lineageos.themes.ThemeChangeRequest;
import java.util.HashMap;
import java.util.Map;
diff --git a/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestTest.java b/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestTest.java
index a891b7f1..3355ca84 100644
--- a/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestTest.java
+++ b/tests/src/org/lineageos/tests/themes/unit/ThemeChangeRequestTest.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.themes.unit;
+package org.lineageos.tests.themes.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.themes.ThemeChangeRequest;
+import lineageos.themes.ThemeChangeRequest;
import java.util.HashMap;
import java.util.Map;
diff --git a/tests/src/org/lineageos/tests/themes/unit/ThemeManagerTest.java b/tests/src/org/lineageos/tests/themes/unit/ThemeManagerTest.java
index bae76640..f909cdd2 100644
--- a/tests/src/org/lineageos/tests/themes/unit/ThemeManagerTest.java
+++ b/tests/src/org/lineageos/tests/themes/unit/ThemeManagerTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.themes.unit;
+package org.lineageos.tests.themes.unit;
import android.content.ContentResolver;
import android.content.Context;
@@ -26,12 +26,12 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.text.TextUtils;
import android.util.Log;
-import cyanogenmod.providers.CMSettings;
-import cyanogenmod.providers.ThemesContract;
-import cyanogenmod.themes.IThemeService;
-import cyanogenmod.themes.ThemeChangeRequest;
-import cyanogenmod.themes.ThemeManager;
-import cyanogenmod.themes.ThemeManager.ThemeChangeListener;
+import lineageos.providers.LineageSettings;
+import lineageos.providers.ThemesContract;
+import lineageos.themes.IThemeService;
+import lineageos.themes.ThemeChangeRequest;
+import lineageos.themes.ThemeManager;
+import lineageos.themes.ThemeManager.ThemeChangeListener;
import org.mockito.Mockito;
@@ -78,8 +78,8 @@ public class ThemeManagerTest extends AndroidTestCase {
@SmallTest
public void testManagerServiceIsAvailable() {
- IThemeService icmStatusBarManager = mThemeManager.getService();
- assertNotNull(icmStatusBarManager);
+ IThemeService ilineageStatusBarManager = mThemeManager.getService();
+ assertNotNull(ilineageStatusBarManager);
}
@SmallTest
@@ -610,8 +610,8 @@ public class ThemeManagerTest extends AndroidTestCase {
}
private static String getDefaultThemePackageName(Context context) {
- final String defaultThemePkg = CMSettings.Secure.getString(context.getContentResolver(),
- CMSettings.Secure.DEFAULT_THEME_PACKAGE);
+ final String defaultThemePkg = LineageSettings.Secure.getString(context.getContentResolver(),
+ LineageSettings.Secure.DEFAULT_THEME_PACKAGE);
if (!TextUtils.isEmpty(defaultThemePkg)) {
PackageManager pm = context.getPackageManager();
try {
diff --git a/tests/src/org/lineageos/tests/themes/unit/ThemesContractTests.java b/tests/src/org/lineageos/tests/themes/unit/ThemesContractTests.java
index 1b0e0c26..480870be 100644
--- a/tests/src/org/lineageos/tests/themes/unit/ThemesContractTests.java
+++ b/tests/src/org/lineageos/tests/themes/unit/ThemesContractTests.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.themes.unit;
+package org.lineageos.tests.themes.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.providers.ThemesContract;
+import lineageos.providers.ThemesContract;
public class ThemesContractTests extends AndroidTestCase {
private static final String TAG = ThemesContract.class.getSimpleName();
diff --git a/tests/src/org/lineageos/tests/util/ColorUtilTest.java b/tests/src/org/lineageos/tests/util/ColorUtilTest.java
index 56e5a2a7..9ce91f96 100644
--- a/tests/src/org/lineageos/tests/util/ColorUtilTest.java
+++ b/tests/src/org/lineageos/tests/util/ColorUtilTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.util;
+package org.lineageos.tests.util;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -23,7 +23,7 @@ import android.graphics.Paint;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.test.AndroidTestCase;
-import cyanogenmod.util.ColorUtils;
+import lineageos.util.ColorUtils;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
diff --git a/tests/src/org/lineageos/tests/versioning/VersioningTest.java b/tests/src/org/lineageos/tests/versioning/VersioningTest.java
index 69f928f7..9cbf2752 100644
--- a/tests/src/org/lineageos/tests/versioning/VersioningTest.java
+++ b/tests/src/org/lineageos/tests/versioning/VersioningTest.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning;
+package org.lineageos.tests.versioning;
import android.widget.Toast;
-import cyanogenmod.os.Build;
+import lineageos.os.Build;
-import org.cyanogenmod.tests.TestActivity;
+import org.lineageos.tests.TestActivity;
public class VersioningTest extends TestActivity {
@Override
@@ -36,23 +36,23 @@ public class VersioningTest extends TestActivity {
new Test("test retrieve version") {
public void run() {
Toast.makeText(VersioningTest.this,
- "Current API version is " + Build.CM_VERSION.SDK_INT + " which is "
- + Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT),
+ "Current API version is " + Build.LINEAGE_VERSION.SDK_INT + " which is "
+ + Build.getNameForSDKInt(Build.LINEAGE_VERSION.SDK_INT),
Toast.LENGTH_SHORT).show();
}
},
new Test("test target version larger") {
public void run() {
- int currentapiVersion = Build.CM_VERSION.SDK_INT;
- if (currentapiVersion >= Build.CM_VERSION_CODES.APRICOT){
+ int currentapiVersion = Build.LINEAGE_VERSION.SDK_INT;
+ if (currentapiVersion >= Build.LINEAGE_VERSION_CODES.APRICOT){
Toast.makeText(VersioningTest.this,
"Current API version is greater or equal to "
- + Build.getNameForSDKInt(Build.CM_VERSION_CODES.APRICOT),
+ + Build.getNameForSDKInt(Build.LINEAGE_VERSION_CODES.APRICOT),
Toast.LENGTH_LONG).show();
} else{
Toast.makeText(VersioningTest.this,
"Current API version is below target SKD version "
- + Build.CM_VERSION_CODES.APRICOT,
+ + Build.LINEAGE_VERSION_CODES.APRICOT,
Toast.LENGTH_SHORT).show();
}
}
diff --git a/tests/src/org/lineageos/tests/versioning/unit/BinderTransactionTest.java b/tests/src/org/lineageos/tests/versioning/unit/BinderTransactionTest.java
index a7403cab..47032bd1 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/BinderTransactionTest.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/BinderTransactionTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit;
+package org.lineageos.tests.versioning.unit;
import android.content.Context;
import android.os.Binder;
@@ -23,10 +23,10 @@ import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
import android.util.Pair;
-import org.cyanogenmod.tests.CyanogenModTestApplication;
-import org.cyanogenmod.tests.versioning.unit.apiv2.ApiV2PriorReleaseInterfaces;
-import org.cyanogenmod.tests.versioning.unit.apiv4.ApiV4PriorReleaseInterfaces;
-import org.cyanogenmod.tests.versioning.unit.apiv5.ApiV5PriorReleaseInterfaces;
+import org.lineageos.tests.LineageOSTestApplication;
+import org.lineageos.tests.versioning.unit.apiv2.ApiV2PriorReleaseInterfaces;
+import org.lineageos.tests.versioning.unit.apiv4.ApiV4PriorReleaseInterfaces;
+import org.lineageos.tests.versioning.unit.apiv5.ApiV5PriorReleaseInterfaces;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -65,7 +65,7 @@ import java.util.regex.Pattern;
public class BinderTransactionTest extends AndroidTestCase {
private static final String TAG = BinderTransactionTest.class.getSimpleName();
private static final String STUB_SUFFIX = "$Stub";
- private static final String CYANOGENMOD_NAMESPACE = "cyanogenmod";
+ private static final String LINEAGEOS_NAMESPACE = "lineageos";
private static final String TRANSACTION_PREFIX = "TRANSACTION_";
private static final int NOT_FROM_PRIOR_RELEASE = -1;
@@ -95,8 +95,8 @@ public class BinderTransactionTest extends AndroidTestCase {
private static void doSetup() {
mKnownSdkClasses = MagicalDexHelper.getLoadedClasses(
- CyanogenModTestApplication.getStaticApplicationContext(), CYANOGENMOD_NAMESPACE);
- sContext = CyanogenModTestApplication.getStaticApplicationContext();
+ LineageOSTestApplication.getStaticApplicationContext(), LINEAGEOS_NAMESPACE);
+ sContext = LineageOSTestApplication.getStaticApplicationContext();
addInterfaces(ApiV2PriorReleaseInterfaces.getInterfaces());
addInterfaces(ApiV4PriorReleaseInterfaces.getInterfaces());
addInterfaces(ApiV5PriorReleaseInterfaces.getInterfaces());
@@ -125,7 +125,7 @@ public class BinderTransactionTest extends AndroidTestCase {
for (String sClazz : mKnownSdkClasses) {
if (sClazz.endsWith(STUB_SUFFIX)) {
try {
- Class clazz = MagicalDexHelper.loadClassForNameSpace(CyanogenModTestApplication
+ Class clazz = MagicalDexHelper.loadClassForNameSpace(LineageOSTestApplication
.getStaticApplicationContext(), sClazz);
Field[] fields = clazz.getDeclaredFields();
Pattern pattern = Pattern.compile("\\.([\\w]+)\\$");
diff --git a/tests/src/org/lineageos/tests/versioning/unit/BuildTest.java b/tests/src/org/lineageos/tests/versioning/unit/BuildTest.java
index 1922e953..02bdf9a9 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/BuildTest.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/BuildTest.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit;
+package org.lineageos.tests.versioning.unit;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.os.Build;
+import lineageos.os.Build;
import android.test.AndroidTestCase;
-import cyanogenmod.os.Concierge;
+import lineageos.os.Concierge;
/**
* Created by adnan on 7/14/15.
@@ -34,17 +34,17 @@ public class BuildTest extends AndroidTestCase {
@SmallTest
public void testFetchSdkApiLevelExists() {
- assertNotNull(Build.CM_VERSION.SDK_INT);
+ assertNotNull(Build.LINEAGE_VERSION.SDK_INT);
}
@SmallTest
public void testSdkApiLevelCurrent() {
- assertEquals(Concierge.PARCELABLE_VERSION, Build.CM_VERSION.SDK_INT);
+ assertEquals(Concierge.PARCELABLE_VERSION, Build.LINEAGE_VERSION.SDK_INT);
}
@SmallTest
public void testSdkApiLevelCanMatch() {
- String apiName = Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT);
+ String apiName = Build.getNameForSDKInt(Build.LINEAGE_VERSION.SDK_INT);
assertNotNull(apiName);
assertEquals(Build.getNameForSDKInt(Concierge.PARCELABLE_VERSION), apiName);
}
@@ -52,7 +52,7 @@ public class BuildTest extends AndroidTestCase {
@SmallTest
public void testSdkApiLevelSkippedIfGreaterThanAllowed() {
int i = 0;
- if (Build.CM_VERSION.SDK_INT > Concierge.PARCELABLE_VERSION + 1) {
+ if (Build.LINEAGE_VERSION.SDK_INT > Concierge.PARCELABLE_VERSION + 1) {
i++;
}
assertEquals(0, i);
diff --git a/tests/src/org/lineageos/tests/versioning/unit/ClassPathException.java b/tests/src/org/lineageos/tests/versioning/unit/ClassPathException.java
index 3c3e6257..7acfc640 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/ClassPathException.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/ClassPathException.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit;
+package org.lineageos.tests.versioning.unit;
/**
* Created by Adnan on 9/25/15.
diff --git a/tests/src/org/lineageos/tests/versioning/unit/ClassPathTest.java b/tests/src/org/lineageos/tests/versioning/unit/ClassPathTest.java
index 481ae7b1..b5c041ed 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/ClassPathTest.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/ClassPathTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit;
+package org.lineageos.tests.versioning.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
@@ -31,7 +31,7 @@ import java.util.Enumeration;
*/
public class ClassPathTest extends AndroidTestCase {
- private static final String CYANOGENMOD_NAMESPACE = "cyanogenmod";
+ private static final String LINEAGEOS_NAMESPACE = "lineageos";
private static final String PATH_TO_SYSTEM_FRAMEWORK = "/system/framework";
private ArrayList<String> mKnownSdkClasses;
@@ -39,7 +39,7 @@ public class ClassPathTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- mKnownSdkClasses = MagicalDexHelper.getLoadedClasses(mContext, CYANOGENMOD_NAMESPACE);
+ mKnownSdkClasses = MagicalDexHelper.getLoadedClasses(mContext, LINEAGEOS_NAMESPACE);
}
@SmallTest
diff --git a/tests/src/org/lineageos/tests/versioning/unit/MagicalDexHelper.java b/tests/src/org/lineageos/tests/versioning/unit/MagicalDexHelper.java
index a7f2ccc7..ae414f38 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/MagicalDexHelper.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/MagicalDexHelper.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit;
+package org.lineageos.tests.versioning.unit;
import android.content.Context;
import dalvik.system.DexFile;
diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java
index 9f5906cd..7329c207 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit.apiv2;
+package org.lineageos.tests.versioning.unit.apiv2;
import java.util.HashMap;
import java.util.Map;
@@ -63,9 +63,9 @@ public class ApiV2PriorReleaseInterfaces {
partnerMap.put("getCurrentHotwordPackageName", 6);
}
- //CMHardwareManager Aidl (ICMHardwareService)
+ //LineageHardwareManager Aidl (ILineageHardwareService)
static {
- Map<String, Integer> hardwareMap = getInternalInterfaceMap("ICMHardwareService");
+ Map<String, Integer> hardwareMap = getInternalInterfaceMap("ILineageHardwareService");
// APRICOT + BOYSENBERRY + CANTALOUPE
hardwareMap.put("getSupportedFeatures", 1);
hardwareMap.put("get", 2);
@@ -93,9 +93,9 @@ public class ApiV2PriorReleaseInterfaces {
hardwareMap.put("unRegisterThermalListener", 24);
}
- //CMStatusBarManager Aidl (ICMStatusBarManager)
+ //LineageStatusBarManager Aidl (ILineageStatusBarManager)
static {
- Map<String, Integer> statusBarMap = getInternalInterfaceMap("ICMStatusBarManager");
+ Map<String, Integer> statusBarMap = getInternalInterfaceMap("ILineageStatusBarManager");
// APRICOT + BOYSENBERRY + CANTALOUPE
statusBarMap.put("createCustomTileWithTag", 1);
statusBarMap.put("removeCustomTileWithTag", 2);
@@ -112,9 +112,9 @@ public class ApiV2PriorReleaseInterfaces {
suggestMap.put("getSuggestions", 2);
}
- //CMTelephonyManager Aidl (ICMTelephonyManager)
+ //LineageTelephonyManager Aidl (ILineageTelephonyManager)
static {
- Map<String, Integer> telephonyMap = getInternalInterfaceMap("ICMTelephonyManager");
+ Map<String, Integer> telephonyMap = getInternalInterfaceMap("ILineageTelephonyManager");
// APRICOT + BOYSENBERRY + CANTALOUPE
telephonyMap.put("getSubInformation", 1);
telephonyMap.put("isSubActive", 2);
diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java
index c34023e0..3ba836e0 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit.apiv4;
+package org.lineageos.tests.versioning.unit.apiv4;
import java.util.HashMap;
import java.util.Map;
@@ -39,16 +39,16 @@ public class ApiV4PriorReleaseInterfaces {
partnerMap.put("setZenModeWithDuration", 7);
}
- //CMHardwareManager Aidl (ICMHardwareService)
+ //LineageHardwareManager Aidl (ILineageHardwareService)
static {
- Map<String, Integer> hardwareMap = getInternalInterfaceMap("ICMHardwareService");
+ Map<String, Integer> hardwareMap = getInternalInterfaceMap("ILineageHardwareService");
// APRICOT + BOYSENBERRY + CANTALOUPE to 24
// DRAGONFRUIT BEGIN
hardwareMap.put("isSunlightEnhancementSelfManaged", 25);
hardwareMap.put("getUniqueDeviceId", 26);
}
- //CMStatusBarManager Aidl (ICMStatusBarManager)
+ //LineageStatusBarManager Aidl (ILineageStatusBarManager)
static {
// APRICOT + BOYSENBERRY + CANTALOUPE to 5
// DRAGONFRUIT BEGIN
@@ -60,7 +60,7 @@ public class ApiV4PriorReleaseInterfaces {
// DRAGONFRUIT BEGIN
}
- //CMTelephonyManager Aidl (ICMTelephonyManager)
+ //LineageTelephonyManager Aidl (ILineageTelephonyManager)
static {
// APRICOT + BOYSENBERRY + CANTALOUPE to 9
// DRAGONFRUIT BEGIN
diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java
index 16a687cc..158b0ff9 100644
--- a/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java
+++ b/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.versioning.unit.apiv5;
+package org.lineageos.tests.versioning.unit.apiv5;
import java.util.HashMap;
import java.util.Map;
@@ -97,12 +97,12 @@ public class ApiV5PriorReleaseInterfaces {
llChangeListener.put("onLiveLockScreenChanged", 1);
}
- //CMAudioManager Aidl (ICMAudioService)
+ //LineageAudioManager Aidl (ILineageAudioService)
static {
- Map<String, Integer> cmAudioService =
- getInternalInterfaceMap("ICMAudioService");
+ Map<String, Integer> lineageAudioService =
+ getInternalInterfaceMap("ILineageAudioService");
//ELDERBERRY BEGIN
- cmAudioService.put("listAudioSessions", 1);
+ lineageAudioService.put("listAudioSessions", 1);
}
//ThemeChangeListener Aidl (IThemeChangeListener)
@@ -142,17 +142,17 @@ public class ApiV5PriorReleaseInterfaces {
themes.put("getLastThemeChangeRequestType", 13);
}
- //CMWeatherManager Aidl (ICMWeatherManager)
+ //LineageWeatherManager Aidl (ILineageWeatherManager)
static {
- Map<String, Integer> icmWeatherManager =
- getInternalInterfaceMap("ICMWeatherManager");
+ Map<String, Integer> ilineageWeatherManager =
+ getInternalInterfaceMap("ILineageWeatherManager");
//ELDERBERRY BEGIN
- icmWeatherManager.put("updateWeather", 1);
- icmWeatherManager.put("lookupCity ", 2);
- icmWeatherManager.put("registerWeatherServiceProviderChangeListener", 3);
- icmWeatherManager.put("unregisterWeatherServiceProviderChangeListener", 4);
- icmWeatherManager.put("getActiveWeatherServiceProviderLabel", 5);
- icmWeatherManager.put("cancelRequest", 6);
+ ilineageWeatherManager.put("updateWeather", 1);
+ ilineageWeatherManager.put("lookupCity ", 2);
+ ilineageWeatherManager.put("registerWeatherServiceProviderChangeListener", 3);
+ ilineageWeatherManager.put("unregisterWeatherServiceProviderChangeListener", 4);
+ ilineageWeatherManager.put("getActiveWeatherServiceProviderLabel", 5);
+ ilineageWeatherManager.put("cancelRequest", 6);
}
//RequestInfoListener Aidl (IRequestInfoListener)
diff --git a/tests/src/org/lineageos/tests/weather/unit/DayForecastBuilderTest.java b/tests/src/org/lineageos/tests/weather/unit/DayForecastBuilderTest.java
index 469b353b..70a8c7ea 100644
--- a/tests/src/org/lineageos/tests/weather/unit/DayForecastBuilderTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/DayForecastBuilderTest.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.providers.WeatherContract;
-import cyanogenmod.weather.WeatherInfo.DayForecast;
+import lineageos.providers.WeatherContract;
+import lineageos.weather.WeatherInfo.DayForecast;
public class DayForecastBuilderTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/weather/unit/LineageWeatherManagerTest.java b/tests/src/org/lineageos/tests/weather/unit/LineageWeatherManagerTest.java
index 3453c773..f6b23484 100644
--- a/tests/src/org/lineageos/tests/weather/unit/LineageWeatherManagerTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/LineageWeatherManagerTest.java
@@ -14,21 +14,21 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.location.Location;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.weather.CMWeatherManager;
-import cyanogenmod.weather.CMWeatherManager.LookupCityRequestListener;
-import cyanogenmod.weather.CMWeatherManager.WeatherServiceProviderChangeListener;
-import cyanogenmod.weather.CMWeatherManager.WeatherUpdateRequestListener;
-import cyanogenmod.weather.ICMWeatherManager;
-import cyanogenmod.weather.RequestInfo;
-import cyanogenmod.weather.WeatherInfo;
-import cyanogenmod.weather.WeatherLocation;
-import org.cyanogenmod.tests.common.MockIBinderStubForInterface;
+import lineageos.weather.LineageWeatherManager;
+import lineageos.weather.LineageWeatherManager.LookupCityRequestListener;
+import lineageos.weather.LineageWeatherManager.WeatherServiceProviderChangeListener;
+import lineageos.weather.LineageWeatherManager.WeatherUpdateRequestListener;
+import lineageos.weather.ILineageWeatherManager;
+import lineageos.weather.RequestInfo;
+import lineageos.weather.WeatherInfo;
+import lineageos.weather.WeatherLocation;
+import org.lineageos.tests.common.MockIBinderStubForInterface;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@@ -38,43 +38,43 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
-public class CMWeatherManagerTest extends AndroidTestCase {
+public class LineageWeatherManagerTest extends AndroidTestCase {
- private CMWeatherManager mWeatherManager;
+ private LineageWeatherManager mWeatherManager;
private static final String CITY_NAME = "Seattle, WA";
private static final int COUNTDOWN = 1;
private static final int REQUEST_ID = 42;
private static final String MOCKED_WEATHER_PROVIDER_LABEL = "Mock'd Weather Service";
- private ICMWeatherManager.Stub mICMWeatherManagerSpy;
+ private ILineageWeatherManager.Stub mILineageWeatherManagerSpy;
@Override
protected void setUp() throws Exception {
super.setUp();
- setUpMockICMWeatherManager();
+ setUpMockILineageWeatherManager();
}
- private void setUpMockICMWeatherManager() {
- mWeatherManager = CMWeatherManager.getInstance(getContext());
+ private void setUpMockILineageWeatherManager() {
+ mWeatherManager = LineageWeatherManager.getInstance(getContext());
Field f;
try {
f = mWeatherManager.getClass().getDeclaredField("sWeatherManagerService");
f.setAccessible(true);
- mICMWeatherManagerSpy
- = MockIBinderStubForInterface.getMockInterface(ICMWeatherManager.Stub.class);
- f.set(mWeatherManager, mICMWeatherManagerSpy);
+ mILineageWeatherManagerSpy
+ = MockIBinderStubForInterface.getMockInterface(ILineageWeatherManager.Stub.class);
+ f.set(mWeatherManager, mILineageWeatherManagerSpy);
Mockito.doAnswer(new WeatherUpdateRequestAnswer())
- .when(mICMWeatherManagerSpy).updateWeather(Mockito.any(RequestInfo.class));
+ .when(mILineageWeatherManagerSpy).updateWeather(Mockito.any(RequestInfo.class));
Mockito.doAnswer(new LookUpCityAnswer())
- .when(mICMWeatherManagerSpy).lookupCity(Mockito.any(RequestInfo.class));
+ .when(mILineageWeatherManagerSpy).lookupCity(Mockito.any(RequestInfo.class));
Mockito.doAnswer(new GetActiveWeatherServiceProviderLabelAnser())
- .when(mICMWeatherManagerSpy).getActiveWeatherServiceProviderLabel();
+ .when(mILineageWeatherManagerSpy).getActiveWeatherServiceProviderLabel();
Mockito.doAnswer(new CancelRequestAnswer())
- .when(mICMWeatherManagerSpy).cancelRequest(Mockito.eq(REQUEST_ID));
+ .when(mILineageWeatherManagerSpy).cancelRequest(Mockito.eq(REQUEST_ID));
} catch (Exception e) {
throw new AssertionError(e);
}
@@ -93,7 +93,7 @@ public class CMWeatherManagerTest extends AndroidTestCase {
final WeatherInfo weatherInfo = new WeatherInfo.Builder(CITY_NAME,
30d, requestInfo.getTemperatureUnit()).build();
requestInfo.getRequestListener().onWeatherRequestCompleted(requestInfo,
- CMWeatherManager.RequestStatus.COMPLETED, weatherInfo);
+ LineageWeatherManager.RequestStatus.COMPLETED, weatherInfo);
return REQUEST_ID;
}
}
@@ -108,7 +108,7 @@ public class CMWeatherManagerTest extends AndroidTestCase {
assertNotNull(cityName);
locations.add(new WeatherLocation.Builder(cityName).build());
requestInfo.getRequestListener().onLookupCityRequestCompleted(requestInfo,
- CMWeatherManager.RequestStatus.COMPLETED, locations);
+ LineageWeatherManager.RequestStatus.COMPLETED, locations);
return REQUEST_ID;
}
}
@@ -147,7 +147,7 @@ public class CMWeatherManagerTest extends AndroidTestCase {
public void onLookupCityRequestCompleted(int status,
List<WeatherLocation> locations) {
final int totalLocations = locations != null ? locations.size() : 0;
- if (status != CMWeatherManager.RequestStatus.COMPLETED
+ if (status != LineageWeatherManager.RequestStatus.COMPLETED
|| totalLocations < 1) {
error[0] = true;
}
@@ -197,7 +197,7 @@ public class CMWeatherManagerTest extends AndroidTestCase {
mWeatherManager.requestWeatherUpdate(weatherLocation, new WeatherUpdateRequestListener() {
@Override
public void onWeatherRequestCompleted(int status, WeatherInfo weatherInfo) {
- if (status != CMWeatherManager.RequestStatus.COMPLETED
+ if (status != LineageWeatherManager.RequestStatus.COMPLETED
|| !weatherInfo.getCity().equals(CITY_NAME)) {
error[0] = true;
}
@@ -220,7 +220,7 @@ public class CMWeatherManagerTest extends AndroidTestCase {
mWeatherManager.requestWeatherUpdate(location, new WeatherUpdateRequestListener() {
@Override
public void onWeatherRequestCompleted(int status, WeatherInfo weatherInfo) {
- if (status != CMWeatherManager.RequestStatus.COMPLETED
+ if (status != LineageWeatherManager.RequestStatus.COMPLETED
|| !weatherInfo.getCity().equals(CITY_NAME)) {
error[0] = true;
}
diff --git a/tests/src/org/lineageos/tests/weather/unit/MockWeatherProviderService.java b/tests/src/org/lineageos/tests/weather/unit/MockWeatherProviderService.java
index 34bcc9bf..83f6d6ea 100644
--- a/tests/src/org/lineageos/tests/weather/unit/MockWeatherProviderService.java
+++ b/tests/src/org/lineageos/tests/weather/unit/MockWeatherProviderService.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
-import cyanogenmod.weatherservice.ServiceRequest;
-import cyanogenmod.weatherservice.WeatherProviderService;
+import lineageos.weatherservice.ServiceRequest;
+import lineageos.weatherservice.WeatherProviderService;
import org.mockito.Mockito;
public class MockWeatherProviderService extends WeatherProviderService {
diff --git a/tests/src/org/lineageos/tests/weather/unit/ServiceRequestResultBuilderTest.java b/tests/src/org/lineageos/tests/weather/unit/ServiceRequestResultBuilderTest.java
index 069e3620..1befff61 100644
--- a/tests/src/org/lineageos/tests/weather/unit/ServiceRequestResultBuilderTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/ServiceRequestResultBuilderTest.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.providers.WeatherContract;
-import cyanogenmod.weather.WeatherInfo;
-import cyanogenmod.weather.WeatherLocation;
-import cyanogenmod.weatherservice.ServiceRequestResult;
+import lineageos.providers.WeatherContract;
+import lineageos.weather.WeatherInfo;
+import lineageos.weather.WeatherLocation;
+import lineageos.weatherservice.ServiceRequestResult;
import java.util.ArrayList;
import java.util.List;
diff --git a/tests/src/org/lineageos/tests/weather/unit/WeatherInfoBuilderTest.java b/tests/src/org/lineageos/tests/weather/unit/WeatherInfoBuilderTest.java
index 22d0e418..bc1dd100 100644
--- a/tests/src/org/lineageos/tests/weather/unit/WeatherInfoBuilderTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/WeatherInfoBuilderTest.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.providers.WeatherContract;
-import cyanogenmod.weather.WeatherInfo;
+import lineageos.providers.WeatherContract;
+import lineageos.weather.WeatherInfo;
public class WeatherInfoBuilderTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/weather/unit/WeatherLocationBuilderTest.java b/tests/src/org/lineageos/tests/weather/unit/WeatherLocationBuilderTest.java
index 852163c2..b6d9c207 100644
--- a/tests/src/org/lineageos/tests/weather/unit/WeatherLocationBuilderTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/WeatherLocationBuilderTest.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.os.Parcel;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import cyanogenmod.weather.WeatherLocation;
+import lineageos.weather.WeatherLocation;
public class WeatherLocationBuilderTest extends AndroidTestCase {
diff --git a/tests/src/org/lineageos/tests/weather/unit/WeatherProviderServiceTest.java b/tests/src/org/lineageos/tests/weather/unit/WeatherProviderServiceTest.java
index fd1e2ff7..bce369d4 100644
--- a/tests/src/org/lineageos/tests/weather/unit/WeatherProviderServiceTest.java
+++ b/tests/src/org/lineageos/tests/weather/unit/WeatherProviderServiceTest.java
@@ -14,19 +14,19 @@
* limitations under the License.
*/
-package org.cyanogenmod.tests.weather.unit;
+package org.lineageos.tests.weather.unit;
import android.location.Location;
import android.os.IBinder;
-import cyanogenmod.weather.CMWeatherManager;
-import cyanogenmod.weather.RequestInfo;
-import cyanogenmod.weather.WeatherLocation;
-import cyanogenmod.weatherservice.IWeatherProviderService;
-import cyanogenmod.weatherservice.IWeatherProviderServiceClient;
-import cyanogenmod.weatherservice.ServiceRequest;
-import cyanogenmod.weatherservice.ServiceRequestResult;
-import org.cyanogenmod.tests.common.MockIBinderStubForInterface;
-import org.cyanogenmod.tests.common.ThreadServiceTestCase;
+import lineageos.weather.LineageWeatherManager;
+import lineageos.weather.RequestInfo;
+import lineageos.weather.WeatherLocation;
+import lineageos.weatherservice.IWeatherProviderService;
+import lineageos.weatherservice.IWeatherProviderServiceClient;
+import lineageos.weatherservice.ServiceRequest;
+import lineageos.weatherservice.ServiceRequestResult;
+import org.lineageos.tests.common.MockIBinderStubForInterface;
+import org.lineageos.tests.common.ThreadServiceTestCase;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
@@ -150,7 +150,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
int result = (int) invocation.getArguments()[2];
assertNotNull(requestInfo);
- assertEquals(result, CMWeatherManager.RequestStatus.FAILED);
+ assertEquals(result, LineageWeatherManager.RequestStatus.FAILED);
latch.countDown();
return null;
@@ -158,7 +158,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
}).when(client)
.setServiceRequestState(Mockito.any(RequestInfo.class),
Mockito.any(ServiceRequestResult.class),
- Mockito.eq(CMWeatherManager.RequestStatus.FAILED));
+ Mockito.eq(LineageWeatherManager.RequestStatus.FAILED));
Mockito.doAnswer(new Answer() {
@Override
@@ -168,7 +168,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
int result = (int) invocation.getArguments()[2];
assertNotNull(requestInfo);
- assertEquals(result, CMWeatherManager.RequestStatus.SUBMITTED_TOO_SOON);
+ assertEquals(result, LineageWeatherManager.RequestStatus.SUBMITTED_TOO_SOON);
latch.countDown();
return null;
@@ -176,7 +176,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
}).when(client)
.setServiceRequestState(Mockito.any(RequestInfo.class),
Mockito.any(ServiceRequestResult.class),
- Mockito.eq(CMWeatherManager.RequestStatus.SUBMITTED_TOO_SOON));
+ Mockito.eq(LineageWeatherManager.RequestStatus.SUBMITTED_TOO_SOON));
Mockito.doAnswer(new Answer() {
@Override
@@ -189,7 +189,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
assertNotNull(requestInfo);
assertNotNull(requestResult);
assertNotNull(requestResult.getLocationLookupList());
- assertEquals(result, CMWeatherManager.RequestStatus.COMPLETED);
+ assertEquals(result, LineageWeatherManager.RequestStatus.COMPLETED);
latch.countDown();
return null;
@@ -197,7 +197,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
}).when(client)
.setServiceRequestState(Mockito.any(RequestInfo.class),
Mockito.any(ServiceRequestResult.class),
- Mockito.eq(CMWeatherManager.RequestStatus.COMPLETED));
+ Mockito.eq(LineageWeatherManager.RequestStatus.COMPLETED));
provider.setServiceClient(client);
@@ -232,7 +232,7 @@ public class WeatherProviderServiceTest extends ThreadServiceTestCase<MockWeathe
.onRequestSubmitted(params.capture());
ServiceRequest request = params.getValue();
- request.reject(CMWeatherManager.RequestStatus.SUBMITTED_TOO_SOON);
+ request.reject(LineageWeatherManager.RequestStatus.SUBMITTED_TOO_SOON);
}
});