mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-27 23:40:31 +02:00
659165fa4c
- properly intert apps reported from pebble into the corresponding tab - disable tracking of installed apps - disable drag and drop for apps and watchfaces - ...
44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
package nodomain.freeyourgadget.gadgetbridge.activities.appmanager;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
|
|
|
public class AppManagerFragmentInstalledApps extends AbstractAppManagerFragment {
|
|
@Override
|
|
protected void refreshList() {
|
|
appList.clear();
|
|
ArrayList uuids = AppManagerActivity.getUuidsFromFile(getSortFilename());
|
|
if (uuids.isEmpty()) {
|
|
appList.addAll(getSystemApps());
|
|
for (GBDeviceApp gbDeviceApp : appList) {
|
|
uuids.add(gbDeviceApp.getUUID());
|
|
}
|
|
AppManagerActivity.rewriteAppOrderFile(getSortFilename(), uuids);
|
|
} else {
|
|
appList.addAll(getCachedApps(uuids));
|
|
}
|
|
}
|
|
|
|
@Override
|
|
protected boolean isCacheManager() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected String getSortFilename() {
|
|
return mGBDevice.getAddress() + ".watchapps";
|
|
}
|
|
|
|
@Override
|
|
protected void onChangedAppOrder() {
|
|
super.onChangedAppOrder();
|
|
sendOrderToDevice(mGBDevice.getAddress() + ".watchfaces");
|
|
}
|
|
|
|
@Override
|
|
protected boolean filterApp(GBDeviceApp gbDeviceApp) {
|
|
return gbDeviceApp.getType() == GBDeviceApp.Type.APP_ACTIVITYTRACKER || gbDeviceApp.getType() == GBDeviceApp.Type.APP_GENERIC;
|
|
}
|
|
}
|