Skip to content

Commit

Permalink
[ci][android] remove xiaomi specific build since it's not used
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Koshura <[email protected]>
  • Loading branch information
AenBleidd committed Feb 22, 2025
1 parent 9bca14f commit 2b33517
Show file tree
Hide file tree
Showing 41 changed files with 34 additions and 784 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
# Copyright (C) 2023 University of California
# https://boinc.berkeley.edu
# Copyright (C) 2025 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
needs: build-client
strategy:
matrix:
task: [assembleRelease, assembleXiaomi_release, assembleArmv6_release, jacocoTestReportDebug]
task: [assembleRelease, assembleArmv6_release, jacocoTestReportDebug]
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand Down Expand Up @@ -172,13 +172,6 @@ jobs:
name: android_manager_${{ github.event.pull_request.head.sha }}
path: deploy/android_manager.7z

- name: Upload xiaomi manager
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ matrix.task == 'assembleXiaomi_release' }}
with:
name: android_xiaomi_manager_${{ github.event.pull_request.head.sha }}
path: deploy/android_manager_xiaomi.7z

- name: Upload armv6 only manager
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
if: ${{ matrix.task == 'assembleArmv6_release' }}
Expand Down
25 changes: 17 additions & 8 deletions android/BOINC/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// This file is part of BOINC.
// https://boinc.berkeley.edu
// Copyright (C) 2025 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

plugins {
id 'org.ajoberstar.grgit'
id 'jacoco'
Expand Down Expand Up @@ -355,14 +372,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.txt'
}

xiaomi_release {
initWith release
}

xiaomi_debug {
initWith debug
}

armv6_release {
initWith release
}
Expand Down
16 changes: 2 additions & 14 deletions android/BOINC/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?><!--
This file is part of BOINC.
http://boinc.berkeley.edu
Copyright (C) 2022 University of California
https://boinc.berkeley.edu
Copyright (C) 2025 University of California
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -110,18 +110,6 @@
<activity
android:name=".attach.BatchConflictListActivity"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".LicenseActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:noHistory="true"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".WelcomeActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:noHistory="true"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".attach.AttachActivity"
android:theme="@style/AppTheme.NoActionBar" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2021 University of California
* https://boinc.berkeley.edu
* Copyright (C) 2025 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -73,8 +73,6 @@ int getBatteryChargeStatus(); // implement: return getDeviceStatus().g
String getAuthFilePath(); // implement: return Monitor.getAuthFilePath();
int getBoincPlatform(); // should be not necessary to be implemented as monitor interface
void cancelNoticeNotification();
boolean getWelcomeStateFile();
void setWelcomeStateFile();
boolean quitClient();
/////// client status //////////////////////////////////////////
boolean getAcctMgrInfoPresent(); // clientStatus.getAcctMgrInfo().present;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2021 University of California
* https://boinc.berkeley.edu
* Copyright (C) 2025 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -54,7 +54,6 @@ import edu.berkeley.boinc.utils.getBitmapFromVectorDrawable
class SplashActivity : AppCompatActivity() {
private var binding: ActivitySplashBinding? = null
private var mIsBound = false
private var mIsWelcomeSpecificFirstRun = true
private val mConnection: ServiceConnection = object : ServiceConnection {
override fun onServiceConnected(className: ComponentName, service: IBinder) {
// This is called when the connection with the service has been established
Expand All @@ -65,8 +64,6 @@ class SplashActivity : AppCompatActivity() {
if (!isMutexAcquiredAsync().await()) {
showNotExclusiveDialog()
}
mIsWelcomeSpecificFirstRun =
BuildConfig.BUILD_TYPE.contains("xiaomi") && !monitor!!.welcomeStateFile
// Read log level from monitor preferences and adjust accordingly
setLogLevel(monitor!!.logLevel)
setLogCategories(monitor!!.logCategories)
Expand All @@ -85,10 +82,6 @@ class SplashActivity : AppCompatActivity() {
override fun onReceive(context: Context, intent: Intent) {
if (mIsBound) {
try {
if (mIsWelcomeSpecificFirstRun) {
startActivity(Intent(this@SplashActivity, LicenseActivity::class.java))
return
}
when (monitor!!.setupStatus) {
ClientStatus.SETUP_STATUS_AVAILABLE -> {
Logging.logDebug(Logging.Category.GUI_ACTIVITY, "SplashActivity SETUP_STATUS_AVAILABLE")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2021 University of California
* https://boinc.berkeley.edu
* Copyright (C) 2025 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -32,7 +32,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.getSystemService
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import edu.berkeley.boinc.BuildConfig
import edu.berkeley.boinc.R
import edu.berkeley.boinc.adapter.ProjectListEntry
import edu.berkeley.boinc.adapter.SelectionRecyclerViewAdapter
Expand Down Expand Up @@ -146,9 +145,6 @@ class SelectionListActivity : AppCompatActivity() {
// the Monitor object that is needed to call functions.
monitor = IMonitor.Stub.asInterface(service)
mIsBound = true
if (BuildConfig.BUILD_TYPE.contains("xiaomi")) {
monitor!!.setWelcomeStateFile()
}
lifecycleScope.launch {
updateProjectList()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of BOINC.
* https://boinc.berkeley.edu
* Copyright (C) 2022 University of California
* Copyright (C) 2025 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -97,7 +97,6 @@ class Monitor : LifecycleService() {
private lateinit var fileNameNoMedia: String
private lateinit var boincWorkingDir: String
private lateinit var clientSocketAddress: String
private lateinit var fileNameWelcomeState: String

private var clientStatusInterval by Delegates.notNull<Int>()
private var deviceStatusIntervalScreenOff: Int = 0
Expand Down Expand Up @@ -204,7 +203,6 @@ class Monitor : LifecycleService() {
fileNameGuiAuthentication = getString(R.string.auth_file_name)
fileNameAllProjectsList = getString(R.string.all_projects_list)
fileNameNoMedia = getString(R.string.nomedia)
fileNameWelcomeState = "welcome.state"
clientStatusInterval = resources.getInteger(R.integer.status_update_interval_ms)
deviceStatusIntervalScreenOff =
resources.getInteger(R.integer.device_status_update_screen_off_every_X_loop)
Expand Down Expand Up @@ -311,18 +309,6 @@ class Monitor : LifecycleService() {
} // throws IllegalStateException if called after timer got cancelled, i.e. after manual shutdown
}

fun getWelcomeStateFile(): Boolean {
val file = File(boincWorkingDir + fileNameWelcomeState)
return file.exists()
}

fun setWelcomeStateFile() {
val file = File(boincWorkingDir + fileNameWelcomeState)
if (!file.exists()) {
file.createNewFile()
}
}

//Kill boinc client nicely
fun quitClient(): Boolean {
if (clientInterface.isConnected) {
Expand Down Expand Up @@ -1097,16 +1083,6 @@ class Monitor : LifecycleService() {
this@Monitor.forceRefresh()
}

@Throws(RemoteException::class)
override fun getWelcomeStateFile(): Boolean {
return this@Monitor.getWelcomeStateFile()
}

@Throws(RemoteException::class)
override fun setWelcomeStateFile() {
this@Monitor.setWelcomeStateFile()
}

@Throws(RemoteException::class)
override fun createAccountPolling(information: AccountIn): AccountOut {
return clientInterface.createAccountPolling(information)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2021 University of California
* https://boinc.berkeley.edu
* Copyright (C) 2025 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -203,14 +203,6 @@ class MonitorAsync(monitor: IMonitor?) : IMonitor {
return monitor.showNotificationDuringSuspend
}

override fun getWelcomeStateFile(): Boolean {
return monitor.welcomeStateFile
}

override fun setWelcomeStateFile() {
return monitor.setWelcomeStateFile()
}

override fun quitClient(): Boolean {
return monitor.quitClient()
}
Expand Down
Loading

0 comments on commit 2b33517

Please sign in to comment.