MOBILE-3839 core: Remove unused SystemUI code
parent
ad4117fa87
commit
ce5e4a0e35
|
@ -7,14 +7,10 @@
|
||||||
</js-module>
|
</js-module>
|
||||||
<platform name="android">
|
<platform name="android">
|
||||||
<config-file target="res/xml/config.xml" parent="/*">
|
<config-file target="res/xml/config.xml" parent="/*">
|
||||||
<feature name="SystemUI">
|
|
||||||
<param name="android-package" value="com.moodle.moodlemobile.SystemUI"/>
|
|
||||||
</feature>
|
|
||||||
<feature name="SecureStorage">
|
<feature name="SecureStorage">
|
||||||
<param name="android-package" value="com.moodle.moodlemobile.SecureStorage"/>
|
<param name="android-package" value="com.moodle.moodlemobile.SecureStorage"/>
|
||||||
</feature>
|
</feature>
|
||||||
</config-file>
|
</config-file>
|
||||||
<source-file src="src/android/SystemUI.java" target-dir="src/com/moodle/moodlemobile" />
|
|
||||||
<source-file src="src/android/SecureStorage.java" target-dir="src/com/moodle/moodlemobile" />
|
<source-file src="src/android/SecureStorage.java" target-dir="src/com/moodle/moodlemobile" />
|
||||||
</platform>
|
</platform>
|
||||||
<platform name="ios">
|
<platform name="ios">
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
// (C) Copyright 2015 Moodle Pty Ltd.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package com.moodle.moodlemobile;
|
|
||||||
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.Window;
|
|
||||||
|
|
||||||
import org.apache.cordova.CordovaPlugin;
|
|
||||||
import org.apache.cordova.CallbackContext;
|
|
||||||
|
|
||||||
import org.json.JSONArray;
|
|
||||||
|
|
||||||
public class SystemUI extends CordovaPlugin {
|
|
||||||
|
|
||||||
private static final String TAG = "SystemUI";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
|
|
||||||
try {
|
|
||||||
switch (action) {
|
|
||||||
// No actions yet.
|
|
||||||
}
|
|
||||||
} catch (Throwable e) {
|
|
||||||
Log.e(TAG, "Failed executing action: " + action, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -12,11 +12,9 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { SystemUI } from './plugins/SystemUI';
|
|
||||||
import { SecureStorage } from './plugins/SecureStorage';
|
import { SecureStorage } from './plugins/SecureStorage';
|
||||||
|
|
||||||
const api: MoodleAppPlugins = {
|
const api: MoodleAppPlugins = {
|
||||||
systemUI: new SystemUI(),
|
|
||||||
secureStorage: new SecureStorage(),
|
secureStorage: new SecureStorage(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
// (C) Copyright 2015 Moodle Pty Ltd.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Manages system UI settings.
|
|
||||||
*/
|
|
||||||
export class SystemUI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set navigation bar color.
|
|
||||||
*
|
|
||||||
* @param color Color.
|
|
||||||
*/
|
|
||||||
async setNavigationBarColor(color: string): Promise<void> {
|
|
||||||
await new Promise((resolve, reject) => {
|
|
||||||
cordova.exec(resolve, reject, 'SystemUI', 'setNavigationBarColor', [color]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -12,13 +12,11 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { SystemUI } from '../src/ts/plugins/SystemUI';
|
|
||||||
import { SecureStorage } from '../src/ts/plugins/SecureStorage';
|
import { SecureStorage } from '../src/ts/plugins/SecureStorage';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
|
||||||
interface MoodleAppPlugins {
|
interface MoodleAppPlugins {
|
||||||
systemUI: SystemUI;
|
|
||||||
secureStorage: SecureStorage;
|
secureStorage: SecureStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue