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

Commit 0701952a authored by Jan Nordqvist's avatar Jan Nordqvist
Browse files

FlowService turned into separate process.

Introduced new much improved remediation handler.
Current incomplete code check-in.
Changing package name to osu.
Much improved and separated flow process.
Adding in-process web-view.

Change-Id: I08e6a19cad88b37f9a01571ea69de23214d97db1
parent 91b43d50
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
	src/com/android/hotspot2/app/IOSUAccessor.aidl \
	src/com/android/hotspot2/flow/IFlowService.aidl

LOCAL_JAVA_LIBRARIES := telephony-common ims-common bouncycastle conscrypt

+26 −28
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * 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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android">
    package="com.android.hotspot2">
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
@@ -12,13 +29,12 @@
    <uses-permission android:name="android.permission.INTERNET" />

    <application
	android:enabled="false"
	android:enabled="true"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
	android:persistent="true"
        android:supportsRtl="true">
        <activity android:name=".MainActivity">
        <activity android:name="com.android.hotspot2.app.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
@@ -28,30 +44,12 @@
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
	<receiver android:name="com.android.MainActivity$WifiReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.SCAN_RESULTS" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.PASSPOINT_WNM_FRAME_RECEIVED" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.PASSPOINT_ICON_RECEIVED" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.CONFIGURED_NETWORKS_CHANGE" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.WIFI_STATE_CHANGED" android:enabled="true"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.STATE_CHANGE" android:enabled="true"/>
            </intent-filter>
	</receiver>
	<service android:name="com.android.MainActivity$OSUService" />
        <activity android:name="com.android.hotspot2.osu.OSUWebView">
        </activity>
	<service android:name=".app.OSUService">
	</service>
	<service android:name=".flow.FlowService" android:process=":osuflow">
	</service>
    </application>

</manifest>
+13 −0
Original line number Diff line number Diff line
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true" />

</FrameLayout>
+17 −0
Original line number Diff line number Diff line
package com.android.anqp;

import android.os.Parcel;

import com.android.hotspot2.Utils;

import java.net.ProtocolException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
@@ -71,4 +75,17 @@ public class HSIconFileElement extends ANQPElement {
                ", type='" + mType + '\'' +
                ", iconData=" + mIconData.length + " bytes }";
    }

    public HSIconFileElement(Parcel in) {
        super(Constants.ANQPElementType.HSIconFile);
        mStatusCode = Utils.mapEnum(in.readInt(), StatusCode.class);
        mType = in.readString();
        mIconData = in.readBlob();
    }

    public void writeParcel(Parcel out) {
        out.writeInt(mStatusCode.ordinal());
        out.writeString(mType);
        out.writeBlob(mIconData);
    }
}
+13 −0
Original line number Diff line number Diff line
package com.android.anqp;

import android.os.Parcel;

import java.io.IOException;
import java.net.ProtocolException;
import java.nio.ByteBuffer;
@@ -77,4 +79,15 @@ public class I18Name {
    public String toString() {
        return mText + ':' + mLocale.getLanguage();
    }

    public I18Name(Parcel in) throws IOException {
        mLanguage = in.readString();
        mText = in.readString();
        mLocale = Locale.forLanguageTag(mLanguage);
    }

    public void writeParcel(Parcel out) {
        out.writeString(mLanguage);
        out.writeString(mText);
    }
}
Loading