Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit cb2700ea authored by Danny Lin's avatar Danny Lin
Browse files

fastboot: Fix unused argument warnings

These arguments are supposed to be present in order to conform to the
types, so prefix them with _ to suppress the warnings.
parent f5ac1e2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ export async function flashZip(
    blob: Blob,
    wipe: boolean,
    onReconnect: ReconnectCallback,
    onProgress: FactoryProgressCallback = (action: string, item: string, progress: number) => {}
    onProgress: FactoryProgressCallback = (_action: string, _item: string, _progress: number) => {}
) {
    onProgress("load", "package", 0.0);
    let reader = new ZipReader(new BlobReader(blob));
+3 −3
Original line number Diff line number Diff line
@@ -431,7 +431,7 @@ export class FastbootDevice {
     * @param {FlashProgressCallback} onProgress - Callback for upload progress updates.
     * @throws {FastbootError}
     */
    async upload(partition: string, buffer: ArrayBuffer, onProgress: FlashProgressCallback = (progress) => {}) {
    async upload(partition: string, buffer: ArrayBuffer, onProgress: FlashProgressCallback = (_progress) => {}) {
        common.logDebug(
            `Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`
        );
@@ -500,7 +500,7 @@ export class FastbootDevice {
     * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.
     * @throws {FastbootError}
     */
    async flashBlob(partition: string, blob: Blob, onProgress: FlashProgressCallback = (progress) => {}) {
    async flashBlob(partition: string, blob: Blob, onProgress: FlashProgressCallback = (_progress) => {}) {
        // Use current slot if partition is A/B
        if ((await this.getVariable(`has-slot:${partition}`)) === "yes") {
            partition += "_" + (await this.getVariable("current-slot"));
@@ -577,7 +577,7 @@ export class FastbootDevice {
     * @param {ReconnectCallback} onReconnect - Callback to request device reconnection.
     * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing.
     */
    async flashFactoryZip(blob: Blob, wipe: boolean, onReconnect: ReconnectCallback, onProgress: FactoryProgressCallback = (progress) => {}) {
    async flashFactoryZip(blob: Blob, wipe: boolean, onReconnect: ReconnectCallback, onProgress: FactoryProgressCallback = (_progress) => {}) {
        return await flashFactoryZip(this, blob, wipe, onReconnect, onProgress);
    }
}