2020-01-09 10:44:32 +01:00
|
|
|
/* Copyright (C) 2016-2020 Andreas Shimokawa
|
2017-03-10 14:53:19 +01:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2016-06-14 20:04:54 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.activities.appmanager;
|
|
|
|
|
2016-06-17 22:43:06 +02:00
|
|
|
import java.util.ArrayList;
|
2016-11-09 19:20:37 +01:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
2016-06-17 22:43:06 +02:00
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
|
|
|
|
2016-06-14 20:04:54 +02:00
|
|
|
public class AppManagerFragmentInstalledWatchfaces extends AbstractAppManagerFragment {
|
2016-11-09 19:20:37 +01:00
|
|
|
|
2016-06-14 20:04:54 +02:00
|
|
|
@Override
|
2016-11-09 19:20:37 +01:00
|
|
|
protected List<GBDeviceApp> getSystemAppsInCategory() {
|
|
|
|
List<GBDeviceApp> systemWatchfaces = new ArrayList<>();
|
|
|
|
systemWatchfaces.add(new GBDeviceApp(UUID.fromString("8f3c8686-31a1-4f5f-91f5-01600c9bdc59"), "Tic Toc (System)", "Pebble Inc.", "", GBDeviceApp.Type.WATCHFACE_SYSTEM));
|
2016-11-24 22:09:27 +01:00
|
|
|
systemWatchfaces.add(new GBDeviceApp(UUID.fromString("3af858c3-16cb-4561-91e7-f1ad2df8725f"), "Kickstart (System)", "Pebble Inc.", "", GBDeviceApp.Type.WATCHFACE_SYSTEM));
|
2016-11-09 19:20:37 +01:00
|
|
|
return systemWatchfaces;
|
2016-06-14 20:04:54 +02:00
|
|
|
}
|
2016-06-15 19:56:34 +02:00
|
|
|
|
2016-06-24 13:39:29 +02:00
|
|
|
@Override
|
|
|
|
protected boolean isCacheManager() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-06-17 22:43:06 +02:00
|
|
|
@Override
|
|
|
|
protected String getSortFilename() {
|
2016-06-15 19:56:34 +02:00
|
|
|
return mGBDevice.getAddress() + ".watchfaces";
|
|
|
|
}
|
2016-06-17 22:43:06 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onChangedAppOrder() {
|
|
|
|
super.onChangedAppOrder();
|
|
|
|
sendOrderToDevice(mGBDevice.getAddress() + ".watchapps");
|
|
|
|
}
|
2016-06-24 13:39:29 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected boolean filterApp(GBDeviceApp gbDeviceApp) {
|
|
|
|
if (gbDeviceApp.getType() == GBDeviceApp.Type.WATCHFACE) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2016-06-14 20:04:54 +02:00
|
|
|
}
|