use of com.android.settingslib.applications.instantapps.InstantAppDataProvider in project android_packages_apps_Settings by crdroidandroid.
the class AdvancedPowerUsageDetailTest method testInitHeader_HasAppEntry_InstantApp.
@Test
public void testInitHeader_HasAppEntry_InstantApp() {
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider", new InstantAppDataProvider() {
@Override
public boolean isInstantApp(ApplicationInfo info) {
return true;
}
});
mFragment.mAppEntry = mAppEntry;
mFragment.initHeader();
verify(mEntityHeaderController).setIcon(mAppEntry);
verify(mEntityHeaderController).setLabel(mAppEntry);
verify(mEntityHeaderController).setIsInstantApp(true);
verify(mEntityHeaderController).setSummary((CharSequence) null);
}
use of com.android.settingslib.applications.instantapps.InstantAppDataProvider in project android_packages_apps_Settings by crdroidandroid.
the class AdvancedPowerUsageDetailTest method testInitHeader_HasAppEntry_BuildByAppEntry.
@Test
public void testInitHeader_HasAppEntry_BuildByAppEntry() {
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider", new InstantAppDataProvider() {
@Override
public boolean isInstantApp(ApplicationInfo info) {
return false;
}
});
mFragment.mAppEntry = mAppEntry;
mFragment.initHeader();
verify(mEntityHeaderController).setIcon(mAppEntry);
verify(mEntityHeaderController).setLabel(mAppEntry);
verify(mEntityHeaderController).setIsInstantApp(false);
}
use of com.android.settingslib.applications.instantapps.InstantAppDataProvider in project android_packages_apps_Settings by SudaMod.
the class AdvancedPowerUsageDetailTest method testInitHeader_HasAppEntry_InstantApp.
@Test
public void testInitHeader_HasAppEntry_InstantApp() {
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider", new InstantAppDataProvider() {
@Override
public boolean isInstantApp(ApplicationInfo info) {
return true;
}
});
mFragment.mAppEntry = mAppEntry;
mFragment.initHeader();
verify(mEntityHeaderController).setIcon(mAppEntry);
verify(mEntityHeaderController).setLabel(mAppEntry);
verify(mEntityHeaderController).setIsInstantApp(true);
verify(mEntityHeaderController).setSummary((CharSequence) null);
}
use of com.android.settingslib.applications.instantapps.InstantAppDataProvider in project android_packages_apps_Settings by SudaMod.
the class AppButtonsPreferenceControllerTest method testIsAvailable_instantApp.
@Test
public void testIsAvailable_instantApp() throws Exception {
mController.mAppEntry = mAppEntry;
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider", new InstantAppDataProvider() {
@Override
public boolean isInstantApp(ApplicationInfo info) {
return true;
}
});
assertThat(mController.isAvailable()).isFalse();
}
use of com.android.settingslib.applications.instantapps.InstantAppDataProvider in project platform_packages_apps_Settings by BlissRoms.
the class AdvancedPowerUsageDetailTest method testInitHeader_HasAppEntry_InstantApp.
@Test
public void testInitHeader_HasAppEntry_InstantApp() {
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider", new InstantAppDataProvider() {
@Override
public boolean isInstantApp(ApplicationInfo info) {
return true;
}
});
mFragment.mAppEntry = mAppEntry;
mFragment.initHeader();
verify(mEntityHeaderController).setIcon(mAppEntry);
verify(mEntityHeaderController).setLabel(mAppEntry);
verify(mEntityHeaderController).setIsInstantApp(true);
verify(mEntityHeaderController).setSummary((CharSequence) null);
}
Aggregations